Skip to content

Commit e2b8cc6

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 #23817 from maropu/SPARK-26607-FOLLOWUP. Authored-by: Takeshi Yamamuro <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 36902e1 commit e2b8cc6

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
@@ -260,19 +260,10 @@ object PROCESS_TABLES extends QueryTest with SQLTestUtils {
260260

261261
// SPARK-22356: overlapped columns between data and partition schema in data source tables
262262
val tbl_with_col_overlap = s"tbl_with_col_overlap_$index"
263-
// For Spark 2.2.0 and 2.1.x, the behavior is different from Spark 2.0, 2.2.1, 2.3+
264-
if (testingVersions(index).startsWith("2.1") || testingVersions(index) == "2.2.0") {
265-
spark.sql("msck repair table " + tbl_with_col_overlap)
266-
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "j", "p"))
267-
checkAnswer(spark.table(tbl_with_col_overlap), Row(1, 1, 1) :: Row(1, 1, 1) :: Nil)
268-
assert(sql("desc " + tbl_with_col_overlap).select("col_name")
269-
.as[String].collect().mkString(",").contains("i,j,p"))
270-
} else {
271-
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "p", "j"))
272-
checkAnswer(spark.table(tbl_with_col_overlap), Row(1, 1, 1) :: Row(1, 1, 1) :: Nil)
273-
assert(sql("desc " + tbl_with_col_overlap).select("col_name")
274-
.as[String].collect().mkString(",").contains("i,p,j"))
275-
}
263+
assert(spark.table(tbl_with_col_overlap).columns === Array("i", "p", "j"))
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,p,j"))
276267
}
277268
}
278269
}

0 commit comments

Comments
 (0)