dssysolyatin commented on code in PR #4572:
URL: https://github.com/apache/calcite/pull/4572#discussion_r2449495723


##########
core/src/main/java/org/apache/calcite/sql/SqlMerge.java:
##########
@@ -148,10 +148,19 @@ public SqlNode getCondition() {
 
   /**
    * Gets the source SELECT expression for the data to be updated/inserted.
+   *
+   * <p>The source SELECT column order:
+   * <ul>
+   *   <li>`WHEN NOT MATCHED THEN INSERT` only: [new values...]</li>
+   *   <li>`WHEN MATCHED THEN UPDATE` only: [old table columns..., updated new 
values...]</li>
+   *   <li>Both `NOT MATCHED THEN INSERT` and `WHEN MATCHED THEN UPDATE`: 
[insert new values...,
+   *   old table columns..., updated new values...]</li>
+   * </ul>
    * Returns null before the statement has been expanded by
-   * {@link SqlValidatorImpl#performUnconditionalRewrites(SqlNode, boolean)}.
+   * {@link SqlValidatorImpl#performUnconditionalRewrites(SqlNode, boolean)} 
and

Review Comment:
   This particular sentence isn’t mine; Julian added it. I won’t argue about 
its correctness because English is my second language. It’s definitely not 
“expand” in the usual sense, like when “SELECT *” expands into “SELECT name, 
age.” or like "expand view". Technically it fits into dictionary definition "to 
increase something in size"
   
   > Returns null before the statement has been expanded by
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to