Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-43680: [Integration] Unskip nanoarrow in IPC integration tests #43715

Merged
merged 6 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/scripts/nanoarrow_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ set -x
mkdir -p ${build_dir}
pushd ${build_dir}

cmake ${source_dir} -DNANOARROW_BUILD_INTEGRATION_TESTS=ON
cmake ${source_dir} -DNANOARROW_IPC=ON -DNANOARROW_BUILD_INTEGRATION_TESTS=ON
cmake --build .

popd
11 changes: 10 additions & 1 deletion dev/archery/archery/integration/datagen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,33 +1914,42 @@ def _temp_path():
generate_duplicate_fieldnames_case()
.skip_tester('JS'),

generate_dictionary_case(),
generate_dictionary_case()
# TODO(https://github.com/apache/arrow-nanoarrow/issues/622)
.skip_tester('nanoarrow'),
bkietz marked this conversation as resolved.
Show resolved Hide resolved

generate_dictionary_unsigned_case()
.skip_tester('nanoarrow')
.skip_tester('Java'), # TODO(ARROW-9377)

generate_nested_dictionary_case()
# TODO(https://github.com/apache/arrow-nanoarrow/issues/622)
.skip_tester('nanoarrow')
.skip_tester('Java'), # TODO(ARROW-7779)

generate_run_end_encoded_case()
.skip_tester('C#')
.skip_tester('Java')
.skip_tester('JS')
# TODO(https://github.com/apache/arrow-nanoarrow/issues/618)
.skip_tester('nanoarrow')
.skip_tester('Rust'),

generate_binary_view_case()
.skip_tester('JS')
# TODO(https://github.com/apache/arrow-nanoarrow/issues/618)
.skip_tester('nanoarrow')
.skip_tester('Rust'),

generate_list_view_case()
.skip_tester('C#') # Doesn't support large list views
.skip_tester('JS')
# TODO(https://github.com/apache/arrow-nanoarrow/issues/618)
.skip_tester('nanoarrow')
.skip_tester('Rust'),

generate_extension_case()
.skip_tester('nanoarrow')
# TODO: ensure the extension is registered in the C++ entrypoint
.skip_format(SKIP_C_SCHEMA, 'C++')
.skip_format(SKIP_C_ARRAY, 'C++'),
Expand Down
39 changes: 33 additions & 6 deletions dev/archery/archery/integration/tester_nanoarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from . import cdata
from .tester import Tester, CDataExporter, CDataImporter
from .util import run_cmd, log
from ..utils.source import ARROW_ROOT_DEFAULT


Expand All @@ -32,10 +33,14 @@
_NANOARROW_PATH, "libnanoarrow_c_data_integration" + cdata.dll_suffix
)

_INTEGRATION_EXE = os.path.join(
_NANOARROW_PATH, "nanoarrow_ipc_integration"
)


class NanoarrowTester(Tester):
PRODUCER = False
CONSUMER = False
PRODUCER = True
CONSUMER = True
FLIGHT_SERVER = False
FLIGHT_CLIENT = False
C_DATA_SCHEMA_EXPORTER = True
Expand All @@ -45,17 +50,39 @@ class NanoarrowTester(Tester):

name = "nanoarrow"

def _run(self, arrow_path, json_path, command, quirks):
env = {
'ARROW_PATH': arrow_path,
'JSON_PATH': json_path,
'COMMAND': command,
**{
f'QUIRK_{q}': "1"
for q in quirks or ()
},
}

if self.debug:
log(f'{_INTEGRATION_EXE} {env}')

run_cmd([_INTEGRATION_EXE], env=env)

def validate(self, json_path, arrow_path, quirks=None):
raise NotImplementedError()
return self._run(arrow_path, json_path, 'VALIDATE', quirks)

def json_to_file(self, json_path, arrow_path):
raise NotImplementedError()
return self._run(arrow_path, json_path, 'JSON_TO_ARROW', quirks=None)

def stream_to_file(self, stream_path, file_path):
raise NotImplementedError()
self.run_shell_command([_INTEGRATION_EXE, '<', stream_path], env={
'COMMAND': 'STREAM_TO_FILE',
'ARROW_PATH': file_path,
})

def file_to_stream(self, file_path, stream_path):
raise NotImplementedError()
self.run_shell_command([_INTEGRATION_EXE, '>', stream_path], env={
'COMMAND': 'FILE_TO_STREAM',
'ARROW_PATH': file_path,
})

def make_c_data_exporter(self):
return NanoarrowCDataExporter(self.debug, self.args)
Expand Down
Loading