-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make ARRAY_TO_MV a not deterministic function #13618
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13618 +/- ##
============================================
+ Coverage 61.75% 61.94% +0.19%
+ Complexity 207 198 -9
============================================
Files 2436 2555 +119
Lines 133233 140716 +7483
Branches 20636 21862 +1226
============================================
+ Hits 82274 87173 +4899
- Misses 44911 46906 +1995
- Partials 6048 6637 +589
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
...-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java
Show resolved
Hide resolved
Technically, |
No. ARRAY_TO_MV is not deterministic. The definition is that the result is the same for the same inputs. That semantic is what give Calcite permission to simplify What you are saying is that |
|
That makes sense, thanks for the explanation! |
(cherry picked from commit 65907b7) # Conflicts: # pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java
Fixes #13595 by making ARRAY_TO_MV a non deterministic function.
As defined in SqlOperator Calcite javadoc, a function is deterministic if and only if
Which is not true in the case of
ARRAY_TO_MV, whose semantic is actually not implementable in Calcite because it actually depends what is being done with the value returned.