@@ -8570,6 +8570,10 @@ pub enum CopyLegacyOption {
85708570 Null ( String ) ,
85718571 /// CSV ...
85728572 Csv ( Vec < CopyLegacyCsvOption > ) ,
8573+ /// IAM_ROLE { default | 'arn:aws:iam::<AWS account-id>:role/<role-name>' }
8574+ IamRole ( Option < String > ) ,
8575+ /// IGNOREHEADER [ AS ] number_rows
8576+ IgnoreHeader ( u64 ) ,
85738577}
85748578
85758579impl fmt:: Display for CopyLegacyOption {
@@ -8579,7 +8583,21 @@ impl fmt::Display for CopyLegacyOption {
85798583 Binary => write ! ( f, "BINARY" ) ,
85808584 Delimiter ( char) => write ! ( f, "DELIMITER '{char}'" ) ,
85818585 Null ( string) => write ! ( f, "NULL '{}'" , value:: escape_single_quote_string( string) ) ,
8582- Csv ( opts) => write ! ( f, "CSV {}" , display_separated( opts, " " ) ) ,
8586+ Csv ( opts) => {
8587+ write ! ( f, "CSV" ) ?;
8588+ if !opts. is_empty ( ) {
8589+ write ! ( f, " {}" , display_separated( opts, " " ) ) ?;
8590+ }
8591+ Ok ( ( ) )
8592+ }
8593+ IamRole ( role) => {
8594+ write ! ( f, "IAM_ROLE" ) ?;
8595+ match role {
8596+ Some ( role) => write ! ( f, " '{role}'" ) ,
8597+ None => write ! ( f, " default" ) ,
8598+ }
8599+ }
8600+ IgnoreHeader ( num_rows) => write ! ( f, "IGNOREHEADER {num_rows}" ) ,
85838601 }
85848602 }
85858603}
0 commit comments