A data-mapped scalar aesthetic on boxplot / violin is dropped by the stat, then fails validation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 554
- Forks
- 30
- Avg merge
- 17h 27m
- Merged PRs (30d)
- 8
Description
Summary
The boxplot / violin stat drops non-grouping aesthetic columns from its output, so a mapped scalar aesthetic fails validation after the stat has run, with an error that names an internal column list. Grouping aesthetics (fill, stroke) survive because they partition the summary; scalar ones (linewidth, size, linetype, opacity) do not.
Reproduction
VISUALISE species AS x, body_mass AS y, bill_len AS linewidth FROM ggsql:penguins
DRAW boxplot
Failed to generate Vega-Lite output: Validation error: Column 'linewidth' referenced in
aesthetic 'linewidth' (layer 1 (global data)) does not exist.
Available columns: __ggsql_aes_pos1__, __ggsql_aes_type__, __ggsql_aes_pos2__, and __ggsql_aes_pos2end__
Control — the same query with sex AS fill renders fine.
Expected
Either carry a scalar aesthetic through the stat (it is constant within a group whenever it is part of the grouping, and otherwise needs a documented aggregate), or fail with an error that names the actual constraint ("aesthetic linewidth cannot be mapped on a boxplot layer") rather than leaking __ggsql_aes_* columns to the user.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the boxplot and violin stat, then trace how scalar aesthetics and grouping aesthetics are passed into post-stat validation. Reproduce the penguins query and compare it with the sex AS fill control. Done means scalar aesthetics no longer fail after the stat, or the error clearly states the supported constraint without exposing internal columns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100