You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/06/10 07:26:00 UTC

[jira] [Work logged] (HIVE-25222) Fix reading Iceberg tables with a comma in column names

     [ https://issues.apache.org/jira/browse/HIVE-25222?focusedWorklogId=609510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-609510 ]

ASF GitHub Bot logged work on HIVE-25222:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jun/21 07:25
            Start Date: 10/Jun/21 07:25
    Worklog Time Spent: 10m 
      Work Description: lcspinter commented on a change in pull request #2368:
URL: https://github.com/apache/hive/pull/2368#discussion_r648912392



##########
File path: iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/InputFormatConfig.java
##########
@@ -201,8 +203,11 @@ public static Schema readSchema(Configuration conf) {
   }
 
   public static String[] selectedColumns(Configuration conf) {
-    String[] readColumns = conf.getStrings(InputFormatConfig.SELECTED_COLUMNS);
-    return readColumns != null && readColumns.length > 0 ? readColumns : null;
+    String readColumns = conf.get(InputFormatConfig.SELECTED_COLUMNS);
+    if (readColumns == null || readColumns.isEmpty()) {
+      return null;
+    }

Review comment:
       nit: new line




-- 
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.

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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 609510)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fix reading Iceberg tables with a comma in column names
> -------------------------------------------------------
>
>                 Key: HIVE-25222
>                 URL: https://issues.apache.org/jira/browse/HIVE-25222
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When using a table with a column name containing a comma (e.g. `employ,ee`), reading an Iceberg table fails because we rely on the property "hive.io.file.readcolumn.names" which encodes the read columns in a comma-separated list, put together by the ColumnProjectionUtils class.
> Because it's comma-separated in all cases, it will produce a string like: "id,birth_date,employ,ee" which can cause problems for Iceberg readers which use this string list to construct their expected read schema.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)