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

   ### What would you like to be improved?
   
   ClickHouse table creation currently only supports identity partitioning when 
converting Gravitino partition transforms to `PARTITION BY`.
   
   For example, `Transforms.identity("created_at")` can be converted to:
   
   ```sql
   PARTITION BY `created_at`
   ```
   
   But function-based transforms such as `year`, `month`, and `day` are 
rejected during table creation, even though ClickHouse supports common 
date/time partition expressions like:
   
   ```sql
   PARTITION BY toYear(created_at)
   PARTITION BY toYYYYMM(created_at)
   PARTITION BY toDate(created_at)
   ```
   
   This limits users who want to create MergeTree-family ClickHouse tables with 
time-based partitioning through Gravitino.
   
   ### How should we improve?
   
   Support ClickHouse partition expression generation for Gravitino time 
transforms when creating tables, at least:
   
   - `Transforms.year(column)` -> `PARTITION BY toYear(column)`
   - `Transforms.month(column)` -> `PARTITION BY toYYYYMM(column)`
   - `Transforms.day(column)` -> `PARTITION BY toDate(column)`
   
   The implementation should keep the existing validation behavior for 
unsupported transforms and nested fields, and add unit/integration test 
coverage for creating ClickHouse tables with these partition transforms.


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