Skip to content

[codex] resolve query tables by SQL name - #119

Merged
philcunliffe merged 1 commit into
masterfrom
codex/query-table-resolution
May 16, 2026
Merged

[codex] resolve query tables by SQL name#119
philcunliffe merged 1 commit into
masterfrom
codex/query-table-resolution

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Summary

This PR updates Collectivus query SQL so table names are resolved from the parsed Squirreling AST instead of being limited to a prebuilt fixed table map. SQL can now inject only the referenced built-in or collected tables, including original quoted collection names such as "random-log".

It also makes --date repeatable for multi-day partition unions and teaches ctvs query schema <table> to resolve schemas for both built-in tables and ctvs collect tables.

Impact

  • Query two or more date partitions at once, for example two days of proxy_messages.
  • Use one SQL statement across multiple Collectivus logical tables such as proxy_messages, logs, and gascity_messages.
  • Query collected JSONL tables by normalized name or original quoted collection name.
  • Install updated collectivus-query skill guidance through ctvs skills install.

Validation

  • npm test -- test/cli/query.test.js test/cli/collect.test.js test/cli/collect.glob.test.js test/skills/install.test.js test/skills/install_bundle.test.js
  • npm run typecheck
  • npm run lint (passes with existing warnings)
  • Installed local skills with node bin/cli.js skills install --client all --force
  • Smoke-tested real multi-day proxy_messages queries and multi-table UNION ALL queries over built-ins
  • Smoke-tested isolated collected-table SQL with random_log plus quoted "other-log"

@philcunliffe
philcunliffe marked this pull request as ready for review May 16, 2026 02:52
@philcunliffe
philcunliffe merged commit 48ecb4b into master May 16, 2026
7 checks passed
@philcunliffe
philcunliffe deleted the codex/query-table-resolution branch May 16, 2026 02:53
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.

1 participant