Deegue commented on a change in pull request #23559: [SPARK-26630][SQL] Fix
ClassCastException in TableReader while creating HadoopRDD
URL: https://github.com/apache/spark/pull/23559#discussion_r251188255
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
##########
@@ -260,6 +260,65 @@ class HiveCatalogedDDLSuite extends DDLSuite with
TestHiveSingleton with BeforeA
assert(err.contains("Cannot recognize hive type string:"))
}
}
+
+ test("SPARK-26630: Fix ClassCastException in TableReader while creating
HadoopRDD") {
+ withTable("table_old", "table_pt_old", "table_new", "table_pt_new",
+ "table_ctas_old", "table_ctas_pt_old", "table_ctas_new",
"table_ctas_pt_new") {
+ spark.sql(
+ s"""
+ |CREATE TABLE table_old (id int)
+ |STORED AS
+ |INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
+ |OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
+ """.stripMargin)
+ spark.sql("INSERT INTO table_old VALUES (1), (2), (3), (4), (5)")
+ assert(spark.sql("SELECT COUNT(1) FROM table_old").collect() ===
Array(Row(5)))
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]