Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19055#discussion_r135836484
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcSourceSuite.scala ---
@@ -194,6 +196,24 @@ abstract class OrcSuite extends QueryTest with
TestHiveSingleton with BeforeAndA
Utils.deleteRecursively(location)
}
}
+
+ test("SPARK-21839: Add SQL config for ORC compression") {
+ val conf = sqlContext.sessionState.conf
+ assert(new OrcOptions(Map.empty[String, String],
conf).compressionCodec == "SNAPPY")
+
+ // OrcOptions's parameters have a higher priority than SQL
configuration.
+ withSQLConf(SQLConf.ORC_COMPRESSION.key -> "uncompressed") {
+ assert(new OrcOptions(Map.empty[String, String],
conf).compressionCodec == "NONE")
+ assert(
+ new OrcOptions(Map("orc.compress" -> "zlib"),
conf).compressionCodec == "ZLIB")
+ }
+
+ Seq("NONE", "SNAPPY", "ZLIB", "LZO").foreach { c =>
--- End diff --
// to test all the valid options of `spark.sql.orc.compression.codec`
> "none", "uncompressed", "snappy", "zlib", "lzo".
You missed one of it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]