carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvramana <...@git.apache.org>
Subject [GitHub] carbondata pull request #1322: [CARBONDATA-1450] Support timestamp more than...
Date Mon, 18 Sep 2017 10:32:15 GMT
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.


---

Mime
View raw message