[ https://issues.apache.org/jira/browse/HIVE-5860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873046#comment-13873046 ]
Navis commented on HIVE-5860: ----------------------------- Could you attach DDL for the table? > Select * does not work when table has non-array columns. > -------------------------------------------------------- > > Key: HIVE-5860 > URL: https://issues.apache.org/jira/browse/HIVE-5860 > Project: Hive > Issue Type: Bug > Reporter: Anuj Ojha > > I was querying a table with non-array columns and I came across situation > where if I use select * it would throw me index out of bound exception. > {code} > java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: -1 > {code} > {code} > java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: -1 > at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:150) > at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1403) > at > org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:270) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:412) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:755) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:613) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.util.RunJar.main(RunJar.java:208) > Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 > at > org.apache.hadoop.hive.serde2.lazy.LazyInteger.parseInt(LazyInteger.java:107) > at > org.apache.hadoop.hive.serde2.lazy.LazyByte.parseByte(LazyByte.java:94) > at > org.apache.hadoop.hive.serde2.lazy.LazyByte.parseByte(LazyByte.java:74) > at > org.apache.hadoop.hive.serde2.lazy.LazyUnion.parse(LazyUnion.java:123) > at > org.apache.hadoop.hive.serde2.lazy.LazyUnion.getTag(LazyUnion.java:178) > at > org.apache.hadoop.hive.serde2.lazy.objectinspector.LazyUnionObjectInspector.getTag(LazyUnionObjectInspector.java:128) > at > org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:367) > at > org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:354) > at > org.apache.hadoop.hive.serde2.SerDeUtils.buildJSONString(SerDeUtils.java:307) > at > org.apache.hadoop.hive.serde2.SerDeUtils.getJSONString(SerDeUtils.java:220) > at > org.apache.hadoop.hive.serde2.DelimitedJSONSerDe.serializeField(DelimitedJSONSerDe.java:59) > at > org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.serialize(LazySimpleSerDe.java:365) > at > org.apache.hadoop.hive.ql.exec.ListSinkOperator.processOp(ListSinkOperator.java:91) > at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:474) > at > org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:468) > at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:136) > ... 11 more > {code} > Table looked something like this: > {code} > Column 1 | column 2 | Column 3 > | Column4 > {"a": "b", "c": "d", "e": ["f": "g"]} [ some stuff here] abcde > aaa > {code} > When I used single fields in select it worked but when I do select * it would > not. > {code} > select * from default.table where column1.a='b' and column3='abcde' and > Column4='aaa' > The above query failed. > {code} > {code} > select count(column4) from default.table where column1.a='b' and > column3='abcde' and Column4='aaa' > The above query works. > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)