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 dask_sql/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def _get_tables_from_stack(self):
for var_name, variable in frame_info.frame.f_locals.items():
if var_name.startswith("_"):
continue
if not isinstance(variable, (pd.DataFrame, dd.DataFrame)):
if not dd.utils.is_dataframe_like(variable):
continue

# only set them if not defined in an inner context
Expand Down
14 changes: 1 addition & 13 deletions tests/unit/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,7 @@ def assert_correct_output(gpu):


@pytest.mark.parametrize(
"gpu",
[
False,
pytest.param(
True,
marks=(
pytest.mark.gpu,
pytest.mark.xfail(
reason="GPU tables aren't picked up by _get_tables_from_stack"
),
),
),
],
"gpu", [False, pytest.param(True, marks=pytest.mark.gpu),],
)
def test_tables_from_stack(gpu):
c = Context()
Expand Down