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

Support PostgreSQL do nothing conflict action #31048

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

TherChenYang
Copy link
Collaborator

Fixes #31046.

Changes proposed in this pull request:

  • Support PostgreSQL do nothing conflict action

This submission resolves the NullPointerException of the following SQL.

INSERT INTO sj_event ( event_id, event_type, event_status, content, create_time, update_time )
VALUES (?,?,?,?,?,?) ON CONFLICT ( event_id ) DO NOTHING

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.

Copy link
Member

@strongduanmu strongduanmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, merged. @TherChenYang Please check if openGauss has the same problem?

@strongduanmu strongduanmu merged commit b910c87 into apache:master Apr 29, 2024
143 checks passed
@TherChenYang
Copy link
Collaborator Author

@strongduanmu Okay, I will check it

@TherChenYang TherChenYang deleted the 31046 branch April 29, 2024 02:46
@TherChenYang
Copy link
Collaborator Author

@strongduanmu I have completed the check, and there are no same issues in openGauss. The upfront null check has been done in the code.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.NullPointerException when execute postgresql sql contains ON CONFLICT DO NOTHING
2 participants