File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,25 @@ impl Column {
83
83
}
84
84
}
85
85
86
- // Internal implementation of normalize
86
+ /// Qualify column if not done yet.
87
+ ///
88
+ /// If this column already has a [relation](Self::relation), it will be returned as is and the given parameters are
89
+ /// ignored. Otherwise this will search through the given schemas to find the column. This will use the first schema
90
+ /// that matches.
91
+ ///
92
+ /// A schema matches if there is a single column that -- when unqualified -- matches this column. There is an
93
+ /// exception for `USING` statements, see below.
94
+ ///
95
+ /// # Using columns
96
+ /// Take the following SQL statement:
97
+ ///
98
+ /// ```sql
99
+ /// SELECT id FROM t1 JOIN t2 USING(id)
100
+ /// ```
101
+ ///
102
+ /// In this case, both `t1.id` and `t2.id` will match unqualified column `id`. To express this possibility, use
103
+ /// `using_columns`. Each entry in this array is a set of columns that are bound together via a `USING` clause. So
104
+ /// in this example this would be `[{t1.id, t2.id}]`.
87
105
pub fn normalize_with_schemas (
88
106
self ,
89
107
schemas : & [ & Arc < DFSchema > ] ,
You can’t perform that action at this time.
0 commit comments