ajantha-bhat commented on a change in pull request #3753:
URL: https://github.com/apache/carbondata/pull/3753#discussion_r422475736
##########
File path:
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/standardpartition/StandardPartitionTableLoadingTestCase.scala
##########
@@ -519,6 +519,40 @@ class StandardPartitionTableLoadingTestCase extends
QueryTest with BeforeAndAfte
sql("drop table origin_csv")
}
+ test("test partition column case insensitive: insert into") {
+ sql(
+ """create table cs_insert_p
+ |(id int, Name string)
+ |stored as carbondata
+ |partitioned by (c1 int, c2 int, C3 string)""".stripMargin)
+ sql("alter table cs_insert_p drop if exists partition(C1=1, C2=111,
c3='2019-11-18')")
+ sql("alter table cs_insert_p add if not exists partition(C1=1, c2=111,
C3='2019-11-18')")
+ sql(
+ """insert into table cs_insert_p
+ | partition(c1=3, C2=111, c3='2019-11-18')
+ | select 200, 'cc'""".stripMargin)
+ checkAnswer(sql("select count(*) from cs_insert_p"), Seq(Row(1)))
+ sql("alter table cs_insert_p drop if exists partition(C1=3, C2=111,
c3='2019-11-18')")
+ checkAnswer(sql("select count(*) from cs_insert_p"), Seq(Row(0)))
+ }
+
+ test("test partition column case insensitive: load data") {
+ sql(
+ """
+ | CREATE TABLE cs_load_p (doj Timestamp,
+ | workgroupcategory int, workgroupcategoryname String, deptno int,
deptname String,
+ | projectcode int, projectjoindate Timestamp, projectenddate
Timestamp,attendance int,
+ | utilization int,salary int)
+ | PARTITIONED BY (empnO int, empnAme String, designaTion String)
+ | STORED AS carbondata
+ """.stripMargin)
+ sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE
cs_load_p PARTITION(empNo='99', empName='ravi', Designation='xx')""")
+ sql(s"""LOAD DATA local inpath '$resourcesPath/data.csv' INTO TABLE
cs_load_p PARTITION(empno='100', emPname='indra', designation='yy')""")
+ checkAnswer(sql("show partitions cs_load_p"), Seq(
Review comment:
can we add filter query with 'indra' and 'INdRA'.
Is filter query should be case-sensitive ?
----------------------------------------------------------------
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:
[email protected]