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

Warning when printing SQL S4 column #1367

Closed
moodymudskipper opened this issue Aug 31, 2022 · 1 comment · Fixed by r-lib/pillar#625
Closed

Warning when printing SQL S4 column #1367

moodymudskipper opened this issue Aug 31, 2022 · 1 comment · Fixed by r-lib/pillar#625
Labels
bug an unexpected problem or unintended behavior

Comments

@moodymudskipper
Copy link

# no problem
x <- tibble::tibble(A = DBI::SQL("a"))

# no problem
x$A
#> <SQL> a

# problem : we get a warning, though the tibble prints fine
x
#> Warning in class(x) <- c("glue", "character"): Setting class(x) to multiple
#> strings ("glue", "character", ...); result will no longer be an S4 object
#> # A tibble: 1 × 1
#>   A    
#>   <SQL>
#> 1 a

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

@krlmlr
Copy link
Member

krlmlr commented Dec 4, 2022

Thanks. This is a pillar bug:

pillar::pillar(DBI::SQL("a"))
#> Warning in class(x) <- c("glue", "character"): Setting class(x) to multiple
#> strings ("glue", "character", ...); result will no longer be an S4 object
#> <pillar>
#> <SQL>
#> a

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

@krlmlr krlmlr added the bug an unexpected problem or unintended behavior label Dec 4, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jun 2, 2023
# pillar 1.9.0

## Features

- Math operations on `num()` objects no longer perform type
  checks. This allows, e.g., multiplying a `num()` with a logical
  (#630, #632).

## Printing

- The Default For The `Pillar.Min_Title_Chars` Option Has been bumped
  up to 20 characters so that title truncuation only affects very long
  variables. Use `options(pillar.min_title_chars = 5)` to reset to the
  previous default (#582, #620).

- Use info bullets to format details (#582, #617, #627, #635).

## Breaking changes

- `colonnade()`, `extra_cols()` and `squeeze()` are now
  hard-deprecated (#272, #374, #631).

## Bug fixes

- Show `colnames()` hint only when needed (tidyverse/tibble#1488, #622).

- Fix printing of very small numbers (#615, #619).

- Shortened list columns are also shown with a subtle style (#628, #634).

- Avoid warning with S4 character classes (tidyverse/tibble#1367, #625).

- Fix method consistency, checked by R-devel (#633).

## Documentation

- Polish `?pillar_options` (#583).

- Fix typo & missing quote in digits vignette stub (@gavinsimpson, #629).

## Internal

- Require vctrs >= 0.5.0
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants