Skip to content

interrogate() fails on DuckDB in-memory database #667

@brucosper

Description

@brucosper

Prework

Description

When interrogating a DuckDB table (using DBI) I get the following error:

Error in if (grepl("sql server|sqlserver", tbl_src_details)) { : 
  argument is of length zero

Looks like it comes from here.

When I run unclass on my table it gives me the following:

r$> merged %>% unclass
$src
src:  DuckDB v1.2.1 [brunopereira@Linux 6.8.0-90-generic:R 4.5.2/:memory:]
tbls:

$lazy_query
From: <derived table>

Which then causes problems when the grepl expression runs.

Reproducible example

library(duckdb)
library(tidyverse)
library(pointblank)

con <- dbConnect(duckdb())

merged <- tbl(con, "'my_table.parquet'")

ucan_agent <- yaml_read_agent("my_validator.yaml") %>% interrogate()

Expected result

Interrogation should finish normally and not throw an error..

Session info

R version 4.5.2 (2025-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.5 LTS

Matrix products: default
BLAS/LAPACK: /home/brunopereira/miniforge3/lib/libopenblasp-r0.3.27.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C               LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8     LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8    LC_PAPER=en_CA.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Toronto
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] duckdb_1.2.1      DBI_1.2.3         pointblank_0.12.3 arrow_19.0.1.1    lubridate_1.9.4   forcats_1.0.0     stringr_1.5.1     dplyr_1.1.4       purrr_1.2.0       readr_2.1.5       tidyr_1.3.1       tibble_3.2.1      ggplot2_3.5.2     tidyverse_2.0.0  

loaded via a namespace (and not attached):
 [1] gtable_0.3.6       xfun_0.52          processx_3.8.6     callr_3.7.6        tzdb_0.5.0         ps_1.9.1           vctrs_0.6.5        tools_4.5.2        generics_0.1.3     curl_6.2.2         parallel_4.5.2     blob_1.2.4         pkgconfig_2.0.3   
[14] dbplyr_2.5.0       RColorBrewer_1.1-3 assertthat_0.2.1   gt_1.1.0           lifecycle_1.0.4    compiler_4.5.2     farver_2.1.2       litedown_0.7       htmltools_0.5.8.1  sass_0.4.10        yaml_2.3.10        pillar_1.10.2      crayon_1.5.3      
[27] commonmark_1.9.5   tidyselect_1.2.1   digest_0.6.37      stringi_1.8.7      fastmap_1.2.0      grid_4.5.2         blastula_0.3.6     cli_3.6.5          magrittr_2.0.3     utf8_1.2.5         clipr_0.8.0        withr_3.0.2        scales_1.4.0      
[40] bit64_4.6.0-1      timechange_0.3.0   rmarkdown_2.29     bit_4.6.0          hms_1.1.3          evaluate_1.0.3     knitr_1.50         V8_6.0.3           markdown_2.0       rlang_1.1.6        Rcpp_1.0.14        glue_1.8.0         juicyjuice_0.1.0  
[53] xml2_1.3.8         reprex_2.1.1       rstudioapi_0.17.1  vroom_1.6.5        jsonlite_2.0.0     R6_2.6.1           fs_1.6.6          

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions