You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "shijie-328931589 (via GitHub)" <gi...@apache.org> on 2025/01/22 02:24:37 UTC

[PR] fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement [shardingsphere]

shijie-328931589 opened a new pull request, #34425:
URL: https://github.com/apache/shardingsphere/pull/34425

   Fixes [34424](https://github.com/apache/shardingsphere/issues/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](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 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](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on PR #34425:
URL: https://github.com/apache/shardingsphere/pull/34425#issuecomment-2606940118

   Hi @shijie-328931589, can you update release note?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu merged PR #34425:
URL: https://github.com/apache/shardingsphere/pull/34425


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement [shardingsphere]

Posted by "shijie-328931589 (via GitHub)" <gi...@apache.org>.
shijie-328931589 commented on code in PR #34425:
URL: https://github.com/apache/shardingsphere/pull/34425#discussion_r1926294173


##########
parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLInsertStatement.java:
##########
@@ -34,7 +34,7 @@ public final class PostgreSQLInsertStatement extends InsertStatement implements
     
     private WithSegment withSegment;
     
-    private OnDuplicateKeyColumnsSegment onDuplicateKeyColumnsSegment;
+    private OnDuplicateKeyColumnsSegment onDuplicateKeyColumns;

Review Comment:
   yes, they have the same problem



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix set OnDuplicateKeyColumnsSegment on PostgreSQLInsertStatement [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #34425:
URL: https://github.com/apache/shardingsphere/pull/34425#discussion_r1925135199


##########
parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLInsertStatement.java:
##########
@@ -34,7 +34,7 @@ public final class PostgreSQLInsertStatement extends InsertStatement implements
     
     private WithSegment withSegment;
     
-    private OnDuplicateKeyColumnsSegment onDuplicateKeyColumnsSegment;
+    private OnDuplicateKeyColumnsSegment onDuplicateKeyColumns;

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



##########
parser/sql/statement/type/postgresql/src/main/java/org/apache/shardingsphere/sql/parser/statement/postgresql/dml/PostgreSQLInsertStatement.java:
##########
@@ -45,7 +45,7 @@ public Optional<WithSegment> getWithSegment() {
     
     @Override
     public Optional<OnDuplicateKeyColumnsSegment> getOnDuplicateKeyColumns() {
-        return Optional.ofNullable(onDuplicateKeyColumnsSegment);
+        return Optional.ofNullable(onDuplicateKeyColumns);

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org