forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-45827][SQL] Move data type checks to CreatableRelationProvider
### What changes were proposed in this pull request? In DataSource.scala, there are checks to prevent writing Variant and Interval types to a `CreatableRelationalProvider`. This PR unifies the checks in a method on `CreatableRelationalProvider` so that data sources can override in order to specify a different set of supported data types. ### Why are the changes needed? Allows data sources to specify what types they support, while providing a sensible default for most data sources. ### Does this PR introduce _any_ user-facing change? The error message for Variant and Interval are now shared, and are a bit more generic. The intent is to otherwise not have any user-facing change. ### How was this patch tested? Unit tests added. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45409 from cashmand/SPARK-45827-CreatableRelationProvider. Authored-by: cashmand <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information
Showing
3 changed files
with
72 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters