You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2021/01/13 03:54:25 UTC

[GitHub] [carbondata] VenuReddy2103 commented on a change in pull request #4073: [CARBONDATA-4104] Vector filling for complex decimal type needs to be handled

VenuReddy2103 commented on a change in pull request #4073:
URL: https://github.com/apache/carbondata/pull/4073#discussion_r556246616



##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/datatype/DecimalConverterFactory.java
##########
@@ -328,9 +328,29 @@ public BigDecimal getDecimal(Object valueToBeConverted) {
     public void fillVector(Object valuesToBeConverted, int size,
         ColumnVectorInfo vectorInfo, BitSet nullBitSet, DataType pageType) {
       CarbonColumnVector vector = getCarbonColumnVector(vectorInfo, nullBitSet);
-      //TODO handle complex child
-      int precision = vectorInfo.measure.getMeasure().getPrecision();
-      int newMeasureScale = vectorInfo.measure.getMeasure().getScale();
+      int precision;

Review comment:
       These changes seem to be same as in`DecimalIntConverter.fillVector()`. Shall we reuse it instead of duplicating same logic again here ? Probably `DecimalUnscaledConverter` can extend `DecimalIntConverter` and overide fillVector like below ?
   
   > public void fillVector(Object valuesToBeConverted, int size, ColumnVectorInfo vectorInfo, BitSet nullBitSet, DataType pageType) {
         if (valuesToBeConverted instanceof byte[][]) {
           ...
         } else {
           super.fillVector(valuesToBeConverted, size, vectorInfo, nullBitSet, pageType);
         }
       }




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org