Skip to content

rust: validate survivorship group tokens before generating SQL #975

Closed

Description

@athvin

Evidence

A group token such as full-name can pass config create and publish checks: the group validator checks membership and chains but no identifier grammar. The golden SQL generator inserts that token unquoted into aliases and CTE names such as attr_full-name. An independent read-only check confirmed DuckDB rejects the resulting SQL with a parser error. Both person and Account lineage generators use the token. Source.

Change

Validate group tokens as safe SQL identifier fragments at config create/publish and retain a defensive generator check. Keep valid existing group tokens and output unchanged.

Done when

  • A group token containing a hyphen, whitespace, or quote is refused before publish with a useful field error.
  • The generator returns an error rather than emitting malformed SQL if called directly with such a token.
  • Valid person and Account group tokens pass generated-SQL planning or execution tests.
  • A regression test demonstrates the failing input was accepted before the fix.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions