Skip to content

Commit 1c20901

Browse files
fix usage of options._allow_large_results
1 parent e65e8a6 commit 1c20901

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

bigframes/core/blocks.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def to_arrow(
545545
under_10gb = (
546546
(not allow_large_results)
547547
if (allow_large_results is not None)
548-
else bigframes.options._allow_large_results
548+
else not bigframes.options._allow_large_results
549549
)
550550
execute_result = self.session._executor.execute(
551551
self.expr,
@@ -645,7 +645,7 @@ def try_peek(
645645
under_10gb = (
646646
(not allow_large_results)
647647
if (allow_large_results is not None)
648-
else bigframes.options._allow_large_results
648+
else not bigframes.options._allow_large_results
649649
)
650650
result = self.session._executor.execute(
651651
self.expr,
@@ -670,7 +670,7 @@ def to_pandas_batches(
670670
under_10gb = (
671671
(not allow_large_results)
672672
if (allow_large_results is not None)
673-
else bigframes.options._allow_large_results
673+
else not bigframes.options._allow_large_results
674674
)
675675
execute_result = self.session._executor.execute(
676676
self.expr,
@@ -726,13 +726,13 @@ def _materialize_local(
726726
under_10gb = (
727727
(not materialize_options.allow_large_results)
728728
if (materialize_options.allow_large_results is not None)
729-
else bigframes.options._allow_large_results
729+
else (not bigframes.options._allow_large_results)
730730
)
731731
execute_result = self.session._executor.execute(
732732
self.expr,
733733
execution_spec.ExecutionSpec(
734734
promise_under_10gb=under_10gb,
735-
ordered=True,
735+
ordered=materialize_options.ordered,
736736
),
737737
)
738738
sample_config = materialize_options.downsampling

bigframes/session/bq_caching_executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ def _maybe_find_existing_table(
256256
if spec.if_exists == "fail":
257257
raise ValueError(f"Table already exists: {spec.table.__str__()}")
258258

259-
if table.clustering_fields != spec.cluster_cols:
259+
if (len(spec.cluster_cols) != 0) and (
260+
table.clustering_fields != spec.cluster_cols
261+
):
260262
raise ValueError(
261263
"Table clustering fields cannot be changed after the table has "
262264
f"been created. Existing clustering fields: {table.clustering_fields}"

0 commit comments

Comments
 (0)