Repository navigation
Conversation
### What problem does this PR solve? Issue Number: None Related PR: apache#69679 Problem Summary: Constant expressions can return ordinary single-row columns, but scan predicate processing assumes ColumnConst and fails a checked cast. Backport apache#69679 to normalize cached results with ConstantExprResult and migrate scan, scalar-function and ANN consumers. Preserve NULL handling and constant broadcasting. Adapt regexp consumers and scan tests to the 4.2 interfaces. Exclude tests for features absent from this branch. ### Release note Fix query errors when scan predicates use constant expressions that return ordinary single-row columns, including COALESCE and IFNULL. ### Check List (For Author) - Test: Unit tests ported and adapted; not executed. Builds and runtime validation await user review as required by the development-machine instructions. clang-format 16, check-format.sh and git diff --cached --check passed. - Behavior changed: Yes. Scan consumers accept ordinary single-row constants and preserve NULL semantics. - Does this need documentation: No. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label (cherry picked from commit 5b2c066)
### What problem does this PR solve? Issue Number: None Related PR: apache#69679 Problem Summary: The backported scan tests used the master function-filter API and omitted nullable tuple metadata required by branch-4.2. Use the branch's three-argument API, inspect its pushdown function list, and initialize the tuple nullability so the new tests compile and execute. ### Release note None ### Check List (For Author) - Test - [x] Unit Test - Behavior changed: - [x] No. - Does this need documentation? - [x] No. ### Testing ASAN BE build passed. Targeted ASAN BE unit tests: 197 tests from 13 suites, 196 passed and 1 pre-existing MathFunctionTest.random_test skipped. clang-format 16 and git diff --check passed. Validation used the automation prebuilt third-party package after checking required C API compatibility; this is not connector runtime validation. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label
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?
Issue Number: None
Related PR: #69679
Problem Summary:
Backport #69679 to branch-4.2. Constant expressions such as COALESCE can return ordinary single-row columns, while scan predicate processing assumes ColumnConst and fails a checked cast. Normalize cached results with ConstantExprResult and migrate scan, scalar-function and ANN consumers, preserving NULL handling and constant broadcasting.
Adapt regexp consumers and scan tests to the 4.2 interfaces without importing unrelated master features.
Release note
Fix query errors when scan predicates use constant expressions that return ordinary single-row columns.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)