[
https://issues.apache.org/jira/browse/HIVE-17448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152133#comment-16152133
]
Nikolay Sokolov commented on HIVE-17448:
----------------------------------------
Is not reproducing when there is no trailing fields -- struct comparison seem
to trim unmatched fields, but outside (row's) struct comparison does not take
into account different number of fields.
Attaching possible naive patch.
> ArrayIndexOutOfBoundsException on ORC tables after adding a struct field
> ------------------------------------------------------------------------
>
> Key: HIVE-17448
> URL: https://issues.apache.org/jira/browse/HIVE-17448
> Project: Hive
> Issue Type: Bug
> Components: ORC
> Affects Versions: 2.1.1
> Environment: Reproduced on Dataproc 1.1, 1.2 (Hive 2.1).
> Reporter: Nikolay Sokolov
> Priority: Minor
> Attachments: HIVE-17448.1-branch-2.1.patch
>
>
> When ORC files have been created with older schema, which had smaller set of
> struct fields, and schema have been changed to one with more struct fields,
> and there are sibling fields of struct type going after struct itself,
> ArrayIndexOutOfBoundsException is being thrown. Steps to reproduce:
> {code:none}
> create external table test_broken_struct(a struct<f1:int, f2:int>, b int);
> insert into table test_broken_struct
> select named_struct("f1", 1, "f2", 2), 3;
> drop table test_broken_struct;
> create external table test_broken_struct(a struct<f1:int, f2:int, f3:int>, b
> int);
> select * from test_broken_struct;
> {code}
> Same scenario is not causing crash on hive 0.14.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)