Skip to content

Commit 2ea9eb3

Browse files
committed
update test case
1 parent bc4618f commit 2ea9eb3

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcSourceSuite.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,15 @@ abstract class OrcSuite extends OrcTest with BeforeAndAfterAll {
440440
val exception = intercept[SparkException] {
441441
testSchemaMergingWithDataTypeConflicts(3)
442442
}.getCause
443-
assert(exception.getMessage.contains(
444-
"Failed to merge incompatible data types bigint and string"))
443+
444+
val innerMessage = orcImp match {
445+
case "native" => exception.getMessage
446+
case "hive" => exception.getCause.getMessage
447+
case impl =>
448+
throw new UnsupportedOperationException(s"Unknown ORC implementation: $impl")
449+
}
450+
451+
assert(innerMessage.contains("Failed to merge incompatible data types bigint and string"))
445452
}
446453

447454
withSQLConf(SQLConf.ORC_SCHEMA_MERGING_ENABLED.key -> "false") {

0 commit comments

Comments
 (0)