Skip to content

Commit

Permalink
fix avrosuite
Browse files Browse the repository at this point in the history
  • Loading branch information
gengliangwang committed Feb 14, 2019
1 parent d8240b3 commit 5b7b258
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -889,15 +889,14 @@ class AvroSuite extends QueryTest with SharedSQLContext with SQLTestUtils {
var msg = intercept[AnalysisException] {
sql("select interval 1 days").write.format("avro").mode("overwrite").save(tempDir)
}.getMessage
assert(msg.toLowerCase(Locale.ROOT)
.contains("avro data source does not support calendarinterval data type."))
assert(msg.contains("Cannot save interval data type into external storage."))

msg = intercept[AnalysisException] {
spark.udf.register("testType", () => new IntervalData())
sql("select testType()").write.format("avro").mode("overwrite").save(tempDir)
}.getMessage
assert(msg.toLowerCase(Locale.ROOT)
.contains("avro data source does not support calendarinterval data type."))
.contains(s"avro data source does not support calendarinterval data type."))
}
}

Expand Down

0 comments on commit 5b7b258

Please sign in to comment.