FANNG1 commented on code in PR #4349:
URL: https://github.com/apache/gravitino/pull/4349#discussion_r1703515449
##########
catalogs/catalog-lakehouse-paimon/src/main/java/org/apache/gravitino/catalog/lakehouse/paimon/utils/TableOpsUtils.java:
##########
@@ -46,4 +153,39 @@ private static void checkColumnAutoIncrement(String
fieldName, boolean autoIncre
String.format(
"Paimon does not support auto increment column. Illegal column:
%s.", fieldName));
}
+
+ private static void checkNestedColumn(String[] fieldNames) {
+ Preconditions.checkArgument(
+ fieldNames.length == 1,
+ String.format(
+ "Paimon does not support update nested column. Illegal column:
%s.",
+ fieldName(fieldNames)));
+ }
+
+ public static String[] fieldName(String fieldName) {
+ return new String[] {fieldName};
+ }
+
+ public static String fieldName(String[] fieldName) {
+ return DOT.join(fieldName);
+ }
+
+ private static String fieldName(ColumnChange columnChange) {
+ return fieldName(columnChange.fieldName());
+ }
+
+ private static Move move(String fieldName, ColumnPosition columnPosition)
+ throws UnsupportedOperationException {
+ if (columnPosition instanceof After) {
+ return Move.after(fieldName, ((After) columnPosition).getColumn());
+ } else if (columnPosition instanceof Default) {
+ return null;
Review Comment:
does this acttly works? seems `testUpdateColumnPosition` not cover this case.
--
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]