-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
"optional" properties for expression.EvalContext
#51477
Labels
type/enhancement
The issue or PR belongs to an enhancement.
Comments
17 tasks
13 tasks
13 tasks
13 tasks
13 tasks
imalasong
pushed a commit
to imalasong/tidb
that referenced
this issue
Apr 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
EvalContext
has many fields to provide but not all of them are required in every scene. So it's better to classify these fields into two categories:type.Context
,errctx.Context
,SQLMode
, etc... These properties are used by functions widely. For example,errctx.Context
used by most functions to handle some errors. The basic properties are also simple, they should be easy to clone and mock. TheEvalContext
MUST provide basic properties.tidb_is_ddl_owner
requiresEvalContext
to provide the information on whether the current tidb is DDL owner, but this function is forbidden in most other scenes except SQL query, like partition expressions or generated column expressions. Some optional properties are complex, so not all of them can be cloned or migrated.The text was updated successfully, but these errors were encountered: