kevinjmh commented on a change in pull request #3214: [CARBONDATA-3382] Fixed compressor type display in desc formatted
URL:
https://github.com/apache/carbondata/pull/3214#discussion_r285920783
##########
File path: integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/describeTable/TestDescribeTable.scala
##########
@@ -65,10 +68,21 @@ class TestDescribeTable extends QueryTest with BeforeAndAfterAll {
assert(descPar.exists(_.toString().contains("Partition Parameters:")))
}
+ test(testName = "Compressor Type update from carbon properties") {
+ sql("drop table if exists b")
+ sql(sqlText = "create table b(a int,b string) stored by 'carbondata'")
+ CarbonProperties.getInstance().addProperty(CarbonCommonConstants.COMPRESSOR, "gzip")
+ val result = sql(sqlText = "desc formatted b").collect()
+ assert(result.filter(row => row.getString(0).contains("Data File Compressor")).head.getString
+ (1).equalsIgnoreCase("gzip"))
+ }
+
override def afterAll: Unit = {
sql("DROP TABLE Desc1")
sql("DROP TABLE Desc2")
sql("drop table if exists a")
+ sql("drop table if exists b")
+ CarbonProperties.getInstance().addProperty(CarbonCommonConstants.COMPRESSOR, "snappy")
Review comment:
Please take care of this case:
` test("test compaction with different compressor for each load")` in `TestLoadDataWithCompression.scala`
create table does not specify compressor, but the global setting is changed before different loads, so one table may use multiply different compressor.
Is it leaving it blank is better? At lease filling it with any value is not correct for above case
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[hidden email]
With regards,
Apache Git Services