[GitHub] [carbondata] akashrn5 commented on a change in pull request #3235: [HOTFIX]Fix select * failure when MV datamap is enabled

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on a change in pull request #3235: [HOTFIX]Fix select * failure when MV datamap is enabled

GitBox
akashrn5 commented on a change in pull request #3235: [HOTFIX]Fix select * failure when MV datamap is enabled
URL: https://github.com/apache/carbondata/pull/3235#discussion_r287910489
 
 

 ##########
 File path: datamap/mv/core/src/test/scala/org/apache/carbondata/mv/rewrite/MVCreateTestCase.scala
 ##########
 @@ -954,6 +954,24 @@ class MVCreateTestCase extends QueryTest with BeforeAndAfterAll {
     sql("drop table if exists all_table")
   }
 
+  test("test select * and distinct when MV is enabled") {
+    sql("drop table if exists limit_fail")
+    sql("CREATE TABLE limit_fail (empname String, designation String, doj Timestamp,workgroupcategory int, workgroupcategoryname String, deptno int, deptname String,projectcode int, projectjoindate Timestamp, projectenddate Timestamp,attendance int,utilization int,salary int)STORED BY 'org.apache.carbondata.format'")
+    sql(s"LOAD DATA local inpath '$resourcesPath/data_big.csv' INTO TABLE limit_fail  OPTIONS" +
+        "('DELIMITER'= ',', 'QUOTECHAR'= '\"')")
+    sql("create datamap limit_fail_dm1 using 'mv' as select empname,designation from limit_fail")
+    try {
+      val df = sql("select distinct(empname) from limit_fail limit 10")
+      sql("select * from limit_fail limit 10").show()
+      val analyzed = df.queryExecution.analyzed
+      assert(verifyMVDataMap(analyzed, "limit_fail_dm1"))
+      assert(true)
 
 Review comment:
   that was added during testing, removed

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