Skip to content

Preserve recursive CTE work-table identifier case - #163

Merged
osipovartem merged 1 commit into
df55-physical-udf-instancefrom
fix/df55-recursive-cte-case
Oct 23, 2026
Merged

osipovartem merged 1 commit into
df55-physical-udf-instancefrom
fix/df55-recursive-cte-case

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Problem

With uppercase_unquoted_identifiers=true, recursive CTE planning reparses an already-normalized work-table name via TableReference::from(String), lowercasing its qualifier. References such as current_layer.component_id then fail. The same reparse occurs when decoding recursive work-table scans from protobuf, including quoted mixed-case names.

Change

Use TableReference::bare at both scan construction points to preserve the normalized or quoted name. Add SQL planner coverage and executable protobuf round-trip coverage for uppercase unquoted and quoted mixed-case CTEs. The default identifier mode remains unchanged.

Verification

  • cargo +1.97.0 test -p datafusion-sql --test sql_integration recursive_cte_preserves_normalized_and_quoted_names
  • cargo +1.97.0 test -p datafusion-proto --test proto_integration (234 passed)
  • cargo +1.97.0 clippy -p datafusion-proto -p datafusion-sql --all-targets
  • cargo +1.97.0 fmt --all --check
  • Independent read-only review: approved, no blocking correctness, performance, API, or test gaps.

@osipovartem
osipovartem merged commit a0493b6 into df55-physical-udf-instance Oct 23, 2026
15 of 19 checks passed
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