Anuj Ojha created HIVE-5860: ------------------------------- Summary: 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} 13/11/20 10:01:28 ERROR beeswax.BeeswaxServiceImpl: Caught BeeswaxException BeeswaxException(message:java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: -1, log_context:key1, handle:QueryHandle(id:abc, log_context:def), SQLState: ) at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.fetch(BeeswaxServiceImpl.java:545) at com.cloudera.beeswax.BeeswaxServiceImpl$5.run(BeeswaxServiceImpl.java:986) at com.cloudera.beeswax.BeeswaxServiceImpl$5.run(BeeswaxServiceImpl.java:981) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408) at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceImpl.java:772) at com.cloudera.beeswax.BeeswaxServiceImpl.fetch(BeeswaxServiceImpl.java:980) at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:987) at com.cloudera.beeswax.api.BeeswaxService$Processor$fetch.getResult(BeeswaxService.java:971) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) {code} Table looked something like this: Column 1 | column 2 | Column 3 | Column4 {"a": "b", "c": "d", "e": ["f": "g"]} [ some stuff here] abcde aaa When I used single fields in select it worked but when I do select * it would not. select * from default.table where column1.a='b' and column3='abcde' and Column4='aaa' The above query failed. select count(column4) from default.table where column1.a='b' and column3='abcde' and Column4='aaa' The above query works. -- This message was sent by Atlassian JIRA (v6.1#6144)