ajantha-bhat commented on a change in pull request #3985:
URL: https://github.com/apache/carbondata/pull/3985#discussion_r506065671



##########
File path: 
core/src/main/java/org/apache/carbondata/core/datastore/page/statistics/PrimitivePageStatsCollector.java
##########
@@ -256,7 +256,7 @@ private int getDecimalCount(double value) {
   }
 
   private int getDecimalCount(float value) {
-    return getDecimalCount((double) value);
+    return getDecimalCount(Double.parseDouble(Float.toString(value)));

Review comment:
       In `AdaptiveDeltaFloatingCodec.java` line please remove line 323 to 328. 
As this code is added as a cover up to this issue. 
   
   ```
   } else if (pageDataType == DataTypes.LONG) {
             int size = pageSize * longSizeInBytes;
             for (int i = 0; i < size; i += longSizeInBytes) {
               vector.putDouble(rowId++, (max - 
ByteUtil.toLongLittleEndian(pageData, i)) / factor);
             }
           }
   ```
   
   Similarly in `AdaptiveFloatingCodec` 309 to 313




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to