@@ -663,17 +663,17 @@ pub enum Expr {
663663 /// such as maps, arrays, and lists:
664664 /// - Array
665665 /// - A 1-dim array `a[1]` will be represented like:
666- /// `CompoundFieldAccess(Ident('a'), vec![Subscript(1)]`
666+ /// `CompoundFieldAccess(Ident('a'), vec![Subscript(1)]`
667667 /// - A 2-dim array `a[1][2]` will be represented like:
668- /// `CompoundFieldAccess(Ident('a'), vec![Subscript(1), Subscript(2)]`
668+ /// `CompoundFieldAccess(Ident('a'), vec![Subscript(1), Subscript(2)]`
669669 /// - Map or Struct (Bracket-style)
670670 /// - A map `a['field1']` will be represented like:
671- /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field')]`
671+ /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field')]`
672672 /// - A 2-dim map `a['field1']['field2']` will be represented like:
673- /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field1'), Subscript('field2')]`
673+ /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field1'), Subscript('field2')]`
674674 /// - Struct (Dot-style) (only effect when the chain contains both subscript and expr)
675675 /// - A struct access `a[field1].field2` will be represented like:
676- /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field1'), Ident('field2')]`
676+ /// `CompoundFieldAccess(Ident('a'), vec![Subscript('field1'), Ident('field2')]`
677677 /// - If a struct access likes `a.field1.field2`, it will be represented by CompoundIdentifier([a, field1, field2])
678678 CompoundFieldAccess {
679679 root : Box < Expr > ,
@@ -6137,10 +6137,10 @@ pub enum Action {
61376137 ManageReleases ,
61386138 ManageVersions ,
61396139 Modify {
6140- modify_type : ActionModifyType ,
6140+ modify_type : Option < ActionModifyType > ,
61416141 } ,
61426142 Monitor {
6143- monitor_type : ActionMonitorType ,
6143+ monitor_type : Option < ActionMonitorType > ,
61446144 } ,
61456145 Operate ,
61466146 OverrideShareRestrictions ,
@@ -6173,7 +6173,7 @@ impl fmt::Display for Action {
61736173 match self {
61746174 Action :: AddSearchOptimization => f. write_str ( "ADD SEARCH OPTIMIZATION" ) ?,
61756175 Action :: Apply { apply_type } => write ! ( f, "APPLY {apply_type}" ) ?,
6176- Action :: ApplyBudget => f. write_str ( "APPLY BUDGET " ) ?,
6176+ Action :: ApplyBudget => f. write_str ( "APPLYBUDGET " ) ?,
61776177 Action :: AttachListing => f. write_str ( "ATTACH LISTING" ) ?,
61786178 Action :: AttachPolicy => f. write_str ( "ATTACH POLICY" ) ?,
61796179 Action :: Audit => f. write_str ( "AUDIT" ) ?,
@@ -6201,8 +6201,18 @@ impl fmt::Display for Action {
62016201 Action :: Manage { manage_type } => write ! ( f, "MANAGE {manage_type}" ) ?,
62026202 Action :: ManageReleases => f. write_str ( "MANAGE RELEASES" ) ?,
62036203 Action :: ManageVersions => f. write_str ( "MANAGE VERSIONS" ) ?,
6204- Action :: Modify { modify_type } => write ! ( f, "MODIFY {modify_type}" ) ?,
6205- Action :: Monitor { monitor_type } => write ! ( f, "MONITOR {monitor_type}" ) ?,
6204+ Action :: Modify { modify_type } => {
6205+ write ! ( f, "MODIFY" ) ?;
6206+ if let Some ( modify_type) = modify_type {
6207+ write ! ( f, " {modify_type}" ) ?;
6208+ }
6209+ }
6210+ Action :: Monitor { monitor_type } => {
6211+ write ! ( f, "MONITOR" ) ?;
6212+ if let Some ( monitor_type) = monitor_type {
6213+ write ! ( f, " {monitor_type}" ) ?
6214+ }
6215+ }
62066216 Action :: Operate => f. write_str ( "OPERATE" ) ?,
62076217 Action :: OverrideShareRestrictions => f. write_str ( "OVERRIDE SHARE RESTRICTIONS" ) ?,
62086218 Action :: Ownership => f. write_str ( "OWNERSHIP" ) ?,
@@ -6520,6 +6530,20 @@ pub enum GrantObjects {
65206530 Warehouses ( Vec < ObjectName > ) ,
65216531 /// Grant privileges on specific integrations
65226532 Integrations ( Vec < ObjectName > ) ,
6533+ /// Grant privileges on resource monitors
6534+ ResourceMonitors ( Vec < ObjectName > ) ,
6535+ /// Grant privileges on users
6536+ Users ( Vec < ObjectName > ) ,
6537+ /// Grant privileges on compute pools
6538+ ComputePools ( Vec < ObjectName > ) ,
6539+ /// Grant privileges on connections
6540+ Connections ( Vec < ObjectName > ) ,
6541+ /// Grant privileges on failover groups
6542+ FailoverGroup ( Vec < ObjectName > ) ,
6543+ /// Grant privileges on replication group
6544+ ReplicationGroup ( Vec < ObjectName > ) ,
6545+ /// Grant privileges on external volumes
6546+ ExternalVolumes ( Vec < ObjectName > ) ,
65236547}
65246548
65256549impl fmt:: Display for GrantObjects {
@@ -6560,6 +6584,27 @@ impl fmt::Display for GrantObjects {
65606584 display_comma_separated( schemas)
65616585 )
65626586 }
6587+ GrantObjects :: ResourceMonitors ( objects) => {
6588+ write ! ( f, "RESOURCE MONITOR {}" , display_comma_separated( objects) )
6589+ }
6590+ GrantObjects :: Users ( objects) => {
6591+ write ! ( f, "USER {}" , display_comma_separated( objects) )
6592+ }
6593+ GrantObjects :: ComputePools ( objects) => {
6594+ write ! ( f, "COMPUTE POOL {}" , display_comma_separated( objects) )
6595+ }
6596+ GrantObjects :: Connections ( objects) => {
6597+ write ! ( f, "CONNECTION {}" , display_comma_separated( objects) )
6598+ }
6599+ GrantObjects :: FailoverGroup ( objects) => {
6600+ write ! ( f, "FAILOVER GROUP {}" , display_comma_separated( objects) )
6601+ }
6602+ GrantObjects :: ReplicationGroup ( objects) => {
6603+ write ! ( f, "REPLICATION GROUP {}" , display_comma_separated( objects) )
6604+ }
6605+ GrantObjects :: ExternalVolumes ( objects) => {
6606+ write ! ( f, "EXTERNAL VOLUME {}" , display_comma_separated( objects) )
6607+ }
65636608 }
65646609 }
65656610}
@@ -7630,7 +7675,7 @@ impl fmt::Display for CopyTarget {
76307675 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
76317676 use CopyTarget :: * ;
76327677 match self {
7633- Stdin { .. } => write ! ( f, "STDIN" ) ,
7678+ Stdin => write ! ( f, "STDIN" ) ,
76347679 Stdout => write ! ( f, "STDOUT" ) ,
76357680 File { filename } => write ! ( f, "'{}'" , value:: escape_single_quote_string( filename) ) ,
76367681 Program { command } => write ! (
0 commit comments