Open mjzk opened 3 days ago
Hi @mjzk, thanks for contributing and raising the issue!
This bug is caused by a lack of Postgres Native Schema Inference in the Datafusion Table Provider, where Postgres schema is inferred based on first line of data. Any missing Postgres numeric / timestamptz data in the first row will cause fields missing in the accelerator schema, in this case DuckDB, and therefore cause panic when data is inserted into DuckDB.
We’ve created an issue to track the Postgres Native Schema inference implementation, and we will fix it in the recent releases.
OK. Thanks for clarification. It is interesting to see that we now inference Postgres schema based on first line of data. There are already several ways to get the schema of Postgres in Rust. And happy to see we will fix this problem soon.
Describe the bug
When changing my nyc taxi dataset from Arrow acceleration to DuckDB acceleration,
spice run
crashes for panic from duckdb-rs codes.But for the tiny table with simple schema, duckdb acceleration works. It is reasonable to check duckdb-rs firstly (in fact, earlier versions of duckdb-rs had quite lots of problems).
To Reproduce
Steps to reproduce the behavior:
spice run
Expected behavior
spice run
crashes, a.k.a., the spiced can not been started. This is a serious end-user failure, and should be avoided in all case.Runtime Details
Spicepod
spicepod.yml
section:Output of the
describe table
Output of
explain query
the spiced can not been started.
spice, spiced, OS info
spice version:
spice version
spiced version:
spiced --version
OS info:
uname -a
Have you tried this on the latest
trunk
branch?If possible, run
spiced
with DEBUG log level n/aScreenshots
Additional context
n/a