-
Notifications
You must be signed in to change notification settings - Fork 178
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
MSSQL Incorrect Translation for !is.na() #1239
Comments
FWIW |
I'm afraid I can't help much here. I don't know much about MSSQL and I don't have a database to test things with. The handling of boolean values in the code is a bit complicated and to fix these kind of issues might require a new translation approach. |
Looks like the translation for SELECT ~CAST(IIF(("year" IS NULL), 1, 0) AS BIT) AS "!is.na(year)"
FROM "flights" @kmishra9 Can you give The issue with |
This also looks like it works now. Thanks for your work @ejneer |
When using
!is.na()
in any context while submitting queries to my MSSQL Server, my ODBC driver isn't happy about a syntax error. It appears using the~
in the query creates an issue, where the most appropriate translation for!is.na(x)
should probably bex IS NOT NULL
.Created on 2023-04-07 with reprex v2.0.2
Specifically, the error is:
but when substituting with raw SQL like above, things work as expected.
I'm not sure if this is an indicator of a broader issue with how the MSSQL implementation expects to apply the "not operator" to non-existent boolean types using "bits" (MSSQL Server doesn't support booleans, which is a facepalm), but I was definitely having issues trying to invert a
TRUE
or1
value in any way using!
via dbplyr.The text was updated successfully, but these errors were encountered: