tajo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jung JaeHwa" <jhj...@gruter.com>
Subject Re: Review Request 19841: TAJO-729: PreLogicalPlanVerifier verifies distinct aggregation functions incorrectly.
Date Fri, 04 Apr 2014 03:08:36 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19841/#review39506
-----------------------------------------------------------

Ship it!


+1

Thank you for your contribution.
It looks good overall, and 'mvn clean install  finished successfully.

Push it.

- Jung JaeHwa


On March 31, 2014, 1:40 p.m., Hyunsik Choi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19841/
> -----------------------------------------------------------
> 
> (Updated March 31, 2014, 1:40 p.m.)
> 
> 
> Review request for Tajo.
> 
> 
> Bugs: TAJO-729
>     https://issues.apache.org/jira/browse/TAJO-729
> 
> 
> Repository: tajo
> 
> 
> Description
> -------
> 
> Since the current Tajo cannot process distinct aggregation functions for multiple columns,
PreLogicalPlanVerifier prevents such a case. But, PreLogicalPlanVerifier checks it incorrectly.
As a result, it causes a verification error even though a query can be actually executed in
Tajo.
> 
> See the below example. This query can be actually executed in Tajo. 
> {code:sql}
> select
>   count(distinct l_orderkey) as v0,
>   sum(l_orderkey) as v1,
>   sum(l_linenumber) as v2,
>   count(*) as v4
> from
>   lineitem
> group by
>   l_orderkey;
> {code}
> 
> But, it causes the following verification error.
> 
> {noformat}
> org.apache.tajo.engine.planner.PlanningException: different DISTINCT columns are not
supported yet: l_orderkey, l_linenumber
>   at org.apache.tajo.engine.planner.PreLogicalPlanVerifier.visitProjection(PreLogicalPlanVerifier.java:89)
>   at org.apache.tajo.engine.planner.PreLogicalPlanVerifier.visitProjection(PreLogicalPlanVerifier.java:33)
>   at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:55)
>   at org.apache.tajo.engine.planner.PreLogicalPlanVerifier.verify(PreLogicalPlanVerifier.java:52)
>   at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:247)
>   at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:138)
>   at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:286)
>   at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:513)
>   at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:103)
>   at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>   at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
>   at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
>   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>   at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
>   at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
>   at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
>   at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
>   at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>   at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
>   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
>   at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
>   at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
>   at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
>   at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
>   at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
>   at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
>   at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
>   at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>   at java.lang.Thread.run(Thread.java:744)
> {noformat}
> 
> 
> Diffs
> -----
> 
>   tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
fef9dc1f0a8b40c974a3c462c717ca0e6d76d3d7 
>   tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
250d6f4b98c22d72cb07371b90dbedd929cd85ae 
>   tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation6.sql
PRE-CREATION 
>   tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testDistinctAggregation6.result
PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/19841/diff/
> 
> 
> Testing
> -------
> 
> mvn clean install
> 
> 
> Thanks,
> 
> Hyunsik Choi
> 
>


Mime
View raw message