Skip to content

Commit

Permalink
refactor: remove the csv backend
Browse files Browse the repository at this point in the history
The CSV backend is not providing much value over other backends that support CSVs.

BREAKING CHANGE: The CSV backend is removed. Use Datafusion for CSV execution.
  • Loading branch information
cpcloud committed Feb 9, 2022
1 parent 9feabbc commit 0e3e02e
Show file tree
Hide file tree
Showing 13 changed files with 7 additions and 301 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ibis-backends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
- "3.7"
- "3.10"
backend:
- name: csv
title: CSV
- name: dask
title: Dask
- name: hdf5
Expand Down
9 changes: 0 additions & 9 deletions ci/datamgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,6 @@ def datafusion(tables, data_directory, ignore_missing_dependency, **params):
pq.write_table(arrow_table, str(target_path))


@cli.command()
def csv(**params):
"""
The csv backend does not need test data, but we still
have an option for the backend for consistency, and to not
have to avoid calling `./datamgr.py csv` in the CI.
"""


@cli.command()
@click.option('-t', '--tables', multiple=True, default=TEST_TABLES)
@click.option(
Expand Down
1 change: 0 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ let

let
backends = [
"csv"
"dask"
"datafusion"
"hdf5"
Expand Down
68 changes: 0 additions & 68 deletions ibis/backends/csv/__init__.py

This file was deleted.

Empty file.
82 changes: 0 additions & 82 deletions ibis/backends/csv/tests/conftest.py

This file was deleted.

115 changes: 0 additions & 115 deletions ibis/backends/csv/tests/test_csv.py

This file was deleted.

1 change: 0 additions & 1 deletion ibis/backends/tests/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

# add here backends that passes join tests
all_db_join_supported = [
'csv',
'dask',
'hdf5',
'pandas',
Expand Down
14 changes: 3 additions & 11 deletions ibis/backends/tests/test_temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ def test_timestamp_extract(backend, alltypes, df, attr):
# Pandas backend is probably doing this wrong
param(
'W',
marks=pytest.mark.xpass_backends(
('csv', 'pandas', 'dask', 'hdf5')
),
marks=pytest.mark.xpass_backends(('pandas', 'dask', 'hdf5')),
),
'h',
'm',
Expand Down Expand Up @@ -116,9 +114,7 @@ def test_timestamp_truncate(backend, alltypes, df, unit):
'D',
param(
'W',
marks=pytest.mark.xpass_backends(
('csv', 'pandas', 'dask', 'hdf5')
),
marks=pytest.mark.xpass_backends(('pandas', 'dask', 'hdf5')),
),
],
)
Expand Down Expand Up @@ -166,7 +162,6 @@ def test_date_truncate(backend, alltypes, df, unit):
pd.Timedelta,
marks=pytest.mark.xpass_backends(
(
'csv',
'pandas',
'bigquery',
'impala',
Expand Down Expand Up @@ -424,7 +419,6 @@ def test_strftime(backend, con, alltypes, df, ibis_pattern, pandas_pattern):
marks=pytest.mark.xpass_backends(
(
'bigquery',
'csv',
'impala',
'pandas',
'pyspark',
Expand All @@ -435,9 +429,7 @@ def test_strftime(backend, con, alltypes, df, ibis_pattern, pandas_pattern):
),
param(
'ns',
marks=pytest.mark.xpass_backends(
('csv', 'pandas', 'dask', 'hdf5')
),
marks=pytest.mark.xpass_backends(('pandas', 'dask', 'hdf5')),
),
],
)
Expand Down
8 changes: 3 additions & 5 deletions ibis/backends/tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def calc_zscore(s):
lambda t: t.id.rank(pct=True),
id='percent_rank',
marks=pytest.mark.xpass_backends(
['csv', 'pandas', 'pyspark', 'hdf5'],
['pandas', 'pyspark', 'hdf5'],
raises=AssertionError,
),
),
Expand All @@ -76,7 +76,7 @@ def calc_zscore(s):
lambda t: t.cumcount(),
id='row_number',
marks=pytest.mark.xfail_backends(
('pandas', 'dask', 'csv', 'hdf5'),
('pandas', 'dask', 'hdf5'),
raises=(IndexError, com.UnboundExpressionError),
),
),
Expand Down Expand Up @@ -498,9 +498,7 @@ def test_ungrouped_unbounded_window(
),
]
)
@pytest.mark.skip_backends(
['pandas', 'csv', 'pyspark', 'hdf5'], reason='Issue #2709'
)
@pytest.mark.skip_backends(['pandas', 'pyspark', 'hdf5'], reason='Issue #2709')
def test_grouped_bounded_range_window(backend, alltypes, df, con):
if not backend.supports_window_operations:
pytest.skip(f'Backend {backend} does not support window operations')
Expand Down
Loading

0 comments on commit 0e3e02e

Please sign in to comment.