drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Gelbana (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5583) Literal expression not handled
Date Tue, 13 Jun 2017 14:31:00 GMT
Muhammad Gelbana created DRILL-5583:
---------------------------------------

             Summary: Literal expression not handled
                 Key: DRILL-5583
                 URL: https://issues.apache.org/jira/browse/DRILL-5583
             Project: Apache Drill
          Issue Type: Bug
          Components: SQL Parser
    Affects Versions: 1.9.0
            Reporter: Muhammad Gelbana


The following query
{code:sql}
SELECT ((UNIX_TIMESTAMP(Calcs.`date0`, 'yyyy-MM-dd') / (60 * 60 * 24)) + (365 * 70 + 17))
`TEMP(Test)(64617177)(0)` FROM `dfs`.`path_to_parquet` Calcs GROUP BY ((UNIX_TIMESTAMP(Calcs.`date0`,
'yyyy-MM-dd') / (60 * 60 * 24)) + (365 * 70 + 17))
{code}

Throws the following exception
{noformat}
[Error Id: 5ee33c0f-9edc-43a0-8125-3e6499e72410 on mgelbana:31010]
org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: AssertionError: Internal error:
invalid literal: 60 + 2


[Error Id: 5ee33c0f-9edc-43a0-8125-3e6499e72410 on mgelbana:31010]
	at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543)
~[drill-common-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:825) [drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:935) [drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:281) [drill-java-exec-1.9.0.jar:1.9.0]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [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: invalid literal: 60 + 2
	... 4 common frames omitted
Caused by: java.lang.AssertionError: Internal error: invalid literal: 60 + 2
	at org.apache.calcite.util.Util.newInternal(Util.java:777) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.SqlLiteral.value(SqlLiteral.java:329) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.SqlCallBinding.getOperandLiteralValue(SqlCallBinding.java:219)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.SqlBinaryOperator.getMonotonicity(SqlBinaryOperator.java:188) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.drill.exec.planner.sql.DrillCalciteSqlOperatorWrapper.getMonotonicity(DrillCalciteSqlOperatorWrapper.java:107)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.calcite.sql.SqlCall.getMonotonicity(SqlCall.java:175) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.SqlCallBinding.getOperandMonotonicity(SqlCallBinding.java:193)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.fun.SqlMonotonicBinaryOperator.getMonotonicity(SqlMonotonicBinaryOperator.java:59)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.drill.exec.planner.sql.DrillCalciteSqlOperatorWrapper.getMonotonicity(DrillCalciteSqlOperatorWrapper.java:107)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.calcite.sql.SqlCall.getMonotonicity(SqlCall.java:175) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql.validate.SelectScope.getMonotonicity(SelectScope.java:154) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.createAggImpl(SqlToRelConverter.java:2476)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertAgg(SqlToRelConverter.java:2374) ~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:603)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:564)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2769)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:518)
~[calcite-core-1.4.0-drill-r19.jar:1.4.0-drill-r19]
	at org.apache.drill.exec.planner.sql.SqlConverter.toRel(SqlConverter.java:263) ~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel(DefaultSqlHandler.java:626)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:195)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:164)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan(DrillSqlWorker.java:123)
~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:97) ~[drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:1008) [drill-java-exec-1.9.0.jar:1.9.0]
	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:264) [drill-java-exec-1.9.0.jar:1.9.0]
	... 3 common frames omitted
{noformat}



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

Mime
View raw message