Skip to content

Commit 419c30a

Browse files
author
Ivo
committed
Remove redundant set_output_format calls
1 parent 39c9800 commit 419c30a

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

python/tests/unit/arcticdb/version_store/test_arrow_read.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def test_basic_with_index(lmdb_version_store_arrow):
4343

4444
def test_basic_small_slices(in_memory_version_store_tiny_segment_arrow):
4545
lib = in_memory_version_store_tiny_segment_arrow
46-
lib.set_output_format(OutputFormat.PYARROW)
4746
df = pd.DataFrame({"x": np.arange(10)})
4847
lib.write("arrow", df)
4948
table = lib.read("arrow").data
@@ -52,7 +51,6 @@ def test_basic_small_slices(in_memory_version_store_tiny_segment_arrow):
5251

5352
def test_basic_small_slices_with_index(in_memory_version_store_tiny_segment_arrow):
5453
lib = in_memory_version_store_tiny_segment_arrow
55-
lib.set_output_format(OutputFormat.PYARROW)
5654
df = pd.DataFrame({"x": np.arange(10)}, index=pd.date_range(pd.Timestamp(0), periods=10))
5755
lib.write("arrow", df)
5856
table = lib.read("arrow").data
@@ -149,7 +147,6 @@ def test_strings_basic(in_memory_version_store_arrow, dynamic_strings, any_arrow
149147
@pytest.mark.parametrize("row_range", [None, (2, 3), (2, 4), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6)])
150148
def test_strings_with_nones_and_nans(in_memory_version_store_tiny_segment_arrow, row_range, any_arrow_string_format):
151149
lib = in_memory_version_store_tiny_segment_arrow
152-
lib.set_output_format(OutputFormat.PYARROW)
153150
lib.set_arrow_string_format_default(any_arrow_string_format)
154151
# in_memory_version_store_tiny_segment_arrow has 2 rows per segment
155152
# This column is constructed so that every 2-element permutation of strings, Nones, and NaNs are tested
@@ -186,7 +183,6 @@ def test_strings_with_nones_and_nans(in_memory_version_store_tiny_segment_arrow,
186183
@pytest.mark.xfail(reason="NaT values in datetime columns are not converted to Arrow nulls (monday ref: 11525537906)")
187184
def test_datetime_col_with_nats(in_memory_version_store_tiny_segment_arrow):
188185
lib = in_memory_version_store_tiny_segment_arrow
189-
lib.set_output_format(OutputFormat.PYARROW)
190186
df = pd.DataFrame(
191187
{
192188
"x": pd.to_datetime(
@@ -264,7 +260,6 @@ def test_strings_multiple_segments_and_columns(
264260
in_memory_version_store_tiny_segment_arrow, dynamic_strings, any_arrow_string_format
265261
):
266262
lib = in_memory_version_store_tiny_segment_arrow
267-
lib.set_output_format(OutputFormat.PYARROW)
268263
lib.set_arrow_string_format_default(any_arrow_string_format)
269264
df = pd.DataFrame(
270265
{
@@ -331,7 +326,6 @@ def test_date_range_corner_cases(in_memory_store_factory, date_range_start, date
331326
)
332327
def test_date_range_between_index_values(in_memory_version_store_tiny_segment_arrow):
333328
lib = in_memory_version_store_tiny_segment_arrow
334-
lib.set_output_format(OutputFormat.PYARROW)
335329
df = pd.DataFrame(
336330
data={
337331
"col1": np.arange(2),
@@ -672,7 +666,6 @@ def test_with_querybuilder(in_memory_version_store_arrow):
672666

673667
def test_arrow_layout(in_memory_version_store_tiny_segment_arrow):
674668
lib = in_memory_version_store_tiny_segment_arrow
675-
lib.set_output_format(OutputFormat.PYARROW)
676669
lib_tool = lib.library_tool()
677670
num_rows = 100
678671
df = pd.DataFrame(
@@ -1025,7 +1018,6 @@ def test_arrow_dynamic_schema_filtered_column(in_memory_version_store_dynamic_sc
10251018

10261019
def test_project_dynamic_schema(in_memory_version_store_dynamic_schema_arrow):
10271020
lib = in_memory_version_store_dynamic_schema_arrow
1028-
lib.set_output_format(OutputFormat.PYARROW)
10291021
sym = "sym"
10301022
table_1 = pa.table({"a": pa.array([1, 2])})
10311023
table_2 = pa.table({"a": pa.array([3, 4]), "b": pa.array([1, 2])})

python/tests/unit/arcticdb/version_store/test_arrow_writes.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ def test_write_multiple_record_batches_indexed(in_memory_version_store_arrow):
199199
@pytest.mark.parametrize("num_cols", [1, 2, 3, 4, 5])
200200
def test_write_sliced(in_memory_version_store_tiny_segment_arrow, num_rows, num_cols, arrow_output_format):
201201
lib = in_memory_version_store_tiny_segment_arrow
202-
lib.set_output_format("pyarrow")
203-
lib._set_allow_arrow_input()
204202
sym = "test_write_sliced"
205203
table = pa.table(
206204
{
@@ -235,8 +233,6 @@ def test_write_sliced(in_memory_version_store_tiny_segment_arrow, num_rows, num_
235233
)
236234
def test_write_bools_sliced(in_memory_version_store_tiny_segment_arrow, data):
237235
lib = in_memory_version_store_tiny_segment_arrow
238-
lib.set_output_format("pyarrow")
239-
lib._set_allow_arrow_input()
240236
sym = "test_write_bools_sliced"
241237
table = pa.table({"col": pa.array(data)})
242238
lib.write(sym, table)
@@ -248,8 +244,6 @@ def test_write_bools_sliced(in_memory_version_store_tiny_segment_arrow, data):
248244
@pytest.mark.parametrize("num_cols", [1, 2, 3, 4, 5])
249245
def test_write_sliced_with_index(in_memory_version_store_tiny_segment_arrow, num_rows, num_cols):
250246
lib = in_memory_version_store_tiny_segment_arrow
251-
lib.set_output_format("pyarrow")
252-
lib._set_allow_arrow_input()
253247
lib_tool = lib.library_tool()
254248
sym = "test_write_sliced_with_index"
255249
df = pd.DataFrame(
@@ -376,8 +370,6 @@ def test_write_view_strings(in_memory_version_store_arrow, type):
376370
def test_write_owned_and_non_owned_buffers(in_memory_version_store_tiny_segment_arrow):
377371
# This test is about our ChunkedBuffer holding mixes of owned and non-owned blocks, not Arrow views
378372
lib = in_memory_version_store_tiny_segment_arrow
379-
lib.set_output_format("pyarrow")
380-
lib._set_allow_arrow_input()
381373
sym = "test_write_owned_and_non_owned_buffers"
382374
rb0 = pa.RecordBatch.from_arrays([pa.array([0, 1, 2], pa.int32())], names=["col"])
383375
rb1 = pa.RecordBatch.from_arrays([pa.array([3, 4, 5], pa.int32())], names=["col"])

0 commit comments

Comments
 (0)