You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/03/06 19:17:38 UTC

[jira] [Created] (DRILL-2396) Query with IS [NOT] DISTINCT FROM in join filter fails during execution if planner.slice_target=1

Victoria Markman created DRILL-2396:
---------------------------------------

             Summary: Query with IS [NOT] DISTINCT FROM in join filter fails during execution if planner.slice_target=1
                 Key: DRILL-2396
                 URL: https://issues.apache.org/jira/browse/DRILL-2396
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow
            Reporter: Victoria Markman
            Assignee: Chris Westin


-- Works
{code}
select
        count(*)
from    j1 inner join j2 ON
        (j1.c_integer = j2.c_integer)
where
        j1.c_bigint IS NOT DISTINCT FROM j2.c_bigint;
{code}

-- Explain plan
{code}
00-01      StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-02        Project($f0=[0])
00-03          SelectionVectorRemover
00-04            Filter(condition=[CAST(CASE(IS NULL($1), IS NULL($3), IS NULL($3), IS NULL($1), =($1, $3))):BOOLEAN NOT NULL])
00-05              HashJoin(condition=[=($0, $2)], joinType=[inner])
00-07                Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/joins/j1]], selectionRoot=/joins/j1, numFiles=1, columns=[`c_integer`, `c_bigint`]]])
00-06                Project(c_integer0=[$0], c_bigint0=[$1])
00-08                  Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/joins/j2]], selectionRoot=/joins/j2, numFiles=1, columns=[`c_integer`, `c_bigint`]]])
{code}
Fails during execution if you set : alter system set `planner.slice_target` = 1;

{code}
0: jdbc:drill:schema=dfs> select
. . . . . . . . . . . . >         count(*)
. . . . . . . . . . . . > from    j1 inner join j2 ON
. . . . . . . . . . . . >         (j1.c_integer = j2.c_integer)
. . . . . . . . . . . . > where
. . . . . . . . . . . . >         j1.c_bigint IS NOT DISTINCT FROM j2.c_bigint;
Query failed: RemoteRpcException: Failure while trying to start remote fragment, Expression has syntax error! line 1:196:no viable alternative at input 'BIT' [ b916d1b0-7cfa-48ad-b5dd-2aadf955857c on atsqa4-133.qa.lab:31010 ]
{code}

Explain plan:
{code}
00-01      StreamAgg(group=[{}], EXPR$0=[$SUM0($0)])
00-02        UnionExchange
01-01          StreamAgg(group=[{}], EXPR$0=[COUNT()])
01-02            Project($f0=[0])
01-03              SelectionVectorRemover
01-04                Filter(condition=[CAST(CASE(IS NULL($1), IS NULL($3), IS NULL($3), IS NULL($1), =($1, $3))):BOOLEAN NOT NULL])
01-05                  HashJoin(condition=[=($0, $2)], joinType=[inner])
01-07                    HashToRandomExchange(dist0=[[$0]])
02-01                      Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/joins/j1]], selectionRoot=/joins/j1, numFiles=1, columns=[`c_integer`, `c_bigint`]]])
01-06                    Project(c_integer0=[$0], c_bigint0=[$1])
01-08                      HashToRandomExchange(dist0=[[$0]])
03-01                        Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/joins/j2]], selectionRoot=/joins/j2, numFiles=1, columns=[`c_integer`, `c_bigint`]]])
{code}

-- If you remove join, query works correctly
{code}
0: jdbc:drill:schema=dfs> select count(*) from j1 where c_bigint is not distinct from c_integer;
+------------+
|   EXPR$0   |
+------------+
| 10000      |
+------------+
1 row selected (0.137 seconds)
{code}

Explain plan:
{code}
00-01      StreamAgg(group=[{}], EXPR$0=[$SUM0($0)])
00-02        StreamAgg(group=[{}], EXPR$0=[COUNT()])
00-03          Project($f0=[0])
00-04            SelectionVectorRemover
00-05              Filter(condition=[CAST(CASE(IS NULL($0), IS NULL($1), IS NULL($1), IS NULL($0), =($0, $1))):BOOLEAN NOT NULL])
00-06                Project(c_bigint=[$1], c_integer=[$0])
00-07                  Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/joins/j1]], selectionRoot=/joins/j1, numFiles=1, columns=[`c_bigint`, `c_integer`]]])
{code}

drillbit.log
{code}
2015-03-06 18:11:14,455 [BitServer-5] ERROR o.a.d.exec.rpc.control.ControlServer - Error 6e9b6998-d020-456f-822c-32a5ff2e764b: Failure while trying to start remote fragment
org.apache.drill.exec.rpc.UserRpcException: org.apache.drill.common.exceptions.ExpressionParsingException: Expression has syntax error! line 1:196:no viable alternative at input 'BIT'
        at org.apache.drill.exec.work.batch.ControlHandlerImpl.startNewRemoteFragment(ControlHandlerImpl.java:139) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.batch.ControlHandlerImpl.handle(ControlHandlerImpl.java:99) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.control.ControlServer.handle(ControlServer.java:60) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.control.ControlServer.handle(ControlServer.java:38) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:58) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:194) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:173) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:161) [netty-codec-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [netty-transport-4.0.24.Final.jar:4.0.24.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [netty-common-4.0.24.Final.jar:4.0.24.Final]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
{code}



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