Github user sv71294 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2412#discussion_r199083404
--- Diff:
integration/presto/src/main/java/org/apache/carbondata/presto/readers/DecimalSliceStreamReader.java
---
@@ -45,80 +45,66 @@
/**
* Reader for DecimalValues
*/
-public class DecimalSliceStreamReader extends AbstractStreamReader {
+public class DecimalSliceStreamReader extends CarbonColumnVectorImpl
+ implements PrestoVectorBlockBuilder {
+ private final char[] buffer = new char[100];
+ protected int batchSize;
+ protected Type type;
+ protected BlockBuilder builder;
private Dictionary dictionary;
- private boolean isDictionary;
+ public DecimalSliceStreamReader(int batchSize,
+ org.apache.carbondata.core.metadata.datatype.DecimalType dataType,
Dictionary dictionary) {
+ super(batchSize, dataType);
+ this.type = DecimalType.createDecimalType(dataType.getPrecision(),
dataType.getScale());
--- End diff --
here type is decided with the precision value by the presto whether
shortDecimal or longDecimal
---