Skip to content

Update FastLanes extension to DuckDB 1.5.6 - #45

Open
sebastiaan-dev wants to merge 88 commits into
mainfrom
fix/duckdb-1.5.6
Open

sebastiaan-dev wants to merge 88 commits into
mainfrom
fix/duckdb-1.5.6

Conversation

@sebastiaan-dev

@sebastiaan-dev sebastiaan-dev commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Scope

Update the extension to build and run against DuckDB 1.5.6, including the required FastLanes patch stack. This PR stops at e239e02; the later filter-first implementation and profiling commits are not included.

Companion FastLanes PR: sebastiaan-dev/FastLanes#5

Changes

Build and dependencies

  • Pin the DuckDB submodule to v1.5.6 (069cc9f9b5be).
  • Pin extension-ci-tools to its v1.5.6 revision (3dc5c2a27542) and update CI workflow references.
  • Replace the moving FastLanes dependency with a SHA-256-verified archive of fastlanes-patched@7f91afdbd916d24ab5b39a990fbdf7d9157c0f69.
  • Apply checked-in build/consolidation patches matching the companion fork PR, including compiler fixes, writer settings and safe deferred positional I/O.
  • Remove the Makefile include for the deleted benchmark harness and support a local FASTLANES_SOURCE_DIR override.

DuckDB API compatibility and correctness

  • Return AsyncResult from file scans.
  • Use DuckDB's reusable-dictionary API in string materializers, with per-output-chunk selection ownership.
  • Fix string dictionary offsets and add the missing BOOLEAN bitmap materializer.
  • Initialize reader cardinality counters and correct the bind-info cast.
  • Reset file-local filter/decoder state when a worker moves between readers, retaining the old reader long enough for filter references to remain valid.

Tests and maintenance

  • Replace the hard-coded local benchmark smoke test with portable, self-generated round-trip, projection, filtering and multi-file tests.
  • Add ordered/unordered parallel COPY tests covering multiple row groups, BOOLEAN values and string dictionaries.
  • Reconcile dev/bench histories already squash-merged into main without resurrecting intentionally removed benchmark tooling.
  • Document reproducible builds, paired worktrees, patch provenance and archived branch recovery.

Validation

Validation performed for this compatibility revision, before the later filter-first work:

  • Full Release build against DuckDB v1.5.6 on macOS arm64 / Apple Clang 21.
  • 175 assertions in 4 SQL test cases pass.
  • 6 standalone FastLanes integration cases pass.
  • Both local FastLanes checkout and pinned downloaded/patched source builds pass.
  • Loadable binaries load into the official DuckDB 1.5.6 CLI, with a 200,003-row round trip and multi-file filter smoke checks.
  • Repeated SQL regressions pass after the multi-file state-lifetime fix.

Other platforms have not been validated by this migration.

Review / merge order

Review the companion FastLanes PR first, then this extension PR into main. The extension is reproducible independently: it uses the immutable baseline plus the checked-in patch series, not an unpublished or moving fork branch.

Follow-up PRs will contain the filter-first architecture, dependency-aware lazy column execution, expanded pruning and work counters. Those changes must not be mixed into this compatibility review.

Summary by CodeRabbit

  • New Features
    • FastLanes supports reading and writing Boolean values and repeated strings, including round trips with larger tables.
    • File scans support projections, filters, row numbers, explicit cardinality, and files with differing column orders.
    • Added support for additional date, time, decimal, and nested struct data types.
  • Bug Fixes
    • Improved reliability when reusing scan workers and when creating, appending to, or reading files.
    • Read failures and invalid file or buffer bounds now produce clear errors.
    • Improved file handling across Windows, macOS, and Linux.
  • Documentation
    • Added guidance for building and testing the extension with DuckDB 1.5.6.

Sebastiaan Gerritsen and others added 30 commits August 6, 2025 10:59
WARNING: Makes use of header redefinitions to make the extension work!
# Conflicts:
#	benchmark_results/tpch-sf1-delta.csv
#	src/include/reader/fls_multi_file_info.hpp
#	src/include/reader/materializer.hpp
#	src/reader/fls_multi_file_info.cpp
#	src/reader/fls_reader.cpp
…d type resolution in the materializer. Fixed calculation on how many tuples to read.
…e filters as a property to the decode kernels.
…e filters as a property to the decode kernels.
Sebastiaan Gerritsen and others added 18 commits March 23, 2026 18:30
… query, to what columns need to be read in the file
origin/dev has identical extension sources to origin/main; only obsolete CMake comments and README edits differ. origin/bench is an ancestor of dev, whose benchmark removals are intentional. Preserve the DuckDB 1.5.6 implementation and record both histories as reconciled.
Ship the same regression-tested changes as the fork worktree through a second pinned-source patch. Fingerprint the series for FetchContent updates and preserve user EXT_FLAGS when selecting a local checkout. Document the audited branches, local archives and deferred remote deletions.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments: 25
.gitattributes: 1

1-2: LGTM!

.gitignore: 1

19-19: LGTM!

CMakeLists.txt: 1

50-51: LGTM!

Also applies to: 59-70, 74-78

Makefile: 1

12-15: LGTM!

cmake/patch_fastlanes.cmake: 1

1-24: LGTM!

docs/branch-consolidation.md: 1

1-59: LGTM!

docs/development.md: 1

1-114: LGTM!

duckdb: 1

1-1: LGTM!

extension-ci-tools: 1

1-1: LGTM!

patches/fastlanes-build.patch: 1

16-25: LGTM!

patches/fastlanes-branch-consolidation.patch: 1

181-192: LGTM!

src/include/reader/fls_multi_file_info.hpp: 1

35-37: LGTM!

Also applies to: 58-59

src/include/reader/materializer/context.hpp: 1

55-58: LGTM!

src/include/reader/materializer/fls_kernel.hpp: 1

8-8: LGTM!

src/include/reader/materializer/fls_type_resolver.hpp: 1

76-78: LGTM!

src/include/reader/materializer/kernels/boolean_kernel.hpp: 1

1-28: LGTM!

src/include/reader/materializer/kernels/dictionary_kernel.hpp: 1

61-72: LGTM!

Also applies to: 83-100

src/include/reader/materializer/kernels/fsst_dict_kernel.hpp: 1

27-32: LGTM!

Also applies to: 56-62, 75-80

src/reader/fls_multi_file_info.cpp: 1

51-51: LGTM!

src/include/reader/fls_reader.hpp: 1

40-40: LGTM!

Also applies to: 94-95

src/reader/fls_reader.cpp: 1

507-516: LGTM!

Also applies to: 526-526, 535-535, 555-555

test/README.md: 1

2-2: LGTM!

test/sql/parallel_roundtrip.test: 1

1-53: LGTM!

test/sql/simple.test: 1

2-130: LGTM!

.github/workflows/MainDistributionPipeline.yml-28-28: 1

28-28: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Pin both reusable workflows to commit hashes. Both @v1.5.6 references remain mutable. A moved tag can change the workflows used by a later build without a change in this repository.

  • .github/workflows/MainDistributionPipeline.yml#L28-L28: use the commit hash for the intended distribution workflow revision.
  • .github/workflows/MainDistributionPipeline.yml#L37-L37: use the commit hash for the intended code-quality workflow revision.

Based on learnings, CI dependencies that serve as fixed, reproducible inputs should use immutable commit hashes.

Sources: Learnings, Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: dbbd7868-da0d-4d9d-8697-6d8c603e884f
📥 Commits

Reviewing files that changed from the base of the PR and between c6b6bcd and e239e02.

📒 Files selected for processing: 25
  • .gitattributes
  • .github/workflows/MainDistributionPipeline.yml
  • .gitignore
  • CMakeLists.txt
  • Makefile
  • cmake/patch_fastlanes.cmake
  • docs/branch-consolidation.md
  • docs/development.md
  • duckdb
  • extension-ci-tools
  • patches/fastlanes-branch-consolidation.patch
  • patches/fastlanes-build.patch
  • src/include/reader/fls_multi_file_info.hpp
  • src/include/reader/fls_reader.hpp
  • src/include/reader/materializer/context.hpp
  • src/include/reader/materializer/fls_kernel.hpp
  • src/include/reader/materializer/fls_type_resolver.hpp
  • src/include/reader/materializer/kernels/boolean_kernel.hpp
  • src/include/reader/materializer/kernels/dictionary_kernel.hpp
  • src/include/reader/materializer/kernels/fsst_dict_kernel.hpp
  • src/reader/fls_multi_file_info.cpp
  • src/reader/fls_reader.cpp
  • test/README.md
  • test/sql/parallel_roundtrip.test
  • test/sql/simple.test

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

coderabbitai[bot]

This comment was marked as resolved.

Repository owner deleted a comment from coderabbitai Bot Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants