drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinfeng Ni (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-482) Cast of non-existent column results in UnsupportedOperation exception
Date Fri, 13 Jun 2014 20:53:03 GMT

     [ https://issues.apache.org/jira/browse/DRILL-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jinfeng Ni updated DRILL-482:
-----------------------------

    Attachment: DRILL-482.1.patch

> Cast of non-existent column results in UnsupportedOperation exception
> ---------------------------------------------------------------------
>
>                 Key: DRILL-482
>                 URL: https://issues.apache.org/jira/browse/DRILL-482
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Codegen
>            Reporter: Steven Phillips
>            Assignee: Jinfeng Ni
>             Fix For: 1.0.0-BETA1
>
>         Attachments: DRILL-482.1.patch
>
>
> For example, this query:
> select cast(name as varchar(10)) from cp.`tpch/nation.parquet`;
> the column name does not exist.
> here is the stack trace.
> java.lang.UnsupportedOperationException: FunctionCall is not expected here. It should
have been converted to FunctionHolderExpression in materialization
> 	org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitFunctionCall(EvaluationVisitor.java:352)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitFunctionCall(EvaluationVisitor.java:340)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.common.expression.FunctionCall.accept(FunctionCall.java:60) ~[drill-common-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitCastExpression(EvaluationVisitor.java:337)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitCastExpression(EvaluationVisitor.java:76)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.common.expression.CastExpression.accept(CastExpression.java:41) ~[drill-common-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitValueVectorWriteExpression(EvaluationVisitor.java:225)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$EvalVisitor.visitUnknown(EvaluationVisitor.java:207)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitUnknown(EvaluationVisitor.java:459)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor$ConstantFilter.visitUnknown(EvaluationVisitor.java:340)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.ValueVectorWriteExpression.accept(ValueVectorWriteExpression.java:64)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.EvaluationVisitor.addExpr(EvaluationVisitor.java:72) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.ClassGenerator.addExpr(ClassGenerator.java:200) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.expr.ClassGenerator.addExpr(ClassGenerator.java:194) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:154)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:53)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:85)
~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:83) ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> 	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]
> 	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]
> 	java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]
> We should handle this case better. Calling cast on a null instance should simply return
a null instance.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message