sarahyurick opened a new pull request, #3189:
URL: https://github.com/apache/arrow-datafusion/pull/3189

   # Which issue does this PR close?
   Closes #3159 
   
   # What changes are included in this PR?
   So far, I've added some basic changes so that IS TRUE works on a scalar 
(`ColumnarValue::Scalar(scalar)`), like `SELECT TRUE IS TRUE as t`, `SELECT 
FALSE IS TRUE as t`, `SELECT 2 IS TRUE as t`, etc.
   
   **Mainly, I am looking for feedback on how to handle the 
`ColumnarValue::Array(array)` case.**
   
   Please also let me know if there are any major issues with this 
implementation so far. Originally, @alamb suggested using `IsNotDistinctFrom`, 
but I was having trouble figuring out how that was supposed to work. Since we 
can already parse `IS TRUE` the initial error (without the changes from this 
PR) is `Error: NotImplemented("Unsupported ast node IsTrue(Identifier(Ident { 
value: \"b\", quote_style: None })) in sqltorel")`. Whenever I would try to 
link `IsTrue` to `IsNotDistinctFrom`, I would run into trouble because `IsTrue` 
looks like `<expr> IS TRUE` while `IsNotDistinctFrom` looks like `<expr> IS NOT 
DISTINCT FROM <expr>`.  Maybe I'm missing something obvious, but the way I 
decided to go about this implementation was to mimic the implementations for 
IsNull and IsNotNull, since they don't have a RHS expression either.
   
   Thanks in advance!


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