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

Fixed bug for maintaining compatibility of decimal type with older releases of Carbondata

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      In old Carbondata releases, precision and scale is not stored for decimal data type and both values are initialized to -1. In TableSpec.ColumnSpec default values for precision and scale are initialized to 0 because of which exception is thrown while reading the old store with decimal column. Exception trace

      Caused by: java.lang.ClassCastException: [B cannot be cast to java.lang.Long
      at org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory$DecimalIntConverter.getDecimal(DecimalConverterFactory.java:98)
      at org.apache.carbondata.core.datastore.page.UnsafeDecimalColumnPage.getDecimal(UnsafeDecimalColumnPage.java:260)
      at org.apache.carbondata.core.datastore.page.LazyColumnPage.getDecimal(LazyColumnPage.java:111)
      at org.apache.carbondata.core.scan.result.vector.MeasureDataVectorProcessor$DecimalMeasureVectorFiller.fillMeasureVector(MeasureDataVectorProcessor.java:215)
      at org.apache.carbondata.core.scan.result.AbstractScannedResult.fillColumnarMeasureBatch(AbstractScannedResult.java:257)
      at org.apache.carbondata.core.scan.collector.impl.DictionaryBasedVectorResultCollector.scanAndFillResult(DictionaryBasedVectorResultCollector.java:164)
      at org.apache.carbondata.core.scan.collector.impl.DictionaryBasedVectorResultCollector.collectVectorBatch(DictionaryBasedVectorResultCollector.java:155)
      at org.apache.carbondata.core.scan.processor.impl.DataBlockIteratorImpl.processNextBatch(DataBlockIteratorImpl.java:65)
      at org.apache.carbondata.core.scan.result.iterator.VectorDetailQueryResultIterator.processNextBatch(VectorDetailQueryResultIterator.java:46)
      at org.apache.carbondata.spark.vectorreader.VectorizedCarbonRecordReader.nextBatch(VectorizedCarbonRecordReader.java:258)
      at org.apache.carbondata.spark.vectorreader.VectorizedCarbonRecordReader.nextKeyValue(VectorizedCarbonRecordReader.java:145)
      at org.apache.carbondata.spark.rdd.CarbonScanRDD$$anon$1.hasNext(CarbonScanRDD.scala:246)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                manishgupta_88 Manish Gupta
                Reporter:
                manishgupta_88 Manish Gupta
              • 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 - 1h
                  1h