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-48288] Add source data type for connector cast expression
Currently, V2ExpressionBuilder will build connector.Cast expression from catalyst.Cast expression. Catalyst cast have expression data type, but connector cast does not have it. Since some casts are not allowed on external engine, we need to know source and target data type, since we want finer granularity to block some unsupported casts. ### What changes were proposed in this pull request? Add source data type to connector `Cast` expression ### Why are the changes needed? We need finer granularity to allow implementors of `SQLBuilder` to disable some unsupported casts. ### Does this PR introduce _any_ user-facing change? Yes, visitCast function is changed, and it needs to be overriden again. ### How was this patch tested? No tests made. Simple code change. ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#46596 from urosstan-db/SPARK-48288-Add-source-data-type-to-connector-cast-expression. Authored-by: Uros Stankovic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information
1 parent
fa83d0f
commit 4be0828
Showing
4 changed files
with
23 additions
and
7 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
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