lasdf1234 opened a new pull request, #14883:
URL: https://github.com/apache/gravitino/pull/14883

   ### What changes were proposed in this pull request?
   
   Strategy compaction builds `where_clause` via `PartitionUtils`. The previous 
forms used Spark-style function names/argument order that `rewrite_data_files` 
often cannot translate:
   
   - `day(col) = N` / `year(col) = N` (Spark builtins) instead of Iceberg 
`days` / `years`
   - `bucket(col, N)` / `truncate(col, W)` instead of Iceberg `bucket(N, col)` 
/ `truncate(W, col)`
   
   This PR emits Iceberg Spark system-function predicates that Iceberg 1.11 
`SparkV2Filters` knows how to translate, updates unit tests, and adjusts TMS 
troubleshooting / alpha-scope notes.
   
   ### Why are the changes needed?
   
   Fixes #10587
   
   `submit-strategy-jobs` for `system_iceberg_compaction` on non-identity 
partitions (for example `PARTITIONED BY (days(event_time))`) failed with:
   
   `Cannot translate Spark expression: ... day(cast(... as date)) ... to data 
source filter`
   
   Related broader work remains in #10358; this change aligns generated 
predicates with Iceberg's Spark UDF surface for the transforms `PartitionUtils` 
already supports.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Strategy-submitted rewrite `where_clause` strings for temporal / bucket 
/ truncate partitions change to Iceberg system-function forms (for example 
`days(event_time) = 19723`, `bucket(16, id) = 3`). Identity predicates are 
unchanged.
   
   ### How was this patch tested?
   
   - `./gradlew :maintenance:optimizer:test --tests 
org.apache.gravitino.maintenance.optimizer.recommender.job.TestPartitionUtils 
-PskipITs`
   - `./gradlew spotlessApply`
   - Docs link check on edited TMS pages
   
   
   Made with [Cursor](https://cursor.com)


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

Reply via email to