Releases: elixir-vibe/quackdb
Releases · elixir-vibe/quackdb
v0.5.3
This patch release improves native append performance and adds helpers for sequence-backed append workflows.
Highlights:
- Fixed quadratic LIST/MAP append encoding for large nested batches.
- Reused Ecto append temp tables for
RETURNINGpaths. - Added sequence allocation and catalog-backed column sequence lookup helpers.
- Added primary-key/default metadata helpers.
- Added explicit direct append shape selection with
append_shape: :columns | :rows.
v0.5.2
Added
- Added
QuackDB.Storageobservability helpers for DuckDB table storage segments, compression summaries, database size, and checkpointing. - Added
QuackDB.Metacatalog helpers for listing tables, attached databases, and logical table columns. - Added
QuackDB.Serverrecovery_mode: :no_wal_writessupport for rebuildable local DuckDB databases. - Added append telemetry phase metrics for encode, transport, decode, request/response bytes, append duration, and rows/sec.
Changed
- Optimized row-oriented native append encoding for wide ordered keyword rows by transposing rows to columns in one pass.
- Switched unsigned LEB128 protocol encoding to
varint. - Optimized native append vector encoding by reducing redundant count and validity passes.
- Optimized Ecto append inserts by using column-oriented append for direct inserts and an ordered-row fast path for temporary append staging.
- Added ExDNA zero-duplication and Reach smell checks to
mix ci.
v0.5.1
Added
- Added
:or_replacesupport toQuackDB.DDL.create_table/2,3and support for creating a differently named table from an Ecto schema viaQuackDB.DDL.create_table(name, schema, opts). - Added
QuackDB.Profilefor DuckDBEXPLAIN (ANALYZE, FORMAT json)query profiles with structured operator helpers, and added:formatsupport toQuackDB.SQL.explain/2. - Added tests and documentation for Ecto insert-from-query staging/dedupe with
returning.
Changed
- Removed public
QuackDB.DDL.create_table_as/3; useQuackDB.DDL.create_table/2or/3with the:asoption instead.
Fixed
- Fixed schema-backed append type inference for parameterized Ecto types such as
Ecto.Enum. - Fixed explicit
columns: [...]preservation in schema-backed append inserts. - Fixed Ecto
:mapappend values by JSON-encoding maps for DuckDBVARCHARappend columns. - Fixed full schema-backed native append value ordering to follow schema field-source order.
v0.5.0
Added
- Added schema-backed Ecto append support for subset columns/defaulted values and
RETURNINGthrough a temporary append table plus Ecto insert-from-query SQL generation. - Added support for using a QuackDB-backed Ecto repo directly with public
QuackDBquery and native append helpers. - Added Ecto
exists/1SQL generation and documented advanced join patterns for semi, anti, ASOF-style lateral, and positional joins. - Added DuckDB star/columns SQL expression helpers and Ecto macros for
* EXCLUDE,* REPLACE,* RENAME, pattern stars,COLUMNS(...), and*COLUMNS(...), including pinned dynamicCOLUMNS(?)selectors. - Added direct SQL and Ecto helpers for common DuckDB LIST operations including length, extraction, slicing, sorting, distinct/unique counts, position, intersection, and concatenation.
- Added direct SQL and Ecto helpers for common DuckDB MAP and STRUCT operations with focused natural names plus explicit aliases for broad
use QuackDB.Ectoimports. - Added raw SQL builders for DuckDB
PIVOT,UNPIVOT,GROUPING SETS,ROLLUP, andCUBEsyntax. - Added Ecto LIST lambda helpers for DuckDB
list_filter,list_transform, andlist_reduceusing constrained Elixirfnsyntax, includingcase_whensupport, with clear macro-time errors.
Changed
- Integration tests now auto-start a shared local Quack server when DuckDB is available, while still honoring explicit
QUACKDB_TEST_URI/QUACKDB_TEST_TOKENconfiguration. - Improved
QuackDB.Serverstartup readiness by detecting thequack_serveresult row from DuckDB stdout, with HTTP polling retained as a fallback. - Consolidated Ecto type-to-DuckDB type mapping for migration DDL, schema DDL helpers, and native append inference.
v0.4.2
Added
- Added
QuackDB.SQL.explain/2for buildingEXPLAINandEXPLAIN ANALYZEstatements. - Added a development stress benchmark for local read, stream, columnar, and append scenarios.
Changed
- Improved row and nested-list materialization performance for large result sets.
- Streamed
QuackDB.columnar_batches/4through a columnar cursor path instead of materializing rows first. - Updated large-result documentation to recommend row streaming or columnar batches for analytical results.
Fixed
- Fixed nullable fixed-width vector decoding when DuckDB stores non-decodable bytes in invalid/null slots.
v0.4.1
Added
- Added direct SQL and Ecto LIST helpers for
list_contains,list_has_any,list_has_all, andunnest. - Added Ecto SQL generation support for nested map/tuple select expressions and
IN (subquery(...))predicates.
Fixed
- Fixed Ecto nil insert values so
nilis sent as a parameterizedNULLinstead of emittingDEFAULT. - Fixed Ecto tagged source-field parameters in query predicates.
- Fixed Ecto lateral joins with
parent_as/1by threading explicit source context through query rendering. - Fixed DBConnection query caching and telemetry to preserve the original parameterized SQL while sending formatted SQL to DuckDB.
- Fixed Ecto map loading/dumping for JSON-backed map fields.
v0.4.0
Added
- Added
Duration.t()SQL parameter support. - Added Ecto
time_bucket/2,3compatibility for pinned Elixir durations, origins, and offsets. - Added typed Ecto
series/1,3helpers for DuckDBgenerate_seriesdate/timestamp sources. - Added JSON SQL parameters/path helpers plus Ecto access syntax and
type/2casts. - Added Ecto regular-expression helpers for DuckDB
regexp_*functions with compatible~rmodifier translation. - Added Ecto text helpers for common DuckDB string predicates and splitting functions.
- Added a public API audit for 0.4.0 and locked accepted naming decisions.
- Added
case_whensyntax for DuckDBCASE WHENand atom date parts. - Added ordered
list/2andstring_agg/3with NULL ordering. - Added Ecto
count(..., :distinct)andcoalesce/2SQL generation. - Added
arg_max/3,arg_min/3, approximate aggregate, boolean aggregate, Bitwise-style bit aggregate, statistical, precise floating-point aggregate, weighted aggregate, product, and histogram helpers. - Added value window functions with fragment-backed frames and future-ready window frame helper macros.
- Added direct and Ecto queryable
SUMMARIZEprofiling helpers. - Added DuckDB function snapshot task with normalized QuackDB type specs for overload auditing.
- Added protocol coverage and quack-ts parity docs plus expanded type/null/append conformance coverage, including stricter variable-vector value count validation and nested dictionary/constant vector coverage.
- Added source sampling, JSON source composition, lakehouse workflow docs, metadata examples, ordinary Elixir map encoding for explicit DuckDB MAP append columns, enumerable stream append, and Table.Reader input append.
Fixed
- Rejected malformed Quack logical type objects that omit required type ids, metadata type tags, or child type fields.
v0.3.0
Added
Local DuckDB and transport
- Replaced Req-based HTTP calls with a stateful Mint transport owned by each DBConnection process, with explicit connect/receive/shutdown timeouts, closed-connection reopening, and safer timeout cleanup.
- Added process-local Quack client query IDs for query, append, and telemetry correlation.
- Added local server performance defaults and
QuackDB.Server:settings/:global_settingsboot options. - Added explicit DuckDB binary management through
QuackDB.Binary,mix quackdb.install, andQuackDB.Serverduckdb: :managed, with built-in checksums for the pinned DuckDB CLI downloads. - Added managed DuckDB binary guide and install-task target prefetching.
- Documented managed DuckDB Windows limitations and linked the managed binary guide from getting started docs.
Native writes, Explorer, and columnar results
- Added
QuackDB.insert_columns/4/insert_columns!/4for column-oriented native append batches. - Added
QuackDB.Explorer.insert_dataframe/4/insert_dataframe!/4for appending Explorer dataframes through native column append. - Added optional
Table.Readerimplementations forQuackDB.ResultandQuackDB.Columns.
DuckDB helpers, sources, and setup SQL
- Added schema-driven
QuackDB.DDL.create_table/2,CREATE TABLE ASquery support with explicit parameterized-query rejection, andQuackDB.DML.insert_into/2setup helpers. - Added
QuackDB.Extensionhelpers for DuckDBINSTALLandLOADstatements. - Added
QuackDB.Secrethelpers for DuckDB HTTP, object-storage, Azure, and Hugging Face secrets. - Added a focused sources guide for DuckDB file/object-store/lakehouse sources, extensions, and secrets.
- Clarified that QuackDB does not automatically upload local source files.
Expanded Ecto adapter
- Added
use QuackDB.Ectoto import Ecto query, analytical, spatial, and FTS helpers together. - Added Ecto combinations, lock SQL, schema full selects,
Repo.get!/2,Repo.explain/3, and additional analytical query expressions includingselected_as,map,type, and identifier fragments. - Added Ecto upsert SQL generation, schema update/delete callbacks,
update_all/delete_all, joined mutations, and rowid-filtered ordered/limited mutations where DuckDB SQL allows it. - Added basic migration DDL generation with real-server coverage for create/drop/alter tables, table/column renames, references, indexes, primary keys, composite primary keys, check constraints, and
Ecto.Migratorexecution. - Expanded Ecto parameter and schema coverage for
:binary_id,:binary, UUID/blob raw params, intervals, temporal values, decimals, arrays, and Geo spatial params.
Protocol and DuckDB type fidelity
- Added conversion helpers and compact inspect output for DuckDB-specific scalar structs.
- Added decode-side checks for quack-ts protocol conformance fixtures.
- Added quack-ts decode fixtures for nanosecond temporal, interval, spatial geometry, null-heavy nested chunks, and
BIGNUMvalues. - Added malformed protocol coverage for truncated
BIGNUMvalues and mismatched data chunk type/vector counts. - Added an optional internal
:fsstbridge for future Quack FSST payload decoding once DuckDB exposes compressed FSST vectors over Quack.
Spatial, FTS, and observability
- Added
QuackDB.SQL.install/1,QuackDB.Spatial, andQuackDB.Ecto.Spatialhelpers for DuckDB spatial extension statements andST_*expressions. - Added optional
QuackDB.GeometryWKB conversion helpers and%Geo.*{}SQL/Ecto parameter support when the:geopackage is available. - Added
QuackDB.FTSandQuackDB.Ecto.FTShelpers for DuckDB FTS indexes, BM25 search ranking, stemming, and Ecto search expressions. - Added
:telemetryevents for query, append, and fetch operations, including custom prefixes, metadata options, optional params, and append batch counts.
Docs and examples
- Added examples for telemetry observation, Explorer dataframe roundtrips, append benchmarks, full-text search, Livebook analytics, and a WMS-like spatial GeoJSON app.
- Added contributor documentation for CI, docs, integration, examples, optional dependency smoke checks, and Hex package-content audits.
- Added Arrow/columnar handoff research notes and protocol fixture docs for tricky scalar/spatial types.
Fixed
- Expanded real Ecto insert coverage for
on_conflict: :nothing, single-row insert upserts, insert-from-query SQL paths, renamed:binary_idsources, and binary payloads containing NUL bytes. - Fixed Mint transport call timeout handling for
timeout: :infinity, which Ecto migrator uses for migration DDL. - Closed Mint transport connections after receive timeouts to avoid reusing sockets with abandoned in-flight responses.
- Updated user docs to reflect current Ecto migration, write, schema-read, package, and protocol coverage.
v0.2.0
Added
- Native append writes through
QuackDB.insert_rows/4andinsert_rows!/4, including batching, nestedLIST/STRUCT/ARRAY/MAPvalues, Calendar-aware temporal encoding,BIGNUM, nanosecond temporal values,TIME WITH TIME ZONE, and interval structs. - Ecto
insert/2andinsert_all/3support for straightforward row inserts,RETURNING, and an explicitinsert_method: :appendfast path. QuackDB.Server,QuackDB.DDL,QuackDB.Type,QuackDB.Ecto.Analytics,QuackDB.SQL.load/1, andQuackDB.SQL.call/3.- quack-ts protocol conformance fixtures for append and data chunk encoding.
Changed
- Split Ecto query SQL generation into
Ecto.Adapters.QuackDB.Query. - Reworked integration tests around reusable helpers that dogfood public DDL/type/source utilities.
- Expanded README positioning and release docs around remote DuckDB analytics, DBConnection-first usage, native append writes, and experimental protocol status.
Fixed
- Replaced production regex-based source and command parsing with explicit scanners.
- Tightened DuckDB scalar fidelity for
BIGNUM, nanosecond temporal values,TIME WITH TIME ZONE, and intervals.
v0.1.1
Experimental follow-up release with analytical Ecto query generation, DuckDB source helpers, column-oriented result APIs, and optional Explorer DataFrame integration.
Highlights:
- Expanded read-only Ecto SQL generation with CTEs, windows, joins, grouping, having, distinct, aggregate FILTER, arithmetic, in/2, fragments, and source/subquery support.
- Added QuackDB.Source helpers for CSV, Parquet, JSON, XLSX, Delta, and Iceberg table functions.
- Added QuackDB.Columns plus columnar/columns streaming APIs for vector-shaped analytical results.
- Added optional QuackDB.Explorer helpers for converting query results and Ecto queries into Explorer.DataFrame values.
- Expanded real DuckDB Quack integration coverage for source scans, columnar batches, and Explorer-facing workflows.