Repository: spark Updated Branches: refs/heads/branch-2.0 704215d30 -> e387c8ba8
[SPARK-17391][TEST][2.0] Fix Two Test Failures After Backport ### What changes were proposed in this pull request? In the latest branch 2.0, we have two test case failure due to backport. - test("ALTER VIEW AS should keep the previous table properties, comment, create_time, etc.") - test("SPARK-6212: The EXPLAIN output of CTAS only shows the analyzed plan") ### How was this patch tested? N/A Author: gatorsmile <gatorsm...@gmail.com> Closes #14951 from gatorsmile/fixTestFailure. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e387c8ba Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e387c8ba Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e387c8ba Branch: refs/heads/branch-2.0 Commit: e387c8ba86f89115eb2eabac070c215f451c5f0f Parents: 704215d Author: gatorsmile <gatorsm...@gmail.com> Authored: Mon Sep 5 11:17:37 2016 +0800 Committer: Wenchen Fan <wenc...@databricks.com> Committed: Mon Sep 5 11:17:37 2016 +0800 ---------------------------------------------------------------------- .../org/apache/spark/sql/hive/execution/HiveExplainSuite.scala | 6 +++--- .../org/apache/spark/sql/hive/execution/SQLViewSuite.scala | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/e387c8ba/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala ---------------------------------------------------------------------- diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala index 98afd99..ec3328c 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala @@ -77,7 +77,7 @@ class HiveExplainSuite extends QueryTest with SQLTestUtils with TestHiveSingleto "src") } - test("SPARK-6212: The EXPLAIN output of CTAS only shows the analyzed plan") { + test("SPARK-17230: The EXPLAIN output of CTAS only shows the analyzed plan") { withTempView("jt") { val rdd = sparkContext.parallelize((1 to 10).map(i => s"""{"a":$i, "b":"str$i"}""")) spark.read.json(rdd).createOrReplaceTempView("jt") @@ -98,8 +98,8 @@ class HiveExplainSuite extends QueryTest with SQLTestUtils with TestHiveSingleto } val physicalIndex = outputs.indexOf("== Physical Plan ==") - assert(!outputs.substring(physicalIndex).contains("Subquery"), - "Physical Plan should not contain Subquery since it's eliminated by optimizer") + assert(outputs.substring(physicalIndex).contains("SubqueryAlias"), + "Physical Plan should contain SubqueryAlias since the query should not be optimized") } } http://git-wip-us.apache.org/repos/asf/spark/blob/e387c8ba/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala ---------------------------------------------------------------------- diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala index c6eeb8a..cf63537 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLViewSuite.scala @@ -232,12 +232,12 @@ class SQLViewSuite extends QueryTest with SQLTestUtils with TestHiveSingleton { val catalog = spark.sessionState.catalog val viewMeta = catalog.getTableMetadata(TableIdentifier("test_view")) - assert(viewMeta.properties("comment") == "test") + assert(viewMeta.comment == Some("test")) assert(viewMeta.properties("key") == "a") sql("ALTER VIEW test_view AS SELECT 3 AS i, 4 AS j") val updatedViewMeta = catalog.getTableMetadata(TableIdentifier("test_view")) - assert(updatedViewMeta.properties("comment") == "test") + assert(updatedViewMeta.comment == Some("test")) assert(updatedViewMeta.properties("key") == "a") assert(updatedViewMeta.createTime == viewMeta.createTime) // The view should be updated. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org