-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set empty_result_for_aggregation_by_empty_set according to AggregateF…
…uncMode (#3822) (#4013) close pingcap/tidb#30923
- Loading branch information
1 parent
b595172
commit 26557c2
Showing
5 changed files
with
215 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/delta-merge-test/query/mpp/aggregation_empty_input.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Preparation. | ||
=> DBGInvoke __enable_schema_sync_service('true') | ||
|
||
=> DBGInvoke __drop_tidb_table(default, test) | ||
=> drop table if exists default.test | ||
|
||
=> DBGInvoke __set_flush_threshold(1000000, 1000000) | ||
|
||
# Data. | ||
=> DBGInvoke __mock_tidb_table(default, test, 'col_1 String, col_2 Int64') | ||
=> DBGInvoke __refresh_schemas() | ||
=> DBGInvoke __put_region(4, 0, 100, default, test) | ||
=> DBGInvoke __put_region(5, 100, 200, default, test) | ||
=> DBGInvoke __put_region(6, 200, 300, default, test) | ||
|
||
# shuffle agg with empty table | ||
=> DBGInvoke tidb_query('select count(col_1) from default.test', 4,'mpp_query:true,mpp_partition_num:3') | ||
┌─exchange_receiver_0─┐ | ||
│ 0 │ | ||
└─────────────────────┘ | ||
|
||
=> DBGInvoke __raft_insert_row(default, test, 4, 50, 'test1', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 4, 51, 'test2', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 4, 52, 'test3', 777) | ||
=> DBGInvoke __raft_insert_row(default, test, 4, 53, 'test4', 888) | ||
=> DBGInvoke __raft_insert_row(default, test, 5, 150, 'test1', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 5, 151, 'test2', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 5, 152, 'test3', 777) | ||
=> DBGInvoke __raft_insert_row(default, test, 5, 153, 'test4', 888) | ||
=> DBGInvoke __raft_insert_row(default, test, 6, 250, 'test1', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 6, 251, 'test2', 666) | ||
=> DBGInvoke __raft_insert_row(default, test, 6, 252, 'test3', 777) | ||
=> DBGInvoke __raft_insert_row(default, test, 6, 253, 'test4', 999) | ||
|
||
# shuffle agg | ||
=> DBGInvoke tidb_query('select count(col_1), first_row(col_2) from default.test where col_2 = 999', 4,'mpp_query:true,mpp_partition_num:3') | ||
┌─exchange_receiver_0─┬─exchange_receiver_1─┐ | ||
│ 1 │ 999 │ | ||
└─────────────────────┴─────────────────────┘ | ||
|
||
# Clean up. | ||
=> DBGInvoke __drop_tidb_table(default, test) | ||
=> drop table if exists default.test |
Oops, something went wrong.