wuwenchi commented on issue #5000: URL: https://github.com/apache/iceberg/issues/5000#issuecomment-1153572709
> Ideally, they could be stored in PartitionSpec as normal PartitionFields. Yes, in fact, I save these specified partition keys in PartitionSpec. When we get the partition keys in creating iceberg table, we create the corresponding transforms according to function name: ```java partitionKeys.forEach(name -> { ComputedColumn computedColumn = computedCols.get(name); if (computedColumn == null) { builder.identity(name); // identity } else { ... switch (udfProp.getFuncName()) { case "years": builder.year(udfProp.getSrcColumn(), computedColumn.getName()); // transforms break; case "months": builder.month(udfProp.getSrcColumn(), computedColumn.getName()); // transforms break; ... } } } -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org