Make parser more powerful #10168
Labels
feature/accepted
This feature request is accepted by product managers
type/feature-request
Categorizes issue or PR as related to a new feature.
Feature Request
Is your feature request related to a problem? Please describe:
When parsing a statement, we only turn the info into a special AST presently. For example, a
select
statement will return aselectStmt
. However, we may need to get some information in the parser stage which will present in many statements. If we add these information in every AST which needs it, the code can not be concise.In PostgreSQL, the parser will return a common selectStmt. In MySQL, a struct
LEX
will save the common info.Here is a problem that needs a more powerful parser:
In #10004, a concept
constItem
is introduced. There are some errors in handling non-deterministic functions. ForgetVar
function, if the value is set in the same statement, the function is nondeterministic. Otherwise, it's deterministic.So we need to know all the set statements in a statement and It's the job of the parser.
Describe the feature you'd like:
Let paser return more infomation
Describe alternatives you've considered:
Let parser return an extra struct?
Teachability, Documentation, Adoption, Migration Strategy:
The text was updated successfully, but these errors were encountered: