You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/20 16:44:45 UTC
[GitHub] [arrow-datafusion] xudong963 commented on pull request #1621: feat: Support Substring(str [from int] [for int])
xudong963 commented on pull request #1621:
URL: https://github.com/apache/arrow-datafusion/pull/1621#issuecomment-1017702031
Thanks @ovr !
Lol, I also have just done exactly this for https://github.com/apache/arrow-datafusion/issues/175
Our idea is same, transfer `Expr::Substring` to `Expr::Function`
```rust
let sql_expr = SQLExpr::Function(Function {
name: ObjectName(
[Ident {
value: "substr".to_string(),
quote_style: None,
}]
.to_vec(),
),
args: [
FunctionArg::Unnamed(*expr.clone()),
FunctionArg::Unnamed(from_expr),
FunctionArg::Unnamed(for_expr),
]
.to_vec(),
over: None,
distinct: false,
});
dbg!(schema.clone());
self.sql_expr_to_logical_expr(&sql_expr, schema)
```
I'll help to review after getting up
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org