Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #32280/ bug fix: WHERE segment with ON CONFLICT segment in INSERT throws exception #2

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

omkar-shitole
Copy link
Owner

@omkar-shitole omkar-shitole commented Dec 31, 2024

…ement of postgres

Fixes apache#32280

Changes proposed in this pull request:

  • Added flow for whereSegment in onConflictKeyColumnSegment which was missing and required. The current flow is more intent on the on_duplicate of MySQL than on_conflict in Postgres which has been added in Postgres after Postgres 9.
  • While using ON CONFLICT with INSERT INTO statement in Postgres it was throwing an exception (no value specified for parameter) as it was not able to set the flow for where statement present in the optOnConflict rule which was eventually failing to read parameter markers expressions and assignments present in whereSegment
  • This fix resolves the error and ensures the successful execution of the INSERT INTO statement. The flow for ON DUPLICATE has not been removed or altered for now, as It may be useful for certain conditions of older versions of Postgres (and can be deprecated in future if no use case is observed for long)

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@omkar-shitole omkar-shitole merged commit ed4a82e into master Jan 2, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant