-
- Downloads
[SPARK-20302][SQL] Short circuit cast when from and to types are structurally the same
## What changes were proposed in this pull request? When we perform a cast expression and the from and to types are structurally the same (having the same structure but different field names), we should be able to skip the actual cast. ## How was this patch tested? Added unit tests for the newly introduced functions. Author: Reynold Xin <rxin@databricks.com> Closes #17614 from rxin/SPARK-20302.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala 42 additions, 23 deletions...cala/org/apache/spark/sql/catalyst/expressions/Cast.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala 26 additions, 0 deletions.../src/main/scala/org/apache/spark/sql/types/DataType.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala 14 additions, 0 deletions...org/apache/spark/sql/catalyst/expressions/CastSuite.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/types/DataTypeSuite.scala 31 additions, 0 deletions...test/scala/org/apache/spark/sql/types/DataTypeSuite.scala
Loading
Please register or sign in to comment