[refine](column) remove IDataType get_default (#62582)#63308
Open
Mryange wants to merge 2 commits into
Open
Conversation
Problem Summary:
`IDataType::get_default()` duplicated the default-value behavior already
owned by `IColumn::insert_default()`, but the two paths did not always
produce the same result. This made default materialization inconsistent
for complex and nested types, and forced several code paths to
round-trip through `Field` even when the column layer already had the
correct defaulting semantics.
This change removes the redundant type-level API and makes default
generation consistently follow the column implementation.
- Remove `IDataType::get_default()` from the BE data type interface and
delete all corresponding overrides.
- Rewrite `create_column_const_with_default_value()` to create a column
and materialize its default value through `insert_default()`.
- Replace storage-side callers that used `type->get_default()` with
direct column-level `insert_default()` calls.
- Update unit tests to stop asserting the removed `Field`-based API and
to validate defaults through column behavior instead.
None
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [x] No need to test or manual test. Explain why:
- [x] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [x] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
(cherry picked from commit 4955aaf)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
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 problem does this PR solve?
#62582
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)