|
15 | 15 |
|
16 | 16 | import dataclasses |
17 | 17 | import itertools |
18 | | -from typing import cast, Optional, Sequence, Set, Tuple |
| 18 | +from typing import Optional, Sequence, Set, Tuple |
19 | 19 |
|
20 | 20 | import bigframes.core.expression |
21 | 21 | import bigframes.core.identifiers |
@@ -152,35 +152,6 @@ def pull_up_selection( |
152 | 152 | return node, tuple( |
153 | 153 | bigframes.core.nodes.AliasedRef.identity(field.id) for field in node.fields |
154 | 154 | ) |
155 | | - # InNode needs special handling, as its a binary node, but row identity is from left side only. |
156 | | - # TODO: Merge code with unary op paths |
157 | | - if isinstance(node, bigframes.core.nodes.InNode): |
158 | | - child_node, child_selections = pull_up_selection( |
159 | | - node.left_child, stop=stop, rename_vars=rename_vars |
160 | | - ) |
161 | | - mapping = {out: ref.id for ref, out in child_selections} |
162 | | - |
163 | | - new_in_node: bigframes.core.nodes.InNode = dataclasses.replace( |
164 | | - node, left_child=child_node |
165 | | - ) |
166 | | - new_in_node = new_in_node.remap_refs(mapping) |
167 | | - if rename_vars: |
168 | | - new_in_node = cast( |
169 | | - bigframes.core.nodes.InNode, |
170 | | - new_in_node.remap_vars( |
171 | | - {node.indicator_col: bigframes.core.identifiers.ColumnId.unique()} |
172 | | - ), |
173 | | - ) |
174 | | - added_selection = tuple( |
175 | | - ( |
176 | | - bigframes.core.nodes.AliasedRef( |
177 | | - bigframes.core.expression.DerefOp(new_in_node.indicator_col), |
178 | | - node.indicator_col, |
179 | | - ), |
180 | | - ) |
181 | | - ) |
182 | | - new_selection = child_selections + added_selection |
183 | | - return new_in_node, new_selection |
184 | 155 |
|
185 | 156 | if isinstance(node, bigframes.core.nodes.AdditiveNode): |
186 | 157 | child_node, child_selections = pull_up_selection( |
|
0 commit comments