Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Lilith info follows, here is the query command:
      0: jdbc:drill:schema=dfs> select case (columns[31]) when 'US' then 'US' else 'other' end from `/user/root/cust-header.tsv` limit 2;
      uery failed: org.apache.drill.exec.rpc.RpcException: [error_id: "e6ffcf8c-b41d-492e-a902-810a211c315d"
      endpoint

      { address: "mfs101.qa.lab" user_port: 31010 control_port: 31011 data_port: 31012 }

      error_type: 0
      message: "Screen received stop request sent. < SchemaChangeException:[ Failure while attempting to load generated class ] < ClassTransformationException:[ Failure generating transformation classes for value: \n \npackage org.apache.drill.exec.test.generated;\n\nimport org.apache.drill.exec.exception.SchemaChangeException;\nimport org.apache.drill.exec.expr.holders.BitHolder;\nimport org.apache.drill.exec.expr.holders.VarCharHolder;\nimport org.apache.drill.exec.ops.FragmentContext;\nimport org.apache.drill.exec.record.RecordBatch;\nimport org.apache.drill.exec.vector.RepeatedVarCharVector;\nimport org.apache.drill.exec.vector.ValueHolderHelper;\nimport org.apache.drill.exec.vector.VarCharVector;\n\npublic class ProjectorGen51 {\n\n RepeatedVarCharVector vv1;\n VarCharHolder string4;\n VarCharHolder constant5;\n VarCharHolder string7;\n VarCharHolder constant8;\n VarCharHolder string9;\n VarCharHolder constant10;\n VarCharVector vv11;\n\n public void doEval(int inIndex, int outIndex)\n throws SchemaChangeException\n {\n {\n VarCharHolder out0 = new VarCharHolder();\n VarCharHolder out3 = new VarCharHolder();\n vv1 .getAccessor().get((inIndex), 31, out3);\n BitHolder out6 = new BitHolder();\n {\n final BitHolder out = new BitHolder();\n VarCharHolder left = out3;\n VarCharHolder right = constant5;\n \n sout:\n {\n int cmp;\n\n outside:\n {\n for (int l = left.start, r = right.start; l < left.end && r < right.end; l+, r+) {\n byte leftByte = left.buffer.getByte(l);\n byte rightByte = right.buffer.getByte(r);\n\n if (leftByte != rightByte)

      {\n cmp = ((leftByte & 255) - (rightByte & 255)) > 0 ? 1 : -1;\n break outside;\n }

      \n }\n\n int l = (left.end - left.start) - (right.end - right.start);\n\n if (l > 0)

      {\n cmp = 1;\n break outside;\n }

      else\n if (l == 0)

      {\n cmp = 0;\n break outside;\n }

      else\n

      {\n cmp = -1;\n break outside;\n }

      \n }\n out.value = cmp == 0 ? 1 : 0;\n }\n \n out6 = out;\n }\n if (out6 .value == 1)

      {\n out0 .value = constant8 .value;\n }

      else

      {\n out0 .value = constant10 .value;\n }

      \n vv11 .getMutator().set((outIndex), out0);\n }\n }\n\n public void doSetup(FragmentContext context, RecordBatch incoming, RecordBatch outgoing)\n throws SchemaChangeException\n {\n {\n Object tmp2 = (incoming).getValueAccessorById(0, RepeatedVarCharVector.class).getValueVector();\n if (tmp2 == null)

      {\n throw new SchemaChangeException(\"Failure while loading vector vv1 with id: TypedFieldId [type=minor_type: VARCHAR\\nmode: REPEATED\\n, fieldId=0, isSuperReader=false].\");\n }

      \n vv1 = ((RepeatedVarCharVector) tmp2);\n string4 = ValueHolderHelper.getVarCharHolder(\"US\");\n constant5 = string4;\n /** start SETUP for function equal */ \n {\n VarCharHolder right = constant5;\n {}\n }\n /* end SETUP for function equal **/ \n string7 = ValueHolderHelper.getVarCharHolder(\"US\");\n constant8 = string7;\n string9 = ValueHolderHelper.getVarCharHolder(\"other\");\n constant10 = string9;\n Object tmp12 = (outgoing).getValueAccessorById(0, VarCharVector.class).getValueVector();\n if (tmp12 == null)

      {\n throw new SchemaChangeException(\"Failure while loading vector vv11 with id: TypedFieldId [type=minor_type: VARCHAR\\nmode: REQUIRED\\n, fieldId=0, isSuperReader=false].\");\n }

      \n vv11 = ((VarCharVector) tmp12);\n }\n }\n\n}\n ] < CompileException:[ Line 74, Column 29: \"value\" is neither a method, a field, nor a member class of \"org.apache.drill.exec.expr.holders.VarCharHolder\" ]"
      ]
      Error: exception while executing query (state=,code=0)

      From Lilith, just debug level, not error level info:
      QueryResultHandler:
      at org.apache.drill.exec.rpc.user.QueryResultHandler$SubmissionListener.success(QueryResultHandler.java:174)
      at org.apache.drill.exec.rpc.user.QueryResultHandler$SubmissionListener.success(QueryResultHandler.java:158)
      at org.apache.drill.exec.rpc.CoordinationQueue$RpcListener.set(CoordinationQueue.java:96)
      at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:170)
      at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:139)
      at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:334)
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:320)

      DrillResultSet:
      at org.apache.drill.jdbc.DrillResultSet$Listener.resultArrived(DrillResultSet.java:130)
      at org.apache.drill.exec.rpc.user.QueryResultHandler.batchArrived(QueryResultHandler.java:75)
      at org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:84)
      at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:52)
      at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:34)
      at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:154)
      at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:139)
      at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)

        Activity

        Hide
        Vivian Summers added a comment -

        verified it's fixed in the latest version

        Show
        Vivian Summers added a comment - verified it's fixed in the latest version
        Hide
        Jacques Nadeau added a comment -

        merged in 8e1865c

        Show
        Jacques Nadeau added a comment - merged in 8e1865c
        Hide
        Jinfeng Ni added a comment -

        The bug will happen when the return type of case expression is a type which does not have "value" field in the holder class. Examples of such type include varchar, decimal, etc. The reason of the run-time code generation failure is because the code tried to access "value" field for those type, which does not exist.

        Show
        Jinfeng Ni added a comment - The bug will happen when the return type of case expression is a type which does not have "value" field in the holder class. Examples of such type include varchar, decimal, etc. The reason of the run-time code generation failure is because the code tried to access "value" field for those type, which does not exist.

          People

          • Assignee:
            Jinfeng Ni
            Reporter:
            Vivian Summers
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development