jcsherin commented on PR #13462:
URL: https://github.com/apache/datafusion/pull/13462#issuecomment-2482857680
Maybe it will be good to add a `IS NULL` or `IS NOT NULL` test as well.
```rust
let expr = col("a").is_not_null();
let ast = unparser.expr_to_sql(&expr)?;
let actual = format!("{}", ast);
let expected = r#"a IS NOT NULL"#.to_string();
```
I also noticed that the unparser will generate an invalid `a = NULL` or `a
<> NULL` if the user writes the following expression,
```rust
let expr = col("a").eq(ScalarValue::Utf8View(None));
let ast = unparser.expr_to_sql(&expr)?;
let actual = format!("{}", ast); // a = NULL
```
Not a problem as long as the user correctly uses `expr.is_null()` or
`expr.is_not_null()`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]