@@ -24,7 +24,6 @@ use common_ast::parser::parse_sql;
24
24
use common_ast:: parser:: tokenize_sql;
25
25
use common_ast:: Backtrace ;
26
26
use common_ast:: Dialect ;
27
- use common_base:: base:: unescape_string;
28
27
use common_catalog:: plan:: DataSourceInfo ;
29
28
use common_catalog:: plan:: DataSourcePlan ;
30
29
use common_catalog:: plan:: Partitions ;
@@ -611,44 +610,41 @@ pub fn parse_copy_file_format_options(
611
610
. parse :: < u64 > ( ) ?;
612
611
613
612
// Field delimiter.
614
- let field_delimiter = unescape_string (
615
- file_format_options
616
- . get ( "field_delimiter" )
617
- . unwrap_or ( & "" . to_string ( ) ) ,
618
- ) ?;
613
+ let field_delimiter = file_format_options
614
+ . get ( "field_delimiter" )
615
+ . unwrap_or ( & "" . to_string ( ) )
616
+ . to_string ( ) ;
619
617
620
618
// Record delimiter.
621
- let record_delimiter = unescape_string (
622
- file_format_options
623
- . get ( "record_delimiter" )
624
- . unwrap_or ( & "" . to_string ( ) ) ,
625
- ) ?;
619
+ let record_delimiter = file_format_options
620
+ . get ( "record_delimiter" )
621
+ . unwrap_or ( & "" . to_string ( ) )
622
+ . to_string ( ) ;
626
623
627
624
// NaN display.
628
- let nan_display = unescape_string (
629
- file_format_options
630
- . get ( "nan_display" )
631
- . unwrap_or ( & "" . to_string ( ) ) ,
632
- ) ?;
625
+ let nan_display = file_format_options
626
+ . get ( "nan_display" )
627
+ . unwrap_or ( & "" . to_string ( ) )
628
+ . to_string ( ) ;
633
629
634
630
// Escape
635
- let escape = unescape_string ( file_format_options. get ( "escape" ) . unwrap_or ( & "" . to_string ( ) ) ) ?;
631
+ let escape = file_format_options
632
+ . get ( "escape" )
633
+ . unwrap_or ( & "" . to_string ( ) )
634
+ . to_string ( ) ;
636
635
637
636
// Compression delimiter.
638
- let compression = unescape_string (
639
- file_format_options
640
- . get ( "compression" )
641
- . unwrap_or ( & "none" . to_string ( ) ) ,
642
- ) ?
643
- . parse ( )
644
- . map_err ( ErrorCode :: UnknownCompressionType ) ?;
637
+ let compression = file_format_options
638
+ . get ( "compression" )
639
+ . unwrap_or ( & "none" . to_string ( ) )
640
+ . parse ( )
641
+ . map_err ( ErrorCode :: UnknownCompressionType ) ?;
645
642
646
643
// Row tag in xml.
647
- let row_tag = unescape_string (
648
- file_format_options
649
- . get ( "row_tag" )
650
- . unwrap_or ( & "" . to_string ( ) ) ,
651
- ) ?;
644
+ let row_tag = file_format_options
645
+ . get ( "row_tag" )
646
+ . unwrap_or ( & "" . to_string ( ) )
647
+ . to_string ( ) ;
652
648
653
649
Ok ( FileFormatOptions {
654
650
format : file_format,
0 commit comments