-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Parameterization of aggregates with WHERE IN
Allow parameterization of a WHERE IN clause when the SELECT contains aggregations. The aggregation across the keys in from the WHERE IN still must execute as a post-lookup operation. Release-Note-Core: Allow parameterizing WHERE IN clauses when the query contains aggregations. Change-Id: Iaf28fb394c4964e5d7e9869b3741fc2017c492d5
- Loading branch information
1 parent
5263bb0
commit d49d37c
Showing
40 changed files
with
119 additions
and
26 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
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
15 changes: 15 additions & 0 deletions
15
system-benchmarks/bench_data/mysql/aggregates/count_group_by.yaml
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,15 @@ | ||
distributions: | ||
- name: ids | ||
range: | ||
start: 0 | ||
end: 100 | ||
zipf: 1.15 | ||
queries: | ||
- spec: >- | ||
SELECT count(*) FROM ints WHERE v = ? GROUP BY i | ||
params: | ||
- sql_type: bigint | ||
distribution: ids | ||
col: 0 | ||
weight: 1 | ||
migrate: true |
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,8 @@ | ||
SET @ints_rows = 50000; | ||
SET @num_ints = 97; | ||
|
||
|
||
CREATE TABLE ints ( | ||
i int primary key, | ||
v int COMMENT 'UNIFORM 0 @num_ints' | ||
) COMMENT = 'ROWS=@ints_rows'; |
15 changes: 15 additions & 0 deletions
15
system-benchmarks/bench_data/mysql/aggregates/simple_count.yaml
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,15 @@ | ||
distributions: | ||
- name: ids | ||
range: | ||
start: 0 | ||
end: 100 | ||
zipf: 1.15 | ||
queries: | ||
- spec: >- | ||
SELECT count(*) FROM ints WHERE v = ? | ||
params: | ||
- sql_type: bigint | ||
distribution: ids | ||
col: 0 | ||
weight: 1 | ||
migrate: true |
15 changes: 15 additions & 0 deletions
15
system-benchmarks/bench_data/mysql/aggregates/simple_sum.yaml
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,15 @@ | ||
distributions: | ||
- name: ids | ||
range: | ||
start: 0 | ||
end: 100 | ||
zipf: 1.15 | ||
queries: | ||
- spec: >- | ||
SELECT sum(v) FROM ints WHERE i = ? | ||
params: | ||
- sql_type: bigint | ||
distribution: ids | ||
col: 0 | ||
weight: 1 | ||
migrate: true |
15 changes: 15 additions & 0 deletions
15
system-benchmarks/bench_data/mysql/aggregates/sum_group_by.yaml
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,15 @@ | ||
distributions: | ||
- name: ids | ||
range: | ||
start: 0 | ||
end: 100 | ||
zipf: 1.15 | ||
queries: | ||
- spec: >- | ||
SELECT sum(v) FROM ints WHERE v = ? GROUP BY i | ||
params: | ||
- sql_type: bigint | ||
distribution: ids | ||
col: 0 | ||
weight: 1 | ||
migrate: true |