alamb commented on code in PR #3018:
URL: https://github.com/apache/arrow-datafusion/pull/3018#discussion_r936510595
##########
datafusion/sql/src/planner.rs:
##########
@@ -1613,6 +1613,13 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
&schema,
&mut HashMap::new(),
),
+ SQLExpr::TypedString {
+ ref data_type,
+ ref value,
+ } => Ok(Expr::Cast {
+ expr: Box::new(lit(&**value)),
+ data_type: convert_data_type(data_type)?,
+ }),
Review Comment:
In case you wanted to make this work with somewhat fewer `*` and `&` you can
do something like:
```suggestion
SQLExpr::TypedString {
data_type,
value,
} => Ok(Expr::Cast {
expr: Box::new(lit(value)),
data_type: convert_data_type(&data_type)?,
}),
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]