brkyvz 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_r356729161
 
 

 ##########
 File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableChange.java
 ##########
 @@ -259,6 +298,64 @@ public int hashCode() {
     }
   }
 
+  interface ColumnPosition {
+    First FIRST = new First();
+
+    static ColumnPosition createAfter(String column) {
+      return new After(column);
+    }
+  }
+
+  /**
+   * Column position FIRST means the specified column should be the first 
column.
+   * Note that, the specified column may be a nested field, and then FIRST 
means this field should
+   * be the first one within the struct.
+   */
+  final class First implements ColumnPosition {
+    private First() {}
+
+    @Override
+    public String toString() {
+      return "FIRST";
+    }
+  }
+
+  /**
+   * Column position AFTER means the specified column should be put after the 
given `column`.
+   * Note that, the specified column may be a nested field, and then the given 
`column` refers to
+   * a nested field in the same struct.
 
 Review comment:
   `a field in the same struct`?

----------------------------------------------------------------
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