Skip to content

Commit

Permalink
[BUG] Fix set_config logic so it can be called after call to set runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Dec 8, 2023
1 parent 9bf06cb commit 6ea1a59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daft/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ def set_config(
fewer partitions. (Defaults to 512MB)
"""
ctx = get_context()
if ctx.disallow_set_runner:
if ctx.runner is not None:
raise RuntimeError(
"Cannot call `set_config` after the runner has already been created. "
"Please call `set_config` before any calls to set the runner and before any dataframe creation or execution."
"Please call `set_config` before any dataframe creation or execution."
)

# Replace values in the DaftConfig with user-specified overrides
Expand Down

0 comments on commit 6ea1a59

Please sign in to comment.