Skip to content

Commit b1cf81c

Browse files
committed
revert unneeded circular import workaround
1 parent 8adafdd commit b1cf81c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bigframes/core/array_value.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
from bigframes.core.window_spec import WindowSpec
3838
import bigframes.dtypes
3939
import bigframes.exceptions as bfe
40+
import bigframes.operations as ops
41+
import bigframes.operations.aggregations as agg_ops
4042

4143
if typing.TYPE_CHECKING:
42-
# Avoid circular imports.
43-
import bigframes.operations.aggregations as agg_ops
4444
from bigframes.session import Session
4545

4646
ORDER_ID_COLUMN = "bigframes_ordering_id"
@@ -185,8 +185,6 @@ def get_column_type(self, key: str) -> bigframes.dtypes.Dtype:
185185

186186
def row_count(self) -> ArrayValue:
187187
"""Get number of rows in ArrayValue as a single-entry ArrayValue."""
188-
import bigframes.operations.aggregations as agg_ops # Avoid circular imports.
189-
190188
return ArrayValue(
191189
nodes.AggregateNode(
192190
child=self.node,
@@ -202,8 +200,6 @@ def row_count(self) -> ArrayValue:
202200
# Operations
203201
def filter_by_id(self, predicate_id: str, keep_null: bool = False) -> ArrayValue:
204202
"""Filter the table on a given expression, the predicate must be a boolean series aligned with the table expression."""
205-
import bigframes.operations as ops # Avoid circular imports.
206-
207203
predicate: ex.Expression = ex.deref(predicate_id)
208204
if keep_null:
209205
predicate = ops.fillna_op.as_expr(predicate, ex.const(True))

0 commit comments

Comments
 (0)