Skip to content

Commit c2ea7a6

Browse files
authored
fix(query): show roles rewrite kind is err (#17547)
1 parent 9eb97c3 commit c2ea7a6

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

src/query/sql/src/planner/binder/ddl/account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ impl Binder {
468468
) -> Result<Plan> {
469469
let (show_limit, limit_str) = get_show_options(show_options, None);
470470
let query = format!("SELECT * FROM show_roles() {} {}", show_limit, limit_str);
471-
self.bind_rewrite_to_query(bind_context, &query, RewriteKind::ShowGrants)
471+
self.bind_rewrite_to_query(bind_context, &query, RewriteKind::ShowRoles)
472472
.await
473473
}
474474
}

tests/sqllogictests/suites/management/management_calls.test

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,53 @@ onlyif todo
1818
statement ok
1919
call system$search_tables('call_t')
2020

21+
statement ok
22+
show roles;
23+
24+
statement ok
25+
show databases;
26+
27+
statement ok
28+
SHOW DROP DATABASES
29+
30+
statement ok
31+
show tables;
32+
33+
statement ok
34+
show columns from v_call_t
35+
36+
statement ok
37+
show engines;
38+
39+
statement ok
40+
show settings;
41+
42+
statement ok
43+
show variables;
44+
45+
statement ok
46+
show functions;
47+
48+
statement ok
49+
SHOW USER FUNCTIONS;
50+
51+
statement ok
52+
show users;
53+
54+
statement ok
55+
SHOW TABLE_FUNCTIONS;
56+
57+
statement ok
58+
show stages;
59+
60+
statement ok
61+
list @~;
62+
63+
statement ok
64+
DESC STAGE @~;
65+
66+
statement ok
67+
SHOW LOCKS
2168

2269
query T
2370
call admin$tenant_quota('admin')

0 commit comments

Comments
 (0)