[jira] [Commented] (DRILL-5645) negation of expression causes null pointer exception

2017-11-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16233945#comment-16233945
 ] 

ASF GitHub Bot commented on DRILL-5645:
---

Github user josiahyan commented on the issue:

https://github.com/apache/drill/pull/892
  
Yay! First commit!

Thanks for the review!


> negation of expression causes null pointer exception
> 
>
> Key: DRILL-5645
> URL: https://issues.apache.org/jira/browse/DRILL-5645
> Project: Apache Drill
>  Issue Type: Bug
>  Components:  Server
>Affects Versions: 1.10.0
> Environment: Drill 1.10
>Reporter: N Campbell
>Priority: Major
>  Labels: ready-to-commit
> Fix For: 1.12.0
>
>
> Following statement will fail when the expression is negated
> select -(2 * 2) from ( values ( 1 ) ) T ( C1 )
> Error: SYSTEM ERROR: NullPointerException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DRILL-5645) negation of expression causes null pointer exception

2017-10-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16200676#comment-16200676
 ] 

ASF GitHub Bot commented on DRILL-5645:
---

Github user asfgit closed the pull request at:

https://github.com/apache/drill/pull/892


> negation of expression causes null pointer exception
> 
>
> Key: DRILL-5645
> URL: https://issues.apache.org/jira/browse/DRILL-5645
> Project: Apache Drill
>  Issue Type: Bug
>  Components:  Server
>Affects Versions: 1.10.0
> Environment: Drill 1.10
>Reporter: N Campbell
>  Labels: ready-to-commit
> Fix For: 1.12.0
>
>
> Following statement will fail when the expression is negated
> select -(2 * 2) from ( values ( 1 ) ) T ( C1 )
> Error: SYSTEM ERROR: NullPointerException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DRILL-5645) negation of expression causes null pointer exception

2017-10-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16196913#comment-16196913
 ] 

ASF GitHub Bot commented on DRILL-5645:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/892
  
+1, LGTM.


> negation of expression causes null pointer exception
> 
>
> Key: DRILL-5645
> URL: https://issues.apache.org/jira/browse/DRILL-5645
> Project: Apache Drill
>  Issue Type: Bug
>  Components:  Server
>Affects Versions: 1.10.0
> Environment: Drill 1.10
>Reporter: N Campbell
> Fix For: 1.12.0
>
>
> Following statement will fail when the expression is negated
> select -(2 * 2) from ( values ( 1 ) ) T ( C1 )
> Error: SYSTEM ERROR: NullPointerException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DRILL-5645) negation of expression causes null pointer exception

2017-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111257#comment-16111257
 ] 

ASF GitHub Bot commented on DRILL-5645:
---

GitHub user josiahyan opened a pull request:

https://github.com/apache/drill/pull/892

DRILL-5645: negation of expression causes null pointer exception

Fixes DRILL-5645, and another test case that got caught up in the change 
due to type issues.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/josiahyan/drill DRILL-5645

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/drill/pull/892.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #892


commit 8ef634e2204a48fe7dd35d212cb0073fdf41aa35
Author: Josiah Yan 
Date:   2017-08-02T14:50:54Z

DRILL-5645: negation of expression causes null pointer exception




> negation of expression causes null pointer exception
> 
>
> Key: DRILL-5645
> URL: https://issues.apache.org/jira/browse/DRILL-5645
> Project: Apache Drill
>  Issue Type: Bug
>  Components:  Server
>Affects Versions: 1.10.0
> Environment: Drill 1.10
>Reporter: N Campbell
>
> Following statement will fail when the expression is negated
> select -(2 * 2) from ( values ( 1 ) ) T ( C1 )
> Error: SYSTEM ERROR: NullPointerException



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (DRILL-5645) negation of expression causes null pointer exception

2017-08-02 Thread Josiah Yan (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111038#comment-16111038
 ] 

Josiah Yan commented on DRILL-5645:
---

Reproduced, getting stacktrace

{code}
[Error Id: bea50afd-515c-4afb-be0f-b07849945dee on psf806i3:31010]
org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: 
NullPointerException


[Error Id: bea50afd-515c-4afb-be0f-b07849945dee on psf806i3:31010]
at 
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:550)
 ~[drill-common-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:847)
 [drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:977) 
[drill-java-exec-1.11.0.jar:1.11.0]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:297) 
[drill-java-exec-1.11.0.jar:1.11.0]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[na:1.8.0_131]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[na:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected 
exception during fragment initialization: Internal error: Error while applying 
rule ReduceExpressionsRule_Project, args [rel#12:L
ogicalProject.NONE.ANY([]).[](input=rel#11:Subset#0.NONE.ANY([]).[0],EXPR$0=-(*(2,
 2)))]
... 4 common frames omitted
Caused by: java.lang.AssertionError: Internal error: Error while applying rule 
ReduceExpressionsRule_Project, args 
[rel#12:LogicalProject.NONE.ANY([]).[](input=rel#11:Subset#0.NONE.ANY([]).[0],EXPR$0=-(*(2,
 2)))]
at org.apache.calcite.util.Util.newInternal(Util.java:792) 
~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251)
 ~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:811)
 ~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:310) 
~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform(DefaultSqlHandler.java:401)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform(DefaultSqlHandler.java:343)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRawDrel(DefaultSqlHandler.java:242)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:292)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:169)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan(DrillSqlWorker.java:131)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:79)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:1050) 
[drill-java-exec-1.11.0.jar:1.11.0]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:280) 
[drill-java-exec-1.11.0.jar:1.11.0]
... 3 common frames omitted
Caused by: java.lang.NullPointerException: null
at 
org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitCall(DrillOptiq.java:170)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.logical.DrillOptiq$RexToDrill.visitCall(DrillOptiq.java:97)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at org.apache.calcite.rex.RexCall.accept(RexCall.java:107) 
~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.drill.exec.planner.logical.DrillOptiq.toDrill(DrillOptiq.java:94) 
~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.logical.DrillOptiq.toDrill(DrillOptiq.java:81) 
~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce(DrillConstExecutor.java:124)
 ~[drill-java-exec-1.11.0.jar:1.11.0]
at 
org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:502)
 ~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.calcite.rel.rules.ReduceExpressionsRule$1.onMatch(ReduceExpressionsRule.java:243)
 ~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228)
 ~[calcite-core-1.4.0-drill-r21.jar:1.4.0-drill-r21]
... 14