| 1127 | ) -> Optional[ExternallyTraversible]: ... |
| 1128 | |
| 1129 | def _corresponding_column( |
| 1130 | self, col, require_embedded, _seen=util.EMPTY_SET |
| 1131 | ): |
| 1132 | newcol = self.selectable.corresponding_column( |
| 1133 | col, require_embedded=require_embedded |
| 1134 | ) |
| 1135 | if newcol is None and col in self.equivalents and col not in _seen: |
| 1136 | for equiv in self.equivalents[col]: |
| 1137 | newcol = self._corresponding_column( |
| 1138 | equiv, |
| 1139 | require_embedded=require_embedded, |
| 1140 | _seen=_seen.union([col]), |
| 1141 | ) |
| 1142 | if newcol is not None: |
| 1143 | return newcol |
| 1144 | |
| 1145 | if ( |
| 1146 | self.adapt_on_names |
| 1147 | and newcol is None |
| 1148 | and isinstance(col, NamedColumn) |
| 1149 | ): |
| 1150 | newcol = self.selectable.exported_columns.get(col.name) |
| 1151 | return newcol |
| 1152 | |
| 1153 | @util.preload_module("sqlalchemy.sql.functions") |
| 1154 | def replace( |