Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19218#discussion_r142553517
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala ---
@@ -728,4 +732,195 @@ class InsertSuite extends QueryTest with
TestHiveSingleton with BeforeAndAfter
assert(e.contains("mismatched input 'ROW'"))
}
}
+
+ test("[SPARK-21786] Check 'spark.sql.parquet.compression.codec' " +
+ "and 'spark.sql.orc.compression.codec' taking effect on hive table
writing") {
+
+ val hadoopConf = spark.sessionState.newHadoopConf()
+
+ val partitionStr = "p=10000"
+
+ case class TableCompressionConf(name: String, codeC: String)
+
+ case class TableDefine(tableName: String, isPartitioned: Boolean,
format: String,
+ compressionConf: Option[TableCompressionConf]) {
+ def createTable(rootDir: File): Unit = {
+ val compression = compressionConf.map(cf =>
s"'${cf.name}'='${cf.codeC}'")
+ sql(
+ s"""
+ |CREATE TABLE $tableName(a int)
+ |${if (isPartitioned) "PARTITIONED BY (p int)" else ""}
--- End diff --
Please do not embed it. Just create a parameter above this?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]