@@ -217,7 +217,9 @@ pub enum Statement {
217217 ShowVirtualColumns ( ShowVirtualColumnsStmt ) ,
218218
219219 // User
220- ShowUsers ,
220+ ShowUsers {
221+ show_options : Option < ShowOptions > ,
222+ } ,
221223 DescribeUser {
222224 user : UserIdentity ,
223225 } ,
@@ -227,7 +229,9 @@ pub enum Statement {
227229 if_exists : bool ,
228230 user : UserIdentity ,
229231 } ,
230- ShowRoles ,
232+ ShowRoles {
233+ show_options : Option < ShowOptions > ,
234+ } ,
231235 CreateRole {
232236 if_not_exists : bool ,
233237 role_name : String ,
@@ -254,7 +258,9 @@ pub enum Statement {
254258
255259 // Stages
256260 CreateStage ( CreateStageStmt ) ,
257- ShowStages ,
261+ ShowStages {
262+ show_options : Option < ShowOptions > ,
263+ } ,
258264 DropStage {
259265 if_exists : bool ,
260266 stage_name : String ,
@@ -458,12 +464,12 @@ impl Statement {
458464 | Statement :: RefreshInvertedIndex ( ..)
459465 | Statement :: RefreshVirtualColumn ( ..)
460466 | Statement :: ShowVirtualColumns ( ..)
461- | Statement :: ShowUsers
467+ | Statement :: ShowUsers { .. }
462468 | Statement :: DescribeUser { .. }
463- | Statement :: ShowRoles
469+ | Statement :: ShowRoles { .. }
464470 | Statement :: ShowGrants { .. }
465471 | Statement :: ShowObjectPrivileges ( ..)
466- | Statement :: ShowStages
472+ | Statement :: ShowStages { .. }
467473 | Statement :: DescribeStage { .. }
468474 | Statement :: RemoveStage { .. }
469475 | Statement :: ListStage { .. }
@@ -807,9 +813,19 @@ impl Display for Statement {
807813 Statement :: DropVirtualColumn ( stmt) => write ! ( f, "{stmt}" ) ?,
808814 Statement :: RefreshVirtualColumn ( stmt) => write ! ( f, "{stmt}" ) ?,
809815 Statement :: ShowVirtualColumns ( stmt) => write ! ( f, "{stmt}" ) ?,
810- Statement :: ShowUsers => write ! ( f, "SHOW USERS" ) ?,
816+ Statement :: ShowUsers { show_options } => {
817+ write ! ( f, "SHOW USERS" ) ?;
818+ if let Some ( show_options) = show_options {
819+ write ! ( f, " {show_options}" ) ?;
820+ }
821+ }
811822 Statement :: DescribeUser { user } => write ! ( f, "DESCRIBE USER {user}" ) ?,
812- Statement :: ShowRoles => write ! ( f, "SHOW ROLES" ) ?,
823+ Statement :: ShowRoles { show_options } => {
824+ write ! ( f, "SHOW ROLES" ) ?;
825+ if let Some ( show_options) = show_options {
826+ write ! ( f, " {show_options}" ) ?;
827+ }
828+ }
813829 Statement :: CreateUser ( stmt) => write ! ( f, "{stmt}" ) ?,
814830 Statement :: AlterUser ( stmt) => write ! ( f, "{stmt}" ) ?,
815831 Statement :: DropUser { if_exists, user } => {
@@ -873,7 +889,12 @@ impl Display for Statement {
873889 write ! ( f, " PATTERN = '{pattern}'" ) ?;
874890 }
875891 }
876- Statement :: ShowStages => write ! ( f, "SHOW STAGES" ) ?,
892+ Statement :: ShowStages { show_options } => {
893+ write ! ( f, "SHOW STAGES" ) ?;
894+ if let Some ( show_options) = show_options {
895+ write ! ( f, " {show_options}" ) ?;
896+ }
897+ }
877898 Statement :: DropStage {
878899 if_exists,
879900 stage_name,
0 commit comments