[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

qiuchenjian-2
GitHub user PallaviSingh1992 opened a pull request:

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

    [CARBONDATA-1404] Added Unit test cases for Hive Integration

   

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

    $ git pull https://github.com/PallaviSingh1992/carbondata feature/HiveUnitTests

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

    https://github.com/apache/carbondata/pull/1286.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 #1286
   
----
commit ec00023d578a6e28b5c6093e95f2ec42b955a842
Author: shivangi <[hidden email]>
Date:   2017-08-14T06:14:01Z

    Added Unit test cases for Hive Integration
    Resolved Review Comments

----


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

qiuchenjian-2
Github user chenliang613 commented on the issue:

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


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

    https://github.com/apache/carbondata/pull/1286
 
    A good PR


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

    https://github.com/apache/carbondata/pull/1286#discussion_r136076518
 
    --- Diff: integration/hive/src/test/java/org/apache/carbondata/hive/CarbonObjectInspectorTest.java ---
    @@ -0,0 +1,159 @@
    +/*
    + * 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.hive;
    +
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.List;
    +
    +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
    +import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo;
    +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
    +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
    +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
    +import org.apache.hadoop.io.ArrayWritable;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.Writable;
    +import org.junit.Assert;
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +public class CarbonObjectInspectorTest {
    +
    +  private CarbonObjectInspector carbonObjectInspector = null;
    +
    +  private List<String> columnNames = Arrays
    +      .asList("id", "name", "salary", "enrollment", "performanceIndex", "areaOfExpertise",
    +          "projects", "dept", "dateOfJoining");
    +  private String listOfColumnTypes =
    +      "int:string:double:bigint,decimal:struct<area:string,experience:int>:array<string>:smallint:date";
    +
    +  @Before public void setUp() {
    +    carbonObjectInspector = getCarbonObjectInspector();
    +  }
    +
    +  private CarbonObjectInspector getCarbonObjectInspector() {
    +    List<TypeInfo> columnTypes = TypeInfoUtils.getTypeInfosFromTypeString(listOfColumnTypes);
    +    TypeInfo rowTypeInfo = TypeInfoFactory.getStructTypeInfo(columnNames, columnTypes);
    +    return new CarbonObjectInspector((StructTypeInfo) rowTypeInfo);
    +  }
    +
    +  @Test public void testGetStructFieldDataNullData() {
    +    Assert.assertNull(carbonObjectInspector
    +        .getStructFieldData(null, carbonObjectInspector.getStructFieldRef("salary")));
    +  }
    +
    +  @Test public void testGetStructFieldDataArrayWritable() {
    +
    +    Writable[] intWritable =
    +        new Writable[] { new IntWritable(10000), new IntWritable(20000), new IntWritable(30000) };
    +    final ArrayWritable writable = new ArrayWritable(IntWritable.class, intWritable);
    +
    +    CarbonObjectInspector carbonObjectInspector = getCarbonObjectInspector();
    +    Object result = carbonObjectInspector
    +        .getStructFieldData(writable, carbonObjectInspector.getStructFieldRef("salary"));
    +    Assert.assertEquals(30000, ((IntWritable) result).get());
    +  }
    +
    +  @Test public void testGetStructFieldDataList() {
    +    CarbonObjectInspector carbonObjectInspector = getCarbonObjectInspector();
    +    Object result = carbonObjectInspector
    +        .getStructFieldData(Arrays.asList(1000, "carbondata", 3000, 4000),
    +            carbonObjectInspector.getStructFieldRef("name"));
    +    Assert.assertEquals("carbondata", (String) result);
    +  }
    +
    +  @Test public void testGetStructFieldsDataListOfNull() {
    +    CarbonObjectInspector carbonObjectInspector = getCarbonObjectInspector();
    +    Assert.assertNull(carbonObjectInspector.getStructFieldsDataAsList(null));
    +  }
    +
    +  @Test public void testGetStructFieldsDataAsListArrayWritable() {
    +    Writable[] intWritable =
    +        new Writable[] { new IntWritable(10000), new IntWritable(20000), new IntWritable(30000) };
    +    final ArrayWritable writable = new ArrayWritable(IntWritable.class, intWritable);
    +
    +    CarbonObjectInspector carbonObjectInspector = getCarbonObjectInspector();
    +    ArrayList result = (ArrayList) carbonObjectInspector.getStructFieldsDataAsList(writable);
    +    Assert.assertEquals(10000, ((IntWritable) result.get(0)).get());
    +  }
    +
    +  @Test(expected = UnsupportedOperationException.class)
    +  public void testGetStructFieldsDataAsListForUnsupportedOperation() {
    +    getCarbonObjectInspector().getStructFieldsDataAsList(Arrays.asList(1000, 2000, 3000, 4000));
    +  }
    +
    +  @Test public void testCreate() {
    +    Assert.assertTrue(getCarbonObjectInspector().create() instanceof ArrayList);
    +  }
    +
    +  @Test public void testSetStructFieldData() {
    +    ArrayList list = new ArrayList();
    +    list.addAll(Arrays.asList(10000, 20000, 30000));
    +    int fieldValue = 60000;
    +    ArrayList result = (ArrayList) carbonObjectInspector
    +        .setStructFieldData(list, carbonObjectInspector.getStructFieldRef("salary"), fieldValue);
    +    Assert.assertEquals(fieldValue, result.get(2));
    +  }
    +
    +  @Test public void testEqualForNullValue() {
    +    Assert.assertFalse(carbonObjectInspector.equals(null));
    +  }
    +
    +  @Test public void testEqualsForDifferentInstance() {
    +    TypeInfo rowTypeInfo;
    +    List<String> columnNames = Arrays.asList("id", "name", "salary");
    +    String listOfColumnTypes = "int:string:double";
    +    List<TypeInfo> columnTypes = TypeInfoUtils.getTypeInfosFromTypeString(listOfColumnTypes);
    +    rowTypeInfo = TypeInfoFactory.getStructTypeInfo(columnNames, columnTypes);
    +
    +    CarbonObjectInspector newCarbonObjectInspector =
    +        new CarbonObjectInspector((StructTypeInfo) rowTypeInfo);
    +    Assert.assertFalse(carbonObjectInspector.equals(newCarbonObjectInspector));
    +  }
    +
    +  @Test public void testEqualsForSameInstance() {
    +    Assert.assertTrue(carbonObjectInspector.equals(getCarbonObjectInspector()));
    +  }
    +
    +  @Test public void testEqualsForDifferentObjectInspectors() {
    +    String testObject = "TestInspector";
    +    Assert.assertFalse(carbonObjectInspector.equals(testObject));
    +  }
    +
    +  @Test public void testHashCode() {
    +    Assert.assertEquals(-2009194663, carbonObjectInspector.hashCode());
    --- End diff --
   
    why test hashcode?


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

    https://github.com/apache/carbondata/pull/1286#discussion_r136079180
 
    --- Diff: integration/hive/src/test/java/org/apache/carbondata/hive/TestCarbonHiveRecordReader.java ---
    @@ -0,0 +1,232 @@
    +/*
    + * 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.hive;
    +
    +import junit.framework.TestCase;
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.apache.carbondata.common.CarbonIterator;
    +import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
    +import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
    +import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
    +import org.apache.carbondata.core.scan.executor.exception.QueryExecutionException;
    +import org.apache.carbondata.core.scan.executor.impl.DetailQueryExecutor;
    +import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
    +import org.apache.carbondata.core.scan.model.QueryModel;
    +import org.apache.carbondata.core.scan.result.BatchResult;
    +import org.apache.carbondata.core.scan.result.iterator.AbstractDetailQueryResultIterator;
    +import org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator;
    +import org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator;
    +import org.apache.hadoop.hive.serde.serdeConstants;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.Text;
    +import org.apache.hadoop.io.Writable;
    +import org.apache.hadoop.mapred.InputSplit;
    +import org.apache.hadoop.mapred.JobConf;
    +import org.apache.hadoop.io.ArrayWritable;
    +import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
    +import org.apache.hadoop.fs.Path;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.ForkJoinPool;
    +
    +public class TestCarbonHiveRecordReader extends TestCase {
    +    private CarbonHiveRecordReader carbonHiveRecordReaderObj;
    +    private AbsoluteTableIdentifier absoluteTableIdentifier ;
    +    private QueryModel queryModel = new QueryModel();
    +    private CarbonReadSupport<ArrayWritable> readSupport = new CarbonDictionaryDecodeReadSupport<>();
    +    private JobConf jobConf = new JobConf();
    +    private InputSplit inputSplitNotInstanceOfHiveInputSplit, inputSplitInstanceOfHiveInputSplit;
    +    private BatchResult batchResult = new BatchResult();
    +    private Writable writable;
    +    private CarbonIterator carbonIteratorObject ;
    +
    +    @BeforeClass
    +    public void setUp() throws Exception{
    --- End diff --
   
    please add a whitespace after Exception


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

    https://github.com/apache/carbondata/pull/1286#discussion_r136079374
 
    --- Diff: integration/hive/src/test/java/org/apache/carbondata/hive/TestCarbonHiveRecordReader.java ---
    @@ -0,0 +1,232 @@
    +/*
    + * 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.hive;
    +
    +import junit.framework.TestCase;
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.apache.carbondata.common.CarbonIterator;
    +import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
    +import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
    +import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
    +import org.apache.carbondata.core.scan.executor.exception.QueryExecutionException;
    +import org.apache.carbondata.core.scan.executor.impl.DetailQueryExecutor;
    +import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
    +import org.apache.carbondata.core.scan.model.QueryModel;
    +import org.apache.carbondata.core.scan.result.BatchResult;
    +import org.apache.carbondata.core.scan.result.iterator.AbstractDetailQueryResultIterator;
    +import org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator;
    +import org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator;
    +import org.apache.hadoop.hive.serde.serdeConstants;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.Text;
    +import org.apache.hadoop.io.Writable;
    +import org.apache.hadoop.mapred.InputSplit;
    +import org.apache.hadoop.mapred.JobConf;
    +import org.apache.hadoop.io.ArrayWritable;
    +import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
    +import org.apache.hadoop.fs.Path;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.ForkJoinPool;
    +
    +public class TestCarbonHiveRecordReader extends TestCase {
    +    private CarbonHiveRecordReader carbonHiveRecordReaderObj;
    +    private AbsoluteTableIdentifier absoluteTableIdentifier ;
    +    private QueryModel queryModel = new QueryModel();
    +    private CarbonReadSupport<ArrayWritable> readSupport = new CarbonDictionaryDecodeReadSupport<>();
    +    private JobConf jobConf = new JobConf();
    +    private InputSplit inputSplitNotInstanceOfHiveInputSplit, inputSplitInstanceOfHiveInputSplit;
    +    private BatchResult batchResult = new BatchResult();
    +    private Writable writable;
    +    private CarbonIterator carbonIteratorObject ;
    +
    +    @BeforeClass
    +    public void setUp() throws Exception{
    +        String array[] = {"neha","01","vaishali"};
    +        writable  = new ArrayWritable(array);
    +        absoluteTableIdentifier = new AbsoluteTableIdentifier("/home/neha/Projects/incubator-carbondata/examples/spark2/target/store",
    +                new CarbonTableIdentifier("DB","TBL","TBLID"));
    +        ColumnarFormatVersion columnarFormatVersion = ColumnarFormatVersion.V3;
    +        Path path = new Path("/home/neha/Projects/incubator-carbondata/examples/spark2/target/store/default/t5/Fact/Part0/Segment_0/part-0-0_batchno0-0-1502197243476.carbondata");
    +        inputSplitInstanceOfHiveInputSplit = new CarbonHiveInputSplit("20",path,1235L,235L,array,columnarFormatVersion);
    +        List<Object[]> rowsList = new ArrayList(2);
    +        ExecutorService executorService = new ForkJoinPool();
    +        List<BlockExecutionInfo> blockExecutionInfoList = new ArrayList<>();
    +
    +        blockExecutionInfoList.add(new BlockExecutionInfo());
    +        blockExecutionInfoList.add(new BlockExecutionInfo());
    +
    +        jobConf.set("hive.io.file.readcolumn.ids","01,02");
    +        jobConf.set(serdeConstants.LIST_COLUMN_TYPES,"int,string");
    +
    +        rowsList.add(0, new Object[] { 1 , "neha"});
    +        rowsList.add(1, new Object[] { 3 , "divya"});
    +        batchResult.setRows(rowsList);
    +
    +
    +        new MockUp<QueryModel>() {
    +            @Mock
    +            public AbsoluteTableIdentifier getAbsoluteTableIdentifier() {
    +                return absoluteTableIdentifier;
    +            }
    +        };
    +
    +        new MockUp<AbstractDetailQueryResultIterator>(){
    --- End diff --
   
    the same as before


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

    https://github.com/apache/carbondata/pull/1286#discussion_r136081693
 
    --- Diff: integration/hive/src/test/java/org/apache/carbondata/hive/TestCarbonHiveRecordReader.java ---
    @@ -0,0 +1,232 @@
    +/*
    + * 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.hive;
    +
    +import junit.framework.TestCase;
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.apache.carbondata.common.CarbonIterator;
    +import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
    +import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
    +import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
    +import org.apache.carbondata.core.scan.executor.exception.QueryExecutionException;
    +import org.apache.carbondata.core.scan.executor.impl.DetailQueryExecutor;
    +import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
    +import org.apache.carbondata.core.scan.model.QueryModel;
    +import org.apache.carbondata.core.scan.result.BatchResult;
    +import org.apache.carbondata.core.scan.result.iterator.AbstractDetailQueryResultIterator;
    +import org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator;
    +import org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator;
    +import org.apache.hadoop.hive.serde.serdeConstants;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.Text;
    +import org.apache.hadoop.io.Writable;
    +import org.apache.hadoop.mapred.InputSplit;
    +import org.apache.hadoop.mapred.JobConf;
    +import org.apache.hadoop.io.ArrayWritable;
    +import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
    +import org.apache.hadoop.fs.Path;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.ForkJoinPool;
    +
    +public class TestCarbonHiveRecordReader extends TestCase {
    +    private CarbonHiveRecordReader carbonHiveRecordReaderObj;
    +    private AbsoluteTableIdentifier absoluteTableIdentifier ;
    +    private QueryModel queryModel = new QueryModel();
    +    private CarbonReadSupport<ArrayWritable> readSupport = new CarbonDictionaryDecodeReadSupport<>();
    +    private JobConf jobConf = new JobConf();
    +    private InputSplit inputSplitNotInstanceOfHiveInputSplit, inputSplitInstanceOfHiveInputSplit;
    +    private BatchResult batchResult = new BatchResult();
    +    private Writable writable;
    +    private CarbonIterator carbonIteratorObject ;
    +
    +    @BeforeClass
    +    public void setUp() throws Exception{
    +        String array[] = {"neha","01","vaishali"};
    +        writable  = new ArrayWritable(array);
    +        absoluteTableIdentifier = new AbsoluteTableIdentifier("/home/neha/Projects/incubator-carbondata/examples/spark2/target/store",
    --- End diff --
   
    If I don't have this path, is it ok?


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #1286: [CARBONDATA-1404] Added Unit test cases for H...

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

    https://github.com/apache/carbondata/pull/1286#discussion_r136248311
 
    --- Diff: integration/hive/src/test/java/org/apache/carbondata/hive/TestCarbonHiveRecordReader.java ---
    @@ -0,0 +1,232 @@
    +/*
    + * 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.hive;
    +
    +import junit.framework.TestCase;
    +import mockit.Mock;
    +import mockit.MockUp;
    +import org.apache.carbondata.common.CarbonIterator;
    +import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
    +import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
    +import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
    +import org.apache.carbondata.core.scan.executor.exception.QueryExecutionException;
    +import org.apache.carbondata.core.scan.executor.impl.DetailQueryExecutor;
    +import org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
    +import org.apache.carbondata.core.scan.model.QueryModel;
    +import org.apache.carbondata.core.scan.result.BatchResult;
    +import org.apache.carbondata.core.scan.result.iterator.AbstractDetailQueryResultIterator;
    +import org.apache.carbondata.core.scan.result.iterator.ChunkRowIterator;
    +import org.apache.carbondata.core.scan.result.iterator.DetailQueryResultIterator;
    +import org.apache.hadoop.hive.serde.serdeConstants;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.Text;
    +import org.apache.hadoop.io.Writable;
    +import org.apache.hadoop.mapred.InputSplit;
    +import org.apache.hadoop.mapred.JobConf;
    +import org.apache.hadoop.io.ArrayWritable;
    +import org.apache.carbondata.hadoop.readsupport.CarbonReadSupport;
    +import org.apache.hadoop.fs.Path;
    +import org.junit.BeforeClass;
    +import org.junit.Test;
    +
    +import java.io.IOException;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.ExecutorService;
    +import java.util.concurrent.ForkJoinPool;
    +
    +public class TestCarbonHiveRecordReader extends TestCase {
    +    private CarbonHiveRecordReader carbonHiveRecordReaderObj;
    +    private AbsoluteTableIdentifier absoluteTableIdentifier ;
    +    private QueryModel queryModel = new QueryModel();
    +    private CarbonReadSupport<ArrayWritable> readSupport = new CarbonDictionaryDecodeReadSupport<>();
    +    private JobConf jobConf = new JobConf();
    +    private InputSplit inputSplitNotInstanceOfHiveInputSplit, inputSplitInstanceOfHiveInputSplit;
    +    private BatchResult batchResult = new BatchResult();
    +    private Writable writable;
    +    private CarbonIterator carbonIteratorObject ;
    +
    +    @BeforeClass
    +    public void setUp() throws Exception{
    +        String array[] = {"neha","01","vaishali"};
    +        writable  = new ArrayWritable(array);
    +        absoluteTableIdentifier = new AbsoluteTableIdentifier("/home/neha/Projects/incubator-carbondata/examples/spark2/target/store",
    --- End diff --
   
    @cenyuhai, yes, this path is just used for mocking.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

    https://github.com/apache/carbondata/pull/1286
 
    SDV Build Failed with Spark 2.1, Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/349/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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


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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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



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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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



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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

    https://github.com/apache/carbondata/pull/1286
 
    @PallaviSingh1992  please remove TestCarbonSerde.java file


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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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



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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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


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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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



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

[GitHub] carbondata issue #1286: [CARBONDATA-1404] Added Unit test cases for Hive Int...

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

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



---
12