-
- Downloads
[SPARK-21255][SQL] simplify encoder for java enum
## What changes were proposed in this pull request? This is a follow-up for https://github.com/apache/spark/pull/18488, to simplify the code. The major change is, we should map java enum to string type, instead of a struct type with a single string field. ## How was this patch tested? existing tests Author: Wenchen Fan <wenchen@databricks.com> Closes #19066 from cloud-fan/fix.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala 13 additions, 33 deletions...ala/org/apache/spark/sql/catalyst/JavaTypeInference.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala 2 additions, 12 deletions...pache/spark/sql/catalyst/encoders/ExpressionEncoder.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala 2 additions, 2 deletions...ache/spark/sql/catalyst/expressions/objects/objects.scala
- sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java 8 additions, 16 deletions...test/java/test/org/apache/spark/sql/JavaDatasetSuite.java
Loading
Please register or sign in to comment