Repository navigation
[core] Keep lone keys of an aggregation or partial-update write buffer without one-row batches - #1395
Open
JeonDaehong wants to merge 1 commit into
Open
JeonDaehong wants to merge 1 commit into
JeonDaehong wants to merge 1 commit into
Conversation
…r without one-row batches
Contributor
Author
|
@JingsongLi this is the write side of #1336 that doesn't need the builder question settled: lone keys at flush skip the one-row batches, about 3.4x faster on new-key writes for aggregation and partial-update. Could you take a look when you have time? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: part of #1336
At flush, the aggregation and partial-update write buffers turn every key with a single version into a one-row
RecordBatch(singleton_merge_row) and concatenate them at the end. Writing 2M new keys takes about 2.1 s with either engine against 0.5 s for deduplicate, which flushes with onetake.Brief change log
takewhen no key merged,interleaveotherwise. Rows and order are unchanged, and a lone retract still keeps its kind and payload.PK table, 2M new keys per write, in-memory FileIO, release build, 3 alternating rounds against main: aggregation 2103–2205 → 622–637 ms, partial-update 2103–2148 → 628–643 ms, deduplicate unchanged.
Tests
test_flush_merge_engines_keep_lone_rows_around_merged_keys: unsorted input with a merged key between lone keys and a string column, for both engines. It also passes on main.Ran the ci.yml steps locally (fmt, clippy, msrv, unit, rest-server, integration, datafusion, python, go).
API and Format
None.
Documentation
None.