Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-3433

MV has issues when create on constant column, dupicate columns and limit queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      MV has issues when create on constant column, dupicate columns and limit queries

      test case to reproduce
      test("test mv with duplicate columns in query and constant column")

      { sql("drop table if exists maintable") sql("create table maintable(name string, age int, add string) stored by 'carbondata'") sql("create datamap dupli_mv using 'mv' as select name, sum(age),sum(age) from maintable group by name") sql("create datamap constant_mv using 'mv' as select name, sum(1) ex1 from maintable group by name") sql("insert into maintable select 'pheobe',31,'NY'") val df1 = sql("select sum(age),name from maintable group by name") val df2 = sql("select sum(age),sum(age),name from maintable group by name") val df3 = sql("select name, sum(1) ex1 from maintable group by name") val df4 = sql("select sum(1) ex1 from maintable group by name") val analyzed1 = df1.queryExecution.analyzed val analyzed2 = df2.queryExecution.analyzed val analyzed3 = df3.queryExecution.analyzed val analyzed4 = df4.queryExecution.analyzed assert(TestUtil.verifyMVDataMap(analyzed1, "dupli_mv")) assert(TestUtil.verifyMVDataMap(analyzed2, "dupli_mv")) assert(TestUtil.verifyMVDataMap(analyzed3, "constant_mv")) assert(TestUtil.verifyMVDataMap(analyzed4, "constant_mv")) }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              akashrn5 Akash R Nilugal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2.5h
                  2.5h