marcboeker / go-duckdb

go-duckdb provides a database/sql driver for the DuckDB database engine.
MIT License
680 stars 103 forks source link

Appender support for TIME, INTERVAL, HUGEINT, DECIMAL, ENUM, and MAP #237

Closed taniabogatsch closed 3 months ago

taniabogatsch commented 3 months ago

This PR introduces support for TIME, INTERVAL, HUGEINT, DECIMAL, ENUM, and MAP in the Appender. go-duckdb now supports all scannable types in the Appender.

Other relevant changes

EDIT

I've extended this PR with some code paths to skip typecasting. This does not include more than one-level nested LISTs and STRUCTs, for which we still transform the input.

EDIT EDIT

I'll move these changes into a different (follow-up) PR.

Benchmark results

BenchmarkTypes-10 4 329119177 ns/op

taniabogatsch commented 3 months ago

@JAicewizard, I've added some changes to the type casting for SetValue[Unsafe]. Is there a way to further speed this up?