Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Impl](Nereids) add propagateNullLiteral trait for special functions #42256

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

LiBinfeng-01
Copy link
Collaborator

@LiBinfeng-01 LiBinfeng-01 commented Oct 22, 2024

Add a trait PropagateNullLiteral, which ensures that if any of its input parameters is a null literal, the output will also be a null literal. Note that PropagateNullable also has this property. Due to limitations in the GeneratedExpressionRelations map, most functions that implement alwaysNullable are included in PropagateNullLiteral. Therefore, defining a function that is PropagateNullable but not PropagateNullLiteral is not currently allowed.
function lists:
Acos AppendTrailingCharIfAbsent Asin BitmapFromArray BitmapFromBase64 BitmapFromString BitmapMax BitmapMin BitmapSubsetInRange BitmapSubsetLimit ConvertTz CryptoFunction DayFloor Date DateFormat Divide DigitalMasking Dlog10 Dsqrt Fmod FromBase64 FromDays GetJsonDouble GetJsonString HourCeil HourFloor IntegralDivide Lpad Ln Log10 Log2 Mod MonthCeil MonthFloor Pmod ParseUrl Rpad Repeat RegexpExtract RegexpExtractAll RegexpReplace RegexpReplaceOne SecondCeil SplitPart Sqrt StAngle StAngleSphere StAreaSquareKm StAreaSquareMeters StDistanceSphere StGeomFromWKB StGeomfromtext StGeometryfromtext StLinefromtext StPoint StPolygon StPolyfromtext StX StY StrToDate SubReplace ToDate ToDateV2

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@LiBinfeng-01
Copy link
Collaborator Author

run buildall

@LiBinfeng-01 LiBinfeng-01 force-pushed the always_propegate_nullable branch from a01e8f1 to 6afd272 Compare October 24, 2024 08:07
@LiBinfeng-01
Copy link
Collaborator Author

run buildall

2 similar comments
@LiBinfeng-01
Copy link
Collaborator Author

run buildall

@LiBinfeng-01
Copy link
Collaborator Author

run buildall

starocean999
starocean999 previously approved these changes Oct 30, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 30, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@LiBinfeng-01 LiBinfeng-01 force-pushed the always_propegate_nullable branch from 0700986 to ca5c3e6 Compare November 1, 2024 11:16
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Nov 1, 2024
@LiBinfeng-01 LiBinfeng-01 force-pushed the always_propegate_nullable branch from ca5c3e6 to 62915d9 Compare November 1, 2024 11:21
@LiBinfeng-01
Copy link
Collaborator Author

run buildall

@LiBinfeng-01
Copy link
Collaborator Author

run buildall

@LiBinfeng-01
Copy link
Collaborator Author

run buildall

@LiBinfeng-01
Copy link
Collaborator Author

run p0

@LiBinfeng-01
Copy link
Collaborator Author

run cloud_p0

Copy link
Contributor

github-actions bot commented Nov 5, 2024

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 5, 2024
@LiBinfeng-01 LiBinfeng-01 changed the title [Impl](Nereids) add propagatableAlwaysNullable trait for special functions [Impl](Nereids) add propagateNullLiteral trait for special functions Nov 6, 2024
@englefly englefly merged commit 86b1d16 into apache:master Nov 6, 2024
33 of 35 checks passed
LiBinfeng-01 added a commit to LiBinfeng-01/doris that referenced this pull request Nov 8, 2024
…pache#42256)

Add a trait PropagateNullLiteral, which ensures that if any of its input
parameters is a null literal, the output will also be a null literal.
Note that PropagateNullable also has this property. Due to limitations
in the GeneratedExpressionRelations map, most functions that implement
alwaysNullable are included in PropagateNullLiteral. Therefore, defining
a function that is PropagateNullable but not PropagateNullLiteral is not
currently allowed.
function lists:
Acos AppendTrailingCharIfAbsent Asin BitmapFromArray BitmapFromBase64
BitmapFromString BitmapMax BitmapMin BitmapSubsetInRange
BitmapSubsetLimit ConvertTz CryptoFunction DayFloor Date DateFormat
Divide DigitalMasking Dlog10 Dsqrt Fmod FromBase64 FromDays
GetJsonDouble GetJsonString HourCeil HourFloor IntegralDivide Lpad Ln
Log10 Log2 Mod MonthCeil MonthFloor Pmod ParseUrl Rpad Repeat
RegexpExtract RegexpExtractAll RegexpReplace RegexpReplaceOne SecondCeil
SplitPart Sqrt StAngle StAngleSphere StAreaSquareKm StAreaSquareMeters
StDistanceSphere StGeomFromWKB StGeomfromtext StGeometryfromtext
StLinefromtext StPoint StPolygon StPolyfromtext StX StY StrToDate
SubReplace ToDate ToDateV2
morrySnow pushed a commit that referenced this pull request Nov 11, 2024
…42256) (#43490)

pick from master #42256

Add a trait PropagateNullLiteral, which ensures that if any of its input
parameters is a null literal, the output will also be a null literal.
Note that PropagateNullable also has this property. Due to limitations
in the GeneratedExpressionRelations map, most functions that implement
alwaysNullable are included in PropagateNullLiteral. Therefore, defining
a function that is PropagateNullable but not PropagateNullLiteral is not
currently allowed.
function lists:
Acos AppendTrailingCharIfAbsent Asin BitmapFromArray BitmapFromBase64
BitmapFromString BitmapMax BitmapMin BitmapSubsetInRange
BitmapSubsetLimit ConvertTz CryptoFunction DayFloor Date DateFormat
Divide DigitalMasking Dlog10 Dsqrt Fmod FromBase64 FromDays
GetJsonDouble GetJsonString HourCeil HourFloor IntegralDivide Lpad Ln
Log10 Log2 Mod MonthCeil MonthFloor Pmod ParseUrl Rpad Repeat
RegexpExtract RegexpExtractAll RegexpReplace RegexpReplaceOne SecondCeil
SplitPart Sqrt StAngle StAngleSphere StAreaSquareKm StAreaSquareMeters
StDistanceSphere StGeomFromWKB StGeomfromtext StGeometryfromtext
StLinefromtext StPoint StPolygon StPolyfromtext StX StY StrToDate
SubReplace ToDate ToDateV2


Co-authored-by: LiBinfeng <[email protected]>
englefly pushed a commit that referenced this pull request Nov 11, 2024
…42256) (#43491)

pick: #42256

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] 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:
    - [ ] No.
    - [x] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

Co-authored-by: LiBinfeng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.8-merged dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants