@@ -8772,6 +8772,10 @@ pub enum CopyLegacyOption {
87728772 Null ( String ) ,
87738773 /// CSV ...
87748774 Csv ( Vec < CopyLegacyCsvOption > ) ,
8775+ /// IAM_ROLE { DEFAULT | 'arn:aws:iam::AWS_ACCOUNT_ID:role/ROLE_NAME' }
8776+ IamRole ( Option < String > ) ,
8777+ /// IGNOREHEADER \[ AS \] number_rows
8778+ IgnoreHeader ( u64 ) ,
87758779}
87768780
87778781impl fmt:: Display for CopyLegacyOption {
@@ -8781,7 +8785,21 @@ impl fmt::Display for CopyLegacyOption {
87818785 Binary => write ! ( f, "BINARY" ) ,
87828786 Delimiter ( char) => write ! ( f, "DELIMITER '{char}'" ) ,
87838787 Null ( string) => write ! ( f, "NULL '{}'" , value:: escape_single_quote_string( string) ) ,
8784- Csv ( opts) => write ! ( f, "CSV {}" , display_separated( opts, " " ) ) ,
8788+ Csv ( opts) => {
8789+ write ! ( f, "CSV" ) ?;
8790+ if !opts. is_empty ( ) {
8791+ write ! ( f, " {}" , display_separated( opts, " " ) ) ?;
8792+ }
8793+ Ok ( ( ) )
8794+ }
8795+ IamRole ( role) => {
8796+ write ! ( f, "IAM_ROLE" ) ?;
8797+ match role {
8798+ Some ( role) => write ! ( f, " '{role}'" ) ,
8799+ None => write ! ( f, " default" ) ,
8800+ }
8801+ }
8802+ IgnoreHeader ( num_rows) => write ! ( f, "IGNOREHEADER {num_rows}" ) ,
87858803 }
87868804 }
87878805}
0 commit comments