Skip to content

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

Merged
englefly merged 3 commits into
apache:masterfrom
LiBinfeng-01:always_propegate_nullable
Nov 6, 2024
Merged

[Impl](Nereids) add propagateNullLiteral trait for special functions#42256
englefly merged 3 commits into
apache:masterfrom
LiBinfeng-01:always_propegate_nullable

Conversation

@LiBinfeng-01

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown
ContributorAuthor

run buildall

@LiBinfeng-01
LiBinfeng-01force-pushed the always_propegate_nullable branch from a01e8f1 to 6afd272CompareOctober 24, 2024 08:07
@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

2 similar comments
@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

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

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@LiBinfeng-01
LiBinfeng-01force-pushed the always_propegate_nullable branch from 0700986 to ca5c3e6CompareNovember 1, 2024 11:16
@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Nov 1, 2024
@LiBinfeng-01
LiBinfeng-01force-pushed the always_propegate_nullable branch from ca5c3e6 to 62915d9CompareNovember 1, 2024 11:21
@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run buildall

@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run p0

@LiBinfeng-01

Copy link
Copy Markdown
ContributorAuthor

run cloud_p0

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Nov 5, 2024
@LiBinfeng-01LiBinfeng-01 changed the title [Impl](Nereids) add propagatableAlwaysNullable trait for special functions[Impl](Nereids) add propagateNullLiteral trait for special functionsNov 6, 2024
@englefly
englefly merged commit 86b1d16 into apache:masterNov 6, 2024
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 <libinfeng@selectdb.com>
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 <libinfeng@selectdb.com>
@gavinchougavinchou mentioned this pull request Nov 26, 2024
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/2.1.8-mergeddev/3.0.3-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@LiBinfeng-01@doris-robot@englefly@starocean999@wm1581066@morrySnow