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

[CH] Refactor: Move SerializedPlanParser::global_context to QueryContext #7147

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

baibaichen
Copy link
Contributor

@baibaichen baibaichen commented Sep 6, 2024

What changes were proposed in this pull request?

After #6558, QueryContext is rewritten, and it's better to put SerializedPlanParser::global_context here.

  1. Rename QueryContextManager => QueryContext
  2. Move SerializedPlanParser::global_context to QueryContext:Data
  3. Move SerializedPlanParser::shared_context to QueryContext::Data
  4. Remove SerializedPlanParser config
  5. Cleanup #include <Parser/SerializedPlanParser.h>

The following 4 static functions is added to QueryContext, we should use QueryContext::globalContext() in most case.

class QueryContext 
    static DB::ContextMutablePtr createGlobal();
    static void resetGlobal();
    static DB::ContextMutablePtr globalMutableContext();
    static DB::ContextPtr globalContext();

How was this patch tested?

Using exited UTs

Copy link

github-actions bot commented Sep 6, 2024

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/apache/incubator-gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

github-actions bot commented Sep 6, 2024

Run Gluten Clickhouse CI

Copy link

github-actions bot commented Sep 6, 2024

Run Gluten Clickhouse CI

@baibaichen baibaichen changed the title [CH] Refactor: move SerializedPlanParser::global_context to QueryContext [CH] Refactor: Move SerializedPlanParser::global_context to QueryContext Sep 6, 2024
Move SerializedPlanParser::global_context to  QueryContext:Data
Move SerializedPlanParser::shared_context to QueryContext::Data
Remove SerializedPlanParser config
Cleanup #include <Parser/SerializedPlanParser.h>
Copy link

github-actions bot commented Sep 6, 2024

Run Gluten Clickhouse CI

@baibaichen baibaichen merged commit 5915c9b into apache:main Sep 9, 2024
8 checks passed
@baibaichen baibaichen deleted the refactpr_ser branch September 9, 2024 02:20
dcoliversun pushed a commit to dcoliversun/gluten that referenced this pull request Sep 11, 2024
Move SerializedPlanParser::global_context to  QueryContext:Data
Move SerializedPlanParser::shared_context to QueryContext::Data
Remove SerializedPlanParser config
Cleanup #include <Parser/SerializedPlanParser.h>
sharkdtu pushed a commit to sharkdtu/gluten that referenced this pull request Nov 11, 2024
Move SerializedPlanParser::global_context to  QueryContext:Data
Move SerializedPlanParser::shared_context to QueryContext::Data
Remove SerializedPlanParser config
Cleanup #include <Parser/SerializedPlanParser.h>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants