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-3445] Aggregate query empty list error fix. #3300

Closed

Conversation

manishnalla1994
Copy link
Contributor

@manishnalla1994 manishnalla1994 commented Jun 19, 2019

Problem: In Aggregate query, CountStarPlan throws head of empty list error.
When right node of join node has Aggregate node with the empty aggregate and group expression then it matches with the count() plan and we try to get the Head of the aggregate expression assuming only one aggregate expression is present. This happens only in Spark 2.3 so added an empty list check that if aggregate expression is empty, it will not treat as count() plan.

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.

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@@ -179,6 +179,9 @@ object CountStarPlan {
if (groupingExpressions.nonEmpty) {
return false
}
if (partialComputation.isEmpty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add UT if possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

@manishnalla1994 is it possible to get which type of query leads to this issue and add test for it.

@ravipesala
Copy link
Contributor

LGTM

1 similar comment
@akashrn5
Copy link
Contributor

LGTM

@asfgit asfgit closed this in ed862ce Jun 21, 2019
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