Skip to content

Support SELECT wildcard RENAME modifiers - #80

Merged
osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-wildcard-rename
Sep 12, 2026
Merged

osipovartem merged 1 commit into
embucket-sync-df55.0.0from
snowflake-wildcard-rename

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Summary

  • implement Snowflake-style SELECT * RENAME for unqualified and qualified wildcards
  • apply wildcard modifiers in semantic order: filter, replace, then rename
  • validate missing, duplicate, and ambiguous REPLACE/RENAME targets
  • normalize rename and replace identifiers through the SQL planner
  • align the no-SQL sqlparser shim and stale lockfile revision with the configured parser revision

Performance

This is planning-only work. Wildcard output indices are built once in an O(columns) hash map and each modifier target is resolved in O(1) average time. No per-row conversion or execution operator is added; this also removes the previous O(columns x replacements) scan used by REPLACE.

Validation

  • cargo test -p datafusion-sql --test sql_integration (599 passed)
  • cargo test -p datafusion-expr --lib (249 passed)
  • cargo check -p datafusion-expr --no-default-features
  • cargo clippy -p datafusion-expr -p datafusion-sql --all-targets -- -D warnings

Coverage includes single/multiple rename, EXCLUDE + REPLACE + RENAME, qualified wildcards, quoted identifiers, and missing/duplicate/ambiguous targets.

@osipovartem
osipovartem merged commit 58daa2e into embucket-sync-df55.0.0 Sep 12, 2026
18 of 20 checks passed
@osipovartem
osipovartem deleted the snowflake-wildcard-rename branch September 12, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant