Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/338#discussion_r90394339
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/compression/BigIntCompressor.java 
---
    @@ -0,0 +1,134 @@
    +/*
    + * 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.compression;
    +
    +import 
org.apache.carbondata.core.datastorage.store.dataholder.CarbonWriteDataHolder;
    +import org.apache.carbondata.core.util.ValueCompressionUtil.DataType;
    +
    +/**
    + * It compresses big int data
    + */
    +public class BigIntCompressor extends ValueCompressor {
    +
    +  @Override protected Object compressNonDecimalMaxMin(DataType 
changedDataType,
    +      CarbonWriteDataHolder dataHolder, int decimal, Object max) {
    +    // in case if bigint, decimal will be 0
    +    return compressMaxMin(changedDataType, dataHolder, max);
    +  }
    +
    +  @Override
    +  protected Object compressNonDecimal(DataType changedDataType, 
CarbonWriteDataHolder dataHolder,
    +      int decimal) {
    +    // in case if bigint, decimal will be 0
    +    return compressNone(changedDataType, dataHolder);
    +  }
    +
    +  @Override
    +  protected Object compressMaxMin(DataType changedDataType, 
CarbonWriteDataHolder dataHolder,
    +      Object max) {
    +    long maxValue = (long) max;
    +    long[] value = dataHolder.getWritableLongValues();
    +    int i = 0;
    +    switch (changedDataType) {
    +      case DATA_BYTE:
    --- End diff --
    
    can we use the data type enum defined by 
`org.apache.carbondata.core.carbon.metadata.datatype.DataType`
    do not create another one


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to