Skip to content

Keep source column references as Arel attributes - #589

Open
nertzy wants to merge 1 commit into
arel/projectionsfrom
arel/source-columns
Open

Keep source column references as Arel attributes#589
nertzy wants to merge 1 commit into
arel/projectionsfrom
arel/source-columns

Conversation

@nertzy

@nertzy nertzy commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Keep original column references as Arel attributes instead of rendering qualified names and parsing them back into SQL fragments for association projections.

A column's physical source remains distinct from its normalized search expression. Foreign columns likewise distinguish the original association table from the derived search subquery. Existing full_name and to_sql String interfaces remain available.

Aggregate inputs still skip NULLs rather than coalescing them early. Public behavior coverage checks physical columns shadowed by model attribute aliases and trusted JSON expressions evaluated before aggregation.

Builds on #588. Quoted-value nodes and expression-boundary cleanup will follow separately.

Use physical source attributes directly in association projections instead
of interpolating qualified names and wrapping rendered SQL. Preserve the
separate normalized and foreign derived-alias expressions, as well as the
existing String rendering interfaces.

Cover model alias collisions and trusted JSON source expressions through
public behavior.
@nertzy
nertzy force-pushed the arel/source-columns branch from e7b39c6 to 613b723 Compare September 7, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant