-
- Downloads
[SPARK-13282][SQL] LogicalPlan toSql should just return a String
Previously we were using Option[String] and None to indicate the case when Spark fails to generate SQL. It is easier to just use exceptions to propagate error cases, rather than having for comprehension everywhere. I also introduced a "build" function that simplifies string concatenation (i.e. no need to reason about whether we have an extra space or not). Author: Reynold Xin <rxin@databricks.com> Closes #11171 from rxin/SPARK-13282.
Showing
- sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala 103 additions, 121 deletions...src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/CreateViewAsSelect.scala 6 additions, 2 deletions.../apache/spark/sql/hive/execution/CreateViewAsSelect.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala 1 addition, 2 deletions...org/apache/spark/sql/hive/ExpressionSQLBuilderSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/LogicalPlanToSQLSuite.scala 15 additions, 14 deletions...ala/org/apache/spark/sql/hive/LogicalPlanToSQLSuite.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/SQLBuilderTest.scala 5 additions, 7 deletions...test/scala/org/apache/spark/sql/hive/SQLBuilderTest.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala 11 additions, 10 deletions.../apache/spark/sql/hive/execution/HiveComparisonTest.scala
Please register or sign in to comment