jiangxt2 opened a new issue, #13391:
URL: https://github.com/apache/gravitino/issues/13391

   ### What would you like to be improved?
   
   ClickHouse MergeTree tables can use `toStartOfWeek(column)` and 
`toStartOfMonth(column)` as partition expressions. When such a table is loaded 
through the Gravitino ClickHouse catalog, `Table.partitioning()` is empty for 
these expressions and the canonical native expression is available only through 
the read-only `partition-key` property. The catalog also cannot create a table 
from the corresponding function transforms. This prevents clients from handling 
these native partition forms through Gravitino's structured partitioning 
metadata across load and create workflows.
   
   ### How should we improve?
   
   Add structured read and create support for the one-column forms 
`toStartOfWeek(column)` and `toStartOfMonth(column)`. On load, preserve the 
ClickHouse function name and column argument in the partition transform; on 
create, emit the corresponding ClickHouse function expression.
   
   Limit this support to those one-column forms. The one-argument 
`toStartOfWeek(column)` form uses ClickHouse's default mode `0` (Sunday start) 
and the server timezone. `toStartOfWeek(column, mode)` and 
`toStartOfWeek(column, mode, timezone)`, nested function expressions, and other 
`toStartOf*` functions remain out of scope. When loading tables that use these 
out-of-scope expressions, leave `Table.partitioning()` unstructured and 
preserve the canonical expression in the read-only `partition-key` property.
   


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