File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
datafusion/proto/src/physical_plan Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -572,9 +572,8 @@ fn cast_options_from_proto<'a>(
572572 match cast_options {
573573 Some ( opts) => {
574574 let format_opts = opts. format_options . as_ref ( ) . or ( format_options) ;
575- let format_options = format_opts
576- . map ( parse_format_options)
577- . unwrap_or_else ( FormatOptions :: new) ;
575+ let format_options =
576+ format_opts. map ( parse_format_options) . unwrap_or_default ( ) ;
578577 Ok ( Some ( CastOptions {
579578 safe : opts. safe ,
580579 format_options,
@@ -583,9 +582,8 @@ fn cast_options_from_proto<'a>(
583582 None => {
584583 // Fallback to deprecated fields for backward compatibility
585584 if format_options. is_some ( ) || safe {
586- let format_options = format_options
587- . map ( parse_format_options)
588- . unwrap_or_else ( FormatOptions :: new) ;
585+ let format_options =
586+ format_options. map ( parse_format_options) . unwrap_or_default ( ) ;
589587 Ok ( Some ( CastOptions {
590588 safe,
591589 format_options,
You can’t perform that action at this time.
0 commit comments