karuppayya commented on code in PR #11045: URL: https://github.com/apache/iceberg/pull/11045#discussion_r1739438634
########## spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestCreateChangelogViewProcedure.java: ########## @@ -242,6 +249,34 @@ public void testUpdateWithIdentifierField() { sql("select * from %s order by _change_ordinal, id, data", viewName)); } + @TestTemplate + public void testUpdateWithInComparableType() { + createTableWithIncomparableType(); + + sql("INSERT INTO %s VALUES (2, Map('b','b'), 12)", tableName); + Table table = validationCatalog.loadTable(tableIdent); + Snapshot snap1 = table.currentSnapshot(); + + sql("INSERT OVERWRITE %s VALUES (3, Map('c','c'), 13), (2, Map('d','d'), 12)", tableName); Review Comment: I can see code where [we compare every column of two rows](https://github.com/apache/iceberg/blob/main/spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/ChangelogIterator.java#L101) in a iterator to see if they are equal and base that to generate the change log. For example consider a table with schema <id: Int, map: Map<String, String>> having records ` 1, Map<a, a>`, `1, Map<b, b>`, `1, Map<a, a>` An ordering based on `id` can result in in ``` 1, Map<a, a> 1, Map<a, a> 1, Map<b, b> ``` In this case first two rows are same or ``` 1, Map<a, a> 1, Map<b, b> 1, Map<a, a> ``` In this case first two rows are different. Hence I was curious if the result would differ when we skip the ordering on a column. -- 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