Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit bb2be62

Browse files
style
1 parent 4503646 commit bb2be62

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

bigframes/session/execution_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ def __init__(self):
3535
self._cached_executions: weakref.WeakKeyDictionary[
3636
nodes.BigFrameNode, bq_data.BigqueryDataSource
3737
] = weakref.WeakKeyDictionary()
38-
# This is state, but probably should be handled by some storage manager rather than by the general plan caching?
38+
# This upload cache is entirely independent of the plan cache.
3939
self._uploaded_local_data: weakref.WeakKeyDictionary[
4040
local_data.ManagedArrowTable,
4141
UploadedLocalData,
4242
] = weakref.WeakKeyDictionary()
4343

4444
def subsitute_cached_subplans(self, root: nodes.BigFrameNode) -> nodes.BigFrameNode:
45-
def maybe_replace_node(node):
45+
def replace_if_cached(node: nodes.BigFrameNode) -> nodes.BigFrameNode:
4646
if node not in self._cached_executions:
4747
return node
4848
# Assumption: GBQ cached table uses field name as bq column name
@@ -59,7 +59,7 @@ def maybe_replace_node(node):
5959
assert node.schema == cached_replacement.schema
6060
return cached_replacement
6161

62-
return nodes.top_down(root, maybe_replace_node)
62+
return nodes.top_down(root, replace_if_cached)
6363

6464
def cache_results_table(
6565
self,

bigframes/session/execution_spec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
@dataclasses.dataclass(frozen=True)
2424
class ExecutionSpec:
25-
# This could probably be a set of side effects, rather than a single destination_spec
2625
destination_spec: Union[TableOutputSpec, GcsOutputSpec, CacheSpec, None] = None
2726
peek: Optional[int] = None
2827
ordered: bool = (

0 commit comments

Comments
 (0)