Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 32a0930

Browse files
mwiewiorclaude
andauthored
feat: Upgrade DataFusion to 50.3.0 (#66)
* Adding dev containers * Bumping to DataFusion 50.3.0 * fix: Add missing low_memory parameter to reset_state() After merging master (aa10539) which introduced the low_memory feature, the reset_state() method needed to be updated to pass self.low_memory when calling try_new(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Archiving openspec spec * Change to self-hosted runners --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent aa10539 commit 32a0930

24 files changed

Lines changed: 2482 additions & 361 deletions

File tree

.claude/commands/openspec/apply.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: OpenSpec: Apply
3+
description: Implement an approved OpenSpec change and keep tasks in sync.
4+
category: OpenSpec
5+
tags: [openspec, apply]
6+
---
7+
<!-- OPENSPEC:START -->
8+
**Guardrails**
9+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10+
- Keep changes tightly scoped to the requested outcome.
11+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
12+
13+
**Steps**
14+
Track these steps as TODOs and complete them one by one.
15+
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
16+
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
17+
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
18+
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
19+
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
20+
21+
**Reference**
22+
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
23+
<!-- OPENSPEC:END -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: OpenSpec: Archive
3+
description: Archive a deployed OpenSpec change and update specs.
4+
category: OpenSpec
5+
tags: [openspec, archive]
6+
---
7+
<!-- OPENSPEC:START -->
8+
**Guardrails**
9+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10+
- Keep changes tightly scoped to the requested outcome.
11+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
12+
13+
**Steps**
14+
1. Determine the change ID to archive:
15+
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
16+
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
17+
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
18+
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
19+
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
20+
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
21+
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
22+
5. Validate with `openspec validate --strict` and inspect with `openspec show <id>` if anything looks off.
23+
24+
**Reference**
25+
- Use `openspec list` to confirm change IDs before archiving.
26+
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
27+
<!-- OPENSPEC:END -->
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: OpenSpec: Proposal
3+
description: Scaffold a new OpenSpec change and validate strictly.
4+
category: OpenSpec
5+
tags: [openspec, change]
6+
---
7+
<!-- OPENSPEC:START -->
8+
**Guardrails**
9+
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10+
- Keep changes tightly scoped to the requested outcome.
11+
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
12+
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
13+
14+
**Steps**
15+
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
16+
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
17+
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
18+
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
19+
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
20+
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
21+
7. Validate with `openspec validate <id> --strict` and resolve every issue before sharing the proposal.
22+
23+
**Reference**
24+
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
25+
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
26+
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
27+
<!-- OPENSPEC:END -->

.claude/settings.local.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebFetch(domain:github.com)",
5+
"WebFetch(domain:ml-explore.github.io)",
6+
"Bash(cargo check:*)",
7+
"WebFetch(domain:docs.rs)",
8+
"Bash(cargo doc:*)",
9+
"Bash(cargo test:*)",
10+
"Bash(cargo bench:*)",
11+
"Bash(timeout 120s cargo bench --bench quick_optimization_test)",
12+
"Bash(git add src/physical_planner/joins/interval_join.rs Cargo.toml benches/datafusion_optimized_benchmark.rs)",
13+
"Bash(grep:*)",
14+
"Bash(sed:*)",
15+
"Bash(git commit:*)",
16+
"Bash(git cherry-pick:*)",
17+
"Bash(git add:*)",
18+
"Bash(git reset:*)",
19+
"Bash(git checkout:*)",
20+
"Bash(git unstage:*)",
21+
"Bash(pre-commit run:*)",
22+
"Bash(python3:*)",
23+
"Bash(git log:*)"
24+
],
25+
"deny": [],
26+
"ask": []
27+
}
28+
}

.devcontainer/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM mcr.microsoft.com/devcontainers/rust:2-1-bullseye
2+
3+
ARG CLAUDE_CODE_VERSION=latest
4+
5+
USER root
6+
7+
# Install Node.js 24.x (latest LTS) from NodeSource
8+
RUN apt-get update && \
9+
apt-get install -y ca-certificates curl gnupg && \
10+
mkdir -p /etc/apt/keyrings && \
11+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
12+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
13+
apt-get update && \
14+
apt-get install -y nodejs && \
15+
apt-get clean && \
16+
rm -rf /var/lib/apt/lists/*
17+
18+
RUN npm install -g @anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}
19+
RUN npm install -g @fission-ai/openspec@latest
20+
USER vscode

.devcontainer/devcontainer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "Rust",
5+
"dockerFile": "Dockerfile",
6+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
7+
// "image": "mcr.microsoft.com/devcontainers/rust:2-1-bullseye",
8+
9+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
10+
// "mounts": [
11+
// {
12+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
13+
// "target": "/usr/local/cargo",
14+
// "type": "volume"
15+
// }
16+
// ]
17+
18+
// Features to add to the dev container. More info: https://containers.dev/features.
19+
// "features": {},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Use 'postCreateCommand' to run commands after the container is created.
25+
// "postCreateCommand": "rustc --version",
26+
27+
// Configure tool-specific properties.
28+
"customizations" : {
29+
"jetbrains" : {
30+
"settings": {
31+
"com.intellij.database:app:DatabaseSettings.enable-local-filter-by-default": false,
32+
"com.intellij:app:BaseRefactoringSettings.safe_delete_when_delete": false,
33+
"com.intellij:app:BaseRefactoringSettings.rename_search_in_comments_for_file": false,
34+
"com.intellij:app:BaseRefactoringSettings.rename_search_for_references_for_file": false,
35+
"com.intellij:app:BaseRefactoringSettings.rename_search_for_references_for_directory": false,
36+
"com.intellij:app:BaseRefactoringSettings.move_search_for_references_for_file": false
37+
},
38+
"backend" : "RustRover"
39+
}
40+
},
41+
42+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
43+
// "remoteUser": "root"
44+
}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
jobs:
1717
build-and-test:
1818
name: build and test
19-
runs-on: [self-hosted, Linux, openstack-ii]
19+
runs-on: [ubuntu-latest]
2020
steps:
2121
- uses: actions/checkout@v4
2222
- name: Install Rust
@@ -37,7 +37,7 @@ jobs:
3737

3838
fmt:
3939
name: fmt
40-
runs-on: [self-hosted, Linux, openstack-ii]
40+
runs-on: [ubuntu-latest]
4141
steps:
4242
- uses: actions/checkout@v4
4343
- name: Install Rust

.pre-commit-config.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
6-
stages: [commit]
6+
stages: [pre-commit]
77
- id: check-json
8-
stages: [commit]
8+
stages: [pre-commit]
9+
exclude: '^\.devcontainer/devcontainer\.json$'
910
- id: check-toml
10-
stages: [commit]
11+
stages: [pre-commit]
1112
- id: check-merge-conflict
12-
stages: [commit]
13+
stages: [pre-commit]
1314
- id: check-case-conflict
14-
stages: [commit]
15+
stages: [pre-commit]
1516
- id: detect-private-key
16-
stages: [commit]
17+
stages: [pre-commit]
1718

1819
- repo: https://github.com/doublify/pre-commit-rust
1920
rev: v1.0

AGENTS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!-- OPENSPEC:START -->
2+
# OpenSpec Instructions
3+
4+
These instructions are for AI assistants working in this project.
5+
6+
Always open `@/openspec/AGENTS.md` when the request:
7+
- Mentions planning or proposals (words like proposal, spec, change, plan)
8+
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
9+
- Sounds ambiguous and you need the authoritative spec before coding
10+
11+
Use `@/openspec/AGENTS.md` to learn:
12+
- How to create and apply change proposals
13+
- Spec format and conventions
14+
- Project structure and guidelines
15+
16+
Keep this managed block so 'openspec update' can refresh the instructions.
17+
18+
<!-- OPENSPEC:END -->
19+
20+
# Repository Guidelines
21+
22+
## Project Structure & Module Organization
23+
- Workspace: Rust 2021, crates in `sequila/`.
24+
- Core library: `sequila/sequila-core` — DataFusion extensions, physical planner, and interval-join optimization.
25+
- CLI: `sequila/sequila-cli` — REPL and file execution for SQL.
26+
- Tests: unit/integration under `sequila/sequila-core/tests` and crate-local tests; benches in `sequila/sequila-core/benches`.
27+
- Utilities/data: `queries/` for sample SQL, `testing/data/` for local datasets, `bin/env.sh` for env helpers.
28+
29+
## Build, Test, and Development Commands
30+
- Build: `cargo build` (release: `cargo build --release`).
31+
- Run CLI: `RUST_LOG=info cargo run -p sequila-cli -- --file queries/q1-coitrees.sql`.
32+
- REPL: `RUST_LOG=info cargo run -p sequila-cli`.
33+
- Tests: `cargo test --workspace` (async tests use Tokio).
34+
- Benchmarks: `RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench databio_benchmark -- --quick`.
35+
36+
## Coding Style & Naming Conventions
37+
- Formatter: rustfmt via pre-commit. Run `cargo fmt --all` before pushing.
38+
- Lints: `cargo check` runs in pre-commit; keep builds warning-free.
39+
- Naming: crates/modules `snake_case`, types/enums `PascalCase`, functions/vars `snake_case`, constants `SCREAMING_SNAKE_CASE`.
40+
- Indentation: 4 spaces; avoid long lines unless readability benefits.
41+
42+
## Testing Guidelines
43+
- Frameworks: Rust built-in tests, `rstest` for parametrization, `tokio::test` for async.
44+
- Locations: unit tests inline in `src/`; integration tests in `sequila-core/tests/`.
45+
- Conventions: name tests descriptively (e.g., `interval_rule_eq`); include edge cases for join predicates and config options.
46+
- Coverage: no strict target; add tests for new features and bug fixes.
47+
48+
## Commit & Pull Request Guidelines
49+
- Commits: imperative mood, concise title; optionally use prefixes (`feat:`, `fix:`, `perf:`). Reference issues/PRs where relevant.
50+
- PRs: include scope/intent, key changes, how to test (commands/queries), and performance notes if applicable. Add screenshots/log snippets when helpful.
51+
- Keep diffs focused; update README or examples when behavior changes.
52+
53+
## Architecture & Configuration Tips
54+
- Core idea: replace/augment DataFusion planning with `SeQuiLaQueryPlanner` and an interval-join physical optimization rule.
55+
- Useful SQL settings:
56+
- `SET sequila.prefer_interval_join TO true;`
57+
- `SET sequila.interval_join_algorithm TO coitrees;`
58+
- `SET datafusion.optimizer.repartition_joins TO false;`
59+
- Bench data: export `BENCH_DATA_ROOT` to point at local datasets.
60+

CLAUDE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- OPENSPEC:START -->
2+
# OpenSpec Instructions
3+
4+
These instructions are for AI assistants working in this project.
5+
6+
Always open `@/openspec/AGENTS.md` when the request:
7+
- Mentions planning or proposals (words like proposal, spec, change, plan)
8+
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
9+
- Sounds ambiguous and you need the authoritative spec before coding
10+
11+
Use `@/openspec/AGENTS.md` to learn:
12+
- How to create and apply change proposals
13+
- Spec format and conventions
14+
- Project structure and guidelines
15+
16+
Keep this managed block so 'openspec update' can refresh the instructions.
17+
18+
<!-- OPENSPEC:END -->

0 commit comments

Comments
 (0)