Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-17112

"select if(true, null, null)" via JDBC triggers IllegalArgumentException in Thriftserver

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Via the Thriftserver beeline client, run

      select if(true, null, null);
      

      The expected output is null (this is what's produced when not running through the thrift server), but this instead results in an error in the Thriftserver:

      16/08/17 11:05:38 WARN ThriftCLIService: Error getting result set metadata:
      java.lang.RuntimeException: java.lang.IllegalArgumentException: Unrecognized type name: null
             	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:83)
             	at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
             	at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
             	at java.security.AccessController.doPrivileged(Native Method)
             	at javax.security.auth.Subject.doAs(Subject.java:422)
             	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
             	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
             	at com.sun.proxy.$Proxy21.getResultSetMetadata(Unknown Source)
             	at org.apache.hive.service.cli.CLIService.getResultSetMetadata(CLIService.java:436)
             	at org.apache.hive.service.cli.thrift.ThriftCLIService.GetResultSetMetadata(ThriftCLIService.java:607)
             	at org.apache.hive.service.cli.thrift.TCLIService$Processor$GetResultSetMetadata.getResult(TCLIService.java:1533)
             	at org.apache.hive.service.cli.thrift.TCLIService$Processor$GetResultSetMetadata.getResult(TCLIService.java:1518)
             	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
             	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
             	at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
             	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
             	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
             	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
             	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: Unrecognized type name: null
             	at org.apache.hive.service.cli.Type.getType(Type.java:168)
             	at org.apache.hive.service.cli.TypeDescriptor.<init>(TypeDescriptor.java:53)
             	at org.apache.hive.service.cli.ColumnDescriptor.<init>(ColumnDescriptor.java:53)
             	at org.apache.hive.service.cli.TableSchema.<init>(TableSchema.java:52)
             	at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.resultSchema$lzycompute(SparkExecuteStatementOperation.scala:66)
             	at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.resultSchema(SparkExecuteStatementOperation.scala:58)
             	at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.getResultSetSchema(SparkExecuteStatementOperation.scala:147)
             	at org.apache.hive.service.cli.operation.OperationManager.getOperationResultSetSchema(OperationManager.java:209)
             	at org.apache.hive.service.cli.session.HiveSessionImpl.getResultSetMetadata(HiveSessionImpl.java:673)
             	at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
             	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
             	at java.lang.reflect.Method.invoke(Method.java:497)
             	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
             	... 18 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                joshrosen Josh Rosen
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: