Skip to content

Commit

Permalink
Add arrow return test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Dec 14, 2024
1 parent 1c16b66 commit 85478f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/memory/test_udf_project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import uuid

import pyarrow as pa
import pytest
from memray._memray import compute_statistics

Expand Down Expand Up @@ -32,13 +33,20 @@ def to_pylist_identity_batched(s):
return data


@daft.udf(return_dtype=str, batch_size=128)
def to_pylist_identity_batched_arrow_return(s):
data = s.to_pylist()
return pa.array(data)


@pytest.mark.parametrize(
"udf",
[
to_arrow_identity,
to_pylist_identity,
to_arrow_identity_batched,
to_pylist_identity_batched,
to_pylist_identity_batched_arrow_return,
],
)
def test_string_identity_projection(udf):
Expand Down

0 comments on commit 85478f7

Please sign in to comment.