[GitHub] carbondata pull request #2964: [HOTFIX] Fix ArrayOutOfBound exception when d...

2018-11-30 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] carbondata pull request #2964: [HOTFIX] Fix ArrayOutOfBound exception when d...

2018-11-29 Thread qiuchenjian
Github user qiuchenjian commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2964#discussion_r237715058
  
--- Diff: 
store/sdk/src/test/java/org/apache/carbondata/sdk/file/CarbonReaderTest.java ---
@@ -575,7 +575,7 @@ public void testReadColumnTwice() throws IOException, 
InterruptedException {
 
 CarbonReader reader = CarbonReader
 .builder(path, "_temp")
-.projection(new String[]{"name", "name", "age", "name"})
+.projection(new String[]{"name", "age", "age", "name"})
--- End diff --

OK, I just noticed this  “fields[1] = new Field("age", DataTypes.INT);”


---


[GitHub] carbondata pull request #2964: [HOTFIX] Fix ArrayOutOfBound exception when d...

2018-11-29 Thread ajantha-bhat
Github user ajantha-bhat commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2964#discussion_r237548880
  
--- Diff: 
store/sdk/src/test/java/org/apache/carbondata/sdk/file/CarbonReaderTest.java ---
@@ -575,7 +575,7 @@ public void testReadColumnTwice() throws IOException, 
InterruptedException {
 
 CarbonReader reader = CarbonReader
 .builder(path, "_temp")
-.projection(new String[]{"name", "name", "age", "name"})
+.projection(new String[]{"name", "age", "age", "name"})
--- End diff --

@qiuchenjian : NO, age is an int column (measure), check schema in writer 
buildler. 

No need of new test case, now this test case handle testing duplicate 
measures and dimensions.


---


[GitHub] carbondata pull request #2964: [HOTFIX] Fix ArrayOutOfBound exception when d...

2018-11-29 Thread qiuchenjian
Github user qiuchenjian commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2964#discussion_r237505549
  
--- Diff: 
store/sdk/src/test/java/org/apache/carbondata/sdk/file/CarbonReaderTest.java ---
@@ -575,7 +575,7 @@ public void testReadColumnTwice() throws IOException, 
InterruptedException {
 
 CarbonReader reader = CarbonReader
 .builder(path, "_temp")
-.projection(new String[]{"name", "name", "age", "name"})
+.projection(new String[]{"name", "age", "age", "name"})
--- End diff --

the types of four columns are all String, this skip the measure part. I 
think another test is needed, which columns has int or short or long type


---


[GitHub] carbondata pull request #2964: [HOTFIX] Fix ArrayOutOfBound exception when d...

2018-11-29 Thread ajantha-bhat
GitHub user ajantha-bhat opened a pull request:

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

[HOTFIX] Fix ArrayOutOfBound exception when duplicate measure in projection 
column

problem: ArrayOutOfBound exception when duplicate measure in the projection 
column

cause: In query executor, when the reusable buffer is formed. It was 
considering only the unique values. Need to consider all the projections.

solution: consider all the projections, while forming a reusable buffer.

Be sure to do all of the following checklist to help us incorporate 
your contribution quickly and easily:

 - [ ] Any interfaces changed? NA
 
 - [ ] Any backward compatibility impacted? NA
 
 - [ ] Document update required? NA

 - [ ] Testing done
yes, updated UT.
   
 - [ ] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA.  NA



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

$ git pull https://github.com/ajantha-bhat/carbondata sdk

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

https://github.com/apache/carbondata/pull/2964.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 #2964


commit ca6fd01b92844f43f2472ccf3f17d498bbd73216
Author: ajantha-bhat 
Date:   2018-11-29T11:42:56Z

fix ArrayOutOfBound exception when duplicate measure in projection column




---