Skip to content

Commit

Permalink
Merge pull request #5990 from junnplus/role-statement
Browse files Browse the repository at this point in the history
fix display for create/drop role statement
  • Loading branch information
junnplus authored Jun 16, 2022
2 parents 01483df + a7410e1 commit 7de80ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/ast/src/ast/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ impl<'a> Display for Statement<'a> {
if *if_not_exists {
write!(f, " IF NOT EXISTS")?;
}
write!(f, " {role}")?;
write!(f, " '{role}'")?;
}
Statement::DropRole {
if_exists,
Expand All @@ -1000,7 +1000,7 @@ impl<'a> Display for Statement<'a> {
if *if_exists {
write!(f, " IF EXISTS")?;
}
write!(f, " {role}")?;
write!(f, " '{role}'")?;
}
Statement::CreateUDF {
if_not_exists,
Expand Down
4 changes: 2 additions & 2 deletions common/ast/tests/it/testdata/statement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3153,7 +3153,7 @@ AlterUser {
---------- Input ----------
create role 'test'
---------- Output ---------
CREATE ROLE test
CREATE ROLE 'test'
---------- AST ------------
CreateRole {
if_not_exists: false,
Expand All @@ -3164,7 +3164,7 @@ CreateRole {
---------- Input ----------
drop role if exists 'test'
---------- Output ---------
DROP ROLE IF EXISTS test
DROP ROLE IF EXISTS 'test'
---------- AST ------------
DropRole {
if_exists: true,
Expand Down

0 comments on commit 7de80ae

Please sign in to comment.