gatorsmile 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_r251189907
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
 ##########
 @@ -260,6 +260,94 @@ class HiveCatalogedDDLSuite extends DDLSuite with 
TestHiveSingleton with BeforeA
       assert(err.contains("Cannot recognize hive type string:"))
    }
   }
+
+  test("SPARK-26630: table with old input format and without partitioned will 
use HadoopRDD") {
+    withTable("table_old", "table_ctas_old") {
+      spark.sql(
+        s"""
+           |CREATE TABLE table_old (col1 LONG, col2 STRING, col3 DOUBLE, col4 
BOOLEAN)
+           |STORED AS
+           |INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
+           |OUTPUTFORMAT 
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
+           |""".stripMargin)
 
 Review comment:
   ```
           s"""
             |CREATE TABLE table_old (col1 LONG, col2 STRING, col3 DOUBLE, col4 
BOOLEAN)
             |STORED AS
             |INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
             |OUTPUTFORMAT 
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
            """.stripMargin)
   ```

----------------------------------------------------------------
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]

Reply via email to