Skip to content

Commit 7267db8

Browse files
committed
Revert "feat: add SQL tests for local Arrow, Pandas, and Polars dataframes"
This reverts commit 90ceec2.
1 parent 90ceec2 commit 7267db8

1 file changed

Lines changed: 0 additions & 39 deletions

File tree

python/tests/test_context.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -348,45 +348,6 @@ def test_from_pandas(ctx):
348348
assert df.collect()[0].num_rows == 3
349349

350350

351-
def test_sql_from_local_arrow_table(ctx):
352-
arrow_table = pa.Table.from_pydict({"a": [1, 2], "b": ["x", "y"]})
353-
354-
result = ctx.sql("SELECT * FROM arrow_table ORDER BY a").collect()
355-
actual = pa.Table.from_batches(result)
356-
expected = pa.Table.from_pydict({"a": [1, 2], "b": ["x", "y"]})
357-
358-
assert actual.equals(expected)
359-
360-
361-
def test_sql_from_local_pandas_dataframe(ctx):
362-
pd = pytest.importorskip("pandas")
363-
pandas_df = pd.DataFrame({"a": [3, 1], "b": ["z", "y"]})
364-
365-
result = ctx.sql("SELECT * FROM pandas_df ORDER BY a").collect()
366-
actual = pa.Table.from_batches(result)
367-
expected = pa.Table.from_pydict({"a": [1, 3], "b": ["y", "z"]})
368-
369-
assert actual.equals(expected)
370-
371-
372-
def test_sql_from_local_polars_dataframe(ctx):
373-
pl = pytest.importorskip("polars")
374-
polars_df = pl.DataFrame({"a": [2, 1], "b": ["beta", "alpha"]})
375-
376-
result = ctx.sql("SELECT * FROM polars_df ORDER BY a").collect()
377-
actual = pa.Table.from_batches(result)
378-
expected = pa.Table.from_pydict({"a": [1, 2], "b": ["alpha", "beta"]})
379-
380-
assert actual.equals(expected)
381-
382-
383-
def test_sql_from_local_unsupported_object(ctx):
384-
unsupported = object()
385-
386-
with pytest.raises(Exception, match="table 'unsupported' not found"):
387-
ctx.sql("SELECT * FROM unsupported").collect()
388-
389-
390351
def test_from_polars(ctx):
391352
# create a dataframe from Polars dataframe
392353
pd = pytest.importorskip("polars")

0 commit comments

Comments
 (0)