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

    https://github.com/apache/carbondata/pull/1322#discussion_r139386365
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/scan/executor/util/RestructureUtil.java
 ---
    @@ -211,10 +213,21 @@ private static Object 
getDirectDictionaryDefaultValue(DataType dataType, byte[]
        * @param defaultValue
        * @return
        */
    -  private static Object getNoDictionaryDefaultValue(byte[] defaultValue) {
    +  private static Object getNoDictionaryDefaultValue(DataType datatype, 
byte[] defaultValue) {
         Object noDictionaryDefaultValue = null;
         if (!isDefaultValueNull(defaultValue)) {
    -      noDictionaryDefaultValue = UTF8String.fromBytes(defaultValue);
    +      switch (datatype) {
    +        case INT:
    +          noDictionaryDefaultValue = ByteUtil.toInt(defaultValue, 0, 
defaultValue.length);
    +          break;
    +        case LONG:
    +        case TIMESTAMP:
    +          long timestampValue = ByteUtil.toLong(defaultValue, 0, 
defaultValue.length);
    --- End diff --
    
    Here Long case to be separately handled.


---

Reply via email to