Repository navigation
fix(function): optimize serial_extract for 3.0 (#24241) - #24255
Merged
5 commits merged intoApr 29, 2026
Merged
5 commits merged into
5 commits merged into
Conversation
jiangxinmeng1
requested review from
XuPeng-SH,
aunjgr and
ouyuanning
as code owners
April 29, 2026 09:01
…ation (matrixorigin#24241) When serial_extract is called with a constant index (the common case in GROUP BY on composite secondary index), use UnpackNthElement to decode only up to the target element instead of deserializing the entire tuple. This reduces CPU overhead ~6x for DISTINCT queries on leading columns of composite secondary indexes. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…tion The BVT test expects "index out of range" without the index number. Align UnpackNthElement's error message with the existing serial_extract error format. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This pull request was closed.
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
fixes #24241
What this PR does / why we need it:
UnpackNthElementto deserialize only the Nth element from a serialized tuple, avoiding full deserializationserial_extractfor constant index parameter (the common case in DISTINCT queries on secondary index)Adaptation for 3.0
yearCodecase (not present in 3.0)EncodeNull)Test plan
TestUnpackNthElementpasses🤖 Generated with Claude Code