Victoria Markman created DRILL-2934:
---------------------------------------
Summary: Exception when distinct aggregate is compared to numeric
literal with decimal point
Key: DRILL-2934
URL: https://issues.apache.org/jira/browse/DRILL-2934
Project: Apache Drill
Issue Type: Bug
Components: Execution - Flow
Affects Versions: 0.9.0
Reporter: Victoria Markman
Assignee: Chris Westin
This exception has something to do with the numeric literal comparison.
alter session set `planner.slice_target` = 1;
Exception: (same is true for SUM/AVG)
{code}
0: jdbc:drill:schema=dfs> select count(*) from cp.`tpch/orders.parquet` having
count(distinct o_orderkey) <= 10000000.00;
Query failed: SYSTEM ERROR:
org.apache.drill.common.exceptions.ExpressionParsingException: Expression has
syntax error! line 1:32:extraneous input 'E7' expecting Careen
[8b467bf9-3fff-4aae-bfca-8d1cb5f01d4f on atsqa4-133.qa.lab:31010]
Error: exception while executing query: Failure while executing query.
(state=,code=0)
{code}
This one works (the difference is the value: one million with decimal point)
{code}
0: jdbc:drill:schema=dfs> select count(*) from cp.`tpch/orders.parquet` having
count(distinct o_orderkey) <= 1000000.00;
+------------+
| EXPR$0 |
+------------+
| 15000 |
+------------+
1 row selected (2.793 seconds)
{code}
Remove decimal point, works:
{code}
0: jdbc:drill:schema=dfs> select count(*) from cp.`tpch/orders.parquet` having
sum(distinct o_orderkey) >= 10000000;
+------------+
| EXPR$0 |
+------------+
| 15000 |
+------------+
1 row selected (3.021 seconds)
{code}
Non distinct aggregate:
{code}
0: jdbc:drill:schema=dfs> select count(*) from cp.`tpch/orders.parquet` having
count(o_orderkey) <= 10000000.00;
+------------+
| EXPR$0 |
+------------+
| 15000 |
+------------+
1 row selected (0.249 seconds)
{code}
drillbit.log
{code}
2015-05-01 04:31:34,925 [2abcfe58-9dd4-8ea0-51f9-4243ed49ad54: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: SYSTEM ERROR:
org.apache.drill.common.exceptions.ExpressionParsingException: Expression has
syntax error! line 1:32:extraneous input 'E7' expecting CParen
[c8b9ea63-fb5d-44a7-a8e3-87995c3e6d31 on atsqa4-133.qa.lab:31010]
at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:212)
[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.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: org.apache.drill.common.exceptions.UserRemoteException: SYSTEM
ERROR: org.apache.drill.common.exceptions.ExpressionParsingException:
Expression has syntax error! line 1:32:extraneous input 'E7' expecting CParen
[c8b9ea63-fb5d-44a7-a8e3-87995c3e6d31 on atsqa4-133.qa.lab:31010]
at
org.apache.drill.exec.rpc.CoordinationQueue.updateFailedFuture(CoordinationQueue.java:154)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
at
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:231)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
at
org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:173)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.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]
... 1 common frames omitted
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)