package analysis
- Alphabetic
- Public
- All
Value Members
-
object
DetectAmbiguousSelfJoin extends Rule[LogicalPlan]
Detects ambiguous self-joins, so that we can fail the query instead of returning confusing results.
Detects ambiguous self-joins, so that we can fail the query instead of returning confusing results.
Dataset column reference is simply an AttributeReference that is returned by
Dataset#col
. Most of time we don't need to do anything special, as AttributeReference can point to the column precisely. However, in case of self-join, the analyzer generates AttributeReference with new expr IDs for the right side plan of the join. If the Dataset column reference points to a column in the right side plan of a self-join, users will get unexpected result because the column reference can't match the newly generated AttributeReference.Note that, this rule removes all the Dataset id related metadata from
AttributeReference
, so that they don't exist after analyzer.