mihailoale-db opened a new pull request, #50226:
URL: https://github.com/apache/spark/pull/50226
### What changes were proposed in this pull request?
Make `AssertTrue` constructor use `toPrettySQL` instead of `simpleString`.
### Why are the changes needed?
Because of `simpleString` usage we end up having `ExpressionId`s in
expression values (and thus in output schema) which can be queried. This is
invalid because the behavior of this feature is non-deterministic (query which
passes will fail with a cluster restart). Example:
```
SELECT assert_true(col <= col_2) FROM (VALUES ('2025-03-01', '2025-03-10'))
t(col,col_2)
```
Output schema will be: `assert_true((col <= col_2), '(col#1214095 <=
col_2#1214096)' is not true!)`
### Does this PR introduce _any_ user-facing change?
Some SQL queries are going to fail (but they would fail with every cluster
reset, as explained).
### How was this patch tested?
Existing tests.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]