RamKrishnan77 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_r285937069
##########
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:
desc formatted just shows the compressor type that will be used for the next load and not the compressor's which have been used previously in the table
----------------------------------------------------------------
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