drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-2235) Assert when NOT IN clause contains multiple columns
Date Thu, 12 Feb 2015 23:04:11 GMT

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

Victoria Markman updated DRILL-2235:
------------------------------------
    Description: 
{code}
0: jdbc:drill:schema=dfs> select * from t1;
+------------+------------+------------+
|     a1     |     b1     |     c1     |
+------------+------------+------------+
| 1          | aaaaa      | 2015-01-01 |
| 2          | bbbbb      | 2015-01-02 |
| 3          | ccccc      | 2015-01-03 |
| 4          | null       | 2015-01-04 |
| 5          | eeeee      | 2015-01-05 |
| 6          | fffff      | 2015-01-06 |
| 7          | ggggg      | 2015-01-07 |
| null       | hhhhh      | 2015-01-08 |
| 9          | iiiii      | null       |
| 10         | jjjjj      | 2015-01-10 |
+------------+------------+------------+
10 rows selected (0.056 seconds)

0: jdbc:drill:schema=dfs> select * from t2;
+------------+------------+------------+
|     a2     |     b2     |     c2     |
+------------+------------+------------+
| 0          | zzz        | 2014-12-31 |
| 1          | aaaaa      | 2015-01-01 |
| 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 |
| 3          | ccccc      | 2015-01-03 |
| 4          | ddddd      | 2015-01-04 |
| 5          | eeeee      | 2015-01-05 |
| 6          | fffff      | 2015-01-06 |
| 7          | ggggg      | 2015-01-07 |
| 7          | ggggg      | 2015-01-07 |
| 8          | hhhhh      | 2015-01-08 |
| 9          | iiiii      | 2015-01-09 |
+------------+------------+------------+
13 rows selected (0.069 seconds)
{code}

IN clause returns correct result:
{code}
0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) in (select a2, b2 from
t2);
+------------+
|   EXPR$0   |
+------------+
| 7          |
+------------+
1 row selected (0.258 seconds)
{code}
NOT IN clause asserts:
{code}
0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) not in (select a2, b2
from t2);
Query failed: AssertionError: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

{code}
#Thu Feb 12 12:13:26 EST 2015
git.commit.id.abbrev=de89f36
{code}

drillbit.log
{code}
2015-02-12 22:47:11,730 [2b22d290-315e-4450-8b3f-9b3590eb20c3: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: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
        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:303)
[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: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
        at org.eigenbase.rel.FilterRelBase.<init>(FilterRelBase.java:56) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.rel.FilterRel.<init>(FilterRel.java:50) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.rel.CalcRel.createFilter(CalcRel.java:212) ~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:840)
~[optiq-core-0.9-drill-r18.jar:na]
        at org.eigenbase.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:497)
~[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:163)
~[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:515) [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
2015-02-12 22:47:11,747 [2b22d290-315e-4450-8b3f-9b3590eb20c3:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 8f0bb8dd-deac-4846-9608-e941da9035e8: AssertionError: AND(AND(NOT(IS TRUE($7)), IS
NOT NULL($3)), IS NOT NULL($4))
{code}


  was:
{code}
0: jdbc:drill:schema=dfs> select * from t1;
+------------+------------+------------+
|     a1     |     b1     |     c1     |
+------------+------------+------------+
| 1          | aaaaa      | 2015-01-01 |
| 2          | bbbbb      | 2015-01-02 |
| 3          | ccccc      | 2015-01-03 |
| 4          | null       | 2015-01-04 |
| 5          | eeeee      | 2015-01-05 |
| 6          | fffff      | 2015-01-06 |
| 7          | ggggg      | 2015-01-07 |
| null       | hhhhh      | 2015-01-08 |
| 9          | iiiii      | null       |
| 10         | jjjjj      | 2015-01-10 |
+------------+------------+------------+
10 rows selected (0.056 seconds)

0: jdbc:drill:schema=dfs> select * from t2;
+------------+------------+------------+
|     a2     |     b2     |     c2     |
+------------+------------+------------+
| 0          | zzz        | 2014-12-31 |
| 1          | aaaaa      | 2015-01-01 |
| 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 |
| 3          | ccccc      | 2015-01-03 |
| 4          | ddddd      | 2015-01-04 |
| 5          | eeeee      | 2015-01-05 |
| 6          | fffff      | 2015-01-06 |
| 7          | ggggg      | 2015-01-07 |
| 7          | ggggg      | 2015-01-07 |
| 8          | hhhhh      | 2015-01-08 |
| 9          | iiiii      | 2015-01-09 |
+------------+------------+------------+
13 rows selected (0.069 seconds)
{code}

IN clause returns correct result:
{code}
0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) in (select a2, b2 from
t2);
+------------+
|   EXPR$0   |
+------------+
| 7          |
+------------+
1 row selected (0.258 seconds)
{code}
NOT IN clause asserts:
{code}
0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) not in (select a2, b2
from t2);
Query failed: AssertionError: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

{code}
#Thu Feb 12 12:13:26 EST 2015
git.commit.id.abbrev=de89f36
{code}




> Assert when NOT IN clause contains multiple columns
> ---------------------------------------------------
>
>                 Key: DRILL-2235
>                 URL: https://issues.apache.org/jira/browse/DRILL-2235
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Victoria Markman
>            Assignee: Jinfeng Ni
>
> {code}
> 0: jdbc:drill:schema=dfs> select * from t1;
> +------------+------------+------------+
> |     a1     |     b1     |     c1     |
> +------------+------------+------------+
> | 1          | aaaaa      | 2015-01-01 |
> | 2          | bbbbb      | 2015-01-02 |
> | 3          | ccccc      | 2015-01-03 |
> | 4          | null       | 2015-01-04 |
> | 5          | eeeee      | 2015-01-05 |
> | 6          | fffff      | 2015-01-06 |
> | 7          | ggggg      | 2015-01-07 |
> | null       | hhhhh      | 2015-01-08 |
> | 9          | iiiii      | null       |
> | 10         | jjjjj      | 2015-01-10 |
> +------------+------------+------------+
> 10 rows selected (0.056 seconds)
> 0: jdbc:drill:schema=dfs> select * from t2;
> +------------+------------+------------+
> |     a2     |     b2     |     c2     |
> +------------+------------+------------+
> | 0          | zzz        | 2014-12-31 |
> | 1          | aaaaa      | 2015-01-01 |
> | 2          | bbbbb      | 2015-01-02 |
> | 2          | bbbbb      | 2015-01-02 |
> | 2          | bbbbb      | 2015-01-02 |
> | 3          | ccccc      | 2015-01-03 |
> | 4          | ddddd      | 2015-01-04 |
> | 5          | eeeee      | 2015-01-05 |
> | 6          | fffff      | 2015-01-06 |
> | 7          | ggggg      | 2015-01-07 |
> | 7          | ggggg      | 2015-01-07 |
> | 8          | hhhhh      | 2015-01-08 |
> | 9          | iiiii      | 2015-01-09 |
> +------------+------------+------------+
> 13 rows selected (0.069 seconds)
> {code}
> IN clause returns correct result:
> {code}
> 0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) in (select a2, b2
from t2);
> +------------+
> |   EXPR$0   |
> +------------+
> | 7          |
> +------------+
> 1 row selected (0.258 seconds)
> {code}
> NOT IN clause asserts:
> {code}
> 0: jdbc:drill:schema=dfs> select count(*) from t1 where (a1, b1) not in (select a2,
b2 from t2);
> Query failed: AssertionError: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> {code}
> #Thu Feb 12 12:13:26 EST 2015
> git.commit.id.abbrev=de89f36
> {code}
> drillbit.log
> {code}
> 2015-02-12 22:47:11,730 [2b22d290-315e-4450-8b3f-9b3590eb20c3: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: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT NULL($4))
>         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:303)
[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: AND(AND(NOT(IS TRUE($7)), IS NOT NULL($3)), IS NOT
NULL($4))
>         at org.eigenbase.rel.FilterRelBase.<init>(FilterRelBase.java:56) ~[optiq-core-0.9-drill-r18.jar:na]
>         at org.eigenbase.rel.FilterRel.<init>(FilterRel.java:50) ~[optiq-core-0.9-drill-r18.jar:na]
>         at org.eigenbase.rel.CalcRel.createFilter(CalcRel.java:212) ~[optiq-core-0.9-drill-r18.jar:na]
>         at org.eigenbase.sql2rel.SqlToRelConverter.convertWhere(SqlToRelConverter.java:840)
~[optiq-core-0.9-drill-r18.jar:na]
>         at org.eigenbase.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:497)
~[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:163)
~[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:515) [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
> 2015-02-12 22:47:11,747 [2b22d290-315e-4450-8b3f-9b3590eb20c3:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 8f0bb8dd-deac-4846-9608-e941da9035e8: AssertionError: AND(AND(NOT(IS TRUE($7)), IS
NOT NULL($3)), IS NOT NULL($4))
> {code}



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

Mime
View raw message