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

when hive metastore is enabled, create preaggregate table on decimal column of main table is failing

    XMLWordPrintableJSON

Details

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

    Description

      steps:

      Enable hive metastore and run the following queries

      1)

      CREATE TABLE uniqdata(CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string,DOB timestamp,DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10),DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1 int) STORED BY 'org.apache.carbondata.format'

       

      2)

      insert into uniqdata select 9000,'CUST_NAME_00000','ACTIVE_EMUI_VERSION_00000','1970-01-01 01:00:03','1970-01-01 02:00:03',123372036854,-223372036854,12345678901.1234000000,22345678901.1234000000,11234567489.7976000000,-11234567489.7976000000,1

       

      3)

      create datamap uniqdata_agg on table uniqdata using 'preaggregate' as select min(DECIMAL_COLUMN1) from uniqdata group by DECIMAL_COLUMN1

       

      java.lang.ClassCastException: org.apache.carbondata.core.metadata.datatype.DataType cannot be cast to org.apache.carbondata.core.metadata.datatype.DecimalType
          at org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema.write(ColumnSchema.java:478)
          at org.apache.carbondata.core.metadata.schema.table.TableSchema.write(TableSchema.java:215)
          at org.apache.carbondata.core.metadata.schema.table.DataMapSchema.write(DataMapSchema.java:99)
          at org.apache.carbondata.core.metadata.schema.table.TableInfo.write(TableInfo.java:245)
          at org.apache.carbondata.core.metadata.schema.table.TableInfo.serialize(TableInfo.java:304)
          at org.apache.spark.sql.CarbonDatasourceHadoopRelation.buildScan(CarbonDatasourceHadoopRelation.scala:83)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy$$anonfun$1.apply(CarbonLateDecodeStrategy.scala:63)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy$$anonfun$1.apply(CarbonLateDecodeStrategy.scala:63)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy$$anonfun$pruneFilterProject$1.apply(CarbonLateDecodeStrategy.scala:178)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy$$anonfun$pruneFilterProject$1.apply(CarbonLateDecodeStrategy.scala:177)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy.getDataSourceScan(CarbonLateDecodeStrategy.scala:366)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy.pruneFilterProjectRaw(CarbonLateDecodeStrategy.scala:299)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy.pruneFilterProject(CarbonLateDecodeStrategy.scala:172)
          at org.apache.spark.sql.execution.strategy.CarbonLateDecodeStrategy.apply(CarbonLateDecodeStrategy.scala:59)
          at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$1.apply(QueryPlanner.scala:62)
          at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$1.apply(QueryPlanner.scala:62)
          at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:434)
          at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:440)
          at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:439)
          at org.apache.spark.sql.catalyst.planning.QueryPlanner.plan(QueryPlanner.scala:92)
          at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2$$anonfun$apply$2.apply(QueryPlanner.scala:77)
          at org.apache.spark.sql.catalyst.planning.QueryPlanner$$anonfun$2$$anonfun$apply$2.apply(QueryPlanner.scala:74)
          at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
          at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
          at scala.collection.Iterator$class.foreach(Iterator.scala:893)
          at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
          at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157)

      Attachments

        Issue Links

          Activity

            People

              akashrn5 Akash R Nilugal
              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 - 2h 40m
                  2h 40m