I think we can just convert it to a column sql node. Just like other identifier. Because the concept of outer reference is a logical plan concept, we can ignore the type of a OuterReferenceColumn which produced by a field resolving.
What changes are included in this PR?
Convert OuterReferenceColumn to a Column SQL node.
Which issue does this PR close?
Closes #10523
Rationale for this change
IMO,
OuterReferenceColumn
is a column can be resolved to an outside field of the current plan. Typically, it's produced fromidentifier
orcompound_identifier
. https://github.com/apache/datafusion/blob/7535d93fa631f0fc42ca1521bc257ca20480b246/datafusion/sql/src/expr/identifier.rs#L64-L69I think we can just convert it to a
column
sql node. Just like other identifier. Because the concept ofouter reference
is a logical plan concept, we can ignore the type of aOuterReferenceColumn
which produced by a field resolving.What changes are included in this PR?
Convert
OuterReferenceColumn
to a Column SQL node.Are these changes tested?
Yes
Are there any user-facing changes?
No