Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1786#discussion_r164678778
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/standardpartition/StandardPartitionTableDropTestCase.scala
---
@@ -182,6 +185,30 @@ class StandardPartitionTableDropTestCase extends
QueryTest with BeforeAndAfterAl
Seq(Row(0)))
}
+ test("test dropping on partition table for int partition column") {
+ sql(
+ """
+ | CREATE TABLE partitionone1 (empname String, designation String,
doj Timestamp,
+ | workgroupcategory int, workgroupcategoryname String, deptno
int, deptname String,
+ | projectcode int, projectjoindate Timestamp, projectenddate
Date,attendance int,
+ | utilization int,salary int)
+ | PARTITIONED BY (empno int)
+ | STORED BY 'org.apache.carbondata.format'
+ """.stripMargin)
+ sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE
partitionone1 OPTIONS('DELIMITER'= ',', 'QUOTECHAR'= '"')""")
+ checkAnswer(
+ sql(s"""select count (*) from partitionone1"""),
+ sql(s"""select count (*) from originTable"""))
+
+ checkAnswer(
+ sql(s"""select count (*) from partitionone1 where empno=11"""),
+ sql(s"""select count (*) from originTable where empno=11"""))
+
+ sql(s"""ALTER TABLE partitionone1 DROP PARTITION(empno='11')""")
+ assert(Files.notExists(Paths.get(TestQueryExecutor.warehouse +
"empno=11"), LinkOption.NOFOLLOW_LINKS))
--- End diff --
it should be inside the table , not directly inside warehose path
---