Github user QiangCai commented on a diff in the pull request: https://github.com/apache/carbondata/pull/3001#discussion_r245912249 --- Diff: integration/presto/src/main/java/org/apache/carbondata/presto/CarbonVectorBatch.java --- @@ -95,6 +95,9 @@ private CarbonColumnVectorImpl createDirectStreamReader(int batchSize, DataType } else if (dataType == DataTypes.STRING) { return new SliceStreamReader(batchSize, field.getDataType(), dictionaryBlock); } else if (DataTypes.isDecimal(dataType)) { + if (dictionary != null && dataType instanceof DecimalType) { + return new DecimalSliceStreamReader(batchSize, (DecimalType) dataType, dictionary); + } --- End diff -- when the decimal column uses dictionary encoding, it can't work fine. the method field.getDataType() will return IntegerType, It is not Decimal type.
---