[jira] [Updated] (DRILL-6533) (type|sqlType|drillType|mode)Of functions fail when used with constants

2019-01-23 Thread Arina Ielchiieva (JIRA)


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

Arina Ielchiieva updated DRILL-6533:

Labels: ready-to-commit  (was: )

> (type|sqlType|drillType|mode)Of functions fail when used with constants
> ---
>
> Key: DRILL-6533
> URL: https://issues.apache.org/jira/browse/DRILL-6533
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.14.0
>Reporter: Arina Ielchiieva
>Assignee: Volodymyr Vysotskyi
>Priority: Major
>  Labels: ready-to-commit
> Fix For: 1.16.0
>
>
> Affected functions: typeOf, sqlTypeOf, drillTypeOf, modeOf
> Example:
> {noformat}
> 0: jdbc:drill:drillbit=localhost> select typeOf(1) from (values(1));
> Error: SYSTEM ERROR: IllegalArgumentException: Can not set 
> org.apache.drill.exec.vector.complex.reader.FieldReader field 
> org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to 
> org.apache.drill.exec.expr.holders.IntHolder
> [Error Id: 709cf2f7-7396-4034-8c5a-e94d78504297 on cv1:31010]
>   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
> during fragment initialization: Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.drill.exec.work.foreman.Foreman.run():294
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():236
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error in evaluating function of 
> typeof
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():347
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():194
> org.apache.drill.common.expression.FunctionHolderExpression.accept():53
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr():69
> org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce():150
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal():620
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions():540
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch():288
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():212
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.IllegalArgumentException) Can not set 
> 

[jira] [Updated] (DRILL-6533) (type|sqlType|drillType|mode)Of functions fail when used with constants

2019-01-23 Thread Arina Ielchiieva (JIRA)


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

Arina Ielchiieva updated DRILL-6533:

Reviewer: Arina Ielchiieva

> (type|sqlType|drillType|mode)Of functions fail when used with constants
> ---
>
> Key: DRILL-6533
> URL: https://issues.apache.org/jira/browse/DRILL-6533
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.14.0
>Reporter: Arina Ielchiieva
>Assignee: Volodymyr Vysotskyi
>Priority: Major
> Fix For: 1.16.0
>
>
> Affected functions: typeOf, sqlTypeOf, drillTypeOf, modeOf
> Example:
> {noformat}
> 0: jdbc:drill:drillbit=localhost> select typeOf(1) from (values(1));
> Error: SYSTEM ERROR: IllegalArgumentException: Can not set 
> org.apache.drill.exec.vector.complex.reader.FieldReader field 
> org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to 
> org.apache.drill.exec.expr.holders.IntHolder
> [Error Id: 709cf2f7-7396-4034-8c5a-e94d78504297 on cv1:31010]
>   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
> during fragment initialization: Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.drill.exec.work.foreman.Foreman.run():294
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():236
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error in evaluating function of 
> typeof
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():347
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():194
> org.apache.drill.common.expression.FunctionHolderExpression.accept():53
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr():69
> org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce():150
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal():620
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions():540
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch():288
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():212
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.IllegalArgumentException) Can not set 
> 

[jira] [Updated] (DRILL-6533) (type|sqlType|drillType|mode)Of functions fail when used with constants

2019-01-21 Thread Volodymyr Vysotskyi (JIRA)


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

Volodymyr Vysotskyi updated DRILL-6533:
---
Fix Version/s: 1.16.0

> (type|sqlType|drillType|mode)Of functions fail when used with constants
> ---
>
> Key: DRILL-6533
> URL: https://issues.apache.org/jira/browse/DRILL-6533
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.14.0
>Reporter: Arina Ielchiieva
>Assignee: Volodymyr Vysotskyi
>Priority: Major
> Fix For: 1.16.0
>
>
> Affected functions: typeOf, sqlTypeOf, drillTypeOf, modeOf
> Example:
> {noformat}
> 0: jdbc:drill:drillbit=localhost> select typeOf(1) from (values(1));
> Error: SYSTEM ERROR: IllegalArgumentException: Can not set 
> org.apache.drill.exec.vector.complex.reader.FieldReader field 
> org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to 
> org.apache.drill.exec.expr.holders.IntHolder
> [Error Id: 709cf2f7-7396-4034-8c5a-e94d78504297 on cv1:31010]
>   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
> during fragment initialization: Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.drill.exec.work.foreman.Foreman.run():294
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():236
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error in evaluating function of 
> typeof
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():347
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():194
> org.apache.drill.common.expression.FunctionHolderExpression.accept():53
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr():69
> org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce():150
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal():620
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions():540
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch():288
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():212
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.IllegalArgumentException) Can not set 
> 

[jira] [Updated] (DRILL-6533) (type|sqlType|drillType|mode)Of functions fail when used with constants

2018-06-24 Thread Arina Ielchiieva (JIRA)


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

Arina Ielchiieva updated DRILL-6533:

Affects Version/s: (was: 1.13.0)
   1.14.0

> (type|sqlType|drillType|mode)Of functions fail when used with constants
> ---
>
> Key: DRILL-6533
> URL: https://issues.apache.org/jira/browse/DRILL-6533
> Project: Apache Drill
>  Issue Type: Bug
>Affects Versions: 1.14.0
>Reporter: Arina Ielchiieva
>Priority: Major
>
> Affected functions: typeOf, sqlTypeOf, drillTypeOf, modeOf
> Example:
> {noformat}
> 0: jdbc:drill:drillbit=localhost> select typeOf(1) from (values(1));
> Error: SYSTEM ERROR: IllegalArgumentException: Can not set 
> org.apache.drill.exec.vector.complex.reader.FieldReader field 
> org.apache.drill.exec.expr.fn.impl.UnionFunctions$GetType.input to 
> org.apache.drill.exec.expr.holders.IntHolder
> [Error Id: 709cf2f7-7396-4034-8c5a-e94d78504297 on cv1:31010]
>   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception 
> during fragment initialization: Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.drill.exec.work.foreman.Foreman.run():294
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error while applying rule 
> ReduceExpressionsRule(Project), args 
> [rel#3945:LogicalProject.NONE.ANY([]).[](input=rel#3944:Subset#0.NONE.ANY([]).[0],EXPR$0=TYPEOF(1))]
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():236
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.RuntimeException) Error in evaluating function of 
> typeof
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():347
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression():194
> org.apache.drill.common.expression.FunctionHolderExpression.accept():53
> 
> org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr():69
> org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce():150
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressionsInternal():620
> org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions():540
> 
> org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch():288
> org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch():212
> org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp():652
> org.apache.calcite.tools.Programs$RuleSetProgram.run():368
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():426
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform():366
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel():255
> 
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel():315
> org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan():180
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():145
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():83
> org.apache.drill.exec.work.foreman.Foreman.runSQL():567
> org.apache.drill.exec.work.foreman.Foreman.run():266
> java.util.concurrent.ThreadPoolExecutor.runWorker():1149
> java.util.concurrent.ThreadPoolExecutor$Worker.run():624
> java.lang.Thread.run():748
>   Caused By (java.lang.IllegalArgumentException) Can not set 
> org.apache.drill.exec.vector.complex.reader.FieldReader field 
>