Login  Register

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

Posted by GitBox on Jan 13, 2021; 3:54am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-akkio-97-opened-a-new-pull-request-4073-WIP-tp105327p105392.html


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:
[hidden email]