[GitHub] carbondata pull request #1795: [CARBONDATA-2016] Exception displays while ex...

classic Classic list List threaded Threaded
46 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1795: [CARBONDATA-2016] Exception displays while ex...

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

    https://github.com/apache/carbondata/pull/1795#discussion_r161792809
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortDataRows.java ---
    @@ -270,7 +270,7 @@ private void writeDataToFile(Object[][] recordHolderList, int entryCountLocal, F
                 } else if (dataType == DataTypes.SHORT) {
                   stream.writeShort((Short) value);
                 } else if (dataType == DataTypes.INT) {
    -              stream.writeInt((Integer) value);
    +              stream.writeInt(Integer.parseInt(value.toString()));
    --- End diff --
   
    But what is the root cause of this bug? I think your change (convert to string and then int) is like hiding this bug.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1795: [CARBONDATA-2016] Exception displays while ex...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1795#discussion_r161794151
 
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/sort/sortdata/SortDataRows.java ---
    @@ -270,7 +270,7 @@ private void writeDataToFile(Object[][] recordHolderList, int entryCountLocal, F
                 } else if (dataType == DataTypes.SHORT) {
                   stream.writeShort((Short) value);
                 } else if (dataType == DataTypes.INT) {
    -              stream.writeInt((Integer) value);
    +              stream.writeInt(Integer.parseInt(value.toString()));
    --- End diff --
   
    @jackylyk ok i get your point you mean we should handle it at the base root level ok I am looking into it


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    @jackylk  
   
    **here is the root reason**
   
    **when we apply the alter table command with default value i;e
           "alter table customer1 add columns (intfield int) TBLPROPERTIES ('DEFAULT.VALUE.intfield'='10')")
   
    that value is always return as the long object in restructure util thats why compaction failed because the column value for newly added column is long but the column type is int**
   
   
    it is wrongly written in restructure util  this code is wrong
   
      public static Object getMeasureDefaultValue(ColumnSchema columnSchema, byte[] defaultValue) {
        Object measureDefaultValue = null;
        if (!isDefaultValueNull(defaultValue)) {
          String value = null;
          DataType dataType = columnSchema.getDataType();
          if (dataType == DataTypes.SHORT || dataType == DataTypes.INT || dataType == DataTypes.LONG) {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            measureDefaultValue = Long.parseLong(value);
          } else if (DataTypes.isDecimal(dataType)) {
            BigDecimal decimal = DataTypeUtil.byteToBigDecimal(defaultValue);
            if (columnSchema.getScale() > decimal.scale()) {
              decimal = decimal.setScale(columnSchema.getScale(), RoundingMode.HALF_UP);
            }
            measureDefaultValue = decimal;
          } else {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            Double parsedValue = Double.valueOf(value);
            if (!Double.isInfinite(parsedValue) && !Double.isNaN(parsedValue)) {
              measureDefaultValue = parsedValue;
            }
          }
        }
        return measureDefaultValue;
      }
   
    this code is always returning a long value objetc that is wrong
   
    i corrected it as
   
      */
      public static Object getMeasureDefaultValue(ColumnSchema columnSchema, byte[] defaultValue) {
        Object measureDefaultValue = null;
        if (!isDefaultValueNull(defaultValue)) {
          String value = null;
          DataType dataType = columnSchema.getDataType();
          if (dataType == DataTypes.SHORT) {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            measureDefaultValue = new Short(value);
          }
         else if (dataType == DataTypes.LONG) {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            measureDefaultValue = Long.parseLong(value);
          }
         else if (dataType == DataTypes.INT) {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            measureDefaultValue = Integer.parseInt(value);
          }
          else if (DataTypes.isDecimal(dataType)) {
            BigDecimal decimal = DataTypeUtil.byteToBigDecimal(defaultValue);
            if (columnSchema.getScale() > decimal.scale()) {
              decimal = decimal.setScale(columnSchema.getScale(), RoundingMode.HALF_UP);
            }
            measureDefaultValue = decimal;
          } else {
            value = new String(defaultValue, Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET));
            Double parsedValue = Double.valueOf(value);
            if (!Double.isInfinite(parsedValue) && !Double.isNaN(parsedValue)) {
              measureDefaultValue = parsedValue;
            }
          }
        }
        return measureDefaultValue;
      }
   
    please review i corrected it


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1662/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2896/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1672/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2904/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    retest this please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1676/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2909/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1681/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2914/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1688/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/2921/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2963/



---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user anubhav100 commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    retest sdv please


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1795: [CARBONDATA-2016] Exception displays while executing...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:

    https://github.com/apache/carbondata/pull/1795
 
    SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/2970/



---
123