Skip to content

Commit c1d8e3e

Browse files
fix cluster type filter, test
1 parent 0c0f6a3 commit c1d8e3e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

bigframes/session/bq_caching_executor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,12 @@ def _execute_plan_gbq(
643643
plan = nodes.PromoteOffsetsNode(plan, offsets_id)
644644
cluster_cols = [offsets_id.sql]
645645
else:
646-
cluster_cols = cache_spec.cluster_cols[:_MAX_CLUSTER_COLUMNS]
646+
cluster_cols = [
647+
col
648+
for col in cache_spec.cluster_cols
649+
if bigframes.dtypes.is_clusterable(plan.schema.get_type(col))
650+
]
651+
cluster_cols = cluster_cols[:_MAX_CLUSTER_COLUMNS]
647652

648653
compiled = compile.compile_sql(
649654
compile.CompileRequest(

tests/system/small/test_dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5540,7 +5540,7 @@ def test_df_cached(scalars_df_index):
55405540
def test_df_cached_many_index_cols(scalars_df_index):
55415541
index_cols = [
55425542
"int64_too",
5543-
"geography_col",
5543+
"time_col",
55445544
"int64_col",
55455545
"bool_col",
55465546
"date_col",

0 commit comments

Comments
 (0)