Repository navigation
[enhancement](plsql) Support show procedure and show create procedure… - #31763
Conversation
|
Thank you for your contribution to Apache Doris. |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
0bcc25c to
c9efbd0
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 37905 ms |
TPC-DS: Total hot run time: 178274 ms |
ClickBench: Total hot run time: 30.4 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
|
|
||
| @Override | ||
| public void showCreateProcedure(FuncNameInfo procedureName, List<List<String>> columns) { | ||
| Map<PlsqlProcedureKey, PlsqlStoredProcedure> allProc = client.getAllPlsqlStoredProcedures(); |
There was a problem hiding this comment.
use client.getPlsqlStoredProcedure(procedureName.getName(), procedureName.getCtlId(), procedureName.getDbId()) instead of getAllPlsqlStoredProcedures
do not get all then check procedureName
| try { | ||
| SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| String createTime = f.format(Calendar.getInstance().getTime()); | ||
| String modifyTime = f.format(Calendar.getInstance().getTime()); |
There was a problem hiding this comment.
createTime and modifyTime may not be equal because get the current time separately
String modifyTime=createTime seems better
|
run buildall |
3a0dc84 to
810d546
Compare
|
run buildall |
|
run p0 |
|
run buildall |
2 similar comments
|
run buildall |
|
run buildall |
b50acfc to
1ab962e
Compare
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
… (#31297)
Proposed changes
Issue Number: close #31297
Support Plsql framework commands.
Further comments
MySQL [(none)]> use mydb;
Database changed
MySQL [mydb]> show procedure status;
+------------------+-----------+-------+-------------+-----------+---------------------+---------------------+
| ProcedureName | CatalogId | DbId | PackageName | OwnerName | CreateTime | ModifyTime |
+------------------+-----------+-------+-------------+-----------+---------------------+---------------------+
| PROCEDURE_SELECT | 0 | 42013 | | root | 2024-03-04 11:58:55 | 2024-03-04 12:01:16 |
+------------------+-----------+-------+-------------+-----------+---------------------+---------------------+
1 row in set (0.15 sec)
MySQL [mydb]> show create procedure procedure_select;
+------------------+---------------------------------------------------------------------------------------------------------------+
| Procedure | Create Procedure |
+------------------+---------------------------------------------------------------------------------------------------------------+
| PROCEDURE_SELECT | CREATE OR REPLACE PROCEDURE procedure_select( IN id_n INT)
BEGIN
select * from plsql_tbl where id = id_n;
END |
+------------------+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
MySQL [mydb]>
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...