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

[fix](nereids) Remove Nondeterministic to avoid ambiguity when decide a expression is nondeterministic or not (#39801) #40130

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

seawinde
Copy link
Contributor

Proposed changes

commitId: 2b715a7
pr: #39801

@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.

@seawinde
Copy link
Contributor Author

run buildall

…a expression is nondeterministic or not (apache#39801)

## Proposed changes

In apache#36111, we add `isDeterministic`
method in class `ExpressionTrait` to identify the expression is
deterministic or not.

But `unix_timestamp` doesn't extend Nondeterministic, but it is not
deterministic when it's children is empty. and is not deterministic when
children is not empty. If we use` instanceOf Nondeterministic `to
indentify if expression is is not deterministic, that is confused.

So we do something as fllowing:
1. Remove Nondeterministic class, and use `isDeterministic` to indentify
it's deterministic.
2. Add `containsNondeterministic` method in `ExpressionTrait` to
identify it contains nondeterministic expression or not.
3. `isDeterministic` only identify current expression is deterministic
or not. would identify if contains nondeterministic or not
@yiguolei yiguolei force-pushed the fix_nondeterministic_decide_21 branch from 3cca485 to 19f6b48 Compare August 29, 2024 15:47
@yiguolei
Copy link
Contributor

run buildall

@yiguolei yiguolei merged commit e072ce7 into apache:branch-2.1 Aug 29, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants