(self)
| 2010 | return other.operands + self.operands[1:] |
| 2011 | |
| 2012 | def _simplify_down(self): |
| 2013 | if isinstance(self.frame, Assign): |
| 2014 | if self._check_for_previously_created_column(self.frame): |
| 2015 | # don't squash if we are using a column that was previously created |
| 2016 | return |
| 2017 | return Assign(*self._remove_common_columns(self.frame)) |
| 2018 | elif isinstance(self.frame, Projection) and isinstance( |
| 2019 | self.frame.frame, Assign |
| 2020 | ): |
| 2021 | if self._check_for_previously_created_column(self.frame.frame): |
| 2022 | return |
| 2023 | new_columns = self.frame.operands[1].copy() |
| 2024 | new_columns.extend([k for k in self.keys if k not in new_columns]) |
| 2025 | return Projection( |
| 2026 | Assign(*self._remove_common_columns(self.frame.frame)), new_columns |
| 2027 | ) |
| 2028 | |
| 2029 | def _check_for_previously_created_column(self, child): |
| 2030 | input_columns = [] |
nothing calls this directly
no test coverage detected