Skip to content

Fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement#34425

Merged
strongduanmu merged 2 commits intoapache:masterfrom
shijie-328931589:feature/fix-postgresql-insert-statement-0122
Jan 31, 2025
Merged

Fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement#34425
strongduanmu merged 2 commits intoapache:masterfrom
shijie-328931589:feature/fix-postgresql-insert-statement-0122

Conversation

@shijie-328931589
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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.

private WithSegment withSegment;

private OnDuplicateKeyColumnsSegment onDuplicateKeyColumnsSegment;
private OnDuplicateKeyColumnsSegment onDuplicateKeyColumns;
Copy link
Copy Markdown
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
Copy Markdown
Contributor 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

@Override
public Optional<OnDuplicateKeyColumnsSegment> getOnDuplicateKeyColumns() {
return Optional.ofNullable(onDuplicateKeyColumnsSegment);
return Optional.ofNullable(onDuplicateKeyColumns);
Copy link
Copy Markdown
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.

@strongduanmu strongduanmu changed the title fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement Fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement Jan 31, 2025
Copy link
Copy Markdown
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.

LGTM, merged.

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