You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by GitBox <gi...@apache.org> on 2021/06/22 12:01:15 UTC

[GitHub] [carbondata] akashrn5 commented on a change in pull request #4156: [CARBONDATA-4225] Fix Update performance issues when auto merge compaction is enabled

akashrn5 commented on a change in pull request #4156:
URL: https://github.com/apache/carbondata/pull/4156#discussion_r656150207



##########
File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/UpdateCarbonTableTestCase.scala
##########
@@ -1187,6 +1187,22 @@ class UpdateCarbonTableTestCase extends QueryTest with BeforeAndAfterAll {
      Seq(Row("abc", 1, "aa", "aaa")))
   }
 
+  test("test update on table with auto-merge enabled") {
+    sql("""drop table if exists iud.autoMergeUpdate""").collect()
+    sql("""create table iud.autoMergeUpdate (c1 string,c2 int,c3 string,c5 string) STORED AS
+        |carbondata tblproperties('auto_load_merge'='true')""".stripMargin)
+    sql(s"""LOAD DATA LOCAL INPATH '$resourcesPath/IUD/dest.csv' INTO table iud.autoMergeUpdate""")
+    sql("update iud.autoMergeUpdate up_TAble set(up_table.C1)=('abc')").show()
+    sql(s"""LOAD DATA LOCAL INPATH '$resourcesPath/IUD/dest.csv' INTO table iud.autoMergeUpdate""")
+    sql("update iud.autoMergeUpdate up_TAble set(up_table.C1)=('abcd')").show()

Review comment:
       here in this test case may be can add assert for segment number by changing the compaction threshold




-- 
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:
users@infra.apache.org