(self)
| 2026 | return other.operands + self.operands[1:] |
| 2027 | |
| 2028 | def _simplify_down(self): |
| 2029 | if isinstance(self.frame, Assign): |
| 2030 | if self._check_for_previously_created_column(self.frame): |
| 2031 | # don't squash if we are using a column that was previously created |
| 2032 | return |
| 2033 | return Assign(*self._remove_common_columns(self.frame)) |
| 2034 | elif isinstance(self.frame, Projection) and isinstance( |
| 2035 | self.frame.frame, Assign |
| 2036 | ): |
| 2037 | if self._check_for_previously_created_column(self.frame.frame): |
| 2038 | return |
| 2039 | new_columns = self.frame.operands[1].copy() |
| 2040 | new_columns.extend([k for k in self.keys if k not in new_columns]) |
| 2041 | return Projection( |
| 2042 | Assign(*self._remove_common_columns(self.frame.frame)), new_columns |
| 2043 | ) |
| 2044 | |
| 2045 | def _check_for_previously_created_column(self, child): |
| 2046 | input_columns = [] |
nothing calls this directly
no test coverage detected