@@ -8296,8 +8296,8 @@ pub enum CopyLegacyOption {
82968296 IamRole ( IamRoleKind ) ,
82978297 /// IGNOREHEADER \[ AS \] number_rows
82988298 IgnoreHeader ( u64 ) ,
8299- /// JSON
8300- Json ,
8299+ /// JSON \[ AS \] 'json_option'
8300+ Json ( Option < String > ) ,
83018301 /// MANIFEST \[ VERBOSE \]
83028302 Manifest { verbose : bool } ,
83038303 /// MAXFILESIZE \[ AS \] max-size \[ MB | GB \]
@@ -8388,7 +8388,13 @@ impl fmt::Display for CopyLegacyOption {
83888388 Header => write ! ( f, "HEADER" ) ,
83898389 IamRole ( role) => write ! ( f, "IAM_ROLE {role}" ) ,
83908390 IgnoreHeader ( num_rows) => write ! ( f, "IGNOREHEADER {num_rows}" ) ,
8391- Json => write ! ( f, "JSON" ) ,
8391+ Json ( opt) => {
8392+ write ! ( f, "JSON" ) ?;
8393+ if let Some ( opt) = opt {
8394+ write ! ( f, " AS '{}'" , value:: escape_single_quote_string( opt) ) ?;
8395+ }
8396+ Ok ( ( ) )
8397+ }
83928398 Manifest { verbose } => write ! ( f, "MANIFEST{}" , if * verbose { " VERBOSE" } else { "" } ) ,
83938399 MaxFileSize ( file_size) => write ! ( f, "MAXFILESIZE {file_size}" ) ,
83948400 Null ( string) => write ! ( f, "NULL '{}'" , value:: escape_single_quote_string( string) ) ,
0 commit comments