You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2023/08/04 07:44:46 UTC

[GitHub] [hive] deniskuzZ commented on a diff in pull request #4546: HIVE-27562: Iceberg: Fetching virtual columns failing.

deniskuzZ commented on code in PR #4546:
URL: https://github.com/apache/hive/pull/4546#discussion_r1284095856


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java:
##########
@@ -535,12 +535,12 @@ private static Schema readSchema(Configuration conf, Table table, boolean caseSe
 
       String[] selectedColumns = InputFormatConfig.selectedColumns(conf);
       if (selectedColumns == null) {
-        return table.schema();
+        readSchema = table.schema();

Review Comment:
   can we do small refactor
   ````
         String[] selectedColumns = InputFormatConfig.selectedColumns(conf);
         readSchema = table.schema();
         
         if (selectedColumns != null) {
           readSchema = caseSensitive ? readSchema.select(selectedColumns) : 
               readSchema.caseInsensitiveSelect(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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org