Skip to content

Support kebab-case Hyper plan JSON keys (backward compatible)#138

Merged
PerFuchs merged 2 commits into
mainfrom
worktree-kebab-case-plan-keys
Jul 23, 2026
Merged

Support kebab-case Hyper plan JSON keys (backward compatible)#138
PerFuchs merged 2 commits into
mainfrom
worktree-kebab-case-plan-keys

Conversation

@PerFuchs

@PerFuchs PerFuchs commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Hyper PR hyper-db#13364 renamed the plan JSON property keys from camelCase to kebab-case (e.g. operatorIdoperator-id, debugNamedebug-name, valueForComparisonvalue-for-comparison). Only keys changed — enum/tag values (operator tags, join types, window/aggregate function names) keep their camelCase spelling. This PR adds support for the new casing while keeping backward compatibility with the old casing.

The Hyper loader is largely key-agnostic, but it reads three renamed keys by literal name; both spellings are now accepted:

  • operator-id / operatorId (operator id map + crosslink resolution)
  • debug-name / debugName (display name + always-shown property)
  • value-for-comparison / valueForComparison (fixed child ordering)

Example plans are regenerated in the new kebab-case format, matching what dump-plans.py now emits against a Hyper build containing hyper-db#13364, so the default examples reflect current output. Keys are renamed using the exact mapping from hyper-db#13364 (137 keys, including acronym cases such as resultIUsresult-ius and filterJoinIUfilter-join-iu); keys that #13364 left untouched (e.g. distinctValues, allowTrustedCasts) are kept as-is. tablescan-legacy-camelcase.plan.json is kept as the single old-syntax example to exercise the backward-compatibility path.

Hyper PR #13364 (hyper-db) renamed plan JSON property keys from camelCase
to kebab-case (e.g. operatorId -> operator-id, debugName -> debug-name,
valueForComparison -> value-for-comparison). Only keys changed; enum/tag
values (operator tags, join types, ...) keep their camelCase spelling.

The Hyper loader is largely key-agnostic, but it reads three renamed keys
by literal name. Accept both spellings so plans produced before and after
the cutover both render:

- operatorId / operator-id (operator id map + crosslink resolution)
- debugName / debug-name   (display name + always-shown property)
- valueForComparison / value-for-comparison (fixed child ordering)

Other referenced keys (analyze, sqlpos, cpu-cycles, tuple-count, and the
crosslink source keys magic/builder/input/source) were not renamed by the
PR and are unchanged. Adds a kebab-case tablescan example plan.
@PerFuchs
PerFuchs marked this pull request as ready for review July 16, 2026 11:51
Comment thread standalone-app/examples/hyper/tablescan-kebab-case.plan.json Outdated
Address review feedback: rather than adding a single kebab-case example on
top of otherwise-camelCase plans, regenerate all Hyper example plans in the
new kebab-case key format (as `dump-plans.py` would now emit against a Hyper
build containing hyper-db#13364), and keep exactly one example in the old
camelCase syntax to exercise the backward-compatibility path.

- Rename plan JSON property keys camelCase -> kebab-case across all Hyper
  examples, using the exact key mapping from hyper-db#13364 (137 keys, incl.
  acronym cases like resultIUs -> result-ius, filterJoinIU -> filter-join-iu).
  Only keys change; enum/tag values keep their camelCase spelling. Keys that
  #13364 left untouched (e.g. distinctValues, allowTrustedCasts) are kept as-is.
- Remove the now-redundant tablescan-kebab-case.plan.json (tablescan.plan.json
  is itself kebab-case now).
- Add tablescan-legacy-camelcase.plan.json as the single old-syntax example.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PerFuchs
PerFuchs merged commit 812e68a into main Jul 23, 2026
5 checks passed
@PerFuchs
PerFuchs deleted the worktree-kebab-case-plan-keys branch July 23, 2026 10:28
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