Indhumathi27 commented on code in PR #4280:
URL: https://github.com/apache/carbondata/pull/4280#discussion_r902186258


##########
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/standardpartition/StandardPartitionTableCleanTestCase.scala:
##########
@@ -200,6 +200,46 @@ class StandardPartitionTableCleanTestCase extends 
QueryTest with BeforeAndAfterA
     assert(sql(s"show segments for table partitionalldeleteseg").count == 3)
   }
 
+  test("test clean files and overwrite partitions with 0th segment being 
deleted segment") {
+    sql("drop table if exists part_clean")
+    sql(
+      """
+        | CREATE TABLE part_clean (empno int, empname String, designation 
String, doj Timestamp,
+        |  workgroupcategoryname String, deptno int, deptname String, 
projectcode int,
+        |  projectjoindate Timestamp, projectenddate Date,attendance int,
+        |  utilization int,salary int)
+        | PARTITIONED BY (workgroupcategory int)
+        | STORED AS carbondata
+      """.stripMargin)
+    sql(
+      s"""LOAD DATA local inpath '$resourcesPath/data.csv'
+         | INTO TABLE part_clean OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '"')
+         | """.stripMargin)
+    sql(
+      s"""LOAD DATA local inpath '$resourcesPath/data.csv'
+         | INTO TABLE part_clean OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '"')
+         | """.stripMargin)
+    sql(
+      s"""LOAD DATA local inpath '$resourcesPath/data.csv'
+         | INTO TABLE part_clean OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '"')
+         | """.stripMargin)
+    sql("delete from table part_clean where SEGMENT.ID IN(0,1)")

Review Comment:
   please add a test scenario with compaction



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@carbondata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to