[GitHub] carbondata pull request #1420: Fixed IntermediateFileMerger for decimal type...

classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1420: Fixed IntermediateFileMerger for decimal type...

qiuchenjian-2
GitHub user kunal642 opened a pull request:

    https://github.com/apache/carbondata/pull/1420

    Fixed IntermediateFileMerger for decimal types

    Analysis: casting bigdecimal to byte[] was throwing ClassCastException in IntermediateFileMerger.
   
    Solution: Use DataType#bigDecimalToByte to convert bigdecimal to byte[].

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kunal642/carbondata fix_merger_for_decimal

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/1420.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1420
   
----
commit b0ef7ef5b65dea32db67c9c3b60d7f26698e729a
Author: kunal642 <[hidden email]>
Date:   2017-10-19T06:26:37Z

    fixed IntermediateFileMerger for decimal types

----


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

qiuchenjian-2
Github user CarbonDataQA commented on the issue:

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    Build Success with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/358/



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    Can you add a testcase to verify?


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    @jackylk test case added..Please review


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

[GitHub] carbondata pull request #1420: [CARBONDATA-1596] Fixed IntermediateFileMerge...

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

    https://github.com/apache/carbondata/pull/1420#discussion_r145638480
 
    --- Diff: processing/src/test/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMergerTest.java ---
    @@ -0,0 +1,104 @@
    +/*
    + * 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.processing.sort.sortdata;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.math.BigDecimal;
    +
    +import org.apache.carbondata.core.metadata.datatype.DataType;
    +import org.apache.carbondata.core.metadata.datatype.DataTypes;
    +import org.apache.carbondata.processing.sort.exception.CarbonSortKeyAndGroupByException;
    +
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.junit.AfterClass;
    +import org.junit.Assert;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +public class IntermediateFileMergerTest {
    +
    +  private static IntermediateFileMerger intermediateFileMerger;
    +  private static File file2;
    +  private static File file1;
    +  private static File outputFile;
    +
    +  @BeforeClass public static void setUp() {
    +    SortParameters sortParameters = new SortParameters();
    +    sortParameters.setMeasureColCount(1);
    +    sortParameters.setNoDictionaryDimnesionColumn(new boolean[] { false });
    +    sortParameters.setPrefetch(false);
    +    sortParameters.setSortFileCompressionEnabled(false);
    +    sortParameters.setFileWriteBufferSize(2);
    +    sortParameters.setMeasureDataType(new DataType[] { DataTypes.DECIMAL });
    --- End diff --
   
    I mean to add a testcase to reproduce the error.
    Is it a error when compaction a table having decimal type?


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    Build Failed with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/362/



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata pull request #1420: [CARBONDATA-1596] Fixed IntermediateFileMerge...

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

    https://github.com/apache/carbondata/pull/1420#discussion_r145643832
 
    --- Diff: processing/src/test/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMergerTest.java ---
    @@ -0,0 +1,104 @@
    +/*
    + * 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.processing.sort.sortdata;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.math.BigDecimal;
    +
    +import org.apache.carbondata.core.metadata.datatype.DataType;
    +import org.apache.carbondata.core.metadata.datatype.DataTypes;
    +import org.apache.carbondata.processing.sort.exception.CarbonSortKeyAndGroupByException;
    +
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.junit.AfterClass;
    +import org.junit.Assert;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +public class IntermediateFileMergerTest {
    +
    +  private static IntermediateFileMerger intermediateFileMerger;
    +  private static File file2;
    +  private static File file1;
    +  private static File outputFile;
    +
    +  @BeforeClass public static void setUp() {
    +    SortParameters sortParameters = new SortParameters();
    +    sortParameters.setMeasureColCount(1);
    +    sortParameters.setNoDictionaryDimnesionColumn(new boolean[] { false });
    +    sortParameters.setPrefetch(false);
    +    sortParameters.setSortFileCompressionEnabled(false);
    +    sortParameters.setFileWriteBufferSize(2);
    +    sortParameters.setMeasureDataType(new DataType[] { DataTypes.DECIMAL });
    --- End diff --
   
    yes. While merging the sort temp files the following code was throwing the error.
    (byte[]) NonDictionaryUtil.getMeasure(fieldIndex, row);
    The fix is to use the DataTypeUtil.bigDecimalToByte to convert bigDecimal value to byte[].


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata pull request #1420: [CARBONDATA-1596] Fixed IntermediateFileMerge...

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

    https://github.com/apache/carbondata/pull/1420#discussion_r145664360
 
    --- Diff: processing/src/test/java/org/apache/carbondata/processing/sort/sortdata/IntermediateFileMergerTest.java ---
    @@ -0,0 +1,104 @@
    +/*
    + * 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.processing.sort.sortdata;
    +
    +import java.io.File;
    +import java.io.IOException;
    +import java.math.BigDecimal;
    +
    +import org.apache.carbondata.core.metadata.datatype.DataType;
    +import org.apache.carbondata.core.metadata.datatype.DataTypes;
    +import org.apache.carbondata.processing.sort.exception.CarbonSortKeyAndGroupByException;
    +
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.junit.AfterClass;
    +import org.junit.Assert;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +public class IntermediateFileMergerTest {
    +
    +  private static IntermediateFileMerger intermediateFileMerger;
    +  private static File file2;
    +  private static File file1;
    +  private static File outputFile;
    +
    +  @BeforeClass public static void setUp() {
    +    SortParameters sortParameters = new SortParameters();
    +    sortParameters.setMeasureColCount(1);
    +    sortParameters.setNoDictionaryDimnesionColumn(new boolean[] { false });
    +    sortParameters.setPrefetch(false);
    +    sortParameters.setSortFileCompressionEnabled(false);
    +    sortParameters.setFileWriteBufferSize(2);
    +    sortParameters.setMeasureDataType(new DataType[] { DataTypes.DECIMAL });
    --- End diff --
   
    So can you add a testcase to do compaction on table having decimal type instead of using mock.


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    @jackylk added integration test instead of unit test.


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

    https://github.com/apache/carbondata/pull/1420
 
    Build Failed with Spark 1.6, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/367/



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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


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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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



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

[GitHub] carbondata issue #1420: [CARBONDATA-1596] Fixed IntermediateFileMerger for d...

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

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


---
12