rdblue commented on a change in pull request #2984:
URL: https://github.com/apache/iceberg/pull/2984#discussion_r716256009
##########
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 just to call the method rather than trying to optimize by not
adding the partition entry.
--
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]