spark-instrumented-optimizer/sql/core
herman fab4ca5156
[SPARK-31450][SQL] Make ExpressionEncoder thread-safe
### What changes were proposed in this pull request?
This PR moves the `ExpressionEncoder.toRow` and `ExpressionEncoder.fromRow` functions into their own function objects(`ExpressionEncoder.Serializer` & `ExpressionEncoder.Deserializer`). This effectively makes the `ExpressionEncoder` stateless, thread-safe and (more) reusable. The function objects are not thread safe, however they are documented as such and should be used in a more limited scope (making it easier to reason about thread safety).

### Why are the changes needed?
ExpressionEncoders are not thread-safe. We had various (nasty) bugs because of this.

### Does this PR introduce any user-facing change?
No.

### How was this patch tested?
Existing tests.

Closes #28223 from hvanhovell/SPARK-31450.

Authored-by: herman <herman@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
2020-04-16 18:47:46 -07:00
..
benchmarks [SPARK-31443][SQL] Fix perf regression of toJavaDate 2020-04-15 06:19:12 +00:00
src [SPARK-31450][SQL] Make ExpressionEncoder thread-safe 2020-04-16 18:47:46 -07:00
v1.2/src [SPARK-31398][SQL] Fix perf regression of loading dates before 1582 year by non-vectorized ORC reader 2020-04-13 05:29:54 +00:00
v2.3/src [SPARK-31398][SQL] Fix perf regression of loading dates before 1582 year by non-vectorized ORC reader 2020-04-13 05:29:54 +00:00
pom.xml [SPARK-31021][SQL] Support MariaDB Kerberos login in JDBC connector 2020-04-09 09:20:02 -07:00