Repository navigation
Commit 858d3bf
authored
minor: document EquivalenceProperties::project (#24063)
## Rationale for this change
`EquivalenceProperties::project` is a central, widely-called method, but
its doc comment was a single line ("Projects the equivalences within
according to `mapping` and `output_schema`"). That does not convey that
it carries orderings, the equivalence group, and constraints through the
mapping, nor the key subtlety that an ordering is preserved only through
an order-preserving expression (`SortProperties`). This tripped me up
while reasoning about why an ordering survived a projection containing
computed expressions, so I expanded the docs.
## What changes are included in this PR?
Documentation only. Expands the rustdoc on
`EquivalenceProperties::project` to describe:
- it carries orderings, the equivalence group, and constraints through
the mapping (not just a column-index remap);
- orderings survive only through order-preserving expressions,
determined from each expression's `SortProperties` (e.g. preserved
through `c + 1`, dropped through `abs(c)`; compound orderings like `a +
b` map to `a_new + b_new`);
- expressions/orderings not representable in `output_schema` are
dropped.
## Are these changes tested?
No code change. `cargo doc -p datafusion-physical-expr --no-deps` builds
cleanly with `RUSTDOCFLAGS="-D warnings"`.
## Are there any user-facing changes?
Documentation only.1 parent ceaef16 commit 858d3bf
1 file changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1165 | 1165 | | |
1166 | 1166 | | |
1167 | 1167 | | |
1168 | | - | |
1169 | | - | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1170 | 1189 | | |
1171 | 1190 | | |
1172 | 1191 | | |
| |||
0 commit comments