agnes-xinyi-lu commented on code in PR #17428:
URL: https://github.com/apache/iceberg/pull/17428#discussion_r3684601705
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java:
##########
@@ -314,10 +314,13 @@ private Column sortColumn() {
partitionFieldClustering);
// Map the top level partition column names to the column name
referenced within the manifest
- // entry dataframe
+ // entry dataframe. Backtick-quote the partition field name because it
may itself contain a
+ // literal '.' (e.g. when partitioning on a nested source column) - the
partition struct is
+ // always flat, so unquoted, col() would misparse that dot as a further
level of nesting
+ // instead of treating the whole name as one field.
Column[] partitionColumns =
partitionFieldClustering.stream()
- .map(p -> col(DATA_FILE_PARTITION_COLUMN_NAME + "." + p))
+ .map(p -> col(DATA_FILE_PARTITION_COLUMN_NAME + ".`" + p + "`"))
Review Comment:
updated, PTAL @uros-b thanks!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]