agnes-xinyi-lu opened a new issue, #17425:
URL: https://github.com/apache/iceberg/issues/17425

   ### Apache Iceberg version
   
   1.11.0 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   In Spark 4.1, calling rewrite manifests procedure with sort by on a 
partition field that have a dot in the name after being flattened (for example 
a nested field in a struct), will throw this exception 
   `AnalysisException: [FIELD_NOT_FOUND] No such struct field a in a.b`
   This is because in 
[RewriteManifestsSpark::sortColumn](https://github.com/apache/iceberg/blob/f3d5b1768d7e3939cf5d43b0f943cfdca24ceca2/spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteManifestsSparkAction.java#L320)
 builds the Spark column reference for a custom clustering field by string 
concatenation — col("data_file.partition." + partitionFieldName), we could fix 
it by quotting `partitionFieldName`
   
   ### Willingness to contribute
   
   - [x] I can contribute a fix for this bug independently
   - [x] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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

Reply via email to