drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2165) Assert when grouping on expression with extract and concat functions
Date Wed, 04 Feb 2015 20:19:35 GMT
Victoria Markman created DRILL-2165:
---------------------------------------

             Summary: Assert when grouping on expression with extract and concat functions
                 Key: DRILL-2165
                 URL: https://issues.apache.org/jira/browse/DRILL-2165
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 0.8.0
            Reporter: Victoria Markman


EXTRACT with date data type:
{code}
0: jdbc:drill:schema=dfs> select concat(extract(day from c_date), extract(month from c_date))
from t1 group by concat(extract(day from c_date), extract(month from c_date));
Query failed: AssertionError:
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

EXTRACT with timestamp data type
{code}
0: jdbc:drill:schema=dfs> select concat(extract(day from c_timestamp), extract(month from
c_timestamp)) from t1 group by concat(extract(day from c_timestamp), extract(month from c_timestamp));
Query failed: AssertionError:
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

If you add aggregate function SUM, query runs:
{code}
select
        concat(extract(day from c_date), extract(month from c_date)),
        sum(c_integer)
from
        t1
group by
        concat(extract(day from c_date), extract(month from c_date));
{code}
drillbit.log
{code}
2015-02-04 20:06:15,103 [2b2d8447-b333-5df4-f49a-b2111f875a67:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 8cff16d9-b34e-4ce3-a00b-18eaf3f64e66: AssertionError:
org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: Internal error: while converting `concat`(EXTRACT(DAY FROM `c_timestamp`),
EXTRACT(MONTH FROM `c_timestamp`))
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:197) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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: while converting `concat`(EXTRACT(DAY
FROM `c_timestamp`), EXTRACT(MONTH FROM `c_timestamp`))
        at org.eigenbase.util.Util.newInternal(Util.java:750) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.ReflectiveConvertletTable$2.convertCall(ReflectiveConvertletTable.java:149)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:52)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4099)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:1)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql.SqlCall.accept(SqlCall.java:125) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:3994)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.createAggImpl(SqlToRelConverter.java:2402)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertAgg(SqlToRelConverter.java:2191)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:514)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:474)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:2657)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:432)
~[optiq-core-0.9-drill-r18.jar:na]
        at net.hydromatic.optiq.prepare.PlannerImpl.convert(PlannerImpl.java:186) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToRel(DefaultSqlHandler.java:149)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:126)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:513) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:188) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        ... 4 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
        at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source) ~[na:na]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.7.0_71]
        at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_71]
        at org.eigenbase.sql2rel.ReflectiveConvertletTable$2.convertCall(ReflectiveConvertletTable.java:139)
~[optiq-core-0.9-drill-r18.jar:na]
        ... 21 common frames omitted
Caused by: java.lang.AssertionError: null
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.getRootField(SqlToRelConverter.java:3811)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.adjustInputRef(SqlToRelConverter.java:3087)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertIdentifier(SqlToRelConverter.java:3062)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.access$6(SqlToRelConverter.java:3022) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4109)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:1)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql.SqlIdentifier.accept(SqlIdentifier.java:222) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:3994)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.apache.drill.exec.planner.sql.DrillExtractConvertlet.convertCall(DrillExtractConvertlet.java:58)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.eigenbase.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:52)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4099)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:1)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql.SqlCall.accept(SqlCall.java:125) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:3994)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.StandardConvertletTable.convertExpressionList(StandardConvertletTable.java:731)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.StandardConvertletTable.convertFunction(StandardConvertletTable.java:593)
~[optiq-core-0.9-drill-r18.jar:na]
{code}



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

Mime
View raw message