zeroshade commented on code in PR #2487:
URL: https://github.com/apache/iceberg-go/pull/2487#discussion_r4722217051


##########
table/arrow_utils.go:
##########
@@ -1549,6 +1571,33 @@ func toRequestedSchema(ctx context.Context, requested, 
fileSchema *iceberg.Schem
        return out, nil
 }
 
+// convertPartitionConstants widens each constant to the type its field has in
+// the requested schema: a manifest keeps the partition type the file was
+// written with, so a field promoted since still carries the narrower value.
+// It returns constants itself when nothing needs converting.

Review Comment:
   nit: this always allocates a new map when there are any constants, and 
`projectToRequestedSchema` calls it once per record batch. Could the comment 
say so? Or, better, the constants could be converted once per file, which fits 
the follow-up issue.



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