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-3189] Fix PreAggregate Datamap Issue #3010

Closed
wants to merge 1 commit into from

Conversation

Shubh18s
Copy link
Contributor

Problem -
Load and Select query was failing on table with preaggregate datamap.

Cause -
Previously if query on datamap was not enabled in thread, there was no check afterwards.

Solution -
After checking whether thread param for Direct Query On Datamap is enable. If not enable, we check in session params and then global.

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/1877/

@jackylk
Copy link
Contributor

jackylk commented Dec 20, 2018

Please create a JIRA issue and put it in the PR title

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2087/

@CarbonDataQA
Copy link

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

@Shubh18s Shubh18s changed the title Fix PreAggregate Datamap Issue [CARBONDATA-3189] Fix PreAggregate Datamap Issue Dec 20, 2018
@qiuchenjian
Copy link
Contributor

Can you show up the error message when load and query failing

@Shubh18s
Copy link
Contributor Author

Here is the error message for loading

error

@Shubh18s Shubh18s closed this Dec 21, 2018
@Shubh18s Shubh18s reopened this Dec 21, 2018
@brijoobopanna
Copy link
Contributor

retest this please

@brijoobopanna
Copy link
Contributor

add to whitelist

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/2128/

@kumarvishal09
Copy link
Contributor

@Shubh18s Please fix the test case failures

@CarbonDataQA
Copy link

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

@@ -1449,12 +1449,9 @@ private CarbonCommonConstants() {

public static final String SUPPORT_DIRECT_QUERY_ON_DATAMAP_DEFAULTVALUE = "false";

@CarbonProperty
public static final String VALIDATE_DIRECT_QUERY_ON_DATAMAP =
"carbon.query.validate.direct.query.on.datamap";
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 we can remove this property and use carbon.query.directQueryOnDataMap.enabled.

Need to remove from configuration-paramters.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I made changes to configuration-paramters.md accordingly and removed this property.

if (relation.carbonRelation.carbonTable.isChildDataMap) {
isPreAggDataMapExists = true
}
}
val validateQuery = CarbonProperties.getInstance
.getProperty(CarbonCommonConstants.VALIDATE_DIRECT_QUERY_ON_DATAMAP,
CarbonCommonConstants.VALIDATE_DIRECT_QUERY_ON_DATAMAP_DEFAULTVALUE).toBoolean
.getProperty(CarbonCommonConstants.VALIDATE_DIRECT_QUERY_ON_DATAMAP)
var isThrowException = false
// if validate query is enabled and relation contains pre aggregate data map
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the comment according to the changes done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@Shubh18s Shubh18s force-pushed the PreAgg branch 2 times, most recently from 9a4df75 to 80094ca Compare December 27, 2018 14:10
@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@Shubh18s
Copy link
Contributor Author

retest this please

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@kunal642
Copy link
Contributor

kunal642 commented Jan 2, 2019

@Shubh18s Please fix 2.3 build

@Shubh18s
Copy link
Contributor Author

Shubh18s commented Jan 2, 2019

retest this please

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@@ -1445,16 +1445,10 @@ private CarbonCommonConstants() {

@CarbonProperty(dynamicConfigurable = true)
public static final String SUPPORT_DIRECT_QUERY_ON_DATAMAP =
"carbon.query.directQueryOnDataMap.enabled";
"carbon.query.directQueryOnDataMap.enabled";
Copy link
Contributor

Choose a reason for hiding this comment

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

Revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

aggregateColumns += s"${a.getAggFunction match {
case "count" => "sum"
case _ => a.getAggFunction}}(${a.getColumnName})"
aggregateColumns += s"${
Copy link
Contributor

Choose a reason for hiding this comment

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

revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}

/**
/** CarbonProperties.getInstance().addProperty(CarbonCommonConstants
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change is requried??

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@Shubh18s
Copy link
Contributor Author

Shubh18s commented Jan 3, 2019

retest this please

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@kumarvishal09
Copy link
Contributor

retest this please

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@CarbonDataQA
Copy link

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

@Shubh18s
Copy link
Contributor Author

Shubh18s commented Jan 7, 2019

Respected Reviewer please Merge this PR.

@kumarvishal09
Copy link
Contributor

LGTM

@asfgit asfgit closed this in aad9aab Jan 7, 2019
@xubo245
Copy link
Contributor

xubo245 commented Jan 16, 2019

Why haven't test case for this PR? @Shubh18s @kumarvishal09

asfgit pushed a commit that referenced this pull request Jan 21, 2019
Problem -
Load and Select query was failing on table with preaggregate datamap.

Cause -
Previously if query on datamap was not enabled in thread, there was no check afterwards.

Solution -
After checking whether thread param for Direct Query On Datamap is enable. If not enable, we check in session params and then global.

This closes #3010
qiuchenjian pushed a commit to qiuchenjian/carbondata that referenced this pull request Jun 14, 2019
Problem -
Load and Select query was failing on table with preaggregate datamap.

Cause -
Previously if query on datamap was not enabled in thread, there was no check afterwards.

Solution -
After checking whether thread param for Direct Query On Datamap is enable. If not enable, we check in session params and then global.

This closes apache#3010
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

8 participants