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

IGNITE-22278 Sql. Refactor base and planning contexts #3787

Merged
merged 8 commits into from
May 21, 2024

Conversation

korlov42
Copy link
Contributor

https://issues.apache.org/jira/browse/IGNITE-22278

This patch refactors contexts used within sql engine:

  1. BaseQueryContext is removed. Instead lightweight SqlOperationContext is introduced. All planning-related metadata moved to PlanningContext
  2. PrepareService is not aware of SchemaManager. It accepts operation time as input and resolve active schema itself
  3. schemaVersion renamed to catalogVersion in numerous places to better reflect semantic

Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:

The Review Checklist

  • Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • Design: new code conforms with the design principles of the components it is added to.
  • Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

korlov42 added 4 commits May 17, 2024 17:04
- remove NonNull check for attributes which are not sent to remote node
- set time zone for prepare only operation
@lowka
Copy link
Contributor

lowka commented May 20, 2024

There are few places in sql-engine module where schemaVersion is still being used:

  • KeyValueModifyPlan has a field schemaVersion
  • KeyValueGetPlan has a field schemaVersion
  • SqlSchemaManager defines a method table(schemaVersion, tableId)
  • ExecutionServiceImpl FragmentCacheKey has a field schemaVersion

Are the names of these fields/variables kept unchanged on purpose?

korlov42 added 2 commits May 20, 2024 13:57
- rename schemaVersion to catalogVersion in missed places
@korlov42
Copy link
Contributor Author

@lowka my bad, thanks for noticing. I didn't use full text search, just changed names in those places I stumbled upon.

Renamed also mentioned places.

korlov42 added 2 commits May 21, 2024 09:11
- rename version to catalogVersion where applicable
- add missed javadocs
@korlov42 korlov42 merged commit 3229528 into apache:main May 21, 2024
1 check passed
@korlov42 korlov42 deleted the ignite-22278 branch May 21, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants