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

Query with expression is giving wrong result

    XMLWordPrintableJSON

Details

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

    Description

      Create Maintable:

      CREATE TABLE mainTable(id int, name string, city string, age string) STORED BY 'org.apache.carbondata.format

       

      Create datamap
      create datamap agg1 on table mainTable using 'preaggregate' as select name,sum(id) from mainTable group by name

      Load data 

      Run query :select sum(id)+count(id) from maintable is giving wrong result

      Problem: When query has expression it is not checking which aggregate function is applied on table and based on table it is selecting aggregate table

      Solution: While extracting the aggregate expression from query plan in case if any expression is present extract which aggregate function applied on column to select the aggregate table 

       

      Attachments

        Issue Links

          Activity

            People

              kumarvishal09 Kumar Vishal
              kumarvishal09 Kumar Vishal
              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 - 50m
                  50m