hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-22622) Hive allows to create a struct with duplicate attribute names
Date Mon, 31 Aug 2020 21:29:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 31/Aug/20 21:28
            Start Date: 31/Aug/20 21:28
    Worklog Time Spent: 10m 
      Work Description: zabetak commented on a change in pull request #1446:
URL: https://github.com/apache/hive/pull/1446#discussion_r480409116



##########
File path: common/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
##########
@@ -471,6 +471,7 @@
           "Not an ordered-set aggregate function: {0}. WITHIN GROUP clause is not allowed.",
true),
   WITHIN_GROUP_PARAMETER_MISMATCH(10422,
           "The number of hypothetical direct arguments ({0}) must match the number of ordering
columns ({1})", true),
+  AMBIGUOUS_STRUCT_FIELD(10423, "Struct field is not unique: {0}", true),

Review comment:
       nit: Usually we use "field" for row types and "attribute" for struct types. Plus it
reads more natural if we inline the attribute name in the sentence: 
   
   `Attribute \"{0}\" specified more than once in structured type.` 




----------------------------------------------------------------
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: 476848)
    Time Spent: 20m  (was: 10m)

> Hive allows to create a struct with duplicate attribute names
> -------------------------------------------------------------
>
>                 Key: HIVE-22622
>                 URL: https://issues.apache.org/jira/browse/HIVE-22622
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Denys Kuzmenko
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When you create at table with a struct with twice the same attribute name, hive allow
you to create it.
> create table test_struct( duplicateColumn struct<id:int, id:int>);
> You can insert data into it :
> insert into test_struct select named_struct("id",1,"id",1);
> But you can not read it :
> select * from test_struct;
> Return : java.io.IOException: java.io.IOException: Error reading file: hdfs://.../test_struct/delta_0000001_0000001_0000/bucket_00000
,
> We can create and insert. but fail on read the Struct part of the tables. We can still
read all other columns (if we have more than one) but not the struct anymore.



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

Mime
View raw message