| 3593 | |
| 3594 | |
| 3595 | class CombineFirstAlign(MaybeAlignPartitions): |
| 3596 | _parameters = ["frame", "other"] |
| 3597 | _expr_cls = CombineFirst |
| 3598 | |
| 3599 | def _simplify_up(self, parent, dependents): |
| 3600 | # TODO: de-duplicate |
| 3601 | if isinstance(parent, Projection): |
| 3602 | columns = determine_column_projection(self, parent, dependents) |
| 3603 | frame_columns = [col for col in self.frame.columns if col in columns] |
| 3604 | other_columns = [col for col in self.other.columns if col in columns] |
| 3605 | if ( |
| 3606 | self.frame.columns == frame_columns |
| 3607 | and self.other.columns == other_columns |
| 3608 | ): |
| 3609 | return |
| 3610 | |
| 3611 | return type(parent)( |
| 3612 | type(self)(self.frame[frame_columns], self.other[other_columns]), |
| 3613 | *parent.operands[1:], |
| 3614 | ) |
| 3615 | |
| 3616 | |
| 3617 | class FillnaAlign(MaybeAlignPartitions): |
no outgoing calls
no test coverage detected
searching dependent graphs…