Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

shivamasn
Copy link
Contributor

@shivamasn shivamasn commented Dec 28, 2018

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.

@@ -140,6 +140,7 @@ public boolean isLocalDictGeneratedPage() {
} else {
actualDataColumnPage.putBytes(rowId, bytes);
}
pageSize = rowId + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2059/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2263/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10311/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder2.1/2117/

@CarbonDataQA
Copy link

Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2322/

@CarbonDataQA
Copy link

Build Success with Spark 2.3.2, Please check CI http://136.243.101.176:8080/job/carbondataprbuilder2.3/10371/

@kumarvishal09
Copy link
Contributor

@shivamasn Please update the PR details....
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.

@kumarvishal09
Copy link
Contributor

LGTM

@asfgit asfgit closed this in deb08c3 Jan 3, 2019
asfgit referenced this pull request Jan 21, 2019
…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
qiuchenjian referenced this pull request in qiuchenjian/carbondata Jun 14, 2019
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants