[ 
https://issues.apache.org/jira/browse/IMPALA-12394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17764045#comment-17764045
 ] 

ASF subversion and git services commented on IMPALA-12394:
----------------------------------------------------------

Commit 704ff7788d015dcbe66a319fb017d0a3f8a76399 in impala's branch 
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=704ff7788 ]

IMPALA-12383: Fix SingleNodePlanner aggregation limits

IMPALA-2581 added enforcement of the limit when adding entries to the
grouping aggregation. It would stop adding new entries if the number of
entries in the grouping aggregation was >= the limit. If the grouping
aggregation never contains more entries than the limit, then it would
not output more entries.

However, this limit was not enforced exactly when adding. It would add a
whole batch before checking the limit, so it can go past the limit. In
practice the exchange in a distributed aggregation would enforce limits,
so this would only show up when num_nodes=1. As a result, the following
query incorrectly returns 16 rows, not 10:

  set num_nodes=1;
  select distinct l_orderkey from tpch.lineitem limit 10;

One option is to be exact when adding items to the group aggregation,
which would require testing the limit on each row (we don't know which
are duplicates). This is awkward. Removing the limit on the output of
the aggregation also is not really needed for the original change
(stopping the children early once the limit is reached). Instead, we
restore the limit on the output of the grouping agg (which is already
known to work).

Testing:
- added a test case where we assert number of rows returned by an
  aggregation node (rather than an exchange or top-n).
- restores definition of ALL_CLUSTER_SIZES and makes it simpler to
  enable for individual test suites. Filed IMPALA-12394 to generally
  re-enable testing with ALL_CLUSTER_SIZES. Enables ALL_CLUSTER_SIZES
  for aggregation tests.

Change-Id: Ic5eec1190e8e182152aa954897b79cc3f219c816
Reviewed-on: http://gerrit.cloudera.org:8080/20379
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Reviewed-by: Joe McDonnell <joemcdonn...@cloudera.com>


> Restore testing single-node planning for most tests
> ---------------------------------------------------
>
>                 Key: IMPALA-12394
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12394
>             Project: IMPALA
>          Issue Type: Task
>            Reporter: Michael Smith
>            Priority: Major
>
> ALL_CLUSTER_SIZES was redefined to be ALL_NODES_ONLY due to IMPALA-561. 
> However it wasn't restored after IMPALA-561 was fixed, and now we've added 
> tons of tests that might only work with ALL_NODES_ONLY.
> Re-evaluate new tests with ALL_CLUSTER_SIZES and restore testing with single 
> and distributed planning by updating ImpalaTestSuite#add_test_dimensions and 
> test_dimensions.create_exec_option_dimension to use ALL_CLUSTER_SIZES.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to