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

expression: separate BuildContext and EvalContext #52311

Merged
merged 2 commits into from Apr 3, 2024

Conversation

lcwangchao
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #52310

Problem Summary:

It's better to separate EvalContext and BuildContext in expression because they all have their respective method in semantics.

For example, if we add a new method EvalContext.Clone in the future to "clone" an EvalContext, BuildContext will also have this method in the current implementation because BuildContext extends EvalContext. It is strange that BuildContext.Clone can be called and an EvalContext returns, so it's better to separate these two methods.

What changed and how does it work?

  • BuildContext does not extend EvalContext anymore in this PR.
  • BuildContext gives a new method GetEvalContext to return the context for evaluation.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 2, 2024
Copy link

tiprow bot commented Apr 2, 2024

Hi @lcwangchao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 2, 2024
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 3, 2024
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Apr 3, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-04-03 07:39:51.422970903 +0000 UTC m=+429652.950511447: ☑️ agreed by YangKeao.
  • 2024-04-03 08:34:59.433768424 +0000 UTC m=+432960.961308970: ☑️ agreed by XuHuaiyu.

Copy link

ti-chi-bot bot commented Apr 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, tangenta, XuHuaiyu, YangKeao

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Apr 3, 2024
@ti-chi-bot ti-chi-bot bot merged commit 482ce59 into pingcap:master Apr 3, 2024
23 checks passed
@lcwangchao lcwangchao deleted the expr_seperate_ctx branch April 3, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separate BuildContext and EvalContext in expression
5 participants