apache / apache/arrow-adbc

[R] Schema stability for adbcsqlite?

Open
#1,591 3 comments 1 reaction 0 assignees View on GitHub
Type: enhancement
Dominant language
C#
Stars
627
Forks
217
Avg merge
17h
Merged PRs (30d)
57

Description

### What feature or improvement would you like to see?

Modern SQLite offers an option to enforce schema stability. Should this be the default for adbcsqlite?

We're running into DBItest problems: creating an empty table doesn't result in the correct schema when queried.

``` r
library(adbi)

con <- dbConnect(adbi("adbcsqlite"))

data <- data.frame(a = "data")
ptype <- data[0, , drop = FALSE]

dbCreateTable(con, "test", ptype)
waldo::compare(dbReadTable(con, "test"), ptype)
#> `old$a` is an S3 object of class , a double vector
#> `new$a` is a character vector ()
```

Created on 2024-03-05 with [reprex v2.1.0](https://reprex.tidyverse.org)

Contributor guide

Open the contributing guide

Research direction

Reproduce the R example using adbi("adbcsqlite"), dbCreateTable(), and dbReadTable(), then inspect the adbcsqlite implementation and its SQLite schema-stability settings. Compare the returned empty-table schema with the requested ptype and run the relevant DBItest checks; done means the behavior is correct and the default-setting decision is documented or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, sqlite
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.