Skip to content

Commit

Permalink
morsel size only swordfish
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Ho authored and Colin Ho committed Nov 4, 2024
1 parent 8644aed commit 7943f4f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest

import daft
import daft.context
from daft.table import MicroPartition

# import all conftest
Expand Down Expand Up @@ -172,7 +173,10 @@ def assert_df_equals(
raise


@pytest.fixture(scope="function", params=[1, None])
@pytest.fixture(
scope="function",
params=[1, None] if daft.context.get_context().daft_execution_config.enable_native_executor else [None],
)
def with_morsel_size(request):
morsel_size = request.param
with daft.context.execution_config_ctx(default_morsel_size=morsel_size):
Expand Down
5 changes: 4 additions & 1 deletion tests/cookbook/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def service_requests_csv_pd_df():
return pd.read_csv(COOKBOOK_DATA_CSV, keep_default_na=False)[COLUMNS]


@pytest.fixture(scope="module", params=[1, 2])
@pytest.fixture(
scope="module",
params=[1, 2] if daft.context.get_context().daft_execution_config.enable_native_executor is False else [1],
)
def repartition_nparts(request):
"""Adds a `n_repartitions` parameter to test cases which provides the number of
partitions that the test case should repartition its dataset into for testing
Expand Down

0 comments on commit 7943f4f

Please sign in to comment.