Manish Gupta created CARBONDATA-1509:
----------------------------------------
Summary: Fixed bug for maintaining compatibility of decimal type with older releases of Carbondata
Key: CARBONDATA-1509
URL:
https://issues.apache.org/jira/browse/CARBONDATA-1509 Project: CarbonData
Issue Type: Bug
Reporter: Manish Gupta
Assignee: Manish Gupta
Fix For: 1.2.0
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)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)