Skip to content

Commit

Permalink
[SPARK-49424][CONNECT][SQL] Consolidate Encoders.scala
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
This PR moves Encoders.scala to sql/api. It removes the duplicate one in connect.

### Why are the changes needed?
We are creating a unified scala interface for Classic and Connect.

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

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

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #48021 from hvanhovell/SPARK-49424.

Authored-by: Herman van Hovell <[email protected]>
Signed-off-by: Herman van Hovell <[email protected]>
  • Loading branch information
hvanhovell committed Sep 18, 2024
1 parent b180709 commit 31cd699
Show file tree
Hide file tree
Showing 24 changed files with 300 additions and 620 deletions.
6 changes: 6 additions & 0 deletions common/utils/src/main/resources/error/error-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,12 @@
},
"sqlState" : "42903"
},
"INVALID_AGNOSTIC_ENCODER" : {
"message" : [
"Found an invalid agnostic encoder. Expects an instance of AgnosticEncoder but got <encoderType>. For more information consult '<docroot>/api/java/index.html?org/apache/spark/sql/Encoder.html'."
],
"sqlState" : "42001"
},
"INVALID_ARRAY_INDEX" : {
"message" : [
"The index <indexValue> is out of bounds. The array has <arraySize> elements. Use the SQL function `get()` to tolerate accessing element at invalid index and return NULL instead. If necessary set <ansiConfig> to \"false\" to bypass this error."
Expand Down
4 changes: 4 additions & 0 deletions project/MimaExcludes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ object MimaExcludes {
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.DataFrameWriterV2"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.WriteConfigMethods"),

// SPARK-49424: Shared Encoders
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.Encoders"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.Encoders$"),

// SPARK-49413: Create a shared RuntimeConfig interface.
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.RuntimeConfig"),
ProblemFilters.exclude[MissingClassProblem]("org.apache.spark.sql.RuntimeConfig$"),
Expand Down
Loading

0 comments on commit 31cd699

Please sign in to comment.