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