ovr commented on code in PR #2500:
URL: https://github.com/apache/arrow-datafusion/pull/2500#discussion_r869250295


##########
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:
   Looks likes, there are mistakes in tests, I found that current tests are not 
valid:
   
   In select.rs, you need to do some changes:
   
   ```
   // " - is used for identifiers, but in this test, should be 
some_struct['bar'], because it's a name of the field, not an identifier.
   let sql = "SELECT some_struct[\"bar\"] as l0 FROM structs LIMIT 3";
   ```



-- 
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]

Reply via email to