karuppayya commented on code in PR #11045: URL: https://github.com/apache/iceberg/pull/11045#discussion_r1744645623
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/CreateChangelogViewProcedure.java: ########## @@ -146,10 +147,16 @@ public InternalRow[] call(InternalRow args) { Dataset<Row> df = loadRows(changelogTableIdent, options(input)); boolean netChanges = input.asBoolean(NET_CHANGES, false); + String[] identifierColumns = identifierColumns(input, tableIdent); + Preconditions.checkArgument( + identifierColumns.length > 0 + || Arrays.stream(df.schema().fields()) + .allMatch(field -> OrderUtils.isOrderable(field.dataType())), + "Identifier field is required if table contains unorderable columns"); Review Comment: I think it would be informative if we can log the column name(and type) that is not order-able -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org