cloud-fan commented on a change in pull request #26817: [SPARK-30192][SQL] 
support column position in DS v2
URL: https://github.com/apache/spark/pull/26817#discussion_r356422627
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableChange.java
 ##########
 @@ -113,7 +114,30 @@ static TableChange addColumn(
       DataType dataType,
       boolean isNullable,
       String comment) {
-    return new AddColumn(fieldNames, dataType, isNullable, comment);
+    return new AddColumn(fieldNames, dataType, isNullable, comment, null);
+  }
+
+  /**
+   * Create a TableChange for adding a column.
+   * <p>
+   * If the field already exists, the change will result in an {@link 
IllegalArgumentException}.
+   * If the new field is nested and its parent does not exist or is not a 
struct, the change will
+   * result in an {@link IllegalArgumentException}.
 
 Review comment:
   This doc is for catalog implementations. They should throw 
`IllegalArgumentException` if something goes wrong.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to