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

fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement #34425

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shijie-328931589
Copy link

@shijie-328931589 shijie-328931589 commented Jan 22, 2025

Fixes 34424

Changes proposed in this pull request:


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

@strongduanmu
Copy link
Member

strongduanmu commented Jan 22, 2025

Hi @shijie-328931589, can you update release note? Besides, you need add an sql parser test for this change.

@@ -34,7 +34,7 @@ public final class PostgreSQLInsertStatement extends InsertStatement implements

private WithSegment withSegment;

private OnDuplicateKeyColumnsSegment onDuplicateKeyColumnsSegment;
private OnDuplicateKeyColumnsSegment onDuplicateKeyColumns;
Copy link
Member

Choose a reason for hiding this comment

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

Can you check openGauss insert statement? Since they are same database dialect.

Copy link
Author

Choose a reason for hiding this comment

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

yes, they have the same problem

@@ -45,7 +45,7 @@ public Optional<WithSegment> getWithSegment() {

@Override
public Optional<OnDuplicateKeyColumnsSegment> getOnDuplicateKeyColumns() {
return Optional.ofNullable(onDuplicateKeyColumnsSegment);
return Optional.ofNullable(onDuplicateKeyColumns);
Copy link
Member

Choose a reason for hiding this comment

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

Besides, you need add sql parser test for this change.

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.

No value specified for parameter exception when use postgresql on duplicate
3 participants