pvary commented on code in PR #10449:
URL: https://github.com/apache/iceberg/pull/10449#discussion_r1636140730
##########
mr/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -125,11 +125,9 @@ public List<InputSplit> getSplits(JobContext context) {
}
String schemaStr = conf.get(InputFormatConfig.READ_SCHEMA);
if (schemaStr != null) {
- scan.project(SchemaParser.fromJson(schemaStr));
- }
- String[] selectedColumns =
conf.getStrings(InputFormatConfig.SELECTED_COLUMNS);
- if (selectedColumns != null) {
- scan.select(selectedColumns);
+ scan = scan.project(SchemaParser.fromJson(schemaStr));
+ } else if (conf.getStrings(InputFormatConfig.SELECTED_COLUMNS) != null) {
Review Comment:
Don't forget that this is not Hive only code. Originally it was intended for
reading the Iceberg table through MR jobs. While this might not be the most
common use, we should not forget about this.
--
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]