Skip to content

refactor: rename direction to address, inline the last SQL files - #46

Merged
jonaas-dev merged 1 commit into
mainfrom
refactor/schema-naming-and-query-loading
Sep 6, 2026
Merged

refactor: rename direction to address, inline the last SQL files#46
jonaas-dev merged 1 commit into
mainfrom
refactor/schema-naming-and-query-loading

Conversation

@jonaas-dev

Copy link
Copy Markdown
Owner

Three leftovers from when the project had a single benchmark. All cosmetic, but all of them things a reader hits before reaching any logic.

Why it stood out
direction VARCHAR(200)address A literal translation of "dirección". In English direction means heading, not domicile. The schema is the first file most people open.
queries/query_1.sql, query_2.sql → inline Generically named, and loaded only by select_star while the other three benchmarks declared their SQL inline. The inconsistency had no reason behind it; for one-line queries the file indirection buys nothing. Directory removed along with QUERIES_DIR and the _get_query helper.
QUERY_1_NAME / QUERY_2_NAMELABEL_* in select_star.py One benchmark's display labels sitting in global config. They now live next to the queries they name.

No behaviour change.

Verification

  • ruff check . clean, 54 tests (was 55 — test_queries_dir tested a directory that no longer exists), 93% coverage.
  • The integration NULL check now covers address, so the rename is guarded rather than assumed. Watched it fail with UndefinedColumn before making the change.
  • Full compose stack rebuilt from scratch: all four benchmarks return 200 with a chart, and the seeded schema reports the renamed column.

🤖 Generated with Claude Code

https://claude.ai/code/session_014abw4B6YUf54giaEyPQpbo

Three leftovers from when the project had a single benchmark, all of them
things a reader notices before they read any logic.

- `direction VARCHAR(200)` was a literal translation of "direccion". In
  English `direction` means heading, not domicile. The schema is the first
  file most people open, so the column is now `address`.
- `queries/query_1.sql` and `query_2.sql` were generically named and loaded
  only by select_star, while the other three benchmarks declared their SQL
  inline. The inconsistency had no reason behind it — for one-line queries
  the file indirection buys nothing, so all four now read the same way and
  the directory is gone along with QUERIES_DIR and the _get_query helper.
- `QUERY_1_NAME` and `QUERY_2_NAME` put one benchmark's display labels in
  global config. They now live in select_star.py next to the queries they
  name, as LABEL_ALL_COLUMNS and LABEL_THREE_COLUMNS.

No behaviour change. Verified end to end against a fresh compose stack: all
four benchmarks return 200 with a chart, and the seeded schema reports the
renamed column.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014abw4B6YUf54giaEyPQpbo
@jonaas-dev
jonaas-dev merged commit baf7095 into main Sep 6, 2026
1 check passed
@jonaas-dev
jonaas-dev deleted the refactor/schema-naming-and-query-loading branch September 6, 2026 18:19
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