jiangxt2 commented on code in PR #13749:
URL: https://github.com/apache/gravitino/pull/13749#discussion_r4441017082
##########
catalogs-contrib/catalog-jdbc-clickhouse/src/main/java/org/apache/gravitino/catalog/clickhouse/operations/ClickHouseTableSqlUtils.java:
##########
@@ -577,6 +587,21 @@ private static String extractPartitionIdentifier(String
expression) {
return isStrictIdentifier(trimmed) ? trimmed : null;
}
+ /**
+ * Resolves the partition column for a known granularity function. When the
inner expression is
+ * too complex to resolve as a simple column name and exactly one column
participates in the
+ * partition, that column is used as a fallback.
+ */
+ @Nullable
+ private static String resolvePartitionIdentifier(
+ String expression, List<String> partitionColumns) {
+ String identifier = extractSimpleIdentifier(expression);
+ if (identifier != null) {
+ return identifier;
+ }
+ return partitionColumns.size() == 1 ? partitionColumns.get(0) : null;
Review Comment:
Thanks for the update. The single-column fallback has been removed, and the
offset and required-cast cases from my original comment now remain unstructured
with the original `partition-key` 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]