Skip to content
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

Wrong escaping BLOB data with NULL for SQL Server #983

Closed
krlmlr opened this issue Aug 23, 2022 · 1 comment · Fixed by #1071
Closed

Wrong escaping BLOB data with NULL for SQL Server #983

krlmlr opened this issue Aug 23, 2022 · 1 comment · Fixed by #1071
Labels
bug an unexpected problem or unintended behavior
Milestone

Comments

@krlmlr
Copy link
Member

krlmlr commented Aug 23, 2022

dbplyr::escape(
  blob::blob(raw(3), NULL),
  parens = FALSE,
  collapse = NULL,
  con = dbplyr::simulate_mssql()
)
#> <SQL> (0x000000)
#> <SQL> (0xNULL)

Created on 2022-08-23 by the reprex package (v2.0.1)

Should be plain NULL .

@krlmlr krlmlr added the bug an unexpected problem or unintended behavior label Aug 23, 2022
@hadley
Copy link
Member

hadley commented Dec 5, 2022

I think it's doing it incorrectly for every backend:

dbplyr::escape(
  blob::blob(raw(3), NULL),
  parens = FALSE,
  collapse = NULL,
  con = dbplyr::simulate_postgres()
)
#> <SQL> (X'000000')
#> <SQL> (X'NULL')

Created on 2022-12-04 with reprex v2.0.2

@hadley hadley added this to the 2.3.0 milestone Dec 5, 2022
hadley added a commit that referenced this issue Dec 8, 2022
@hadley hadley closed this as completed in 3e6203d Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants