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

Select Query failed with preagg having timeseries and normal agg table together

    XMLWordPrintableJSON

Details

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

    Description

      sql("drop table if exists maintabletime")
      sql("create table maintabletime(year int,month int,name string,salary int,dob timestamp) stored by 'carbondata' tblproperties('sort_scope'='Global_sort','table_blocksize'='23','sort_columns'='month,year,name')")

      sql("insert into maintabletime select 10,11,'babu',12,'2014-01-01 00:00:00'")

      sql("create datamap agg0 on table maintabletime using 'preaggregate' as select dob,name from maintabletime group by dob,name")

      sql("create datamap agg1 on table maintabletime using 'preaggregate' DMPROPERTIES ('timeseries.eventTime'='dob', 'timeseries.hierarchy'='hour=1,day=1,month=1,year=1') as select dob,name from maintabletime group by dob,name")

      val df = sql("select timeseries(dob,'year') from maintabletime group by timeseries(dob,'year')")

       

       

      Exception 

      Exception in thread "main" org.apache.spark.sql.AnalysisException: Column does not exists in Pre Aggregate table;
      at org.apache.spark.sql.hive.CarbonPreAggregateQueryRules.getChildAttributeReference(CarbonPreAggregateRules.scala:719)

      at org.apache.spark.sql.hive.CarbonPreAggregateQueryRules$$anonfun$19$$anonfun$4.applyOrElse(CarbonPreAggregateRules.scala:855)

      Attachments

        Issue Links

          Activity

            People

              Bjangir Babulal
              Bjangir Babulal
              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 - 2h 10m
                  2h 10m