You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2013/10/08 23:47:41 UTC

[jira] [Created] (HIVE-5492) Explain query fails with NPE if a client doesn't call getResultSetSchema()

Xuefu Zhang created HIVE-5492:
---------------------------------

             Summary: Explain query fails with NPE if a client doesn't call getResultSetSchema()
                 Key: HIVE-5492
                 URL: https://issues.apache.org/jira/browse/HIVE-5492
             Project: Hive
          Issue Type: Bug
          Components: Thrift API
    Affects Versions: 0.11.0
            Reporter: Xuefu Zhang
            Assignee: Xuefu Zhang
             Fix For: 0.13.0


If a thrift client makes an explain query and fetches results without calling getResultSetSchema() first, NullPointerException will occur in Hive.

{code}
org.apache.hive.service.cli.HiveSQLException: java.lang.NullPointerException
        at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:262)
        at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:179)
        at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:422)
        at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:333)
        at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:413)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1613)
        at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1598)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.hive.service.auth.TUGIContainingProcessor$1.run(TUGIContainingProcessor.java:40)
        at org.apache.hive.service.auth.TUGIContainingProcessor$1.run(TUGIContainingProcessor.java:37)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1477)
        at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:527)
        at org.apache.hive.service.auth.TUGIContainingProcessor.process(TUGIContainingProcessor.java:37)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:244)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
        at org.apache.hive.service.cli.Row.<init>(Row.java:45)
        at org.apache.hive.service.cli.RowSet.addRow(RowSet.java:61)
        at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:254)
        ... 19 more
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)