szehon-ho commented on code in PR #4569:
URL: https://github.com/apache/iceberg/pull/4569#discussion_r880758088


##########
core/src/main/java/org/apache/iceberg/BaseMetadataTable.java:
##########
@@ -52,18 +51,17 @@ protected BaseMetadataTable(TableOperations ops, Table 
table, String name) {
    * This method transforms the table's partition spec to a spec that is used 
to rewrite the user-provided filter
    * expression against the given metadata table.
    * <p>
-   * The resulting partition spec maps $partitionPrefix.X fields to partition 
X using an identity partition transform.
+   * The resulting partition spec maps partition.X fields to partition X using 
an identity partition transform.
    * When this spec is used to project an expression for the given metadata 
table, the projection will remove
-   * predicates for non-partition fields (not in the spec) and will remove the 
"$partitionPrefix." prefix from fields.
+   * predicates for non-partition fields (not in the spec) and will remove the 
"partition." prefix from fields.
    *
    * @param metadataTableSchema schema of the metadata table
    * @param spec spec on which the metadata table schema is based
-   * @param partitionPrefix prefix to remove from each field in the partition 
spec
    * @return a spec used to rewrite the metadata table filters to partition 
filters using an inclusive projection
    */
-  static PartitionSpec transformSpec(Schema metadataTableSchema, PartitionSpec 
spec, String partitionPrefix) {
+  static PartitionSpec transformSpec(Schema metadataTableSchema, PartitionSpec 
spec) {
     PartitionSpec.Builder identitySpecBuilder = 
PartitionSpec.builderFor(metadataTableSchema).checkConflicts(false);
-    spec.fields().forEach(pf -> identitySpecBuilder.identity(partitionPrefix + 
pf.name(), pf.name()));
+    spec.fields().forEach(pf -> identitySpecBuilder.add(pf.fieldId(), 
pf.name(), "identity"));

Review Comment:
   Thanks for checking it



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to