Skip to content

Commit 76bff5e

Browse files
committed
chore: codefmt
1 parent 0a36127 commit 76bff5e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/query/sql/src/planner/binder/bind_table_reference/bind_table_function.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use databend_common_catalog::table_args::TableArgs;
3131
use databend_common_catalog::table_function::TableFunction;
3232
use databend_common_exception::ErrorCode;
3333
use databend_common_exception::Result;
34+
use databend_common_expression::types::convert_to_type_name;
3435
use databend_common_expression::types::NumberScalar;
3536
use databend_common_expression::FunctionKind;
3637
use databend_common_expression::Scalar;
@@ -88,18 +89,22 @@ impl Binder {
8889
return;
8990
}
9091
assert_eq!(self.udtf.arg_types.len(), self.table_args.positioned.len());
91-
let Some((pos, (_, _ty))) = self
92+
let Some((pos, (_, ty))) = self
9293
.udtf
9394
.arg_types
9495
.iter()
9596
.find_position(|(name, _)| name == column.column.name())
9697
else {
9798
return;
9899
};
99-
100-
*expr = Expr::Literal {
100+
*expr = Expr::Cast {
101101
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,
103108
}
104109
}
105110
}

0 commit comments

Comments
 (0)