Vega-Lite writer: build_discrete_facet_label_expr is unreachable

Open Beginner friendly
#517 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
backend

Research direction

Start in src/writer/vegalite/mod.rs, reading apply_facet_label_renaming around line 744 and build_discrete_facet_label_expr around line 964. Trace the index_map and binned-scale conditions to confirm the branch is unreachable. Done means the dead path is removed or otherwise resolved without changing reachable facet-label behavior, with the relevant test suite passing.

Written by the indexing model from the issue text.

Description

writer

build_discrete_facet_label_expr (src/writer/vegalite/mod.rs:964) is reached from apply_facet_label_renaming only when index_map is empty and the scale is not binned. Facet ordering converts every discrete facet column to integer sort indices and routes it through build_indexed_facet_label_expr instead, so that combination no longer occurs — the branch at src/writer/vegalite/mod.rs:744 looks dead.

Dominant language
Rust
Stars
554
Forks
30
Avg merge
17h 27m
Merged PRs (30d)
8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/ggsql

All issues in posit-dev/ggsql

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.