deniskuzZ commented on code in PR #5282: URL: https://github.com/apache/hive/pull/5282#discussion_r1629729932
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java: ########## @@ -177,12 +177,9 @@ CombinedScanTask> applyConfig( } 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)); Review Comment: why don't we use helper methods: ```` Schema readSchema = InputFormatConfig.readSchema(conf); if (readSchema != null) { scan = scan.project(readSchema); } else { String[] selectedColumns = InputFormatConfig.selectedColumns(conf); if (selectedColumns != null) { scan = scan.select(selectedColumns) } } ```` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org