-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: support HTTP DuckDB queries in WASM notebooks #9480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
peter-gy
wants to merge
22
commits into
marimo-team:main
Choose a base branch
from
peter-gy:ptr/duckdb-wasm-patch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
dca790a
refactor: share WASM fetch and replacement patch utilities
peter-gy b6351cf
feat: add DuckDB WASM remote-source fallbacks
peter-gy 9f03093
feat: wire DuckDB WASM SQL through marimo
peter-gy 3549988
test: cover DuckDB WASM parity and runtime integration
peter-gy c0218b4
refactor: clarify DuckDB WASM patch specs
peter-gy 2fc69d0
docs: clarify def details
peter-gy 3283670
fix: preserve DuckDB WASM remote reader semantics
peter-gy a78037e
fix: tighten DuckDB WASM SQL patch wrapper
peter-gy a3ae692
fix: handle nullable DuckDB SQL summary relations
peter-gy 31e3e19
fix: skip DuckDB catalog lookup for local WASM SQL
peter-gy e4f4bfb
fix: avoid stale DuckDB WASM view rewrites
peter-gy a5be229
fix: narrow DuckDB WASM package preloading
peter-gy 2e77fbf
refactor: keep DuckDB SQL wrapper contract non-optional
peter-gy 32dc803
test: clean up views
peter-gy 6fe3e01
fix: preserve DuckDB catalog semantics in WASM rewrites
peter-gy 1665f99
fix: broaden DuckDB WASM package preloading
peter-gy 942e191
fix: address DuckDB WASM review comments
peter-gy 7224e5a
fix: support older sqlglot URL scan metadata
peter-gy e50c8b5
docs: comment adjustments
peter-gy c82765d
refactor: reduce WASM patch helper duplication
peter-gy 43a4ddd
refactor: simplify DuckDB WASM source resolution
peter-gy 7110d6a
test: compact DuckDB WASM regression coverage
peter-gy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* Copyright 2026 Marimo. All rights reserved. */ | ||
|
|
||
| import { describe, expect, it } from "vitest"; | ||
| import { shouldLoadDuckDBPackages } from "../utils"; | ||
|
|
||
| describe("shouldLoadDuckDBPackages", () => { | ||
| it("loads for mo.sql", () => { | ||
| expect(shouldLoadDuckDBPackages('df = mo.sql("SELECT 1")')).toBe(true); | ||
| }); | ||
|
|
||
| it("loads for duckdb imports and usage", () => { | ||
| expect(shouldLoadDuckDBPackages("import duckdb")).toBe(true); | ||
| expect(shouldLoadDuckDBPackages("from duckdb import sql")).toBe(true); | ||
| expect(shouldLoadDuckDBPackages("import pandas, duckdb")).toBe(true); | ||
| expect(shouldLoadDuckDBPackages("rows = duckdb.sql('SELECT 1')")).toBe( | ||
| true, | ||
| ); | ||
| }); | ||
|
|
||
| it("loads when package discovery found duckdb", () => { | ||
| expect( | ||
| shouldLoadDuckDBPackages("print('hello')", new Set(["duckdb"])), | ||
| ).toBe(true); | ||
| }); | ||
|
|
||
| it("does not load for incidental duckdb text", () => { | ||
| expect(shouldLoadDuckDBPackages("name = 'duckdb'")).toBe(false); | ||
| expect(shouldLoadDuckDBPackages("# import duckdb")).toBe(false); | ||
| }); | ||
|
|
||
| it("does not load without mo.sql, duckdb usage, or discovery", () => { | ||
| expect(shouldLoadDuckDBPackages("print('hello')")).toBe(false); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.