-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Enhancement] [plsql] support drop store procedure (#30966) #31001
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
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
TPC-H: Total hot run time: 41216 ms |
TPC-DS: Total hot run time: 180486 ms |
ClickBench: Total hot run time: 31.1 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
32dc678 to
c2b0633
Compare
|
could u use text instead of pic in description? text is search engine and git commit msg friendly |
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/PLParser.g4
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
Outdated
Show resolved
Hide resolved
thanks for your comments. I will update it soon |
updated. thank you |
24f9b1b to
5f9af8d
Compare
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/PLParser.g4
Outdated
Show resolved
Hide resolved
|
@Vallishp Doris plsql is modified based on hive hplsql, can continue to refer to hplsql grammar. If it conflicts with oracle, it will be compatible with oracle first. |
fe/fe-core/src/main/java/org/apache/doris/plsql/functions/DorisFunctionRegistry.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/plsql/functions/InMemoryFunctionRegistry.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/plsql/functions/InMemoryFunctionRegistry.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/PLParser.g4
Outdated
Show resolved
Hide resolved
…r.g4 Co-authored-by: morrySnow <101034200+morrySnow@users.noreply.github.com>
…alPlanBuilder.java Co-authored-by: morrySnow <101034200+morrySnow@users.noreply.github.com>
6cd60af to
aa8bbf8
Compare
aa8bbf8 to
66a9188
Compare
...e-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/DropProcedureCommand.java
Outdated
Show resolved
Hide resolved
|
run buildall |
TPC-H: Total hot run time: 41247 ms |
TPC-DS: Total hot run time: 177266 ms |
ClickBench: Total hot run time: 30.75 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
...e-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/DropProcedureCommand.java
Outdated
Show resolved
Hide resolved
xinyiZzz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 41936 ms |
TPC-DS: Total hot run time: 176830 ms |
ClickBench: Total hot run time: 30.83 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
Proposed changes
Issue Number: close #30966
Support Drop stored procedure.
Unit test report.
mysql> delimiter //
mysql> CREATE OR REPLACE PROCEDURE procedure_select( IN id_n INT)
-> BEGIN
-> select * from plsql_tbl where id = id_n;
-> END
-> //
Query OK, 0 rows affected (0.05 sec)
mysql> call procedure_select(111)
-> ;//
+------+----------+
| id | name |
+------+----------+
| 111 | plsql111 |
+------+----------+
1 row in set (0.29 sec)
Query OK, 0 rows affected (0.29 sec)
mysql> drop procedure procedure_select;//
Query OK, 0 rows affected (0.03 sec)
mysql> call procedure_select(111) ;//
ERROR 1064 (HY000): plsql exec error, Ln:1 identifier 'procedure_select' must be declared.
mysql>
Meta info before and after the drop:
after create the dump of meta from FE.
"nameToStoredProcedures": [
[
{
"name": "PROCEDURE_SELECT",
"catalogName": "",
"dbName": ""
},
{
"name": "PROCEDURE_SELECT",
"catalogName": "",
"dbName": "",
"ownerName": "root",
"source": "CREATE OR REPLACE PROCEDURE procedure_select( IN id_n INT)\nBEGIN\n select * from plsql_tbl where id \u003d id_n;\nEND"
}
]
],
"nameToPackages": {}
}
y"header
after drop
:{
"nameToStoredProcedures": {},
"nameToPackages": {}
}
y"header
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...