Skip to content

Commit

Permalink
ARROW-18041: [Python] Sustrait-related test failure in wheel tests (a…
Browse files Browse the repository at this point in the history
…pache#14408)

Authored-by: Weston Pace <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
westonpace authored Oct 14, 2022
1 parent 49e6d27 commit dd9c224
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions ci/appveyor-cpp-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ set PYARROW_WITH_PARQUET=ON
set PYARROW_WITH_PARQUET_ENCRYPTION=ON
set PYARROW_WITH_S3=%ARROW_S3%
set PYARROW_WITH_STATIC_BOOST=ON
set PYARROW_WITH_SUBSTRAIT=ON

set ARROW_HOME=%CONDA_PREFIX%\Library
@rem ARROW-3075; pkgconfig is broken for Parquet for now
Expand Down
11 changes: 7 additions & 4 deletions python/pyarrow/tests/test_substrait.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# under the License.

import os
import pathlib
import pytest

import pyarrow as pa
Expand Down Expand Up @@ -58,7 +59,7 @@ def test_run_serialized_query(tmpdir):
"local_files": {
"items": [
{
"uri_file": "file://FILENAME_PLACEHOLDER",
"uri_file": "FILENAME_PLACEHOLDER",
"arrow": {}
}
]
Expand All @@ -72,7 +73,8 @@ def test_run_serialized_query(tmpdir):
file_name = "read_data.arrow"
table = pa.table([[1, 2, 3, 4, 5]], names=['foo'])
path = _write_dummy_data_to_disk(tmpdir, file_name, table)
query = tobytes(substrait_query.replace("FILENAME_PLACEHOLDER", path))
query = tobytes(substrait_query.replace(
"FILENAME_PLACEHOLDER", pathlib.Path(path).as_uri()))

buf = pa._substrait._parse_json_plan(query)

Expand Down Expand Up @@ -130,7 +132,7 @@ def test_binary_conversion_with_json_options(tmpdir):
"local_files": {
"items": [
{
"uri_file": "file://FILENAME_PLACEHOLDER",
"uri_file": "FILENAME_PLACEHOLDER",
"arrow": {},
"metadata" : {
"created_by" : {},
Expand All @@ -147,7 +149,8 @@ def test_binary_conversion_with_json_options(tmpdir):
file_name = "binary_json_data.arrow"
table = pa.table([[1, 2, 3, 4, 5]], names=['bar'])
path = _write_dummy_data_to_disk(tmpdir, file_name, table)
query = tobytes(substrait_query.replace("FILENAME_PLACEHOLDER", path))
query = tobytes(substrait_query.replace(
"FILENAME_PLACEHOLDER", pathlib.Path(path).as_uri()))
buf = pa._substrait._parse_json_plan(tobytes(query))

reader = substrait.run_query(buf)
Expand Down

0 comments on commit dd9c224

Please sign in to comment.