LantaoJin commented on a change in pull request #26499: [SPARK-29869][SQL] Fix
assertion error in HiveMetastoreCatalog#convertToLogicalRelation
URL: https://github.com/apache/spark/pull/26499#discussion_r347711022
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
##########
@@ -358,4 +358,24 @@ class DataSourceWithHiveMetastoreCatalogSuite
Seq(table("src").count().toString))
}
}
+
+ test("SPARK-29869: Fix convertToLogicalRelation throws unclear
AssertionError") {
+ withTempPath(dir => {
+ val baseDir =
s"${dir.getCanonicalFile.toURI.toString}/non_partition_table"
+ val partitionLikeDir = s"$baseDir/dt=20191113"
+ spark.range(3).selectExpr("id").write.parquet(partitionLikeDir)
+ withTable("non_partition_table") {
+ withSQLConf(HiveUtils.CONVERT_METASTORE_PARQUET.key -> "true") {
+ spark.sql(
+ s"""
+ |CREATE TABLE non_partition_table (id bigint)
+ |STORED AS PARQUET LOCATION '$baseDir'
+ |""".stripMargin)
+ val e = intercept[HiveTableConvertException](
+ spark.table("non_partition_table"), Seq()).getMessage
Review comment:
Ah, typo
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]