ovr commented on code in PR #2500:
URL: https://github.com/apache/arrow-datafusion/pull/2500#discussion_r869255480
##########
datafusion/core/src/sql/planner.rs:
##########
@@ -97,9 +97,10 @@ fn plan_key(key: SQLExpr) -> Result<ScalarValue> {
ScalarValue::Int64(Some(s.parse().unwrap()))
}
SQLExpr::Value(Value::SingleQuotedString(s)) =>
ScalarValue::Utf8(Some(s)),
+ SQLExpr::Identifier(Ident { value, .. }) =>
ScalarValue::Utf8(Some(value)),
Review Comment:
You can do it in your PR. Probably, it's a good idea to drop this line and
change tests to correct variant: `some_struct['bar']`. Right now,
`GetIndexedExpr` doesn't support dynamic expression as `key`, and converting
`Identifier` to `ScalarValue::Utf8` is not correct, because it can be a
variable for example.
--
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]