File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/query/sql/src/planner/binder/bind_table_reference Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ use databend_common_catalog::table_args::TableArgs;
31
31
use databend_common_catalog:: table_function:: TableFunction ;
32
32
use databend_common_exception:: ErrorCode ;
33
33
use databend_common_exception:: Result ;
34
+ use databend_common_expression:: types:: convert_to_type_name;
34
35
use databend_common_expression:: types:: NumberScalar ;
35
36
use databend_common_expression:: FunctionKind ;
36
37
use databend_common_expression:: Scalar ;
@@ -88,18 +89,22 @@ impl Binder {
88
89
return ;
89
90
}
90
91
assert_eq ! ( self . udtf. arg_types. len( ) , self . table_args. positioned. len( ) ) ;
91
- let Some ( ( pos, ( _, _ty ) ) ) = self
92
+ let Some ( ( pos, ( _, ty ) ) ) = self
92
93
. udtf
93
94
. arg_types
94
95
. iter ( )
95
96
. find_position ( |( name, _) | name == column. column . name ( ) )
96
97
else {
97
98
return ;
98
99
} ;
99
-
100
- * expr = Expr :: Literal {
100
+ * expr = Expr :: Cast {
101
101
span : * span,
102
- value : Literal :: String ( self . table_args . positioned [ pos] . to_string ( ) ) ,
102
+ expr : Box :: new ( Expr :: Literal {
103
+ span : * span,
104
+ value : Literal :: String ( self . table_args . positioned [ pos] . to_string ( ) ) ,
105
+ } ) ,
106
+ target_type : convert_to_type_name ( ty) ,
107
+ pg_style : false ,
103
108
}
104
109
}
105
110
}
You can’t perform that action at this time.
0 commit comments