zhangbutao commented on code in PR #5282: URL: https://github.com/apache/hive/pull/5282#discussion_r1630744602
########## 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: > btw, there is `expectedSchema = readSchema(conf, table, caseSensitive)` but it creates a Hive schema with virtual columns, maybe that could be reused I didn't find a better way to reuse this method. :( -- 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