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

   
   ### What changes were proposed in this pull request?
   Remove the partition-specific SHOW CREATE regex parsing path and use 
`system.tables.partition_key` as the single authoritative source. For native 
partition expressions that cannot be structured into identity/year/month/day 
transforms, return `Transforms.apply("raw", {UnparsedExpression.of(expr)})` 
instead of throwing, and add a simple-field check to the toYear/toDate/toYYYYMM 
mappings.
   
   ### Why are the changes needed?
   Loading a valid MergeTree table with `PARTITION BY cityHash64(...) % 7` 
currently throws UnsupportedOperationException from the strict parser, which 
blocks ordinary table metadata access. Returning only an empty Transform array 
would also be ambiguous, since callers could not distinguish an unpartitioned 
table from a native expression that Gravitino cannot structure.
   
   Fix: #12843
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. When loading a table with a native partition expression, 
`Table.partitioning()` now returns a Transform named "raw" whose argument is an 
UnparsedExpression, instead of throwing or returning empty. Known limitation: 
tuple partition keys that contain functions with comma arguments are not 
supported.
   
   ### How was this patch tested?
   - Unit test TestClickHouseTableOperationsPartitioning (raw and 
nested-expression cases)
   - New IT: CatalogClickHouseIT.testLoadTableWithNativePartitionExpression
   - Manual end-to-end: real ClickHouse + Gravitino server + REST, verifying 
that partitioning returns function/raw/unparsed with the original expression 
preserved
   


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