-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Utf8View in Unparser expr_to_sql
#13462
Conversation
Co-authored-by: Sherin Jacob <jacob@protoship.io>
Maybe it will be good to add a 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 noticed that the unparser will generate an invalid 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 |
Thanks @phillipleblanc. LGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @phillipleblanc and @jcsherin -- this looks good to me
Which issue does this PR close?
Closes #13461
Rationale for this change
Now that Utf8View is being returned by DataFusion, we need to ensure that when we encounter it as part of unparsing an expression, we support it properly.
What changes are included in this PR?
Correctly maps the Utf8View Arrow data type to the existing Utf8 type for unparsing.
Are these changes tested?
Yes
Are there any user-facing changes?
No API changes.