Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid RowConverter for multi column grouping (10% faster clickbench queries) #12269

Merged
merged 31 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
37d1382
row like group values to avoid rowconverter
jayzhan211 Aug 31, 2024
f40a164
comment out unused
jayzhan211 Aug 31, 2024
9c61a8b
implement to Arrow's builder
jayzhan211 Sep 14, 2024
f20780e
cleanup
jayzhan211 Sep 14, 2024
d3f54ed
switch back to vector
jayzhan211 Sep 15, 2024
6e0b179
clippy
jayzhan211 Sep 15, 2024
10d3d18
optimize for non-null
jayzhan211 Sep 16, 2024
7602a18
use truncate
jayzhan211 Sep 16, 2024
7a4dbd5
cleanup
jayzhan211 Sep 16, 2024
05fb466
cleanup
jayzhan211 Sep 16, 2024
8efcf07
fix first N bug
jayzhan211 Sep 16, 2024
bc16d55
fix null check
jayzhan211 Sep 17, 2024
fb94485
fast path null
jayzhan211 Sep 17, 2024
07ed966
fix bug
jayzhan211 Sep 17, 2024
925166d
fmt
jayzhan211 Sep 17, 2024
f59d11e
fix error
jayzhan211 Sep 17, 2024
e9f9abc
clippy
jayzhan211 Sep 17, 2024
720c343
adjust spill mode max mem
jayzhan211 Sep 18, 2024
b6cd012
Merge branch 'main' of https://github.com/apache/datafusion into row-…
jayzhan211 Sep 18, 2024
5b8aceb
revert test_create_external_table_with_terminator_with_newlines_in_va…
jayzhan211 Sep 18, 2024
ed9b78e
fix null handle bug
jayzhan211 Sep 18, 2024
fb1b745
cleanup
jayzhan211 Sep 18, 2024
2cab4c2
support binary
jayzhan211 Sep 18, 2024
0090008
add binary test
jayzhan211 Sep 18, 2024
e6d1890
use Vec<T> instead of Option<Vec<T>>
jayzhan211 Sep 21, 2024
77efb1a
add test and doc
jayzhan211 Sep 21, 2024
ef274a4
debug assert
jayzhan211 Sep 21, 2024
864bdfa
mv & rename
jayzhan211 Sep 21, 2024
103c45d
fix take_n logic
jayzhan211 Sep 22, 2024
0bd5251
address comment
jayzhan211 Sep 23, 2024
bf5dcc4
cleanup
jayzhan211 Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/queries/clickbench/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ SELECT "URL", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventD
SELECT "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("SearchEngineID" = 0 AND "AdvEngineID" = 0) THEN "Referer" ELSE '' END AS Src, "URL" AS Dst, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-01' AND "EventDate"::INT::DATE <= '2013-07-31' AND "IsRefresh" = 0 GROUP BY "TraficSourceID", "SearchEngineID", "AdvEngineID", Src, Dst ORDER BY PageViews DESC LIMIT 10 OFFSET 1000;
SELECT "URLHash", "EventDate"::INT::DATE, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-01' AND "EventDate"::INT::DATE <= '2013-07-31' AND "IsRefresh" = 0 AND "TraficSourceID" IN (-1, 6) AND "RefererHash" = 3594120000172545465 GROUP BY "URLHash", "EventDate"::INT::DATE ORDER BY PageViews DESC LIMIT 10 OFFSET 100;
SELECT "WindowClientWidth", "WindowClientHeight", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-01' AND "EventDate"::INT::DATE <= '2013-07-31' AND "IsRefresh" = 0 AND "DontCountHits" = 0 AND "URLHash" = 2868770270353813622 GROUP BY "WindowClientWidth", "WindowClientHeight" ORDER BY PageViews DESC LIMIT 10 OFFSET 10000;
SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-14' AND "EventDate"::INT::DATE <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000;
SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND "EventDate"::INT::DATE >= '2013-07-14' AND "EventDate"::INT::DATE <= '2013-07-15' AND "IsRefresh" = 0 AND "DontCountHits" = 0 GROUP BY DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) ORDER BY DATE_TRUNC('minute', M) LIMIT 10 OFFSET 1000;
4 changes: 2 additions & 2 deletions datafusion/physical-expr-common/src/binary_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ where
}

/// The size, in number of entries, of the initial hash table
const INITIAL_MAP_CAPACITY: usize = 128;
pub(super) const INITIAL_MAP_CAPACITY: usize = 128;
/// The initial size, in bytes, of the string data
const INITIAL_BUFFER_CAPACITY: usize = 8 * 1024;
pub(super) const INITIAL_BUFFER_CAPACITY: usize = 8 * 1024;
impl<O: OffsetSizeTrait, V> ArrowBytesMap<O, V>
where
V: Debug + PartialEq + Eq + Clone + Copy + Default,
Expand Down
Loading