StarRocks SQL Planner Summer Camp
SQL Parser and Analyzer are important components of the new version of StarRocks Planner. We have developed a new framework for Parser and Analyzer that provides a convenient way to add new code and expand functional modules. It also does part of the pre-processing work and is a pre-requisite module for the new version of the optimizer. This is a huge project, so there remains a considerable amount of statement which hasn't been migrated. Below issues aim to support certain statements in the new framework.
How to participate?
- Pick an issue you are interested in, click the issue link and leave a comment under the issue to sign up (when you comment, please add an issue # as well, please see below example). One person can only choose one issue and the first person who picks the issue will be assigned.
Example: My name is Kate. I am from StarRocks and I have been working on database kernel development for 1 year. I am interested in OLAP, good at C++ programming, and have been using StarRocks for 6 months. I'd like to work on issue #123a.
-
After the issue is assigned, you should complete the task in 14 days. If you are unable to complete it within the specified time, the task will be withdrawn and assigned to others.
-
Participants are required to produce two pieces of content (forms including but not limited to mind maps, study notes, blogs, and tutorials) in the course of the activity, each of which should be at least 200 words.
-
Got questions? Join our Slack channel and find channel: #sql-planner.
Required work and output
-
Use antlr4 to complete parse statements. The generated statement must follow the original data structure, and should be compatible with the old statement.
-
In the original syntax file sql_parser.cup, the new syntax needs to be compatible with the syntax of the old version, using the syntax file sql_parser.cup of the old version as the reference standard.
-
Remove the logic of analyze functions in the statement and move the relevant logic to the new Analyzer framework. The new Analyzer is in the SQL/Analyzer directory.
-
If the code related to Privilege Check exists in the original analyzer, move the code related to privilege control into PrivilegeChecker.
-
When submitting the PR, please make sure there is unit test coverage for related changes.
Tasks
Challenging
- [x] (Done)New Parser and Analyzer support table-related statements (Challenging) #7938
- [x] (Done)New Parser and Analyzer support schema change (column change) operation-related statements(Challenging) #7941
- [x] (Done)New Parser and Analyzer support partition-related statements (Challenging) #7942
- [x] (Done)New Parser and Analyzer support database-related statements (Challenging) #7947
- [x] (Done)New Parser and Analyzer support RoutineLoad-related statements (Challenging) #7949
- [x] (Done)New Parser and Analyzer support privilege-related statements(Challenging) #7950
- [x] (Done)New Parser and Analyzer support Load related-statements (Challenging) #7955
Moderate
- [x] (Done)New Parser and Analyzer support cluster FE/BE control statements (Moderate) #7935
- [x] (Done)New Parser and Analyzer support blacklist and whitelist-related statements (Moderate) #7944
- [x] (Done)New Parser and Analyzer support Backup/Restore-related statements(Moderate) #7951
- [x] New Parser and Analyzer support export related-statements (Moderate) #7952
- [x] (Done)New Parser and Analyzer support User Defined Function-statements (Moderate) #7953
- [x] (Done)New Parser and Analyzer support exrernal table resource related-statements (Moderate) #7954
Easy
- [x] (Done)New Parser and Analyzer support admin related-statements (Easy) #7945
- [x] (Done)New Parser and Analyzer support KillStmt (Easy) #7956
- [x] (Done)New Parser and Analyzer support SetStmt (Easy) #7957
- [x] (Done)New Parser and Analyzer support SetUserPropertyStmt/ShowUserPropertyStmt (Easy) #7958
- [x] (Done)New Parser and Analyzer support ShowDynamicPartitionStmt (Easy) #7959
- [x] (Done)New Parser and Analyzer support ShowProcesslistStmt (Easy) #7960
- [x] (Done)New Parser and Analyzer support ShowProcStmt (Easy) #7961
- [x] (Done)New Parser and Analyzer support ShowTransactionStmt (Easy) #7962
- [x] (Done)New Parser and Analyzer support ShowCharsetStmt(Easy) #7963
- [x] (Done)New Parser and Analyzer support ShowCollationStmt(Easy) #7964
- [x] (Done)New Parser and Analyzer support ShowEnginesStmt(Easy) #7965
- [x] (Done)New Parser and Analyzer support ShowEventsStmt(Easy) #7967
- [x] (Done)New Parser and Analyzer support ShowStatusStmt(Easy) #7971
- [x] (Done)New Parser and Analyzer support ShowProcedureStmt(Easy) #7975
- [x] (Done)New Parser and Analyzer support ShowOpenTableStmt(Easy) #7977
- [x] (Done)New Parser and Analyzer support ShowWarningStmt(Easy) #7978
Before you start
-
Read Contributing.md carefully to understand how to submit a pull request and how to configure BE and FE development environment.
-
Sign the Contributor License Agreement before you make a pull request.
-
To learn more about StarRocks, please refer to StarRocks documentation.
Pull request requirements
- Create a pull request (PR) after you complete the task.
- PR title format: [SR SQL Planner Summer Camp] + PR title
- After submitting PR, you can comment under the pinned Issue [SR SQL Planner Summer Camp].
- Comment format: "I have finished Issue #" + PR link
7958 or 7954 @Johnsonginati
We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!