libbigdata 3.0.0
libbigdata: ^3.0.0 copied to clipboard
A pure Dart library for big data manipulation with DataFrame API and query engine.
Changelog #
3.0.0 #
Reads and writes go through a storage abstraction, so the library can run
over storages other than the local filesystem. doc/MIGRATION.md lists every
changed signature with its 2.x and 3.0 forms.
Breaking #
- Every path in the public API is a
Location: theDataFrameIOreaders and writers,DataFrame.scan,Table.writeJson/writeJsonLines, and theParquetReader,ParquetWriter,CsvReader,CsvWriter,JsonReader,JsonWriter,Dataset,DeltaTable,DeltaWriter,DeltaLog,IcebergTable,IcebergWriterandLocalCatalogentry points. Each takes an optionalstorage:, aLocalStorageby default.Location.file(path)names a local file. SqlEngine.open(sandboxRoot:)is replaced bymounts: List<Mount>. SQL paths resolve only against mounted storages; anything else isKind.denied. Withoutmountsthere is one local mount at the working directory, under which absolute paths now read as well.- Iceberg commits write
metadata/v<N>.metadata.json(the Hadoop catalog form) andversion-hint.text, and no longer create av<N>.commitmarker. Existing<N>-<uuid>tables still read and append. IcebergCatalog.current,IcebergBackend.commitandIcebergCommitCoordinator.committake the table'sStorageandLocation;IcebergMetadataPublishcarries only the metadata JSON.- A permission failure on a local file is
Kind.denied(wasKind.io). - A crashed publish (Delta commit, Iceberg metadata) blocks that version,
with
Kind.conflictfor five minutes and the newKind.blockedafter, untilLocalStorage.recoverruns, instead of being reclaimed after five minutes. Readers ignore it and read the previous version. - An empty Delta commit or Iceberg metadata file, which a crashed 2.x writer
leaves, is
Kind.corrupt. Stop 2.x writers before 3.0 writers start. Kindhas a new value,blocked.SqlEngineis read-only unless opened withreadOnly: false; before, an engine withoutmountsallowed writes.Table.writeJsonandwriteJsonLinestakeoptions:as a named argument.- Parquet
TIME, Avrotime-millisandtime-micros, and Icebergtimecolumns read as the newDataType.time, aDurationsince midnight, instead of integers or strings. A stored value outside a day isKind.corrupt. CAST(x AS TIME)works, where it raised an unsupported-operation error.CURRENT_DATE,CURRENT_TIMESTAMPandCURRENT_TIMEare keywords, so a column of one of those names needs quoting ("current_date").
Added #
Storage, withLocalStorageand a publicMemoryStorage(a fault hook and an optional size limit, for tests),LocationandMount.- Delta and Iceberg commit on
Storage.publish, a create-if-absent write that reports a conflict or an unknown outcome distinctly. Delta and Iceberg tables, datasets and every file format work on anyStorage; the file-lock and local-catalog coordinators remain local-only and reportKind.unsupportedelsewhere. LocalStorage.publishclaims the location with an exclusive marker and an exclusive empty target, and never reclaims, so an existing object is never overwritten and exactly one writer of a location wins, across processes, isolates and writers outside this library that never replace a file. The claim is invisible tostat,openandlist, so Delta and Iceberg see an atomic publish, as on an object store.LocalStorage.recover(location)clears what a crashed publish left.S3Storage, for Amazon S3 and S3-compatible stores, with AWS Signature Version 4 signing, conditionalPUTforpublish, multipart uploads, versioned ranged reads and retries. Delta, Iceberg, datasets, every file format and SQL mounts work on it. Credentials are passed asCredentials.- Joins whose
ONmixes key equalities with other conditions, for every join type butNOT IN, and correlatedIN/EXISTSwith non-equality conditions. A join with no equality runs as a nested-loop join, capped by the newmaxJoinPairs(100,000,000 pairs) and logging a performance warning. IN,IS NULLandIS NOT NULLprune Parquet row groups, and alias-qualified predicates are pushed below joins whose sides share a column name.- Parallel dataset reads use isolates only on
LocalStorage; other storages read with bounded async concurrency. - SQL
DELETE FROM '<delta path>' [WHERE …], which removes the matched rows by deletion vector, asDeltaWriter.deletedoes, and isKind.deniedon a read-only engine. Mutations, withDeltaMutations: batchupdate,deleteandmergeoverDataChunks, with theWhere,Setter,PairandReadstypes. SQL DML and the row-mapDeltaWriter.update,deleteandmergerun on it.- Delta
UPDATEandMERGEwork on partitioned tables, and aSETon a partition column moves the row. On a table withdeletionVectorsthey delete changed rows by deletion vector and write only the new values. - Iceberg
UPDATE,DELETEandMERGE, from SQL and asIcebergMutations: copy-on-write (rewriting the affected files and manifests) or merge-on-read (position delete files), by the table'swrite.*.modeproperties, on partitioned tables, honouring existing position and equality deletes, skipping files by bounds and partition values, and recomputed from the new head when another commit lands first. Spark, pyiceberg and DuckDB read the results. A copy-on-write rewrite streams, a batch at a time, so memory does not grow with the files it rewrites.Mutations.of(storage, location)picks Delta or Iceberg by what is at the location. - SQL
MERGE ... WHEN MATCHED THEN UPDATE SET column = value, ..., on Delta and Iceberg tables: each value is an expression over the target's and the source's columns, by their aliases. SqlEngine.open(iceberg: backend)reads and changes catalog-backed Iceberg tables through their catalog's backend, andMutations.oftakes it asbackend:.- Iceberg partition transforms (identity, bucket, truncate, year, month, day,
hour and void), matching the spec's test vectors and pyiceberg. An append
without
partitionByinto an existing table writes under the table's own spec. - Delta DML skips the files the statistics rule out, decides files by
partition values when the predicate reads only partition columns
(removing them whole for
DELETE), andMERGEskips target files outside the source key range. A 1%UPDATEof a 1M-row, 20-column table takes 787 ms, from 7,796 ms. - A
TIMEtype (DataType.time, aDuration):TIME '10:30'literals,CAST, comparison with string literals, sorting and grouping, and storage in Parquet (TIME(MICROS)), Arrow (time64[us]; Arrowtime32andtime64in every unit read, where they wereKind.unsupported), Avro, Iceberg, CSV and JSON. Delta has no time type, soDeltaWriter(time: TimeForm.micros)stores it as alongandTimeForm.textas a string, marked"extended.type": "time"in the field metadata, which libbigdata reads back asTIME. - Date and time SQL:
EXTRACT,DATE_PARTand its shorthands (YEARand others),DATE_TRUNC,INTERVALliterals and date arithmetic,DATE_ADD,DATE_SUB,DATE_DIFF,LAST_DAY, the current-time functions read once per statement from the newSqlEngine.open(clock:),MAKE_DATE,MAKE_TIMESTAMP,MAKE_TIME,EPOCH,EPOCH_MS,TO_TIMESTAMP,STRFTIME,STRPTIMEandTRY_STRPTIME, following DuckDB apart from the differencesdoc/SQL.mdlists.
Fixed #
-
Iceberg identity partitions on a date or timestamp column failed to write: the manifest's Avro partition record was given days or microseconds where its logical type takes a
DateTime. -
The Delta orphan sweep could delete a commit published after it looked at a crash-orphaned empty commit file, when two writers swept at once (also in 2.0). Writers no longer delete such files; a write fails closed naming the file.
-
Iceberg tables written on Windows recorded
file://C:\...references that no reader could resolve (also in 2.0). References are nowfile:///C:/..., andfile:/C:/...(Spark's form) reads too.Location.parsereadsfile:///C:/...as the drive pathC:\...(it produced\C:\...), which also keeps the Iceberg metadata log's references valid, and acceptsfile://localhost/.... Not yet run end to end on Windows. -
A local write whose fsync failed on
closeleft its file handle open (holding the deleted temp file's space) and reported success on a secondclose. It now closes the handle and reports the same failure again.MemoryStoragedoes the same for aclosethat ran out of room or met an injected fault: on both storages a failedclosestays failed. -
A dataset listing follows a symlink only when its target lies inside the dataset's directory, and fails with
Kind.deniedfor one leading outside (2.x followed links anywhere, so a dataset could read files outside its directory through a link inside it). Symlinked partition directories inside the dataset are read under the link's name, and link cycles are not followed round. -
Delta
vacuumOrphanscompares files by identity (resolving links) rather than by the path that names them, so a committed file listed or logged through a symlink inside the table is never deleted. (2.x could delete a file the log named through a link.) -
LocalCatalogno longer deletes an empty (corrupt) registry before a transaction: it fails withKind.corruptand leaves the file, as reads already did. -
On Windows, a relative SQL path into an object-store mount (
'dir/x.parquet'on amem://mount) named the keydir\x.parquet. A relative path is now a/-separated key under any non-local mount.
2.0.0 #
Every fallible public entry point now returns a Result<T, ErrorDetails>
instead of throwing, and nothing escapes one: an unexpected error is returned
with the error as its cause, and only argument preconditions throw; doc/MIGRATION.md has before and after examples for each
area.
Breaking #
- Columns no longer expose or adopt their backing buffers.
NumericColumn,StringColumn,BoolColumnandListColumnareabstract finalpublic types built through their copying factories; their implementations are not exported.NumericColumn.adopt,rawBufferandrawNullBitmap,StringColumn.adoptandencode, andBoolColumn.adopt,rawBitsandrawNullBitmapare gone from the public API.bufferandnullBitmap(unmodifiable views) and every read member stay. - SQL
ORDER BYandGROUP BYno longer take a position:ORDER BY 2andGROUP BY 1areKind.invalid; use a column name, a select alias or an expression. - Public multi-word names have shorter forms:
DataFrameIO.readCsvOptimizedfolds intoreadCsv, which takesfilter,columns,limitandbatchSizeand scans in batches when any is given;SqlEngine.getTables()andgetTableSchema(name)aretablesandschema(name);CsvWriter.writeTableToStreamiswriteSink. - Logging: the library logs under
Loggers.root(libbigdata) and its childrenLoggers.dataframe,delta,jsonandsql, instead of flat class names; the unusedLoggersconstants are removed. A secondLoggingConfig.initializereplaces the previous configuration instead of being ignored.Level,LoggerandLogRecordare exported. - One option vocabulary for the readers and writers: format
options:and the caps are always named; every batch API takesbatchSize(it wassizeon most readers, andbufferSizeonreadCsvOptimized); CSV projection iscolumns(wasselectColumns); CSV readers takefilter: RowFilter, applied exactly per row (a string predicate before); Delta time travel isasOf(wastimestamp), as for Iceberg;writeJsonandwriteJsonLinestakepath. Every reader that materializes its result takesmaxRows/maxBytes. AbatchSizebelow 1 throws at the call rather than inside the stream.RowFilter.matchesevaluates a filter exactly against one row. - Exported classes carry Dart 3 class modifiers:
ColumnandRowFilteraresealed; the filesystem and local-catalog Iceberg catalogs,FilesystemCommitCoordinatorandMemoryManagerarebase(extend them, do not implement them); the coordinator, catalog, backend and invariant interfaces stay implementable; every other exported class isfinal. - Public API hygiene for 2.0:
ParquetWriterOptions.compressiontakes the newParquetCompressionenum (it took an unexported Thrift type, so no codec could be chosen without asrc/import).- The deprecated
DataFrameIO.fromCsv,fromJson,fromJsonLines,fromArrow,fromArrowStream,fromArrowBatches,toArrowandtoArrowStreamaliases are removed; use theread*/write*members they forwarded to. DataFrameIO.readDatasetBatchesyields DataFrames, as the other batch readers do.- Internals are no longer exported:
unifyTables,decimalStats,distinctStatsCap,defaultChunkSize,parseTemporal, and the unusedDelimiterDetectionResult(removed). TheParquetReader/IcebergTablediagnostic counters are@internal.
- SQL follows DuckDB's defaults: a number with a decimal point (
1.50,0.1) is an exactDECIMAL(it was aDOUBLE; write an exponent orCAST(... AS DOUBLE)for a double), andORDER BY ... DESCputs NULLs last, asASCdoes (it put them first). NumericColumn.hasNullsreports whether a null is present, like every other column; it reported whether the column was nullable. The Parquet writer keeps a nullable field OPTIONAL even with no null in it (string and boolean columns without nulls were written REQUIRED).Field.isCompatibleWithaccepts only types that concatenate without a cast.SqlEngine.execute,SqlEngine.sqlandDataFrame.sqlreturnResult, andSqlEngine.executeStreamyieldsResult<Table, ErrorDetails>items, ending after anErr. SQL is treated as untrusted input, so no failure is thrown: SQL that does not parse or type-check isKind.invalid, unimplemented SQLKind.unsupported, an unknown table or fileKind.missing, a path outside the sandbox or a write on a read-only engineKind.denied, an unreadable data fileKind.corrupt, a result or spill capKind.limit, and a deadlineKind.timeout. UPDATE, INSERT and MERGE return the Delta writer's kinds; an INSERT that does not fit the table isKind.schema. Any other error isKind.invalidwith the error as itscause. Only using a disposed engine still throws.- DataFrame terminal operations return
Result:execute,toList,toJsonString,head,tail,count,show,cache,toCsv,toJsonandtoJsonLines, andexecuteStreamyieldsResult<Table, ErrorDetails>items. Predicates and expressions are caller-supplied strings, so failures are reported asSqlEngine.executereports them: an invalid predicate isKind.invalid, a cap isKind.limit, a deadlineKind.timeout. - Reads return
Result:ParquetReader.schema,readandreadBatches,CsvReaderandJsonReaderreads,DeltaTable.read/readBatches,IcebergTable.read/readBatches,Dataset.read/readBatches, and everyDataFrameIO.read*andfrom*. Streams yieldResultitems. A missing file or table isKind.missing, a malformed fileKind.corrupt, a capKind.limit, an unknown projected columnKind.invalid, a path outside a lake tableKind.denied, and an unsupported format featureKind.unsupported. - Writes return
Result<void, ErrorDetails>:ParquetWriter(write,open,writeBatch,writeBatches,close),CsvWriterandJsonWriterfile and stream writes,Table.writeJson/writeJsonLines, and theDataFrameIOwrites (writeCsv,writeJson,writeJsonLines,writeArrow,writeArrowStream,writeParquetStream). An unwritable destination isKind.io, a value its Parquet type would truncateKind.invalid, a batch that does not match the first batch's schemaKind.schema, and an unwritable codec or typeKind.unsupported. No partial file is left after anErr. SqlEngine.open(...)replaces theSqlEngine(...)constructor and returnsResult<SqlEngine, ErrorDetails>(Kind.iowhen the spill directory cannot be created).registerFile,registerDataFrameanddisposereturnResult.- The top-level
sqlis a function,sql(query), returningResult<Table, ErrorDetails>from a shared engine opened on first use. It was the sharedSqlEngineitself; to register tables, open an engine. LocalCatalog.lookupandguarded, andIcebergCatalog.current(all implementations), returnResult.CommitConflict,DeltaCommitIndeterminate,IcebergCommitConflictandIcebergCommitIndeterminateare no longer exported: a commit reportsKind.conflictorKind.indeterminate. A customDeltaCommitCoordinatororIcebergBackendreturnsErr(ErrorDetails(Kind.conflict, ...))for a lost race.- The CLI prints
Error: <kind>: <message>and exits 1 when a--csv/--parquetfile cannot be loaded. SqlEngineis read-only by default whensandboxRootis set: UPDATE, INSERT, MERGE and CREATE/DROP VIEW fail withKind.denied. PassreadOnly: falseto allow writes.- SQL never converts a string literal to a number.
n = '1',n < '3',n IN ('1', '2')andn + '1'on a numeric column fail withKind.invalidat planning.=andINpreviously matched nothing,<failed only at run time, and+raised aTypeError. Write the number orCAST('1' AS BIGINT). - The CSV, JSON and Parquet readers report a missing file as
Kind.missing, with thePathNotFoundExceptionas itscause. - Delta writes return
Result<int, ErrorDetails>instead of throwing:DeltaWriter.write,delete,updateandmerge,DeltaCommitCoordinator.commit(all implementations),DataFrameIO.writeDeltaandInvariantEvaluator.violations. A lost commit race isKind.conflict(aftermaxRetries, with the attempt count in its message), an unconfirmed publish isKind.indeterminate(staged files are kept), a schema or partitioning mismatch isKind.schema, a merge source or partition count over its cap isKind.limit, anddelta.appendOnlyrefusing a mutation isKind.denied.CommitConflictandDeltaCommitIndeterminateare no longer thrown out of these calls. Seedoc/MIGRATION.md. - Iceberg writes return
Result<int, ErrorDetails>instead of throwing:IcebergWriter.writeandexpireSnapshots,IcebergBackend.commit(all implementations) andDataFrameIO.writeIceberg. An append schema mismatch isKind.schema; a lost commit race, or a schema or partition spec changed concurrently, isKind.conflict; an unconfirmed publish isKind.indeterminate; the metadata or partition cap isKind.limit; a missing table isKind.missing. When staged files cannot be removed after a failure the result isKind.iowith the original failure as itscause.expireSnapshots(retain: 0)still throwsArgumentError. DataType.decimal.dartTypeisBigInt, the type decimal columns store (unscaled), instead ofdouble.- In SQL,
"..."is a quoted identifier (standard SQL), no longer a string literal. Write strings in single quotes:WHERE name = 'x', notWHERE name = "x". An unknown column error now reminds you of this. A quoted path afterFROMis still read as a file. - In SQL,
LENGTH(CHAR_LENGTH) andSUBSTRcount Unicode code points, asLIKEdoes, instead of UTF-16 code units:LENGTH('a𝄞b')is 3 (was 4), andSUBSTRno longer splits a character outside the Basic Multilingual Plane. - DataFrame
filterrejects a quoted value, or anything that is not a number, compared with a numeric column (Kind.invalid), as SQL does:filter("age == '30'")was read asage == 30. Write the number unquoted. - DataFrame
filter/whereandwithColumntake SQL scalar expressions, parsed and bound as SQL parses and binds them.withColumnarithmetic follows standard precedence, which changes results without an error:'a + 10 * 2'was(a + 10) * 2and is nowa + 20. A name with a space or-is a double-quoted identifier ('"First Name" = ...'), a double-quoted value is an identifier (strings take single quotes),[name]brackets are a parse error, and an unquoted word on either side is a column.==is accepted as=, in SQL too. Parentheses,NOT,IS NULL,IN,LIKE,CASE,CASTand functions are available.doc/MIGRATION.mdhas before and after examples. - DataFrame
orderBysorts NULLs last in both directions, as SQLORDER BYdoes; an ascending sort put them first. DataFrameselect,filter,limit,orderBy,drop,rename,withColumnanddistinctare planned by the SQL planner, so a filter and a projection on a file-backed frame (DataFrame.scan,readParquet) prune row groups and columns, andorderBy(...).limit(n)keeps only the bestnrows. - DataFrame
groupBy().agg(),joinandunionare planned by the SQL planner too, so a filter or projection reaches the scans on both sides of a join or union.joinruns as SQLJOIN ... USING (on): a non-key column both sides have is qualified by its side's name (p.nameandd.name;left.nameandright.namewhen both sides have the same name, as twofromRowsframes do), where it came out twice under its bare name, andschema/columnsreport those names.union'sschemareports each column's promoted type, as the result has. A set operation whose branches have different column counts isKind.schemain SQL, as it is for DataFrameunion. - The DataFrame file readers return lazy frames:
readCsv,readJson,readJsonLines,readParquet(with or withoutfilter/columns),readArrow,readArrowStreamover an IPC file,readDelta,readIcebergandreadDatasetread the schema when called and the data when a terminal runs, with the reader's options, so a laterfilter/selectprunes files, row groups and columns. A missing file, an unreadable schema, a directory that is not a table, an unknown version or snapshot, and an unknown column incolumnsare still anErrfrom the reader; a bad value further into the file, an unreadable data file, a data or delete file outside the table, and the reader'smaxRows/maxBytesare reported by the terminal. The reader's caps bound a materialized result (execute,toList,head, ...) together with the terminal's own;countandexecuteStreamset no result cap, so they no longer fail on a file larger than the reader's cap.readDeltawithoutversion/asOfandreadIcebergwithoutsnapshotId/asOffix the version or snapshot current at the reader call, so a later commit does not change the frame's result. A frame from a file reader is named after the file (p.csvisp; a glob dataset isdataset) in join qualifiers and its result, where it wascsv,json_data,arrow_table,delta,icebergordataset. Read when called, as before: a CSV with a customlineTerminatorormaxFileBytes, JSON withexpandArraysor with both caps null (whole-file inference), an Arrow IPC stream, Delta withconcurrencyabove 1, a dataset withconcurrencyabove 1 and both caps null, and an empty file. SqlEngine.registerDataFrameandDataFrame.sqlregister the frame's plan as a view instead of running the frame: each query that reads it plans the frame's operations with its own, so a query'sWHEREprunes a file-backed frame's row groups and its columns narrow the scans, and each query reads the frame's sources again. The table's columns are named asDataFrame.columnsnames them.registerDataFrame'smaxRows/maxBytes(and the caps of the readers the frame is built on) now bound the result of eachexecutethat reads the frame, where they bounded the frame's own result at registration: registering a frame larger than the cap succeeds,SELECT COUNT(*)over it succeeds, and a result past the cap fails withKind.limit. An invalid expression or unknown column still fails the registration; a source file removed after it fails the query.- In SQL, a
JOINorINNER JOINwithoutONorUSINGis a parse error, as in PostgreSQL and DuckDB. It previously ran as a cross join; writeCROSS JOINfor that. - In SQL, a string value compared or combined with a number is an error (
Kind.invalid):WHERE s = 1,s IN (1, 2)anda IN (SELECT s ...)on a textsmatched nothing. An aggregate with the wrong number of arguments (COUNT(a, b),SUM(a, b)) is an error; the extra arguments were ignored. - CSV dates and timestamps without a zone read as UTC, as elsewhere in the library; they were read in the host's time zone, so the same file gave different instants on different machines.
- SQL casts follow DuckDB: a fractional value cast to an integer rounds half away from zero
(
CAST(2.5 AS INTEGER)was 2, now 3);INTEGER,SMALLINTandTINYINTare 32, 16 and 8 bits wide (all were 64) and an out-of-range value is an error;CAST(2 AS BOOLEAN)and the textt,yes,yare true (they were false) and other unparsable text is NULL. - String and boolean columns are
StringColumnandBoolColumninstead ofListColumn<String>andListColumn<bool>, wherever the library builds them: file readers,Table.fromRows,DataFrame.fromRowsand SQL results. Values,[]andtoList()are unchanged; code that tests for or casts toListColumnshould useColumn. A Dart string with an unpaired surrogate is stored with U+FFFD in its place.
Added #
- The Arrow IPC stream format:
writeArrowStreamwrites it (withcompression, andbatchSizerows per batch) andreadArrowStreamreads it; both were the file format before. pyarrow'sipc.open_streamreads what is written, andipc.new_streamoutput reads, compressed or not. OkandErrcompare by value, andResult.maptransforms anOkvalue.- Exported the types public signatures already took:
DeltaLog(custom Delta commit coordinators),IcebergCommitCoordinatorandFilesystemCommitCoordinator(Iceberg backends),CatalogTxn(LocalCatalog.guarded),ColumnBounds(RowFilter.keep), and theSqlDataFrameextension (DataFrame.sql). - Avro: the
zstandardcodec reads. - Delta tables with struct, array and map columns read and write. Their schema was read and
written as
string, so such tables were unreadable and a nested table written here had a wrong schema. StringColumnholds strings as one UTF-8 buffer with an offset per row: an 8-character ASCII value costs about 12 bytes, against 24 in aListColumn.BoolColumnholds booleans as bits: 1 bit a value, 2 with nulls, against 64.ParquetReader.read(concurrency: n)decodes row groups in up tonisolates.DeltaTable.readBatchesandIcebergTable.readBatchestakefilter:andcolumns:. A file is skipped when its partition values or column statistics show it cannot match (Iceberg also skips manifests by their partition summaries), row groups are pruned in the files read, and only the listed columns are read.DeltaTable.schema()andIcebergTable.schema()read a table's schema from its metadata without opening data files.- In SQL,
FROM '<dir>'andregisterFileaccept a Delta or Iceberg table directory and stream it with the query's filter and columns pushed down. - The CLI's
--root DIRoption confines SQL and loaded file paths to DIR, which may be given absolutely, instead of to relative paths under the current directory. Result<T, E>(Ok,Err),ErrorDetailsandKind, the types 2.0's public entry points return for expected failures.doc/MIGRATION.mdlists every entry point that changes.make interopchecks the interop prerequisites (Python modules,duckdb, a JDK) with install hints for anything missing, then runs the interop-tagged tests. Seetool/interop/README.md.EngineOptions,MemoryManagerandSpillBudgetare exported frompackage:libbigdata/libbigdata.dart, soDataFrame.execute(options: ...)no longer needs asrc/import.- SQL
DATE '...'andTIMESTAMP '...'literals. - Query deadlines:
SqlEngine.open(timeout:)sets a default andexecute,executeStreamandsqltake a per-calltimeout:, counted from the call. A query past its deadline fails withKind.timeout, whether it is running, queued behind another query on the engine, or waiting on a slow read. Work Dart cannot interrupt, such as a read in progress, finishes in the background: it holds the engine until it ends,disposewaits for it, and its spill files are removed before the next query runs. - A long query gives the event loop a turn about every 10 ms, so timers and I/O elsewhere in the isolate, such as a server's requests, are not held up until it finishes.
Security #
- Parquet footers: a Thrift list, set or map that declares more elements than bytes remain
is
Kind.corruptat its header. - SQL limits: an expression tree deeper than 4,096 levels, or an
EXCEPT/INTERSECTchain of more than 2,048 branches, isKind.invalidnaming the limit, checked right after parsing. Such queries already failed safely, but with the message "Stack Overflow". - A long chain of
UNION/UNION ALLno longer crashes the process: 1,000 branches (26 KB of SQL) ended it with an uncaught stack overflow during execution. A chain of unions is planned as one n-ary union, with oneDISTINCTup to the last distinctUNION, and runs without nesting at any length. - Decimal precision and scale read from Delta, Iceberg, Parquet, Arrow and Avro schemas are
checked (precision 1-38 for Delta and Iceberg, 1-76 otherwise; scale 0 to precision). A
schema declaring
decimal(10,2000000000)made later formatting allocate gigabytes. - Crafted Parquet pages fail as corrupt instead of allocating or misreading: a DELTA_BINARY_PACKED header could request a terabyte allocation (it must now follow the spec's block and miniblock sizes, with bit widths no wider than the type), a V1 page too short for its level length, a V2 page with nulls but no definition levels (read as zeros), a V2 page whose levels exceed it, and a nested leaf whose pages disagree with its metadata. An unknown value encoding is unsupported; it was decoded as PLAIN.
- Delta invariants are parsed as one expression over the row's columns and evaluated on a read-only engine. An invariant read from table metadata could close the parenthesis it was placed in and add a subquery, which let anyone able to write a table's metadata probe the contents of files the writing process could read.
LIKEno longer translates patterns to regular expressions. A crafted pattern such as'%a%a%a%a%b'previously took tens of seconds per row; matching is now O(n·m) worst case.- New
SqlEngine.open(readOnly: true)rejects every statement that writes. - Parquet dictionary indices and boolean RLE streams stop decoding at the page's value count. A 7-byte run claiming 2^27 values no longer expands to 134M entries.
- DELTA_BINARY_PACKED decoding stops materializing at the requested count; a 12-byte stream claiming 2^27 values at bit width 0 no longer expands.
- DELTA_BYTE_ARRAY validates prefix and suffix lengths before allocating and caps decoded
output at 256 MiB per page. Corrupt lengths are
Kind.corruptinstead of aRangeError. - Parquet V2 data pages reject negative or out-of-range null counts and level lengths before allocating, and take the present-value count from the definition levels.
- Parquet footers are checked for schema depth (100), element count (1M) and consistent child counts before any reader walks the schema. A deeply nested footer previously overflowed the stack.
- Avro's decoded value budget (10M) now spans the whole file instead of resetting per record, so many small records cannot add up to an unbounded allocation. Schema parsing is capped at depth 100; a deeply nested schema previously overflowed the stack.
- Arrow flatbuffer reads are bounds-checked, and a record batch with fewer nodes or buffers
than its schema needs is rejected before decoding. Corrupt files are
Kind.corruptinstead of aRangeError. - An Arrow decimal buffer shorter than its declared width times the row count is
Kind.corrupt. It previously read the neighbouring buffer's bytes as values. - The SQL nesting limit (256) counts
CASE ... ENDblocks as well as parentheses. 2,000 nested CASE expressions previously overflowed the stack. AStackOverflowErrorduring parsing is reported asKind.invalid. - A mutation test (
dart test -t fuzz --run-skipped) feeds 10,000 corrupted Parquet, Avro and Arrow files each to the readers. The cases it found now fail asKind.corrupt: unknown Parquet enum values, pages or column chunks missing required headers, Avro schema JSON of the wrong shape, and invalid Arrow type codes, int widths and float precisions. - Without
sandboxRoot, SQL file paths are resolved through symlinks and must stay under the working directory. A symlink under it that pointed outside was previously followed. - Nested derived tables (
FROM (SELECT * FROM (...) x) x) parse in linear time. Each level previously parsed its subquery twice, so a 500-byte query could take hours to parse.
Fixed #
- SQL
UPDATEcasts aSETvalue to the type of an integer column, asCASTdoes:SET salary = salary * 1.05stores the rounded integer (half away from zero) instead of failing with "is int16 but the value 1050000 is a _BigIntImpl". A value out of the column's range is stillKind.invalid, and nothing is committed. - SQL
WHEREand DataFramefiltercast a predicate that is not boolean toBOOLEAN, as DuckDB does:WHERE agekeeps the rows whereageis nonzero andWHERE 1keeps every row.WHEREused to return no rows for such a predicate, without an error. - SQL registers every file and view a query names, wherever it appears (select list,
GROUP BY, ORDER BY, join conditions, CASE, CAST, function arguments, subqueries). A
query the planner rejects (for example a scalar subquery) that also names a missing or
denied file now reports that file's error instead of
Kind.unsupported. - DataFrame executions that spill and set no
spillDirkeep their runs in a session directory under<temp>/libbigdata-spill/(removed when the execution ends, and reclaimed by the orphan sweep after a crash); they were written loose into the system temp, where a crash left them for good. The intermediate thatsample()materializes is held under the tighter ofmaxBytesandEngineOptions.maxMaterializedBytes(the library default when neither is set), including fromcount()andexecuteStream(), which set no cap. DataFrame.groupBynot followed directly byagg(for examplegroupBy(...).execute()orgroupBy(...).filter(...).agg(...)) isKind.invalid; the grouping used to be dropped without a word.- Two paths to one lock file through a symlink (on macOS,
/var/...and/private/var/...) now exclude each other within an isolate: the in-isolate lock was keyed on the lexical path. Cross-isolate locking is unchanged. - A date or time with a field out of range (
DATE '2024-13-45','2024-02-30', hour 24) no longer rolls over into another date (2025-02-14): a SQL literal or comparison with it isKind.invalid, a CAST of it isNULL, and CSV inference reads it as text. - DataFrame builders never throw:
aggwith an unknown function andselectof an unknown column reportKind.invalidfromexecuteinstead of throwingArgumentErrorat the call. - Iceberg data files without field ids (tables built with
add_filesormigrate) resolve their columns throughschema.name-mapping.default, so a renamed column reads its values instead of NULL. A read of the current table binds the current schema rather than the snapshot's, so a rename or added column shows without a new snapshot; time travel keeps the snapshot's schema. - SQL planner: a misspelled qualifier in a join condition is an unknown column instead of
binding to the other side;
MERGE ... USING table_nameparses andON t.id = s.keymerges on both names; a correlated subquery or comma join over file tables uses their basename qualifiers;HAVINGwithoutGROUP BYaggregates the whole input;GROUP BYmatches function names in any case,t.awitha, and select aliases;COUNT(DISTINCT k)underGROUP BY kworks; an unknown column inINor a comparison, an ungrouped column, and an aggregate inWHEREeach get an error that names the actual problem. - SQL: two files whose paths differ only in case are two tables (they shared one catalog
entry).
executeStreamstarts its deadline at the call, throws on a disposed engine asexecutedoes, and reports an engine disposed before the stream is listened to as anErrinstead of an error on the stream. - CLI:
-fscripts split on semicolons outside strings and comments; a load path may contain a colon, and must have the loader's extension;.tablesshows column counts instead of a wrong0 rows;-o csvquotes headers, carriage returns and every value type; loading files with no SQL opens the REPL instead of exiting; the usage text names the installedlibbigdatacommand. - A table accepts a numeric column built with the factories' default
nullable: trueunder a non-nullable field when it holds no null.DataFrame.unionof frames with different column counts isKind.schema;sampleoutside 0 to 1 isKind.invalid. An unwritable log file no longer crashes the process.writeDelta,writeIcebergandwriteArrowtakemaxRowsandmaxBytes.Table.fromChunkswidens likeappend. String columns refuse more than 2 GiB of text before their offsets overflow. - Avro named types resolve by full name, so two types with the same short name in
different namespaces no longer replace each other, and a reference by full name
(
c.Color) to an enum or fixed type resolves. Avro read caps reportKind.limit(they wereStateErrors reported as corrupt) and an unknown codecKind.unsupported. - Parquet: a nested read over
maxBytes, and a nested row group over the streaming ceiling, reportKind.limitinstead ofKind.corrupt; a repeated column whose first value continues a record is a format error instead of a crash. - Delta and Iceberg scans: an eager read through
openScanapplies its projection and filter, so the byte cap counts only the columns read; Iceberg batches honour the requested size; a projected column the table lacks isKind.invalidinstead of being dropped; a relocated Iceberg table under a directory nameddatare-roots correctly; a short Delta deletion-vector path isKind.corruptinstead of aRangeError. - Delta and Iceberg paths in
file:URI form (file:/x,file:///x,file://localhost/x) resolve to the file in every reader, writer and vacuum; Delta read afile:/xadd path as a file under the table root. A Delta path with a malformed percent escape isKind.corruptinstead of anArgumentError, and an absolute Delta path is percent-decoded as the protocol requires. Datasetdiscovery: files and directories starting with_or.(_SUCCESS,_temporary,_delta_log,.crc) are skipped; a Delta or Iceberg table directory reads as the table, and one nested below the dataset root isKind.unsupported;key=valuedirectories above the root are no longer partitions; a partition key has one type across files (k=1andk=1.5are both doubles, andNaNis text).- A Delta overwrite keeps the metadata (
delta.invariants, comments, generation expressions) of columns it does not change. An overwrite with a schema built in Dart dropped it, so an invariant stopped being enforced. - Delta reads find checkpoints by listing
_delta_loginstead of trusting_last_checkpoint. Time travel to a version below the newest checkpoint, or any read after log cleanup lost_last_checkpoint, failed when the commits before it had been cleaned up. - Iceberg
asOftime travel followssnapshot-log, so it gives the right snapshot after a rollback; anasOfbefore the first snapshot isKind.missinginstead of an empty table. Hadoop catalog tables (v<n>.metadata.json) and gzip-compressed metadata files read, throughIcebergTableandopenScanalike. - Iceberg
expireSnapshotskeeps every snapshot a tag or branch names (and a branch's ancestors up to itsmin-snapshots-to-keep). It expired them and deleted their files, leaving the tag or branch pointing at a snapshot that no longer existed. Themetadata-logis now capped atwrite.metadata.previous-versions-max(default 100) instead of growing with every commit. - Iceberg data files that carry field ids are matched to the table schema by id only. A column dropped and then re-added under the same name read the dropped column's old values from older files; it now reads NULL, as pyiceberg does. Equality-delete keys follow the same rule. Files without field ids match through the table's name mapping, or by name when it has none.
- Delta date partition values and date min/max statistics are the value's calendar day.
A local
DateTimewas converted to UTC first, so on a host east of UTC the partition read one day earlier than the data and engines using the statistics could skip files that matched. Binary partition values read back as bytes. Partition directory names hold a date as2024-01-01and a decimal at its scale (1.50), not2024-01-01 00:00:00.000Zand the unscaled150. - JSON: integers beyond int64 (such as uint64 ids) read exactly as decimals; they were
rounded through a double. NaN and infinities write as null; they made the write fail. A
.jsonlor.ndjsondestination is written as JSON Lines bywriteTableandTable.writeJsontoo. A file holding one top-level object reads throughreadFile, and a stray}in an array is rejected.JsonOptions.encodingapplies to writes. - CSV: with a thousands separator set (
CsvOptions.european()), only correctly grouped digits are numbers;1.2.3read as 123. With an escape character other than the quote, the writer escapes the escape character itself, soa\b,creads back unchanged. A string equal to a null token (NA,null, ...) is quoted on write and reads back as text. - CSV reads agree across
readString,readFileandreadBatches, which now share one pipeline. A comment or blank line before the header madereadStringfail andreadFileread the header as data; files with carriage-return line endings read as empty throughreadFile; a header-only file read as no columns throughreadFile;maxRowscounted the header; and an empty header cell was named""by one path andcolumn_1by the other. A line break inside a quoted field keeps its\r\n. A read that returns no rows still carries the columns. - Arrow dates and timestamps exchange correctly with pyarrow. The writer omitted the date
unit, which the format reads as milliseconds, so pyarrow read 2020-01-01 as 1970-01-01;
the reader assumed days and microseconds where the format's defaults are milliseconds and
seconds, so pyarrow
date64andtimestamp('s')columns read as wrong dates. Files from earlier versions still read as days. - Crafted Arrow files fail as corrupt instead of reading neighbouring bytes or crashing: validity, int16, boolean, date and timestamp buffers are length-checked, string offsets are checked against their own buffer, list and map children are checked, and a seconds timestamp that overflows is refused. Dictionary-encoded and big-endian files are reported as unsupported (dictionary files were reported as corrupt).
- A decimal key matches a double key in a join or
IN (SELECT ...); they never matched. A NULL literal takes the type of the other values inCASE,COALESCEand set operations:CASE WHEN ... THEN NULL ELSE a ENDwas a string column,COALESCE(NULL, 1) + 1failed, andSELECT a ... UNION SELECT NULLfailed. ROUND(x, n)no longer clamps values past 2^63:ROUND(1e300, 2)returned 92233720368547760.0. TheTINYINT,REAL,BOOLandDATETIMEcast types parse.- A decimal in a
VALUEStable keeps its scale:VALUES (CAST(1.5 AS DECIMAL(5,2)))read back as 150. Rows of different scales share the widest, as in DuckDB. - Column alias lists on tables and subqueries rename the columns:
FROM (SELECT a, b FROM t) v(b, a)andFROM t x(p)were parsed and then ignored. A list longer than the table's columns is an error. - SQL results now match DuckDB in three cases:
ORDER BY u.asorts byu.awhen the output also has a column namedafrom another table; it sorted by that column.- RIGHT and FULL
JOIN ... USING(and DataFramejoinwithtype: rightorfull) fill the key from the right side for rows only the right side has; it was NULL. - A date or timestamp column
IN ('2024-01-05', ...)compares dates, as=does; it matched nothing.
- A query that stops reading early (a
LIMITabove a spilling UNION, INTERSECT, semi join or hash join, or a cancelled stream) closes its spill files and returns its memory reservations; each such query kept a deleted spill file open. A spill that fails while finishing returns its spill budget and files. A large sort merges its runs in passes of at most 64, so it no longer runs out of file descriptors. - A join whose output has two columns of the same name (
t.id,u.id) can now be sorted, grouped or deduplicated past the spill threshold. It failed with "Duplicate field name" once the data was large enough to spill, while the same query worked in memory. MIN,MAXandORDER BYon binary columns compare bytes, as DuckDB does. MIN and MAX returned NULL and ORDER BY failed.- DataFrame operations keep a decimal column's precision and scale.
select,rename,withColumn,dropandgroupBy().agg()read 1.50 back as 150, andfilter('d > 2')compared the unscaled value.DataChunk.rowreturnsDecimallikeTable.row, andTable.fromRowstypesDecimalandBigIntvalues as decimal, so rows round-trip. - Parquet row-group pruning no longer trusts the deprecated
min/maxstatistics for strings, binary and unsigned integers. Older writers filled them in signed byte order, so a row group holding'a'and'é'could be skipped fors = 'a'. A column whose declared sort order is unknown is not pruned. - Parquet converted types from 17 up were numbered wrongly (INT_32 and INT_64 were missing), so files with INTERVAL or BSON columns, such as DuckDB's INTERVAL, failed to open, and INT_32/INT_64 columns were tagged JSON/BSON internally. An unknown converted type is now ignored rather than failing the file. JSON and ENUM columns read as text.
- The Parquet writer no longer writes files no reader can open: a top-level column named
like a nested field (
idbesides.id,valuebeside a map) took the nested field's repetition; a null in a required column was written without its definition level (it is nowKind.invalid); and pages were split by value count only, so large strings made pages over the reader's 256 MiB limit (pages now end at about 1 MiB). Map keys are written REQUIRED, which pyarrow requires. - A query whose
WITHclause repeats a name is rejected (Kind.invalid). It used to leave the first CTE's rows in the catalog in place of the table it shadowed, even on a read-only engine. A CTE or view named like a registered file now hides the file for that query; the file was read instead. - SQL
IN (...)parses in linear time. Each nesting level used to be parsed twice, so a 168-byte query of nestedINlists blocked the isolate for 17 seconds, and a query deadline could not stop it.x IN ywithout parentheses is now a parse error; it used to match nothing (or everything withNOT IN). CREATE VIEW v AS SELECT ...parses; the body had to be in parentheses, though the SQL guide showed it without them.- Zstd-compressed Parquet written by DuckDB reads: libcompress 1.3.0 rejected some pages whose Huffman weight tables are long ("FSE weight decode: tail loop exceeded 100 iterations"). libbigdata now requires libcompress 2.0.0.
- A
<>filter on a floating-point column no longer skips a Parquet row group whose statistics show one value equal to the literal. Statistics leave NaN out of min and max, andNaN <> 5is true, so such a group could hold matching NaN rows that were silently dropped. Parquet and Delta statistics carry no NaN count, so they no longer prune<>on floating-point columns; Iceberg prunes when its NaN counts show none. CAST(... AS DATE)andCAST(... AS TIMESTAMP)parse ISO-8601 into date and timestamp values. They previously returned the input string under a date or timestamp type. Unparseable text gives NULL.CAST(... AS TIME)isKind.unsupportedinstead of returning the string.- Comparing a date or timestamp with a string literal compares instants, in SQL
(
ts > '2024-06-01') and in DataFramefilter("t > '2024-06-01'"). Both previously failed on the mismatched types. A string that is not a date isKind.invalid. Table.statisticson a decimal column returns its min, max and mean at the field's scale. It previously threw aTypeError. DataFramewithColumnarithmetic on a decimal column produces a decimal at the right scale; it previously failed column validation.GROUP BY t.id, u.idreturns both keys. The twoidgroup columns previously collided with "Duplicate field name: id".SUBSTRfollows Postgres: a NULL start or length gives NULL, a start before the string counts toward the length (SUBSTR('abc', 0, 2)is'a'), and a negative length isKind.invalid. It previously raisedTypeErrororRangeError, ignored a NULL length, and returned'ab'for start 0.ABSof the minimum int64 is the integer overflow error (Kind.invalid) instead of returning the negative input.- Arithmetic with a string operand (
s + 1) isKind.invalid, naming the operator, instead of a rawTypeError. - CLI: decimals print at their scale (
1.50) in table, CSV and JSON output, and JSON encodes dates and decimals instead of failing. A failed query exits with status 1. End of input leaves the REPL instead of looping, and.quitremoves the spill directory..outputwith no argument shows the current format,--versionmatches the package version, and the help example no longer suggests-tv(which meant--version). - Delta and Iceberg string statistics order by Unicode code point, as external engines do. A value outside the Basic Multilingual Plane (an emoji) sorted below U+FF01, recording a wrong max that let engines skip files that matched. Infinities are now recorded as Iceberg bounds instead of being counted as NaN; Delta, whose JSON stats cannot hold infinity, omits that bound.
- Parquet files carry the modern LogicalType annotation alongside the legacy converted type for strings, decimals, dates and timestamps (UTC microseconds). The LogicalType Thrift structs previously wrote no fields at all, so none was ever emitted.
doc/parquet_support.mdno longer claims V2 data pages are written; the writer emits V1.- Delta reads start from the standard checkpoint other engines write (
_last_checkpointand a single-fileNN.checkpoint.parquet) instead of replaying every JSON commit from version- Vacuum also counts that checkpoint's files as referenced. Multi-part checkpoints are read too, and a log whose earlier commits were cleaned up reads from its checkpoint.
- A Delta write under the default file-lock coordinator reclaims an empty claim left by a
crashed writer at once, instead of waiting out its 5-minute TTL. A DELETE, UPDATE or MERGE
aborts when another writer changed the table's protocol or metadata (for example turned on
delta.appendOnly) after it read the table; it previously committed anyway. - Iceberg commits record
metadata-log(each earlier metadata file) andparent-snapshot-idon every new snapshot, so engines such as PyIceberg see the table's history and lineage. - Iceberg reads reject a
format-versionother than 1 or 2, and a data or delete file that is not Parquet, asKind.unsupported. A v3 table previously read as v2, and an ORC file failed as corrupt Parquet. An equality delete written under an unpartitioned spec now applies to the whole table after partition evolution, and other equality deletes match by partition spec as well as partition values. - An Iceberg filesystem commit re-reads the current metadata after winning its version claim and retries if another writer published in between. A writer that read the table before that publish could previously write a second metadata file at the same version.
- An Iceberg overwrite that changes the schema keeps the field ids of unchanged columns and
numbers new columns above
last-column-id. It previously renumbered from 1, so a new column could take a dropped column's id and engines binding by id read old snapshots into the wrong column. - Iceberg writes widen int8 and int16 columns to int32, Iceberg's smallest integer. Small
integers (which
fromRowsinfers as int8) previously wrote data files that failed to read back with "Column id has type int8 but schema field declares int32". - Delta
vacuumOrphansno longer deletes live files whose logged path is URL-encoded (a partition value such as50%ora b) or absolute. It compared the logged form with the path on disk, so those files looked unreferenced. - A Parquet page that decompresses to zero bytes, as pyarrow writes for an all-null column chunk, reads as empty. It previously failed with "maxSize must be positive".
- Booleans order as false before true.
WHERE flag > falsereturned no rows,MINandMAXof a boolean column returned null, andORDER BYa boolean column (or DataFrameorderBy) threw aTypeError. LEFT,RIGHTandFULL JOINwithoutONorUSINGare a parse error (Kind.invalid). They previously ran as a cross join. Plain andINNER JOINdo too (see Breaking).ORDER BY 2andGROUP BY 1areKind.invalid(see Breaking). An integer there was previously a constant, soORDER BY 2left the rows unsorted.- SQL
--line comments and/* */block comments are whitespace. A--comment was previously parsed as two minus signs, soSELECT id --1returnedid + 1. - A WHERE clause on a file no longer filters other scans of the same file in the query.
SELECT id FROM 'f' WHERE a < 1000 UNION ALL SELECT id FROM 'f'returned the filtered rows twice, and anIN (SELECT ... FROM 'f')subquery saw only the outer query's rows. Pushed filters now belong to a single scan, and each UNION ALL branch prunes row groups with its own WHERE. - A file referenced only in a UNION, INTERSECT or EXCEPT branch (or in a subquery inside one) is read. It previously failed with "File not found or could not be loaded".
LIKE's_matches one Unicode code point, so'𝄞' LIKE '_'is true.- Avro deflate OCFs with highly repetitive data (over 200x compression) read back. The ratio guard rejected the library's own output; the byte budget still bounds inflation.
- Arrow record batches with many columns read with
maxRows: null. The 10M cap was summed across every column's nodes; it is now the larger of 10M and one value per bit of the decompressed body. - A Parquet column with a UTF8 annotation on a numeric or boolean type is reported as corrupt. It was read as a string column holding booleans or bytes. A UTF8 FIXED_LEN_BYTE_ARRAY column, which DuckDB reads as text, reads as text.
- Iceberg writes fill each manifest-list entry's partition summaries (null counts, NaN presence and bounds), which were left null, so readers can skip manifests.
Performance #
Measured on an Apple M5 Max with Dart 3.13.4, AOT-compiled (benchmark/). "Before" is
1.0.1 with this release's hardening and correctness changes but none of the performance
work:
| Operation | Before | 2.0.0 |
|---|---|---|
| Parquet whole-file read, 1M rows, 8 columns, Snappy | 649 ms | 266 ms |
| Parquet whole-file read, flights 1M rows | 537 ms | 150 ms |
Parquet string column read (name, 1M rows) |
125 ms | 37 ms |
Parquet boolean column read (active, 1M rows) |
52 ms | 6 ms |
| SQL GROUP BY, 1M rows | 76 ms | 31 ms |
| SQL ORDER BY ... LIMIT 100, 1M rows | 703 ms | 26 ms |
| SQL UNION, 1M rows | 44 ms | 7 ms |
| SQL GROUP BY over a view, 1M rows | 95 ms | 47 ms |
Parquet reads decode into typed buffers, including dictionary, DELTA_BINARY_PACKED and
BYTE_STREAM_SPLIT pages, and parse the schema once per file. ORDER BY with LIMIT keeps only
the best rows. GROUP BY folds each batch into its groups as it arrives instead of holding
the rows. An inner hash join builds on the smaller side. A Delta or Iceberg query reads only
the columns it uses: on a 1M-row, 6-column table, SELECT id takes 10-11 ms on Delta and
18 ms on Iceberg, against 81-90 ms and 84 ms when every column is read.
1.0.1 #
- Fix a small linting issue.
1.0.0 #
First public release.
DataFrame API #
- Chainable, lazily-evaluated operations (
select,filter,orderBy,groupBy,agg,join,withColumn,distinct,union,sample), executed on a columnar engine with vectorized filter and projection kernels. - Typed columnar storage (
Column,Table,Schema,Field) with null bitmaps, zero-copy slicing, and automatic schema inference.
SQL engine #
- Query files directly:
SELECT * FROM 'data.parquet' WHERE x > 10, or register DataFrames and tables withSqlEngine. - Joins across multiple files, CTEs and views, set operations, grouping sets, window-free
aggregation with exact
BigIntsums, and full three-valued (NULL) logic. VALUESas a table source (SELECT * FROM VALUES (1, 'a'), (2, 'b') AS t(n, s)), andSELECTwithout aFROMclause.INSERT INTO '<delta table>' [(cols)] VALUES (...), alongsideUPDATEandMERGE.- Predicate and projection pushdown into the Parquet reader;
executeStreamfor incremental results. - Operators spill to disk past a configurable memory budget (default 256 MB), so
ORDER BY,GROUP BYand equi-joins work on inputs larger than memory.
Formats #
- CSV: auto-detected delimiters and types, streaming batch reads, streaming writes.
- JSON / JSON Lines: streaming batch reads and writes.
- Parquet: read and write, with Snappy, GZIP, ZSTD and LZ4 (
LZ4_RAWread+write, HadoopLZ4read) codecs, optional page CRC32 verification, and nested list/struct/map types. - Arrow IPC: read and write, streaming batches.
- Delta Lake: append/overwrite,
delete/update/merge, time travel, deletion vectors, and pluggable commit coordinators for multi-writer safety. - Apache Iceberg: snapshots, time travel, schema evolution, partitioning, positional and equality deletes, and pluggable catalogs.
- Datasets: read partitioned directory trees as a single table, with optional parallel reads across isolates.
Correctness #
Numeric values are never silently rewritten. Integer literals are typed by range, the fixed-width
Parquet encoders reject a value they would truncate, and a mixed integer/float column (CSV, JSON, or
Schema.infer) promotes to an exact decimal rather than rounding under float64. Where an exact
result is impossible (unifying int64 with float64 in a set operation), the conversion fails
loudly instead of rounding. JSON field flattening rejects a name collision rather than silently
keeping whichever value came last.
Types #
Decimal is an exact decimal value (unscaled BigInt + scale) with value-based equality, returned
by Table.toRows() for decimal columns, including integer SUM, which is exact beyond 2^63.
Temporal, decimal, and nested types round-trip across Arrow and Parquet. Read paths are bounded by
opt-out resource caps and fail loudly rather than silently truncating or corrupting data. Data files
are flushed to stable media before being published. Interoperability with PySpark, deltalake and
PyIceberg is verified by an opt-in test suite.
Command line #
libbigdata: run SQL against CSV and Parquet files, with table/JSON/CSV output and an interactive REPL. Install withdart pub global activate libbigdata.