File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ impl Interpreter for InsertInterpreterV2 {
138
138
match format. as_str ( ) {
139
139
"VALUES" => {
140
140
let settings = self . ctx . get_settings ( ) ;
141
- let name_resolution_ctx = NameResolutionContext :: try_from ( settings. as_ref ( ) ) ?;
141
+ let name_resolution_ctx =
142
+ NameResolutionContext :: try_from ( settings. as_ref ( ) ) ?;
142
143
let inner = ValueSource :: new (
143
144
str. to_string ( ) ,
144
145
self . ctx . clone ( ) ,
@@ -301,7 +302,7 @@ struct FormatSource {
301
302
is_finished : bool ,
302
303
}
303
304
304
- impl < ' a > SyncSource for FormatSource {
305
+ impl SyncSource for FormatSource {
305
306
const NAME : & ' static str = "FormatSource" ;
306
307
307
308
fn generate ( & mut self ) -> Result < Option < DataBlock > > {
Original file line number Diff line number Diff line change @@ -80,16 +80,12 @@ impl<'a> Binder {
80
80
81
81
let input_source: Result < InsertInputSource > = match source. clone ( ) {
82
82
InsertSource :: Streaming { format, rest_str } => {
83
- self . analyze_stream_format ( rest_str, Some ( format) )
84
- . await
83
+ self . analyze_stream_format ( rest_str, Some ( format) ) . await
85
84
}
86
85
InsertSource :: Values { rest_str, .. } => {
87
86
let str = rest_str. trim_end_matches ( ';' ) ;
88
- self . analyze_stream_format (
89
- str,
90
- Some ( "VALUES" . to_string ( ) ) ,
91
- )
92
- . await
87
+ self . analyze_stream_format ( str, Some ( "VALUES" . to_string ( ) ) )
88
+ . await
93
89
}
94
90
InsertSource :: Select { query } => {
95
91
let statement = Statement :: Query ( query) ;
@@ -127,7 +123,7 @@ impl<'a> Binder {
127
123
let data = stream_str. to_owned ( ) ;
128
124
Ok ( InsertInputSource :: StrWithFormat ( (
129
125
data,
130
- format. unwrap_or ( "VALUES" . to_string ( ) ) ,
126
+ format. unwrap_or_else ( || "VALUES" . to_string ( ) ) ,
131
127
) ) )
132
128
}
133
129
}
You can’t perform that action at this time.
0 commit comments