Repository navigation
Conversation
zzylol
force-pushed
the
stack/editor-sql
branch
from
October 5, 2026 03:07
ac0da53 to
ab155b7
Compare
zzylol
changed the base branch from
stack/509-viewer-stages
to
stack/fix-sql-count-sketches
October 5, 2026 03:08
This was referenced Oct 5, 2026
stage_pipeline takes repeatable --sql and --table '<json>' (compact schema: name, columns with type and nullable, optional time_index); a run is one language. Example 2's flows table goes through the same catalog code. server.py validates and forwards SQL requests, and the query editor gets a PromQL/SQL switch with a tables box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
stack/fix-sql-count-sketches
branch
from
October 5, 2026 06:21
1721efd to
be12a6b
Compare
zzylol
force-pushed
the
stack/editor-sql
branch
from
October 5, 2026 06:21
ab155b7 to
007aed3
Compare
This was referenced Oct 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stack: #574 → #620 → #618 → #621 → #627 → #625 → #628 → #632 → #634 → #616 → #617 → #622 → #624 → #629 → #630 → #631 → #633 → #635 → #636 → #637
Problem
The query editor and
stage_pipelineonly planned PromQL; SQL needed a catalog, and the only SQL workload was Example 2's hard-wiredflowstable (Q54).Changes
stage_pipeline: repeatable--sql <query>and--table '<json>'({"name", "columns": [{"name", "type": timestamp|utf8|string|float64|double|int64|bigint, "nullable" (default true)}], "time_index"?}; same semantics as dag_export's--table-schema, no default tables). A run is one language: mixing--promqland--sqlis an error, as is--tablewithout--sql; malformed tables, duplicate names and out-of-rangetime_indexare errors, not panics.--epsilon/--delta/--interval-msapply as for PromQL. Example 2'sflowsnow goes through the same catalog code (its fixture output is unchanged). Header comment and USAGE updated.server.py:plan_argsacceptslanguage(promql|sql) andtables; validates 1–20 queries, ≤50 tables, 1–500 columns, non-empty and unique names, known types,time_index; passes--table <json>/--sql.flows, example querySELECT COUNT(DISTINCT src_ip) FROM flows; existing CSS tokens.--tableJSON made it too long).Test plan
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warningscargo test -p asap-devtools: 47 passed (new: SQL over a--tablewrites a valid document with language "sql"; mixing languages,--tablewithout--sql, bad table JSON, duplicate tables and undeclared tables error)cargo test --workspace: 1673 passed, 0 failed, 21 ignored (re-run after the rebase on main d4869a7)python3 -m unittest test_viewerwith py_mini_racer): 26 passed, none skipped (new ServerTests for SQL args and validation)server.py --port 8790 --skip-build, POSTed a SQL request overflows→ 200 with a validasap-stage-pipeline/v1document (language "sql", 5 physical candidates, P1 selected); a bad column type → 400 with a clear message🤖 Generated with Claude Code