[refine](column) support const sources in column insertion - #67145
Open
Mryange wants to merge 1 commit into
Open
[refine](column) support const sources in column insertion#67145Mryange wants to merge 1 commit into
Mryange wants to merge 1 commit into
Conversation
### What problem does this PR solve? Issue Number: N/A Problem Summary: MutableBlock and sort paths could receive top-level ColumnConst sources, but the virtual range and index insertion interfaces required concrete non-const columns. Callers therefore had to detect and expand constant columns manually, and some paths could fail with a bad cast. This change applies a non-virtual interface around the insertion methods, routes ColumnConst sources through insert_many_from(), and moves concrete implementations behind insert_range_from_impl() and insert_indices_from_impl(). ### Release note None ### Check List (For Author) - Test: BE build with sh build.sh --be -j48; ASAN BE UT with ColumnConstTest.* and BlockTest.MutableBlockAddRowsSupportsConstNullableSource (19 tests passed) - Behavior changed: No - Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 16881 ms |
Contributor
TPC-DS: Total hot run time: 81831 ms |
Contributor
ClickBench: Total hot run time: 14.64 s |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
IColumn::insert_range_from()andinsert_indices_from()required callers to pass the same concrete column type as the destination. A top-levelColumnConstsource therefore had to be materialized or handled at each call site. Missing that handling could make paths such asMutableBlock::add_rows()cast aColumnConstto the destination's concrete type and abort.Root cause: constant-source handling was outside the common
IColumninsertion contract. This change makes the public insertion methods non-virtual entry points that recognize a top-levelColumnConstsource and append its single nested value throughinsert_many_from(). Concrete column implementations move behindinsert_range_from_impl()andinsert_indices_from_impl(), preserving their existing behavior for ordinary sources and const destinations. The duplicate handling inFullSorteris removed, while theSegmentIteratorworkaround from #67042 is intentionally retained.Unit tests cover range and index insertion for numeric, string, nullable, and array constants, as well as both
MutableBlock::add_rows()overloads.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)