Skip to content

Commit d38a113

Browse files
maropuHyukjinKwon
authored andcommitted
[SPARK-26897][SQL][TEST][FOLLOW-UP] Remove workaround for 2.2.0 and 2.1.x in HiveExternalCatalogVersionsSuite
## What changes were proposed in this pull request? This pr just removed workaround for 2.2.0 and 2.1.x in HiveExternalCatalogVersionsSuite. ## How was this patch tested? Pass the Jenkins. Closes apache#23817 from maropu/SPARK-26607-FOLLOWUP. Authored-by: Takeshi Yamamuro <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit e2b8cc6) Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 0d0c9ff commit d38a113

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -257,19 +257,10 @@ object PROCESS_TABLES extends QueryTest with SQLTestUtils {
257257

258258
// SPARK-22356: overlapped columns between data and partition schema in data source tables
259259
val tbl_with_col_overlap = s"tbl_with_col_overlap_$index"
260-
// For Spark 2.2.0 and 2.1.x, the behavior is different from Spark 2.0, 2.2.1, 2.3+
261-
if (testingVersions(index).startsWith("2.1") || testingVersions(index) == "2.2.0") {
262-
spark.sql("msck repair table " + tbl_with_col_overlap)
263-
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "j", "p"))
264-
checkAnswer(spark.table(tbl_with_col_overlap), Row(1, 1, 1) :: Row(1, 1, 1) :: Nil)
265-
assert(sql("desc " + tbl_with_col_overlap).select("col_name")
266-
.as[String].collect().mkString(",").contains("i,j,p"))
267-
} else {
268-
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "p", "j"))
269-
checkAnswer(spark.table(tbl_with_col_overlap), Row(1, 1, 1) :: Row(1, 1, 1) :: Nil)
270-
assert(sql("desc " + tbl_with_col_overlap).select("col_name")
271-
.as[String].collect().mkString(",").contains("i,p,j"))
272-
}
260+
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "p", "j"))
261+
checkAnswer(spark.table(tbl_with_col_overlap), Row(1, 1, 1) :: Row(1, 1, 1) :: Nil)
262+
assert(sql("desc " + tbl_with_col_overlap).select("col_name")
263+
.as[String].collect().mkString(",").contains("i,p,j"))
273264
}
274265
}
275266
}

0 commit comments

Comments
 (0)