Revision 3860ac5d2313d438c25e5c46ed4e2b8b2b5227e3 authored by Chao Sun on 19 January 2022, 22:07:30 UTC, committed by Chao Sun on 19 January 2022, 22:09:27 UTC
### What changes were proposed in this pull request?

Pass `isDeterministic` flag to `ApplyFunctionExpression`, `Invoke` and `StaticInvoke` when processing V2 scalar functions.

### Why are the changes needed?

A V2 scalar function can be declared as non-deterministic. However, currently Spark doesn't pass the flag when converting the V2 function to a catalyst expression, which could lead to incorrect results if being applied with certain optimizations.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Added a unit test.

Closes #35243 from sunchao/SPARK-37957.

Authored-by: Chao Sun <sunchao@apple.com>
Signed-off-by: Chao Sun <sunchao@apple.com>
1 parent 5cf8108
History

README.md

back to top