-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CARBONDATA-3212] Fixed NegativeArraySizeException while querying in specific scenario #3031
Conversation
@@ -140,6 +140,7 @@ public boolean isLocalDictGeneratedPage() { | |||
} else { | |||
actualDataColumnPage.putBytes(rowId, bytes); | |||
} | |||
pageSize = rowId + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageSize = rowId + 1; | |
if (pageSize <= rowId) { | |
pageSize = rowId + 1; | |
} |
LocalDictColumnPage construct method has init pageSize in line 80, I think it's better to compare rowId and pageSize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we need to update the pageSize each time we put a row to the page? It is so waste of calculation.
Please reconsider the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xuchuanyin @qiuchenjian Is it ok now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay now ....for complex type children like array it can have more than 32k elements so page size also need to be changes
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2059/ |
Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2263/ |
Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10311/ |
a8f945d
to
e9f5b96
Compare
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2117/ |
Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2322/ |
Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10371/ |
@shivamasn Please update the PR details.... |
LGTM |
…specific scenario Problem:In Local Dictionary, page size was not getting updated for complex children columns. So during fallback, new page was being created with less records giving NegativeArraySizeException while querying data. Solution:Updated the page size in Local Dictionary. This closes#3031
…specific scenario Problem:In Local Dictionary, page size was not getting updated for complex children columns. So during fallback, new page was being created with less records giving NegativeArraySizeException while querying data. Solution:Updated the page size in Local Dictionary. This closes#3031
What was the issue?
In Local Dictionary, page size was not getting updated for complex children columns. So during fallback, new page was being created with less records giving NegativeArraySizeException while querying data.
What has been changed?
Updated the page size in Local Dictionary.
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
Any interfaces changed?
Any backward compatibility impacted?
Document update required?
Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.