Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6602

NullPointerException when send ExectuteRequest via protobuf with no parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • queryserver-6.0.0
    • queryserver-6.0.1
    • queryserver
    • None

    Description

      ExecuteRequest has following format:

      message ExecuteRequest {
        StatementHandle statementHandle = 1;
        repeated TypedValue parameter_values = 2;
        uint64 deprecated_first_frame_max_size = 3;
        bool has_parameter_values = 4;
        int32 first_frame_max_size = 5;
      }
      

      When i try to set has_parameter_values to false and set 0 parameters then i get error:

      'protocol' => {
                      'severity' => 0,
                      'exceptions' => [
                                      'java.lang.NullPointerException
      	at org.apache.calcite.avatica.MetaImpl.checkParameterValueHasNull(MetaImpl.java:1633)
      	at org.apache.calcite.avatica.jdbc.JdbcMeta.execute(JdbcMeta.java:849)
      	at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:260)
      	at org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1056)
      	at org.apache.calcite.avatica.remote.Service$ExecuteRequest.accept(Service.java:1026)
      	at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94)
      	at org.apache.calcite.avatica.remote.ProtobufHandler.apply(ProtobufHandler.java:46)
      	at org.apache.calcite.avatica.server.AvaticaProtobufHandler.handle(AvaticaProtobufHandler.java:134)
      	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      	at org.eclipse.jetty.server.Server.handle(Server.java:501)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
      	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
      	at java.lang.Thread.run(Thread.java:748)
      '],
          'message' => 'NullPointerException: (null exception message)',
          'sql_state' => '00000',
          'error_code' => 4294967295
      }
      

      It work well when parameter_values is not empty list.

      Perhaps it was necessary to create issue in calcite avatica project, but I decided to try it here, since I still use queryserver.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              logioniz Aleksey Stavrov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: