|
49 | 49 | import bigframes.core.ordering as ordering |
50 | 50 | import bigframes.core.schema as bf_schema |
51 | 51 | import bigframes.core.sql as sql |
52 | | -import bigframes.core.tree_properties as tree_properties |
53 | 52 | import bigframes.core.utils as utils |
54 | 53 | import bigframes.core.window_spec as window_specs |
55 | 54 | import bigframes.dtypes |
@@ -205,7 +204,7 @@ def shape(self) -> typing.Tuple[int, int]: |
205 | 204 | row_count_expr = self.expr.row_count() |
206 | 205 |
|
207 | 206 | # Support in-memory engines for hermetic unit tests. |
208 | | - if self.expr.node.session is None: |
| 207 | + if self.expr.session is None: |
209 | 208 | try: |
210 | 209 | row_count = row_count_expr._try_evaluate_local().squeeze() |
211 | 210 | return (row_count, len(self.value_columns)) |
@@ -283,7 +282,7 @@ def index_name_to_col_id(self) -> typing.Mapping[Label, typing.Sequence[str]]: |
283 | 282 |
|
284 | 283 | @property |
285 | 284 | def explicitly_ordered(self) -> bool: |
286 | | - return self.expr.node.explicitly_ordered |
| 285 | + return self.expr.explicitly_ordered |
287 | 286 |
|
288 | 287 | def cols_matching_label(self, partial_label: Label) -> typing.Sequence[str]: |
289 | 288 | """ |
@@ -466,7 +465,7 @@ def _validate_result_schema( |
466 | 465 | ): |
467 | 466 | actual_schema = tuple(bq_result_schema) |
468 | 467 | ibis_schema = self.expr._compiled_schema |
469 | | - internal_schema = self.expr.node.schema |
| 468 | + internal_schema = self.expr.schema |
470 | 469 | if not bigframes.features.PANDAS_VERSIONS.is_arrow_list_dtype_usable: |
471 | 470 | return |
472 | 471 | if internal_schema.to_bigquery() != actual_schema: |
@@ -561,7 +560,7 @@ def to_pandas( |
561 | 560 | def try_peek( |
562 | 561 | self, n: int = 20, force: bool = False |
563 | 562 | ) -> typing.Optional[pd.DataFrame]: |
564 | | - if force or tree_properties.can_fast_peek(self.expr.node): |
| 563 | + if force or self.expr.supports_fast_peek: |
565 | 564 | iterator, _ = self.session._peek(self.expr, n) |
566 | 565 | df = self._to_dataframe(iterator) |
567 | 566 | self._copy_index_to_pandas(df) |
@@ -2365,10 +2364,7 @@ def cached(self, *, force: bool = False, session_aware: bool = False) -> None: |
2365 | 2364 | if (not force) and self.session._executor._is_trivially_executable(self.expr): |
2366 | 2365 | return |
2367 | 2366 | elif session_aware: |
2368 | | - bfet_roots = [obj._block._expr.node for obj in self.session.objects] |
2369 | | - self.session._executor._cache_with_session_awareness( |
2370 | | - self.expr, session_forest=bfet_roots |
2371 | | - ) |
| 2367 | + self.session._executor._cache_with_session_awareness(self.expr) |
2372 | 2368 | else: |
2373 | 2369 | self.session._executor._cache_with_cluster_cols( |
2374 | 2370 | self.expr, cluster_cols=self.index_columns |
|
0 commit comments