Skip to content

DuckDB persistent storage: KeyError after reconnect #99

@rgreminger

Description

@rgreminger

There might be a bug for DuckDB with persistent storage.

The following produces a KeyError and the table cannot be retrieved after the connection is closed and re-opened. The same also happens when Julia is restarted.

using TidierDB 

df = DataFrame(id = [string('A' + i ÷ 26, 'A' + i % 26) for i in 0:9], 
                          groups = [i % 2 == 0 ? "aa" : "bb" for i in 1:10], 
                          value = repeat(1:5, 2), 
                          percent = 0.1:0.1:1.0);

db = connect(duckdb(), "tmp.db")

copy_to(db, df, "df_mem");

close(db)

db = connect(duckdb(), "tmp.db")

show_tables(db) 
# this works and lists the "df_mem" table correctly 

table_retrieved = db_table(db, "df_mem")
# produces: KeyError Binder Error: KeyError: key "df_mem" not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions