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 incorrect dedup of non-deterministic functions #22686

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

martint
Copy link
Member

@martint martint commented Jul 16, 2024

Fixes #22683

Release notes

(x) Release notes are required, with the following suggested text:

# General
* Fix incorrect evaluation of repeated non-deterministic functions. ({issue}`22683`)

@cla-bot cla-bot bot added the cla-signed label Jul 16, 2024
@martint martint force-pushed the random branch 3 times, most recently from 73f0065 to 9d14a9c Compare July 16, 2024 21:43
@martint martint marked this pull request as ready for review July 17, 2024 04:03
The abstraction for validating the IR is brittle, as it depends on details of how QueryAssertions
constructs the underlying query. We remove it from the QueryAssertions API for now.

Additionally, clean up the tests in TestJsonStringArrayExtractScalar, which were unnecessarily complex.
Non-determinism depends on the body of the lambda expressions
passed to the function. That's handled elsewhere.
@martint
Copy link
Member Author

martint commented Jul 17, 2024

@hashhar, I made a few additional changes. Mind taking a look again?

@martint martint requested review from kasiafi and dain July 17, 2024 22:28
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know/cant verify impact of " Mark array and map processing functions as deterministic " since I couldn't find the code which determines a lambda as deterministic or not.

LGTM otherwise.

@martint martint merged commit 382ff20 into trinodb:master Jul 18, 2024
97 checks passed
@martint martint deleted the random branch July 18, 2024 18:10
@github-actions github-actions bot added this to the 453 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Random function returns the same result for a row when invoked with the same arguments
2 participants