aokolnychyi commented on a change in pull request #2984:
URL: https://github.com/apache/iceberg/pull/2984#discussion_r716260715



##########
File path: 
spark/src/main/java/org/apache/iceberg/spark/source/BaseDataReader.java
##########
@@ -132,6 +142,15 @@ protected InputFile getInputFile(String location) {
     return inputFiles.get(location);
   }
 
+  protected Map<Integer, ?> constantsMap(FileScanTask task, Schema readSchema) 
{
+    if (readSchema.findField(MetadataColumns.PARTITION_COLUMN_ID) != null) {
+      StructType partitionType = Partitioning.partitionType(table);
+      return PartitionUtil.constantsMap(task, partitionType, 
BaseDataReader::convertConstant);

Review comment:
       I'd prefer calling this all the time too. However, this would mean we 
can no longer query tables with unknown transforms. We need to know all 
transforms to build a common partition type. That's why I don't set the 
partition column if it is not requested.
   
   Any thoughts on this, @rdblue?




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