Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/datafusion/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def __init__(
df = ctx.read_csv("data.csv")
"""
config = config.config_internal if config is not None else None
runtime = runtime.config_internal if config is not None else None
runtime = runtime.config_internal if runtime is not None else None

self.ctx = SessionContextInternal(config, runtime)

Expand Down
8 changes: 8 additions & 0 deletions python/datafusion/tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ def test_create_context_no_args():
SessionContext()


def test_create_context_session_config_only():
SessionContext(config=SessionConfig())


def test_create_context_runtime_config_only():
SessionContext(runtime=RuntimeConfig())


@pytest.mark.parametrize("path_to_str", (True, False))
def test_runtime_configs(tmp_path, path_to_str):
path1 = tmp_path / "dir1"
Expand Down