Introducing a new way to review your PRs.

Read the announcement

eventual-inc / daft

High-performance data engine for AI and multimodal workloads. Process images, audio, video, and structured data at any scale

View on GitHub

19 documents · Updated Nov 11, 2026

docs / data-sources-and-sinks

Data sources, scans, and sinks

Daft connects files, object stores, tables, streams, and external systems to lazy DataFrame plans. A source turns a data location into independent read tasks. A sink turns the plan result into files, table changes, or a user-defined write result. This page explains the shared rules for those paths. See the parent page, Data access and persistence, for the wider data access model, and Catalog and table integrations for table and catalog behavior.

Data access flow

Source tasks

The source is the entry point for a read. It declares a schema and can declare storage partition fields, execution clustering guarantees, and metadata count support before it discovers source tasks, which are independent units such as files, row ranges, or database partitions. The execution engine can send these tasks to workers, so a large input can be read without first loading the full input into one process.

Daft exposes a shared DataSource and DataSourceTask contract for sources that provide tasks and tasks that produce record batches. A source that supports count pushdown must apply all relevant pushdowns when it answers a count from metadata. Native file tasks use the regular scan path. Python-defined sources can use the same task boundary with their own source logic. Native Parquet and MCAP task factories carry the file metadata and pushdowns into the native readers.

Each task produces record batches. A task may also provide row counts, byte size, column statistics, and partition values. These facts help the planner reduce work and help the runner balance work across tasks.

flowchart LR
    A[Path or external source] --> B[Source]
    B --> C[Schema and source metadata]
    B --> D[Independent source tasks]
    D --> E[Format reader or source adapter]
    E --> F[Record batches]
    F --> G[DataFrame plan]

References: daft/…/source.py• L25-111 daft/…/source.py• L112-231 src/…/source.rs• L29-144 src/…/lib.rs• L348-369

Scan plans

File reads start as lazy scan plans. The plan keeps the path pattern, format rules, schema choice, storage settings, and optional generated columns together until execution. This lets later DataFrame operations pass useful limits and filters to the source.

For a file pattern, Daft lists matching files and normally creates one scan task per file. A supplied list of concrete paths can skip the listing step. Metadata from discovery can describe file size and row groups. That metadata supports task sizing and some query rewrites before data rows are read.

Schema discovery can inspect only the first matching file in the normal case. If a configured corrupt-file policy allows it, the scan can continue to another matching file when the first file cannot provide a schema. This keeps a bad format file from hiding valid files while still treating access errors as failures.

References: daft/…/common.py• L20-54 src/…/glob.rs• L81-149 src/…/glob.rs• L177-289 src/…/glob.rs• L649-783

Read pushdowns

Pushdowns are read requests that the plan sends toward the source. A source uses them when the source or format can answer part of the request early. Any part that the source cannot apply remains a normal DataFrame operation after the scan.

PushdownPurposeTypical effect
FilterRestrict rowsReads or decodes fewer matching rows when the reader can use the predicate
Partition filterRestrict files or partitionsSkips paths whose partition values do not match
ColumnsRestrict fieldsAvoids reading fields that the plan does not need
LimitRestrict row countStops a source after enough rows when the source supports it
Count aggregationAnswer a count from source metadataCan avoid row reads for sources with exact count facts
ShardDivide source work between workersGives task discovery the worker share to return

Partition filters act on storage keys. Row filters act on data values. A file source may still need to read a column used by a filter even when that column is not part of the final projection.

Iceberg reads pass both usable row predicates and identity-partition predicates to the table reader. The table reader can then combine them for metadata and file pruning. Iceberg file tasks also carry decoded min and max bounds for primitive fields only when both bounds are present and decodable. Missing, one-sided, or undecodable bounds become unknown, so the scan keeps correct results and loses only that pruning opportunity.

Count pushdown has a stricter contract than ordinary pruning. A source that answers a count from metadata must honor partition_filters even when the row-level filters value is empty. For an Iceberg count, exact partition records can select surviving files and their row counts can be summed. A row-level predicate, an evolved partition spec that lacks the needed field, or delete files requires a regular scan.

References: daft/…/pushdowns.py• L14-73 daft/…/source.py• L77-91 src/…/pushdowns.rs• L15-36 src/…/scan_operator.rs• L14-68 daft/…/iceberg_scan.py• L115-184 daft/…/iceberg_scan.py• L267-462

Storage configuration

File and object-store paths

A path selects the storage service through its URI scheme. Local paths use the local file system. Remote paths use the matching object-store client. IOConfig carries access and connection settings, while StorageConfig carries those settings with the choice of threaded IO for the scan.

The same general path model serves reads and writes. The URI and its config must agree. For example, an S3-compatible path uses S3 settings, while an Azure path uses Azure settings. Some table and catalog libraries also receive storage options translated from the same config; see Catalog and table integrations.

Path familyExamples
S3-compatibles3://, s3a://, oss://
Google Cloud Storagegs://, gcs://
Azure Blob Storageaz://, abfs://, abfss://
Catalog-backed file accessgvfs://
Hugging Face repositorieshf://
Local filesLocal paths without a remote scheme

Credentials, endpoints, TLS choices, and request limits belong in IO settings rather than in the scan or writer logic. Azure paths support both a bare container/path form and a container@account-host/path form. The latter also applies to Microsoft Fabric OneLake hosts, where the workspace is the container and the account name comes from the *.dfs.fabric.microsoft.com host.

References: src/…/storage_config.rs• L16-45 daft/…/object_store_options.py• L11-36 daft/…/object_store_options.py• L39-116 src/…/storage_backend.rs• L14-25 src/…/azure_blob.rs• L27-137

Azure object access

The Azure object source provides list, metadata, full-read, and range-read operations through the common object-store interface. It maps Azure containers and blobs to standard file metadata so glob discovery and scan planning can use the same path model as other stores.

The client resolves the storage account from the URI when the host names an Azure or OneLake account. Otherwise it uses the Azure configuration or its environment fallbacks. Credentials can use anonymous access, an access key, a SAS token, a bearer token, service-principal fields, or the default Azure credential chain. A connection limit protects the shared IO pool.

Azure reads support bounded, offset, and suffix ranges. Writes through this backend are not available, so Azure output must use a writer backend that supports the target URI. A missing object, an unauthorized request, and a path that names a directory have different error meanings for callers.

References: src/…/azure_blob.rs• L174-285 src/…/azure_blob.rs• L539-685 src/…/azure_blob.rs• L687-750

OpenDAL backends

OpenDAL provides an additional path to object stores and file systems through backend settings in IOConfig. The configured scheme selects a compiled backend, while the backend map supplies its endpoint, root, and access settings. Reads support byte ranges and listing. Writes support direct and multipart output.

OpenDAL reads have deadline controls named timeout_ms and io_timeout_ms. These settings protect metadata calls and stalled body reads. Write and delete operations keep their prior unbounded behavior so a slow valid upload is not cut off by a read deadline.

References: src/…/Cargo.toml• L27-39 src/…/opendal_source.rs• L18-103 src/…/opendal_source.rs• L119-150 src/…/opendal_source.rs• L214-345

Hugging Face paths

Hugging Face paths provide read access to model, dataset, space, and bucket repositories through the same glob and range-read model as other remote sources. A path can name a repository revision and an object pattern. Bucket browser paths that contain the reserved tree segment are normalized to the object path before listing or reading.

The source lists repository trees through the Hugging Face API and follows paged results. A dataset root scanned as Parquet can use Hugging Face's Parquet file API, which also supports datasets whose stored files are not natively Parquet. Direct file reads use HTTP ranges when available. When Xet reads are enabled, the source first resolves and reads Xet-backed files, then falls back to HTTP when the file is not Xet-backed or the Xet read cannot proceed.

Hugging Face access is read-only in this source path. Repository credentials come from HuggingFaceConfig. Bucket authorization errors are reported separately from other repository authorization errors so a mistaken bucket URI can be distinguished from a private repository. HTTP failures also retain useful transient, timeout, and socket error classes for callers.

References: src/…/mod.rs• L37-92 src/…/mod.rs• L95-157 src/…/mod.rs• L184-247 src/…/mod.rs• L407-699 src/…/xet.rs• L33-35 src/…/xet.rs• L77-190

Path discovery

Glob discovery turns a path pattern into file metadata. It supports wildcards and recursive paths across the object-store interface. It filters directory markers and common Spark marker files so those control objects do not become data tasks.

Discovery can stop at a requested limit. For a large directory tree, it can use a prefix listing instead of walking every directory. A pattern with no matching file is an input error for the tabular scan path. A concrete path can be treated as a file first and as a directory when it is not a file.

References: daft/…/_files.py• L12-34 src/…/object_store_glob.rs• L301-333 src/…/object_store_glob.rs• L352-397 src/…/object_store_glob.rs• L445-499 src/…/glob.rs• L95-149

Format readers

Tabular file readers

Daft provides readers for common file forms. Each reader builds the same kind of lazy file scan, then supplies format-specific rules such as schema inference, parsing options, and corrupt-file handling.

ReaderInput modelImportant source behavior
ParquetColumnar filesCan select row groups, use field IDs, use file statistics, and optionally skip format-corrupt files
AvroSchema-based recordsUses the shared tabular scan path with optional schema inference or a supplied schema
CSVDelimited rowsSupports headers, delimiter and quote rules, variable-width rows, and optional corrupt-file skipping
JSONLine-delimited JSONInfers a schema and can skip empty files
TextLines or whole filesProduces text rows, with a choice between one row per line and one row per file
WARCWeb archive recordsProduces record metadata, content bytes, and header data
MCAPTime-stamped message recordsUses a fixed source schema and can restrict reads by time range or topic

Schema inference reads enough source metadata to form a schema before the full scan. A supplied schema can be the final schema or a hint, based on the reader setting. Avro, text, WARC, and MCAP use format-specific schema rules. Text, WARC, and MCAP use fixed schemas instead of inference. MCAP uses native scan tasks, so it shares the normal projection, residual-filter, partition, limit, and storage flow rather than a separate Python row conversion path. An MCAP directory expands to recursive **/*.mcap discovery unless the input is already a file or explicit glob. Optional per-file topic start-time resolution can split one file into topic-specific native tasks. This supports readers such as video consumers that need keyframe messages before a requested time range.

The public MCAP reader emits message path, topic, log time, publish time, sequence, and binary payload columns. It accepts inclusive start and exclusive end log-time bounds. The default raw output uses unsigned time and sequence types with binary payloads; the deprecated raw_legacy mode casts them to the older signed and string types.

References: daft/…/__init__.py• L21-42 daft/…/_avro.py• L23-85 daft/…/_mcap.py• L27-31 daft/…/_mcap.py• L34-73 daft/…/_mcap.py• L76-190 daft/…/_mcap.py• L193-273 src/…/file_format_config.rs• L17-27 src/…/file_format_config.rs• L79-102 src/…/file_format_config.rs• L428-600 src/…/glob.rs• L200-469 daft/…/source.py• L207-231

Iceberg table reader

Iceberg is a table reader that uses table metadata to select data files and expose the table as a lazy DataFrame scan. It combines row predicates with partition information so the table can reduce metadata and file work before rows are read.

The reader can use table snapshots and partition records to build scan tasks. It also carries file statistics and delete-file information into the read path. When a table has no delete files and the request is an exact metadata count, it can return a count task without reading data files. A row filter, an unsafe partition-evolution case, or any delete file disables that shortcut and uses a regular scan. Table identity and commit behavior are covered in Catalog and table integrations.

flowchart LR
    A[Iceberg snapshot] --> B[Partition and row predicate pruning]
    B --> C[File statistics and delete-file metadata]
    C --> D[Native Parquet scan tasks or metadata count]
    D --> E[DataFrame rows or count]

References: daft/…/iceberg_scan.py• L115-184 daft/…/iceberg_scan.py• L187-237 daft/…/iceberg_scan.py• L267-462

Delta Lake table reader

Delta Lake is a versioned table reader that turns the active files in a transaction log into native Parquet scan tasks. It supports table version selection, storage settings, partition metadata, and column mapping so logical table fields remain separate from physical file and statistics names.

The reader applies partition filters before it creates tasks. It also uses a best-effort predicate over Delta file statistics to skip files that cannot contain matching rows. The statistics check is fail-open: unsupported expressions, missing statistics, unsafe literal conversions, or uncertain bounds keep the file so pruning cannot change query results. String and binary prefixes, floating-point values, and timestamp precision receive conservative bounds.

Delta can answer an unfiltered count from file row counts. A partition filter can still participate in that metadata count. Deletion vectors disable this shortcut because file row counts include rows that a deletion vector may remove. Unsupported deletion-vector propagation stops the scan unless the caller explicitly chooses to ignore the feature.

flowchart LR
    A[Delta table version] --> B[Active add actions]
    B --> C[Partition and statistics pruning]
    C --> D[Native Parquet scan tasks]
    D --> E[DataFrame rows]

References: daft/…/delta_lake_scan.py• L148-271 daft/…/delta_lake_scan.py• L273-479 daft/…/_visitors.py• L66-200 daft/…/_visitors.py• L202-245

Lance table reader

Lance is a versioned table reader for local and object-store URIs. It can read the latest table state or select a version or point in time, then expose the table as a lazy DataFrame scan.

The reader accepts Lance scan defaults and can group fragments into scan tasks. It can also expose fragment identity for workflows that merge or update Lance data. Its checkpoint option connects table reads to the same progress tracking model used by other sources. Lance Namespace table identifiers provide an alternative to a direct URI.

References: daft/…/__init__.py• L1-5 daft/…/_lance.py• L19-37 daft/…/_lance.py• L38-103 daft/…/_lance.py• L124-140

Raw file and external readers

Not every source is a tabular file scan. from_files returns lazy file references for later file operations. read_blob returns one row per file with its path, size, and raw bytes. Other source adapters cover SQL queries, bounded Kafka ranges, generators, numeric ranges, and video or binary formats.

These adapters still follow the source-and-task model. Their task boundaries come from the external system rather than from file paths. SQL can split work by a column. Kafka can split bounded reads by topic partition and offset range. Kafka reads are bounded batch reads and do not manage offset commits.

References: daft/…/_files.py• L12-54 daft/…/_blob.py• L15-49 daft/…/_sql.py• L25-73 daft/…/_kafka.py• L259-314 daft/…/_kafka.py• L556-657 daft/…/_generator.py• L22-72 daft/…/_range.py• L136-209

Storage partitioning

Read partition fields

A storage partition is a file or directory group described by values in its path or table metadata. A partition field names the value that belongs to the group. A partition transform derives that value from a source field, such as a year or day from a timestamp.

Hive-style paths can add fields such as key=value to the scan schema. A file path column is another generated field. Daft injects these values into each task's output instead of requiring them to exist in the file body. The planner can use them for partition filters before it opens the file.

Supported transform families include:

  • Identity values.
  • Year, month, day, and hour values.
  • Iceberg bucket values.
  • Iceberg truncate values.

Iceberg partition fields use the table's own field names and transforms. This lets scan-side partition keys match the table metadata even when a field is derived from a source column. Partition evolution can leave older files without a field added by a later partition spec. Such files cannot answer a partition-filtered count from metadata, so the source falls back to reading rows when needed.

References: daft/…/partitioning.py• L7-31 daft/…/partitioning.py• L52-187 src/…/partitioning.rs• L7-39 src/…/glob.rs• L508-565 src/…/glob.rs• L700-736 daft/…/iceberg_scan.py• L93-112 daft/…/iceberg_scan.py• L381-408 daft/…/iceberg_write.py• L97-132 daft/…/iceberg_write.py• L357-384

Write partition paths

A write with partition_cols groups rows by the selected values and creates a separate writer for each group. The values form directory keys under the output root. For plain column partition keys, the writer keeps those values in the path and can omit them from the file body. The returned write metadata keeps the output path and partition values together.

Write partitioning is separate from execution clustering. Clustering describes how rows are spread across running tasks. Storage partitioning describes how values are laid out for later reads. A source may declare clustering to avoid a later shuffle, but a path partition does not by itself make that promise.

References: src/…/partition.rs• L14-29 src/…/partition.rs• L51-57 src/…/partition.rs• L65-77 src/…/lib.rs• L99-145 daft/…/source.py• L50-75 src/…/scan_operator.rs• L20-39

Writer and sink flows

File writers

The file write APIs execute the DataFrame at call time. They write Parquet, CSV, or JSON under an output root and return a new DataFrame that describes the files written. Append adds files. Overwrite replaces the output. Overwrite-partitions replaces only the partition groups being written.

The writer uses a target file size to decide when to close one file and start another. This keeps files useful for later parallel reads without requiring the input to arrive in fixed-size pieces. single_file=True changes the result to one Parquet file at an exact path. It is restricted to the native runner and cannot be combined with partitioned output.

flowchart LR
    A[DataFrame plan] --> B[Execute into micropartitions]
    B --> C{Partition columns?}
    C -- No --> D[Size-aware file writer]
    C -- Yes --> E[Group rows by partition]
    E --> D
    D --> F[Local file or multipart object upload]
    F --> G[Written path metadata]

References: daft/…/dataframe.py• L1017-1110 daft/…/dataframe.py• L1112-1226 daft/…/dataframe.py• L1228-1319 src/…/lib.rs• L136-230 src/…/file.rs• L10-91 src/…/storage_backend.rs• L70-157 daft/…/writer.py• L39-230 daft/…/writer.py• L233-323

Iceberg table writes

An Iceberg write turns each completed data file into table metadata that includes its path, partition values, size, and file statistics. The writer aligns each output table with the Iceberg schema before it writes. Missing table fields become null values and extra input fields do not enter the file. This keeps the output ready for the table commit step.

The writer applies the table's partition transforms to group rows and records the transformed values in the Iceberg partition record. It also gathers Parquet statistics with the table's field mapping. An overwrite filter is a safety boundary. Daft parses or converts the filter and checks it against the table schema before writing. Each new file must be provably inside that filter through its partition values or its file statistics. If neither source can prove that, the write fails instead of adding data that could escape the requested overwrite range.

flowchart LR
    A[DataFrame rows] --> B[Iceberg partition groups]
    B --> C[Schema-aligned Parquet files]
    C --> D[Partition and file statistics]
    D --> E[Iceberg data-file metadata]
    E --> F[Table commit]

References: daft/…/_expressions.py• L125-150 daft/…/iceberg_write.py• L29-217 daft/…/iceberg_write.py• L220-300 daft/…/iceberg_write.py• L303-385 daft/…/writer.py• L326-395

Custom data sinks

A data sink is a user-defined destination that receives executed micropartitions. Its lifecycle has one start step, many write steps, and one final step. Workers can run write steps in parallel. The final step gathers write results and returns a record batch that becomes the result DataFrame.

This flow supports destinations that need their own client, commit step, or result format. Each write result carries destination data with row and byte counts. The sink declares the schema of the final result, and the runtime can wrap write errors with the sink name before returning them. Built-in SQL and some table writers use the same sink contract while adding destination-specific rules. Table formats and their commit behavior are covered in Catalog and table integrations.

  1. The sink starts and can create shared destination state.
  2. Daft executes the upstream plan and sends micropartitions to writers.
  3. Each writer returns row and byte counts plus destination metadata.
  4. The sink finalizes all results into its declared result schema.

References: daft/…/sink.py• L16-45 daft/…/sink.py• L47-111 daft/…/dataframe.py• L2266-2295 src/…/sink.rs• L12-93 src/…/sink.rs• L15-70

Checkpoint-aware IO

Checkpointed reads

A checkpoint key identifies one source input row for progress tracking. Readers that expose checkpoint= attach that setting to the source. During planning, Daft reads the stored keys and filters them from the source. It stages new keys as the flow moves toward the sink.

The current file readers with direct checkpoint support are Parquet, Avro, CSV, JSON, and WARC. The Lance table reader also accepts checkpoint configuration. The MCAP reader uses the normal source-task path but does not expose a direct checkpoint argument. Checkpoint filtering needs the Ray runner. It also needs a map-only path from the source to the sink so the source key remains linked to the produced result.

sequenceDiagram
    participant R as Reader
    participant C as Checkpoint store
    participant T as Map-only transforms
    participant S as Sink
    R->>C: Load processed source keys
    R->>R: Skip matching source rows
    R->>C: Stage new source keys
    R->>T: Send remaining rows
    T->>S: Produce output
    S->>C: Record output references at completion

The checkpoint store records keys and output references rather than row data. A crash before task completion can cause the task to run again. A completed task can be skipped on a later run. Transactional table sinks can add an idempotent commit on top of this source progress model; see Catalog and table integrations.

References: daft/…/_checkpoint.py• L13-38 daft/…/_avro.py• L23-85 daft/…/_parquet.py• L23-37 daft/…/_csv.py• L23-42 daft/…/_json.py• L23-35 daft/…/_warc.py• L23-30 daft/…/_mcap.py• L193-261 daft/…/_lance.py• L92-98 src/…/rewrite_checkpoint_source.rs• L1-3 src/…/rewrite_checkpoint_source.rs• L45-50 src/…/rewrite_checkpoint_source.rs• L132-227

Change checklist

When these files or sections are changed, remember to consider these:

  • A new public IO reader must keep its package export, public name, reader options, and scan construction aligned.
  • A new file reader must keep its public reader options aligned with FileFormatConfig, scan construction, schema inference, and the format-to-reader mapping.
  • A change to URI schemes or IOConfig fields must keep native scans, multipart writers, OpenDAL backend settings, and storage-option translation aligned for the same backend.
  • A change to Azure URI parsing or endpoint selection must keep bare container paths, account-qualified ADLS paths, OneLake paths, credentials, and Fabric endpoint construction aligned.
  • A change to OpenDAL deadline settings must keep the accepted key names, value range, read-only deadline behavior, and unbounded write behavior aligned.
  • A change to partition fields must cover both read-side value injection and write-side path grouping. Do not treat storage partitioning as execution clustering.
  • A new output format or writer mode must update writer selection, file result metadata, sink output schema, and any catalog adapter that consumes those results.
  • A change to checkpoint key flow must preserve the source key through the map-only path and keep the staged key format compatible with the checkpoint store.
  • A change to Iceberg filter conversion must keep ordinary read pushdowns best-effort while keeping metadata count pushdowns partition-aware, delete-file-aware, and overwrite filters schema-bound and fail-closed.
  • A change to Iceberg file metadata must keep partition records, transformed field names, paired min/max bounds, logical dtypes, file statistics, delete files, and table commit inputs consistent.
  • A change to Delta filter conversion must keep logical-to-physical statistics mapping, safe literal conversion, conservative unknown handling, and fail-open pruning behavior aligned.
  • A change to Delta table loading must keep version selection, storage-option translation, encoded log paths, partition values, Parquet column mapping, row counts, and deletion-vector handling aligned.
  • A change to Hugging Face path parsing must keep URI canonicalization, repository API paths, resolve URLs, glob patterns, and copied bucket tree URLs aligned.
  • A change to Hugging Face read selection must preserve Xet range behavior, HTTP fallback, repository authentication, and the separate bucket authorization error.
  • A change to the Lance reader must keep direct URI access, namespace table identity, version or as-of selection, fragment metadata, and checkpoint planning aligned.
  • A new file format must update the format config, Python-facing config wrapper, schema-inference rules, scan task construction, and any reader that consumes the config.
  • A change to the DataSource or DataSourceTask contract must keep task statistics, partition values, execution clustering guarantees, count pushdown semantics, native scan shims, MCAP and Parquet factories, and Python source bridges consistent.
  • A change to MCAP task planning must keep directory expansion, file discovery, time bounds, topic selection, resolver fan-out, batch-size validation, native storage settings, and output type compatibility aligned.

Important failure modes

TriggerConsequenceGuard
A glob matches no usable fileSchema inference or scan task creation fails instead of producing rowsCheck the URI and pattern. Use recursive ** when the data is below nested directories
An Avro path list is emptyThe reader rejects the input before it creates a scanPass at least one path or use a non-empty glob
Avro schema inference is disabled without a supplied schemaThe reader cannot define the source schema and rejects the readSet infer_schema=True or provide schema
Schema inference sees a corrupt first fileThe read fails, or the file is skipped only when the format's corrupt-file option is enabledSet an explicit schema or enable the reader's corrupt-file option when format errors are acceptable. Network and permission errors still fail
An Azure URI uses an unsupported host form or lacks a storage accountClient creation or object access fails before the scan can read dataUse container/path with Azure config or container@account.dfs.core.windows.net/path. For OneLake use container@account.dfs.fabric.microsoft.com/path with the Fabric endpoint setting
An Azure request names a directory as a file or asks for an unsupported continuation tokenThe source returns a not-file error or rejects the listing requestUse file URIs for reads and do not depend on continuation tokens in the Azure listing path
A partition filter uses fields not present in path or table metadataThe source cannot prune the file set and may reject the filterKeep partition predicates on declared partition fields. Use a row filter for data columns
An Iceberg read predicate cannot be converted or names only a derived partition fieldThe table reader loses that pushdown, so it may inspect more metadata or filesKeep predicates bound to data columns. Treat skipped conversion as a performance loss, not a change in row semantics
An Iceberg count pushdown ignores partition_filtersA count returns rows from excluded identity partitionsApply partition predicates to exact partition records. Fall back to a regular scan when row filters or evolved specs prevent an exact metadata count
An Iceberg table has delete filesMetadata count pushdown is disabled and the source reads data files so deletes can be appliedKeep the regular scan path when delete files exist. Do not sum data-file row counts as the final count
An Iceberg file has missing, one-sided, or undecodable min/max boundsThe scan cannot use that file's statistics and reads more dataTreat the field as unknown. Keep paired bounds and preserve the task schema rather than guessing a range
A Delta stats predicate uses an unsupported expression or an unsafe literal conversionFile pruning is skipped, so the scan reads more files but keeps correct rowsConvert only safe comparisons. Keep files when stats are missing, truncated, or uncertain
A Delta table uses column mapping but physical names are treated as logical namesParquet fields or file-stat filters can select the wrong data or lose pruningPreserve field IDs for Parquet reads and map top-level physical stats names back to logical names
A Delta count uses file row counts while deletion vectors remove rowsThe count can include deleted rowsDisable metadata count pushdown when deletion vectors are enabled. Use explicit ignore behavior only when its data-loss trade-off is accepted
A Delta table version is outside the available range or a log path is decoded incorrectlyTable loading or file reads fail before the DataFrame can produce rowsValidate the requested version and keep the Delta library's path encoding rules aligned with URI construction
An Iceberg overwrite filter names an unknown field or cannot prove a new file matchesThe write is rejected before it can add an unsafe fileValidate the filter against the table schema and filter the DataFrame to rows covered by it
overwrite-partitions has no partition columnsThe write is rejected because there is no safe group to replaceSupply partition_cols or use append or overwrite
single_file=True is used with a non-native runner or partition columnsThe write is rejectedUse the native runner with one unpartitioned Parquet output
A JSON output schema contains unsupported extension, binary, or duration dataThe JSON writer cannot be selectedCast or remove unsupported fields before the write
A remote multipart upload fails during finalizationThe file write does not complete even if upstream rows were processedTreat the write result as complete only after the sink closes and finalizes the upload
An OpenDAL timeout setting is malformed, zero, or above the accepted limitThe OpenDAL client fails during creation instead of silently using an invalid deadlineUse timeout_ms or io_timeout_ms with a value from 1 millisecond through 24 hours
An OpenDAL read stalls or a backend does not support the configured schemeThe read fails at its deadline or client creation failsConfigure a compiled backend and set a valid read deadline. Do not use read deadlines as write duration limits
Checkpointing runs on the native runner or across a shuffle, join, aggregate, or row selectorThe plan is rejected, or the source-to-sink key link cannot be preservedUse the Ray runner and keep checkpointed paths map-only
A Lance URI is combined with namespace table identity, or a requested table version cannot be openedThe Lance source cannot identify the table state to scanUse either a direct URI or a complete namespace identity. Check the requested version or as-of value
A Hugging Face bucket URI keeps the browser-only tree segment or uses the wrong repository typeListing or reading targets the wrong API path, or the error looks like a credential failureUse a canonical hf:// repository path. Check whether the repository is a bucket, dataset, model, or space
Xet resolution or download fails after authenticationThe source falls back to HTTP when possible. A final HTTP or authorization failure still stops the readKeep Hugging Face credentials and Xet settings valid. Treat the read as complete only after the byte stream succeeds
An MCAP source uses an invalid batch sizeSource configuration is rejected before task executionUse a positive batch size
An MCAP directory or glob has no matching .mcap filesTask discovery raises a file-not-found errorCheck the path and use a file, explicit glob, or directory that contains MCAP files
An MCAP topic resolver fails for one fileThe source logs a warning and uses the source-wide time and topic constraints for that fileKeep the resolver available and return a map of valid topic start times. A resolver failure does not silently invent per-topic bounds
An MCAP topic start time is negative or outside the internal unsigned time rangeTask creation or time conversion raises an overflow errorReturn times from 0 through 2**64 - 1 and keep the end bound exclusive
output_format="raw_legacy" is usedThe reader emits deprecated signed and string types and raises a deprecation warningUse the default raw format with unsigned time and sequence fields and binary payloads

Key files

FileWhy to read it
daft/…/__init__.pyDefines the public IO surface and exposes the supported source and sink entry points
daft/…/_avro.pyDefines the Avro reader's public options and its connection to the shared tabular scan and checkpoint flow
daft/…/_mcap.pyDefines MCAP path discovery, time and topic selection, resolver-based task fan-out, native task creation, and raw output types
daft/…/source.pyDefines the source and task contract used by custom readers and external sources. It also declares partition layout, execution clustering, metadata count capability, and native Parquet and MCAP task boundaries
src/…/source.rsDefines the shared native source and source-task contract, including task metadata and record-batch reads
src/…/glob.rsShows how file paths become schemas, partition values, metadata, and scan tasks
src/…/lib.rsDefines scan sources, scan tasks, chunk boundaries, and metadata used by planning
daft/…/pushdowns.pyDefines the read requests shared by the planner and source adapters
src/…/file_format_config.rsShows the supported tabular file reader families and their source-level options
src/…/python.rsShows the Python-facing scan handles, source bridges, file task factories, and pushdown boundary
src/…/storage_config.rsConnects IO settings and threaded IO choices to scan execution
daft/…/iceberg_scan.pyConnects Iceberg metadata, partition pruning, delete-aware count pushdown, file statistics, and native Parquet tasks
daft/…/delta_lake_scan.pyDefines Delta table version loading, partition and statistics pruning, count pushdown, column mapping, and native Parquet tasks
daft/…/_visitors.pyDefines the safe, fail-open conversion from Daft filters to Delta file-stat checks
daft/…/_lance.pyDefines the public Lance table scan entry point, table selection, fragment controls, and checkpoint option
src/…/azure_blob.rsDefines Azure and OneLake URI parsing, credential and endpoint selection, listing, range reads, and Azure error mapping
src/…/opendal_source.rsDefines OpenDAL backend reads, listings, byte ranges, deadlines, writes, and multipart output
src/…/Cargo.tomlShows which OpenDAL backend services are available in the native IO build
src/…/path.rsDefines Hugging Face URI forms, revisions, canonical paths, and API URLs
src/…/mod.rsDefines Hugging Face listing, range reads, Parquet discovery, error mapping, and HTTP fallback behavior
src/…/xet.rsDefines optional Xet file resolution, range downloads, and session reuse
src/…/object_store_glob.rsShows path matching and object-store file discovery behavior
daft/…/object_store_options.pyShows how URI schemes select storage options for object-store-backed libraries
daft/…/dataframe.py• L1017-1319Defines the public Parquet, CSV, and JSON write behavior
daft/…/writer.pyDefines local and remote file writers, output partition paths, schema alignment, and table-specific file metadata
src/…/lib.rsAssembles file, partition, and size-aware writer flows
src/…/partition.rsShows how output rows become per-partition writers
src/…/storage_backend.rsDefines local file and multipart object-store completion
daft/…/_expressions.pyDefines how read and overwrite predicates cross the Daft and Iceberg boundary
daft/…/iceberg_write.pyDefines Iceberg schema alignment, partition records, data-file metadata, statistics, and overwrite safety checks
daft/…/sink.pyDefines the lifecycle for custom and sink-backed writes
src/…/rewrite_checkpoint_source.rsShows how checkpoint settings change a source-to-sink plan