Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/20165#discussion_r159900236
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcSourceSuite.scala
---
@@ -62,6 +63,22 @@ class HiveOrcSourceSuite extends OrcSuite with
TestHiveSingleton {
""".stripMargin)
}
+ test("SPARK-22972: hive orc source") {
+ spark.sql(
+ s"""CREATE TABLE normal_orc_as_source_hive
+ |USING org.apache.spark.sql.hive.orc
+ |OPTIONS (
+ | PATH '${new File(orcTableAsDir.getAbsolutePath).toURI}'
+ |)
+ """.stripMargin)
+ spark.sql("desc formatted normal_orc_as_source_hive").show()
--- End diff --
Replace it by
```
val tableMetadata = spark.sessionState.catalog.getTableMetadata(
TableIdentifier("normal_orc_as_source_hive"))
assert(tableMetadata.storage.inputFormat ==
Option("org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"))
assert(tableMetadata.storage.outputFormat ==
Option("org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"))
assert(tableMetadata.storage.serde ==
Option("org.apache.hadoop.hive.ql.io.orc.OrcSerde"))
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]