To reproduce, add the following to TestHiveDistributedQueries:
@Test
public void test()
{
assertQuery("SELECT\n" +
" linenumber,\n" +
" 'xxx'\n" +
" FROM\n" +
" (\n" +
" (SELECT orderkey, linenumber FROM lineitem)\n" +
" UNION\n" +
" (SELECT orderkey, linenumber FROM lineitem)\n" +
" ) WHERE orderkey = 1 \n" +
" GROUP BY\n" +
" 1");
}
Caused by: java.lang.IllegalArgumentException: Streaming aggregation with input not grouped on the grouping keys
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:135)
at com.facebook.presto.sql.planner.sanity.ValidateStreamingAggregations$Visitor.visitAggregation(ValidateStreamingAggregations.java:89)
at com.facebook.presto.sql.planner.sanity.ValidateStreamingAggregations$Visitor.visitAggregation(ValidateStreamingAggregations.java:52)
at com.facebook.presto.sql.planner.plan.AggregationNode.accept(AggregationNode.java:200)
at com.facebook.presto.sql.planner.plan.InternalPlanNode.accept(InternalPlanNode.java:31)
at com.facebook.presto.sql.planner.sanity.ValidateStreamingAggregations$Visitor.lambda$visitPlan$0(ValidateStreamingAggregations.java:73)
CC: @highker @wenleix @rongrong @hellium01
Just did a bisect. It is likely introduced by #12606. @rongrong, could you help to take a look?
I'm taking a look.
Most helpful comment
I'm taking a look.