Commit 29abc5c 1 parent b72701c commit 29abc5c Copy full SHA for 29abc5c
File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -3914,10 +3914,13 @@ mod tests {
3914
3914
. await ?;
3915
3915
3916
3916
// decimal query
3917
- let result = plan_and_collect ( & mut ctx, "select min(c1) from aggregate_simple" )
3918
- . await
3919
- . unwrap ( ) ;
3920
- println ! ( "{:?}" , result) ;
3917
+
3918
+ // let result = plan_and_collect(&mut ctx, "select min(c1) from aggregate_simple")
3919
+ // .await
3920
+ // .unwrap();
3921
+ //
3922
+ // println!("{:?}", result);
3923
+
3921
3924
Ok ( ( ) )
3922
3925
}
3923
3926
Original file line number Diff line number Diff line change @@ -145,7 +145,6 @@ fn maybe_data_types(
145
145
valid_types : & [ DataType ] ,
146
146
current_types : & [ DataType ] ,
147
147
) -> Option < Vec < DataType > > {
148
- // TODO liukun4515
149
148
150
149
if valid_types. len ( ) != current_types. len ( ) {
151
150
return None ;
@@ -157,13 +156,10 @@ fn maybe_data_types(
157
156
158
157
if current_type == valid_type {
159
158
new_type. push ( current_type. clone ( ) )
159
+ } else if can_coerce_from ( valid_type, current_type) {
160
+ new_type. push ( valid_type. clone ( ) )
160
161
} else {
161
- if can_coerce_from ( valid_type, current_type) {
162
- new_type. push ( valid_type. clone ( ) )
163
- } else {
164
- // not possible
165
- return None ;
166
- }
162
+ return None ;
167
163
}
168
164
}
169
165
Some ( new_type)
@@ -175,7 +171,6 @@ fn maybe_data_types(
175
171
/// See the module level documentation for more detail on coercion.
176
172
fn can_coerce_from ( type_into : & DataType , type_from : & DataType ) -> bool {
177
173
use self :: DataType :: * ;
178
- // TODO liukun4515
179
174
match type_into {
180
175
// TODO, decimal data type, we just support the decimal
181
176
Int8 => matches ! ( type_from, Int8 ) ,
You can’t perform that action at this time.
0 commit comments