carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [30/57] [abbrv] incubator-carbondata git commit: move org.apache.carbon.common in core
Date Sat, 14 Jan 2017 07:57:39 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/Compressor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/Compressor.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/Compressor.java
deleted file mode 100644
index 1b90bc6..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/Compressor.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-public interface Compressor {
-
-  byte[] compressByte(byte[] unCompInput);
-
-  byte[] unCompressByte(byte[] compInput);
-
-  byte[] unCompressByte(byte[] compInput, int offset, int length);
-
-  byte[] compressShort(short[] unCompInput);
-
-  short[] unCompressShort(byte[] compInput);
-
-  short[] unCompressShort(byte[] compInput, int offset, int lenght);
-
-  byte[] compressInt(int[] unCompInput);
-
-  int[] unCompressInt(byte[] compInput);
-
-  int[] unCompressInt(byte[] compInput, int offset, int length);
-
-  byte[] compressLong(long[] unCompInput);
-
-  long[] unCompressLong(byte[] compInput);
-
-  long[] unCompressLong(byte[] compInput, int offset, int length);
-
-  byte[] compressFloat(float[] unCompInput);
-
-  float[] unCompressFloat(byte[] compInput);
-
-  float[] unCompressFloat(byte[] compInput, int offset, int length);
-
-  byte[] compressDouble(double[] unCompInput);
-
-  double[] unCompressDouble(byte[] compInput);
-
-  double[] unCompressDouble(byte[] compInput, int offset, int length);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/CompressorFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/CompressorFactory.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/CompressorFactory.java
deleted file mode 100644
index 5160879..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/CompressorFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.util.CarbonProperties;
-
-public class CompressorFactory {
-
-  private static final CompressorFactory COMPRESSOR_FACTORY = new CompressorFactory();
-
-  private final Compressor compressor;
-
-  private CompressorFactory() {
-    String compressorType = CarbonProperties.getInstance()
-        .getProperty(CarbonCommonConstants.COMPRESSOR, CarbonCommonConstants.DEFAULT_COMPRESSOR);
-    switch (compressorType) {
-      case "snappy":
-        compressor = new SnappyCompressor();
-        break;
-      default:
-        throw new RuntimeException(
-            "Invalid compressor type provided! Please provide valid compressor type");
-    }
-  }
-
-  public static CompressorFactory getInstance() {
-    return COMPRESSOR_FACTORY;
-  }
-
-  public Compressor getCompressor() {
-    return compressor;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/MeasureMetaDataModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/MeasureMetaDataModel.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/MeasureMetaDataModel.java
deleted file mode 100644
index f207478..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/MeasureMetaDataModel.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-public class MeasureMetaDataModel {
-  /**
-   * maxValue
-   */
-  private Object[] maxValue;
-
-  /**
-   * minValue
-   */
-  private Object[] minValue;
-
-  /**
-   * mantissa
-   */
-  private int[] mantissa;
-
-  /**
-   * measureCount
-   */
-  private int measureCount;
-
-  /**
-   * uniqueValue
-   */
-  private Object[] uniqueValue;
-
-  /**
-   * type
-   */
-  private char[] type;
-
-  /**
-   * dataTypeSelected
-   */
-  private byte[] dataTypeSelected;
-
-  public MeasureMetaDataModel(Object[] minValue, Object[] maxValue, int[] mantissa,
-      int measureCount, Object[] uniqueValue, char[] type, byte[] dataTypeSelected) {
-    this.minValue = minValue;
-    this.maxValue = maxValue;
-    this.mantissa = mantissa;
-    this.measureCount = measureCount;
-    this.uniqueValue = uniqueValue;
-    this.type = type;
-    this.dataTypeSelected = dataTypeSelected;
-  }
-
-  /**
-   * get Max value
-   *
-   * @return
-   */
-  public Object[] getMaxValue() {
-    return maxValue;
-  }
-
-  /**
-   * getMinValue
-   *
-   * @return
-   */
-  public Object[] getMinValue() {
-    return minValue;
-  }
-
-  /**
-   * getMantissa
-   *
-   * @return
-   */
-  public int[] getMantissa() {
-    return mantissa;
-  }
-
-  /**
-   * getMeasureCount
-   *
-   * @return
-   */
-  public int getMeasureCount() {
-    return measureCount;
-  }
-
-  /**
-   * getUniqueValue
-   *
-   * @return
-   */
-  public Object[] getUniqueValue() {
-    return uniqueValue;
-  }
-
-  /**
-   * @return the type
-   */
-  public char[] getType() {
-    return type;
-  }
-
-  /**
-   * @return the dataTypeSelected
-   */
-  public byte[] getDataTypeSelected() {
-    return dataTypeSelected;
-  }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ReaderCompressModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ReaderCompressModel.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ReaderCompressModel.java
deleted file mode 100644
index 51730a2..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ReaderCompressModel.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-import org.apache.carbondata.core.metadata.ValueEncoderMeta;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-
-// Used in read path for decompression preparation
-public class ReaderCompressModel {
-  private ValueEncoderMeta valueEncoderMeta;
-
-  private ValueCompressionUtil.DataType convertedDataType;
-
-  private ValueCompressionHolder valueHolder;
-
-  public void setValueEncoderMeta(ValueEncoderMeta valueEncoderMeta) {
-    this.valueEncoderMeta = valueEncoderMeta;
-  }
-
-  public ValueCompressionUtil.DataType getConvertedDataType() {
-    return convertedDataType;
-  }
-
-  public void setConvertedDataType(ValueCompressionUtil.DataType convertedDataType) {
-    this.convertedDataType = convertedDataType;
-  }
-
-  public Object getMaxValue() {
-    return valueEncoderMeta.getMaxValue();
-  }
-
-  public int getMantissa() {
-    return valueEncoderMeta.getMantissa();
-  }
-
-  public ValueCompressionHolder getValueCompressionHolder() {
-    return valueHolder;
-  }
-
-  public void setValueCompressionHolder(ValueCompressionHolder valueHolder) {
-    this.valueHolder = valueHolder;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/SnappyCompressor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/SnappyCompressor.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/SnappyCompressor.java
deleted file mode 100644
index 62d3b53..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/SnappyCompressor.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-
-import org.xerial.snappy.Snappy;
-import org.xerial.snappy.SnappyNative;
-
-public class SnappyCompressor implements Compressor {
-
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(SnappyCompressor.class.getName());
-
-  private final SnappyNative snappyNative;
-
-  public SnappyCompressor() {
-    Snappy snappy = new Snappy();
-    Field privateField = null;
-    try {
-      privateField = snappy.getClass().getDeclaredField("impl");
-    } catch (NoSuchFieldException | SecurityException e) {
-      throw new RuntimeException(e);
-    }
-    privateField.setAccessible(true);
-    try {
-      snappyNative = (SnappyNative) privateField.get(snappy);
-    } catch (IllegalArgumentException | IllegalAccessException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  @Override public byte[] compressByte(byte[] unCompInput) {
-    try {
-      return Snappy.rawCompress(unCompInput, unCompInput.length);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public byte[] unCompressByte(byte[] compInput) {
-    try {
-      return Snappy.uncompress(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return compInput;
-  }
-
-  @Override public byte[] unCompressByte(byte[] compInput, int offset, int length) {
-    int uncompressedLength = 0;
-    byte[] data = null;
-    try {
-      uncompressedLength = Snappy.uncompressedLength(compInput, offset, length);
-      data = new byte[uncompressedLength];
-      Snappy.uncompress(compInput, offset, length, data, 0);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return data;
-  }
-
-  @Override public byte[] compressShort(short[] unCompInput) {
-    try {
-      return Snappy.compress(unCompInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public short[] unCompressShort(byte[] compInput) {
-    try {
-      return Snappy.uncompressShortArray(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public short[] unCompressShort(byte[] compInput, int offset, int lenght) {
-    try {
-      return Snappy.uncompressShortArray(compInput, offset, lenght);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public byte[] compressInt(int[] unCompInput) {
-    try {
-      return Snappy.compress(unCompInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public int[] unCompressInt(byte[] compInput) {
-    try {
-      return Snappy.uncompressIntArray(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public int[] unCompressInt(byte[] compInput, int offset, int length) {
-    try {
-      return Snappy.uncompressIntArray(compInput, offset, length);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public byte[] compressLong(long[] unCompInput) {
-    try {
-      return Snappy.compress(unCompInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public long[] unCompressLong(byte[] compInput) {
-    try {
-      return Snappy.uncompressLongArray(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public long[] unCompressLong(byte[] compInput, int offset, int length) {
-    try {
-      return Snappy.uncompressLongArray(compInput, offset, length);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public byte[] compressFloat(float[] unCompInput) {
-    try {
-      return Snappy.compress(unCompInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public float[] unCompressFloat(byte[] compInput) {
-    try {
-      return Snappy.uncompressFloatArray(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public float[] unCompressFloat(byte[] compInput, int offset, int length) {
-    try {
-      return Snappy.uncompressFloatArray(compInput, offset, length);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public byte[] compressDouble(double[] unCompInput) {
-    try {
-      return Snappy.compress(unCompInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-      return null;
-    }
-  }
-
-  @Override public double[] unCompressDouble(byte[] compInput) {
-    try {
-      return Snappy.uncompressDoubleArray(compInput);
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-
-  @Override public double[] unCompressDouble(byte[] compInput, int offset, int length) {
-    try {
-      int uncompressedLength = Snappy.uncompressedLength(compInput, offset, length);
-      double[] result = new double[uncompressedLength / 8];
-      snappyNative.rawUncompress(compInput, offset, length, result, 0);
-      return result;
-    } catch (IOException e) {
-      LOGGER.error(e, e.getMessage());
-    }
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ValueCompressionHolder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ValueCompressionHolder.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ValueCompressionHolder.java
deleted file mode 100644
index 6fee5ea..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/ValueCompressionHolder.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-import java.math.BigDecimal;
-
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-
-
-/**
- * ValueCompressionHolder is the base class for handling
- * compression / decompression of the measure data chunk
- */
-public abstract class ValueCompressionHolder<T> {
-
-  /**
-   * compressedValue
-   */
-  protected byte[] compressedValue;
-
-  /**
-   * @param compressor the compressor used to decompress the data
-   * @param dataType data type of the data
-   * @param data compressed data
-   */
-  public void unCompress(Compressor compressor, DataType dataType, byte[] data,
-      int offset, int length) {
-    switch (dataType) {
-      case DATA_BYTE:
-        setValue((T)compressor.unCompressByte(data, offset, length));
-        break;
-      case DATA_SHORT:
-        setValue((T)compressor.unCompressShort(data, offset, length));
-        break;
-      case DATA_INT:
-        setValue((T)compressor.unCompressInt(data, offset, length));
-        break;
-      case DATA_LONG:
-      case DATA_BIGINT:
-        setValue((T)compressor.unCompressLong(data, offset, length));
-        break;
-      case DATA_FLOAT:
-        setValue((T)compressor.unCompressFloat(data, offset, length));
-        break;
-      default:
-        setValue((T)compressor.unCompressDouble(data, offset, length));
-        break;
-    }
-  }
-
-  /**
-   * @param compressor the compressor used to compress the data
-   * @param dataType data type of the data
-   * @param data original data
-   */
-  public byte[] compress(Compressor compressor, DataType dataType, Object data) {
-    switch (dataType) {
-      case DATA_BYTE:
-        return compressor.compressByte((byte[])data);
-      case DATA_SHORT:
-        return compressor.compressShort((short[])data);
-      case DATA_INT:
-        return compressor.compressInt((int[])data);
-      case DATA_LONG:
-      case DATA_BIGINT:
-        return compressor.compressLong((long[])data);
-      case DATA_FLOAT:
-        return compressor.compressFloat((float[])data);
-      case DATA_DOUBLE:
-      default:
-        return compressor.compressDouble((double[])data);
-    }
-  }
-
-  public abstract void setValue(T value);
-
-  public abstract T getValue();
-
-  public abstract void setValueInBytes(byte[] value);
-
-  public abstract void compress();
-
-  public abstract void uncompress(DataType dataType, byte[] compressData, int offset,
-      int length, int decimal, Object maxValueObject);
-
-  public byte[] getCompressedData() { return compressedValue; }
-
-  public abstract long getLongValue(int index);
-
-  public abstract double getDoubleValue(int index);
-
-  public abstract BigDecimal getBigDecimalValue(int index);
-
-  public abstract void freeMemory();
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/WriterCompressModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/WriterCompressModel.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/WriterCompressModel.java
deleted file mode 100644
index 2e93123..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/WriterCompressModel.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression;
-
-import org.apache.carbondata.core.util.CompressionFinder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-
-public class WriterCompressModel {
-
-  /**
-   * DataType[]  variable.
-   */
-  private ValueCompressionUtil.DataType[] convertedDataType;
-  /**
-   * DataType[]  variable.
-   */
-  private ValueCompressionUtil.DataType[] actualDataType;
-
-  /**
-   * maxValue
-   */
-  private Object[] maxValue;
-  /**
-   * minValue.
-   */
-  private Object[] minValue;
-
-  /**
-   * uniqueValue
-   */
-  private Object[] uniqueValue;
-  /**
-   * mantissa.
-   */
-  private int[] mantissa;
-
-  /**
-   * aggType
-   */
-  private char[] type;
-
-  /**
-   * dataTypeSelected
-   */
-  private byte[] dataTypeSelected;
-  /**
-   * unCompressValues.
-   */
-  private ValueCompressionHolder[] valueHolder;
-
-  private CompressionFinder[] compressionFinders;
-
-  /**
-   * @return the convertedDataType
-   */
-  public ValueCompressionUtil.DataType[] getConvertedDataType() {
-    return convertedDataType;
-  }
-
-  /**
-   * @param convertedDataType the convertedDataType to set
-   */
-  public void setConvertedDataType(ValueCompressionUtil.DataType[] convertedDataType) {
-    this.convertedDataType = convertedDataType;
-  }
-
-  /**
-   * @return the actualDataType
-   */
-  public ValueCompressionUtil.DataType[] getActualDataType() {
-    return actualDataType;
-  }
-
-  /**
-   * @param actualDataType
-   */
-  public void setActualDataType(ValueCompressionUtil.DataType[] actualDataType) {
-    this.actualDataType = actualDataType;
-  }
-
-  /**
-   * @return the maxValue
-   */
-  public Object[] getMaxValue() {
-    return maxValue;
-  }
-
-  /**
-   * @param maxValue the maxValue to set
-   */
-  public void setMaxValue(Object[] maxValue) {
-    this.maxValue = maxValue;
-  }
-
-  /**
-   * @return the mantissa
-   */
-  public int[] getMantissa() {
-    return mantissa;
-  }
-
-  /**
-   * @param mantissa the mantissa to set
-   */
-  public void setMantissa(int[] mantissa) {
-    this.mantissa = mantissa;
-  }
-
-  /**
-   * getUnCompressValues().
-   *
-   * @return the unCompressValues
-   */
-  public ValueCompressionHolder[] getValueCompressionHolder() {
-    return valueHolder;
-  }
-
-  /**
-   * @param valueHolder set the ValueCompressionHolder
-   */
-  public void setValueCompressionHolder(ValueCompressionHolder[] valueHolder) {
-    this.valueHolder = valueHolder;
-  }
-
-  /**
-   * getMinValue
-   *
-   * @return
-   */
-  public Object[] getMinValue() {
-    return minValue;
-  }
-
-  /**
-   * setMinValue.
-   *
-   * @param minValue
-   */
-  public void setMinValue(Object[] minValue) {
-    this.minValue = minValue;
-  }
-
-  /**
-   * @return the aggType
-   */
-  public char[] getType() {
-    return type;
-  }
-
-  /**
-   * @param type the type to set
-   */
-  public void setType(char[] type) {
-    this.type = type;
-  }
-
-  /**
-   * @return the dataTypeSelected
-   */
-  public byte[] getDataTypeSelected() {
-    return dataTypeSelected;
-  }
-
-  /**
-   * @param dataTypeSelected the dataTypeSelected to set
-   */
-  public void setDataTypeSelected(byte[] dataTypeSelected) {
-    this.dataTypeSelected = dataTypeSelected;
-  }
-
-  /**
-   * getUniqueValue
-   *
-   * @return
-   */
-  public Object[] getUniqueValue() {
-    return uniqueValue;
-  }
-
-  /**
-   * setUniqueValue
-   *
-   * @param uniqueValue
-   */
-  public void setUniqueValue(Object[] uniqueValue) {
-    this.uniqueValue = uniqueValue;
-  }
-
-  public void setCompressionFinders(CompressionFinder[] compressionFinders) {
-    this.compressionFinders = compressionFinders;
-  }
-
-  public CompressionFinder[] getCompressionFinders() {
-    return this.compressionFinders;
-  }
-
-  /**
-   * @return the compType
-   */
-  public ValueCompressionUtil.COMPRESSION_TYPE getCompType(int index) {
-    return this.compressionFinders[index].getCompType();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinByte.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinByte.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinByte.java
deleted file mode 100644
index bd1c643..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinByte.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-3 * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.decimal;
-
-import java.math.BigDecimal;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionMaxMinByte extends ValueCompressionHolder<byte[]> {
-
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionMaxMinByte.class.getName());
-
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  protected byte[] value;
-
-  private MeasureDataChunkStore<byte[]> measureChunkStore;
-
-  /**
-   * actual data type
-   */
-  protected DataType actualDataType;
-
-  private double maxValue;
-
-  public CompressionMaxMinByte(DataType actualDataType) {
-    this.actualDataType = actualDataType;
-  }
-
-  @Override public byte[] getValue() {return this.value; }
-
-  @Override public void setValue(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_BYTE, value);
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, maxValueObject);
-
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public long getLongValue(int index) {
-    byte byteValue = measureChunkStore.getByte(index);
-    return (long) (maxValue - byteValue);
-  }
-
-  @Override public double getDoubleValue(int index) {
-    byte byteValue = measureChunkStore.getByte(index);
-    return (maxValue - byteValue);
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionMaxMinByte");
-  }
-
-  private void setUncompressedValues(byte[] data, Object maxValueObject) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_BYTE, data.length);
-    this.measureChunkStore.putData(data);
-    if (maxValueObject instanceof Long) {
-      this.maxValue = (long)maxValueObject;
-    } else {
-      this.maxValue = (double) maxValueObject;
-    }
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinDefault.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinDefault.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinDefault.java
deleted file mode 100644
index 1c38d11..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinDefault.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.decimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-
-public class CompressionMaxMinDefault extends ValueCompressionHolder<double[]> {
-
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionMaxMinDefault.class.getName());
-
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  private double[] value;
-
-  private MeasureDataChunkStore<double[]> measureChunkStore;
-
-  /**
-   * actual data type
-   */
-  private DataType actualDataType;
-
-  private double maxValue;
-
-  public CompressionMaxMinDefault(DataType actualDataType) {
-    this.actualDataType = actualDataType;
-  }
-
-  @Override public void setValue(double[] value) {
-    this.value = value;
-  }
-
-  @Override public double[] getValue() {return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_DOUBLE, value);
-  }
-
-  @Override public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, maxValueObject);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToDoubleArray(buffer, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionMaxMinDefault");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    double doubleValue = measureChunkStore.getDouble(index);
-    return maxValue - doubleValue;
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionMaxMinDefault");
-  }
-
-  private void setUncompressedValues(double[] data, Object maxValueObject) {
-    this.measureChunkStore = MeasureChunkStoreFactory.INSTANCE
-            .getMeasureDataChunkStore(DataType.DATA_DOUBLE, data.length);
-    this.measureChunkStore.putData(data);
-    if (maxValueObject instanceof Long) {
-      this.maxValue = (long) maxValueObject;
-    } else {
-      this.maxValue = (double) maxValueObject;
-    }
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinInt.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinInt.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinInt.java
deleted file mode 100644
index 940b637..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinInt.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.decimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionMaxMinInt extends ValueCompressionHolder<int[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionMaxMinInt.class.getName());
-
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  private MeasureDataChunkStore<int[]> measureChunkStore;
-
-  /**
-   * value.
-   */
-  private int[] value;
-
-  private DataType actualDataType;
-
-  private double maxValue;
-
-  public CompressionMaxMinInt(DataType actualType) {
-    this.actualDataType = actualType;
-  }
-
-  @Override public void setValue(int[] value) {
-    this.value = value;
-  }
-
-  @Override public int[] getValue() { return this.value; }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, maxValueObject);
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_INT, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToIntArray(buffer, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    int intValue = measureChunkStore.getInt(index);
-    return (long) (maxValue - intValue);
-  }
-
-  @Override public double getDoubleValue(int index) {
-    int intValue = measureChunkStore.getInt(index);
-    return maxValue - intValue;
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionMaxMinInt");
-  }
-
-  private void setUncompressedValues(int[] data, Object maxValueObject) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_INT, data.length);
-    this.measureChunkStore.putData(data);
-    if (maxValueObject instanceof Long) {
-      this.maxValue = (long) maxValueObject;
-    } else {
-      this.maxValue = (double) maxValueObject;
-    }
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinLong.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinLong.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinLong.java
deleted file mode 100644
index 846d93e..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinLong.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.decimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionMaxMinLong extends ValueCompressionHolder<long[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionMaxMinLong.class.getName());
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  private MeasureDataChunkStore<long[]> measureChunkStore;
-
-  /**
-   * value.
-   */
-  protected long[] value;
-
-  protected DataType actualDataType;
-
-  private double maxValue;
-
-  public CompressionMaxMinLong(DataType actualDataType) {
-    this.actualDataType = actualDataType;
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_LONG, value);
-  }
-
-  @Override public void setValue(long[] value) {
-    this.value = value;
-
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressValues(value, maxValueObject);
-  }
-
-  @Override public long[] getValue() {return this.value; }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToLongArray(buffer, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    long longValue = measureChunkStore.getLong(index);
-    return (long) maxValue - longValue;
-  }
-
-  @Override public double getDoubleValue(int index) {
-    long longValue = measureChunkStore.getLong(index);
-    return maxValue - longValue;
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionMaxMinLong");
-  }
-
-  private void setUncompressValues(long[] data, Object maxValueObject) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_LONG, data.length);
-    this.measureChunkStore.putData(data);
-    if (maxValueObject instanceof Long) {
-      this.maxValue = (long) maxValueObject;
-    } else {
-      this.maxValue = (double) maxValueObject;
-    }
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinShort.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinShort.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinShort.java
deleted file mode 100644
index f12ba69..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/decimal/CompressionMaxMinShort.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.decimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionMaxMinShort extends ValueCompressionHolder<short[]> {
-
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionMaxMinShort.class.getName());
-
-  /**
-   * shortCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  private MeasureDataChunkStore<short[]> measureChunkStore;
-
-  /**
-   * value.
-   */
-  private short[] value;
-
-  private DataType actualDataType;
-
-  private double maxValue;
-
-  public CompressionMaxMinShort(DataType actualDataType) {
-    this.actualDataType = actualDataType;
-  }
-
-  @Override public void setValue(short[] value) {
-    this.value = value;
-
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, maxValueObject);
-  }
-
-  @Override public short[] getValue() {return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_SHORT, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToShortArray(buffer, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    short shortValue = measureChunkStore.getShort(index);
-    return (long) maxValue - shortValue;
-  }
-
-  @Override public double getDoubleValue(int index) {
-    short shortValue = measureChunkStore.getShort(index);
-    return maxValue - shortValue;
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionMaxMinShort");
-  }
-
-  private void setUncompressedValues(short[] data, Object maxValueObject) {
-    this.measureChunkStore = MeasureChunkStoreFactory.INSTANCE
-        .getMeasureDataChunkStore(DataType.DATA_SHORT, data.length);
-    this.measureChunkStore.putData(data);
-    if (maxValueObject instanceof Long) {
-      this.maxValue = (long) maxValueObject;
-    } else {
-      this.maxValue = (double) maxValueObject;
-    }
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalByte.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalByte.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalByte.java
deleted file mode 100644
index 3f0a99c..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalByte.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalByte extends ValueCompressionHolder<byte[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalByte.class.getName());
-
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  private byte[] value;
-
-  private MeasureDataChunkStore<byte[]> measureChunkStore;
-
-  private double divisionFactory;
-
-  @Override public void setValue(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public byte[] getValue() {return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_BYTE, value);
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalByte");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    return (measureChunkStore.getByte(index) / this.divisionFactory);
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalByte");
-  }
-
-  private void setUncompressedValues(byte[] data, int decimalPlaces) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_BYTE, data.length);
-    this.measureChunkStore.putData(data);
-    this.divisionFactory = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalDefault.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalDefault.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalDefault.java
deleted file mode 100644
index 48e4b5e..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalDefault.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalDefault extends ValueCompressionHolder<double[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalDefault.class.getName());
-  /**
-   * doubleCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-  /**
-   * value.
-   */
-  private double[] value;
-
-  private MeasureDataChunkStore<double[]> measureChunkStore;
-
-  private double divisionFactory;
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces);
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_DOUBLE, value);
-  }
-
-  @Override public void setValue(double[] value) {
-    this.value = value;
-
-  }
-
-  @Override public double[] getValue() {return this.value; }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToDoubleArray(buffer, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalDefault");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    return (measureChunkStore.getDouble(index) / divisionFactory);
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalDefault");
-  }
-
-  private void setUncompressedValues(double[] data, int decimalPlaces) {
-    this.measureChunkStore = MeasureChunkStoreFactory.INSTANCE
-        .getMeasureDataChunkStore(DataType.DATA_DOUBLE, data.length);
-    this.measureChunkStore.putData(data);
-    this.divisionFactory = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalInt.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalInt.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalInt.java
deleted file mode 100644
index 1ae5595..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalInt.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalInt extends ValueCompressionHolder<int[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalInt.class.getName());
-  /**
-   * intCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-  /**
-   * value.
-   */
-  private int[] value;
-
-  private MeasureDataChunkStore<int[]> measureChunkStore;
-
-  private double divisionFactory;
-
-  @Override public void setValue(int[] value) {
-    this.value = value;
-  }
-
-  @Override public int[] getValue() { return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_INT, value);
-  }
-
-  @Override public void setValueInBytes(byte[] bytesArr) {
-    ByteBuffer buffer = ByteBuffer.wrap(bytesArr);
-    this.value = ValueCompressionUtil.convertToIntArray(buffer, bytesArr.length);
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData, int offset, int length,
-      int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalInt");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    return (measureChunkStore.getInt(index) / this.divisionFactory);
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecmialInt");
-  }
-
-  private void setUncompressedValues(int[] data, int decimalPlaces) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_INT, data.length);
-    this.measureChunkStore.putData(data);
-    this.divisionFactory = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalLong.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalLong.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalLong.java
deleted file mode 100644
index 8152647..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalLong.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalLong extends ValueCompressionHolder<long[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalLong.class.getName());
-
-  /**
-   * longCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  private long[] value;
-
-  private MeasureDataChunkStore<long[]> measureChunkStore;
-
-  private double divisionFactory;
-
-  @Override public void setValue(long[] value) {
-    this.value = value;
-  }
-
-  @Override public long[] getValue() { return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_LONG, value);
-  }
-
-  @Override public void uncompress(DataType dataType, byte[] compressedData, int offset,
-      int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces);
-  }
-
-  @Override public void setValueInBytes(byte[] bytes) {
-    ByteBuffer buffer = ByteBuffer.wrap(bytes);
-    this.value = ValueCompressionUtil.convertToLongArray(buffer, bytes.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalLong");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    return (measureChunkStore.getLong(index) / this.divisionFactory);
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalLong");
-  }
-
-  private void setUncompressedValues(long[] data, int decimalPlaces) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_LONG, data.length);
-    this.measureChunkStore.putData(data);
-    this.divisionFactory = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinByte.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinByte.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinByte.java
deleted file mode 100644
index 913c3bd..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinByte.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalMaxMinByte extends ValueCompressionHolder<byte[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalMaxMinByte.class.getName());
-
-  /**
-   * compressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  private byte[] value;
-
-  private MeasureDataChunkStore<byte[]> measureChunkStore;
-
-  private BigDecimal maxValue;
-
-  private double divisionFactor;
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces, maxValueObject );
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_BYTE, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public void setValue(byte[] value) {
-    this.value = value;
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalMaxMinByte");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    byte byteValue = measureChunkStore.getByte(index);
-    BigDecimal diff = BigDecimal.valueOf(byteValue / this.divisionFactor);
-    return maxValue.subtract(diff).doubleValue();
-
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalMaxMinByte");
-  }
-
-  private void setUncompressedValues(byte[] data, int decimalPlaces, Object maxValueObject) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_BYTE, data.length);
-    this.measureChunkStore.putData(data);
-    this.maxValue = BigDecimal.valueOf((double) maxValueObject);
-    this.divisionFactor = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-
-  @Override public byte[] getValue() { return this.value; }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinDefault.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinDefault.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinDefault.java
deleted file mode 100644
index a52f6de..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinDefault.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalMaxMinDefault extends ValueCompressionHolder<double[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalMaxMinDefault.class.getName());
-
-  /**
-   * doubleCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-
-  /**
-   * value.
-   */
-  private double[] value;
-
-  private MeasureDataChunkStore<double[]> measureChunkStore;
-
-  private BigDecimal maxValue;
-
-  private double divisionFactor;
-
-  @Override public void setValue(double[] value) {
-    this.value = value;
-  }
-
-  @Override public double[] getValue() { return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_DOUBLE, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToDoubleArray(buffer, value.length);
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor,dataType,compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces, maxValueObject);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalMaxMinDefault");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    double doubleValue = measureChunkStore.getDouble(index);
-    BigDecimal diff = BigDecimal.valueOf(doubleValue / this.divisionFactor);
-    return maxValue.subtract(diff).doubleValue();
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalMaxMinDefault");
-  }
-
-  private void setUncompressedValues(double[] data, int decimalPlaces, Object maxValueObject) {
-    this.measureChunkStore = MeasureChunkStoreFactory.INSTANCE
-        .getMeasureDataChunkStore(DataType.DATA_DOUBLE, data.length);
-    this.measureChunkStore.putData(data);
-    this.maxValue = BigDecimal.valueOf((double) maxValueObject);
-    this.divisionFactor = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinInt.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinInt.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinInt.java
deleted file mode 100644
index cbb63db..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinInt.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalMaxMinInt extends ValueCompressionHolder<int[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalMaxMinInt.class.getName());
-  /**
-   * intCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-  /**
-   * value.
-   */
-  private int[] value;
-
-  private MeasureDataChunkStore<int[]> measureChunkStore;
-
-  private double divisionFactor;
-
-  private BigDecimal maxValue;
-
-  @Override public void setValue(int[] value) {
-    this.value = value;
-  }
-
-  @Override public int[] getValue() {return this.value; }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_INT, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buffer = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToIntArray(buffer, value.length);
-  }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces, maxValueObject);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalMaxMinInt");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    int intValue = measureChunkStore.getInt(index);
-    BigDecimal diff = BigDecimal.valueOf(intValue / this.divisionFactor);
-    return maxValue.subtract(diff).doubleValue();
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException(
-      "Big decimal value is not defined for CompressionNonDecimalMaxMinInt");
-  }
-
-  private void setUncompressedValues(int[] data, int decimalPlaces, Object maxValueObject) {
-    this.measureChunkStore =
-        MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_INT, data.length);
-    this.measureChunkStore.putData(data);
-    this.maxValue = BigDecimal.valueOf((double) maxValueObject);
-    this.divisionFactor = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinLong.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinLong.java b/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinLong.java
deleted file mode 100644
index 00aa2ae..0000000
--- a/core/src/main/java/org/apache/carbondata/core/datastorage/store/compression/nondecimal/CompressionNonDecimalMaxMinLong.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.carbondata.core.datastorage.store.compression.nondecimal;
-
-import java.math.BigDecimal;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureChunkStoreFactory;
-import org.apache.carbondata.core.datastore.chunk.store.MeasureDataChunkStore;
-import org.apache.carbondata.core.datastorage.store.compression.Compressor;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.util.ValueCompressionUtil;
-import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
-
-public class CompressionNonDecimalMaxMinLong extends ValueCompressionHolder<long[]> {
-  /**
-   * Attribute for Carbon LOGGER
-   */
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(CompressionNonDecimalMaxMinLong.class.getName());
-
-  /**
-   * longCompressor.
-   */
-  private static Compressor compressor = CompressorFactory.getInstance().getCompressor();
-  /**
-   * value.
-   */
-  private long[] value;
-
-  private MeasureDataChunkStore<long[]> measureChunkStore;
-
-  private BigDecimal maxValue;
-
-  private double divisionFactor;
-
-  @Override public void setValue(long[] value) {
-    this.value = value;
-
-  }
-
-  @Override public long[] getValue() { return this.value; }
-
-  @Override
-  public void uncompress(DataType dataType, byte[] compressedData,
-      int offset, int length, int decimalPlaces, Object maxValueObject) {
-    super.unCompress(compressor, dataType, compressedData, offset, length);
-    setUncompressedValues(value, decimalPlaces, maxValueObject);
-  }
-
-  @Override public void compress() {
-    compressedValue = super.compress(compressor, DataType.DATA_LONG, value);
-  }
-
-  @Override public void setValueInBytes(byte[] value) {
-    ByteBuffer buff = ByteBuffer.wrap(value);
-    this.value = ValueCompressionUtil.convertToLongArray(buff, value.length);
-  }
-
-  @Override public long getLongValue(int index) {
-    throw new UnsupportedOperationException(
-      "Long value is not defined for CompressionNonDecimalMaxMinLong");
-  }
-
-  @Override public double getDoubleValue(int index) {
-    long longValue = measureChunkStore.getLong(index);
-    BigDecimal diff = BigDecimal.valueOf(longValue / this.divisionFactor);
-    return maxValue.subtract(diff).doubleValue();
-  }
-
-  @Override public BigDecimal getBigDecimalValue(int index) {
-    throw new UnsupportedOperationException("Big decimal value is not supported");
-  }
-
-  private void setUncompressedValues(long[] data, int decimalPlaces, Object maxValueObject) {
-    this.measureChunkStore =
-      MeasureChunkStoreFactory.INSTANCE.getMeasureDataChunkStore(DataType.DATA_LONG, data.length);
-    this.measureChunkStore.putData(data);
-    this.maxValue = BigDecimal.valueOf((double) maxValueObject);
-    this.divisionFactor = Math.pow(10, decimalPlaces);
-  }
-
-  @Override public void freeMemory() {
-    this.measureChunkStore.freeMemory();
-  }
-}



Mime
View raw message