MrHappyEnding opened a new pull request, #57789:
URL: https://github.com/apache/spark/pull/57789
### What changes were proposed in this pull request?
Mark `ApplyFunctionExpression` as stateful and add a regression test
verifying
that it produces a fresh expression instance.
### Why are the changes needed?
`ApplyFunctionExpression` reuses a mutable `SpecificInternalRow`. Without
being
marked stateful, the same expression instance could be shared by multiple
evaluators, causing concurrent evaluations to overwrite each other's inputs
and
produce incorrect results.
### Does this PR introduce *any* user-facing change?
Yes. It prevents incorrect results during concurrent evaluation of
`ApplyFunctionExpression`. There is no public API change.
### How was this patch tested?
Added `ApplyFunctionExpressionSuite` and ran:
build/sbt 'catalyst/testOnly *ApplyFunctionExpressionSuite'
build/sbt 'catalyst/testOnly *DataSourceV2FunctionSuite'
dev/lint-scala
--
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]