drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-2808) Substr function throws weird message when wrong arguments are passed in
Date Thu, 28 Apr 2016 17:43:12 GMT

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

Sean Hsuan-Yi Chu updated DRILL-2808:
-------------------------------------
    Assignee:     (was: Sean Hsuan-Yi Chu)

> Substr function throws weird message when wrong arguments are passed in
> -----------------------------------------------------------------------
>
>                 Key: DRILL-2808
>                 URL: https://issues.apache.org/jira/browse/DRILL-2808
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.9.0
>            Reporter: Victoria Markman
>             Fix For: 1.7.0
>
>
> #Wed Apr 15 17:37:25 EDT 2015
> git.commit.id.abbrev=cb47df0
> {code}
> 0: jdbc:drill:schema=dfs> select substr(0, 1, 'abc') from sys.options limit 1;
> Query failed: SYSTEM ERROR: Unexpected exception during fragment initialization: Internal
error: Error while applying rule ReduceExpressionsRule[Project], args [rel#53990:ProjectRel.NONE.ANY([]).[](child=rel#53989:Subset#0.ENUMERABLE.ANY([]).[],EXPR$0=SUBSTR(0,
1, 'abc'))]
> [1f7e0c35-fc65-4a2f-b668-12e9baf5c9b8 on atsqa4-133.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> drillbit.log
> {code}
> 2015-04-16 22:04:32,029 [2acfce0f-8af4-9786-4799-9180b9bac219:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- State change requested.  PENDING --> FAILED
> org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: Internal error: Error while applying rule ReduceExpressionsRule[Project],
args [rel#54047:ProjectRel.NONE.ANY([]).[](child=rel#54046:Subset#0.ENUMERABLE.ANY([]).[],EXPR$0=SUBSTR(0,
1, 'abc'))]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:211) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_71]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_71]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
> Caused by: java.lang.AssertionError: Internal error: Error while applying rule ReduceExpressionsRule[Project],
args [rel#54047:ProjectRel.NONE.ANY([]).[](child=rel#54046:Subset#0.ENUMERABLE.ANY([]).[],EXPR$0=SUBSTR(0,
1, 'abc'))]
>         at org.eigenbase.util.Util.newInternal(Util.java:750) ~[optiq-core-0.9-drill-r21.jar:na]
>         at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:246)
~[optiq-core-0.9-drill-r21.jar:na]
>         at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661)
~[optiq-core-0.9-drill-r21.jar:na]
>         at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165)
~[optiq-core-0.9-drill-r21.jar:na]
>         at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:278) ~[optiq-core-0.9-drill-r21.jar:na]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:196)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:137)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:155)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:770) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:202) [drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         ... 3 common frames omitted
> Caused by: java.lang.RuntimeException: Error in evaluating function of castBIGINT
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:323)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:147)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.common.expression.FunctionHolderExpression.accept(FunctionHolderExpression.java:47)
~[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:251)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:147)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.common.expression.FunctionHolderExpression.accept(FunctionHolderExpression.java:47)
~[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr(InterpreterEvaluator.java:65)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce(DrillConstExecutor.java:180)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.eigenbase.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:410)
~[optiq-core-0.9-drill-r21.jar:na]
>         at org.eigenbase.rel.rules.ReduceExpressionsRule$1.onMatch(ReduceExpressionsRule.java:196)
~[optiq-core-0.9-drill-r21.jar:na]
>         at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223)
~[optiq-core-0.9-drill-r21.jar:na]
>         ... 11 common frames omitted
> Caused by: java.lang.NumberFormatException: abc
>         at org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.nfeL(StringFunctionHelpers.java:91)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.varCharToLong(StringFunctionHelpers.java:62)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.impl.gcast.CastVarCharBigInt.eval(CastVarCharBigInt.java:42)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:309)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
>         ... 21 common frames omitted
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message