core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMap.java
/**
   * Fill the measures min values with minimum , this is needed for backward version compatability
   * as older versions don't store min values for measures
   */
Fill the measures min values with minimum , this is needed for backward version compatability
as older versions don't store min values for measures
Fill the measures min values with minimum this is needed for backward version compatability as older versions don ' t store min values for measures
private byte[][] updateMinValues(byte[][] minValues, int[] minMaxLen) {
    byte[][] updatedValues = minValues;
    if (minValues.length < minMaxLen.length) {
      updatedValues = new byte[minMaxLen.length][];
      System.arraycopy(minValues, 0, updatedValues, 0, minValues.length);
      List<CarbonMeasure> measures = segmentProperties.getMeasures();
      ByteBuffer buffer = ByteBuffer.allocate(8);
      for (int i = 0; i < measures.size(); i++) {
        buffer.rewind();
        DataType dataType = measures.get(i).getDataType();
        if (dataType == DataTypes.BYTE) {
          buffer.putLong(Byte.MIN_VALUE);
          updatedValues[minValues.length + i] = buffer.array().clone();
        } else if (dataType == DataTypes.SHORT) {
          buffer.putLong(Short.MIN_VALUE);
          updatedValues[minValues.length + i] = buffer.array().clone();
        } else if (dataType == DataTypes.INT) {
          buffer.putLong(Integer.MIN_VALUE);
          updatedValues[minValues.length + i] = buffer.array().clone();
        } else if (dataType == DataTypes.LONG) {
          buffer.putLong(Long.MIN_VALUE);
          updatedValues[minValues.length + i] = buffer.array().clone();
        } else if (DataTypes.isDecimal(dataType)) {
          updatedValues[minValues.length + i] =
              DataTypeUtil.bigDecimalToByte(BigDecimal.valueOf(Long.MIN_VALUE));
        } else {
          buffer.putDouble(Double.MIN_VALUE);
          updatedValues[minValues.length + i] = buffer.array().clone();
        }
      }
    }
    return updatedValues;
  }
private byte [ ] [ ] updateMinValues ( byte [ ] [ ] minValues , int [ ] minMaxLen ) { byte [ ] [ ] updatedValues = minValues ; if ( minValues . length < minMaxLen . length ) { updatedValues = new byte [ minMaxLen . length ] [ ] ; System . arraycopy ( minValues , 0 , updatedValues , 0 , minValues . length ) ; List < CarbonMeasure > measures = segmentProperties . getMeasures ( ) ; ByteBuffer buffer = ByteBuffer . allocate ( 8 ) ; for ( int i = 0 ; i < measures . size ( ) ; i ++ ) { buffer . rewind ( ) ; DataType dataType = measures . get ( i ) . getDataType ( ) ; if ( dataType == DataTypes . BYTE ) { buffer . putLong ( Byte . MIN_VALUE ) ; updatedValues [ minValues . length + i ] = buffer . array ( ) . clone ( ) ; } else if ( dataType == DataTypes . SHORT ) { buffer . putLong ( Short . MIN_VALUE ) ; updatedValues [ minValues . length + i ] = buffer . array ( ) . clone ( ) ; } else if ( dataType == DataTypes . INT ) { buffer . putLong ( Integer . MIN_VALUE ) ; updatedValues [ minValues . length + i ] = buffer . array ( ) . clone ( ) ; } else if ( dataType == DataTypes . LONG ) { buffer . putLong ( Long . MIN_VALUE ) ; updatedValues [ minValues . length + i ] = buffer . array ( ) . clone ( ) ; } else if ( DataTypes . isDecimal ( dataType ) ) { updatedValues [ minValues . length + i ] = DataTypeUtil . bigDecimalToByte ( BigDecimal . valueOf ( Long . MIN_VALUE ) ) ; } else { buffer . putDouble ( Double . MIN_VALUE ) ; updatedValues [ minValues . length + i ] = buffer . array ( ) . clone ( ) ; } } } return updatedValues ; }
Fill the measures min values with minimum , this is needed for backward version compatability
 as older versions don't store min values for measures
Fill the measures min values with minimum this is needed for backward version compatability as older versions don ' t store min values for measures