Skip to content

Commit 3c71b93

Browse files
committed
GH-50993: [CI][Integration] Add extension-wrapped union to integration data
Add a new integration datagen case (extension_union) with sparse- and dense-union columns wrapped in an extension type, so the cross-language integration tests exercise the extension/union interaction. This mirrors the C++ IPC coverage added in GH-50623 (#50927).
1 parent 43eca86 commit 3c71b93

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

dev/archery/archery/integration/datagen.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,6 +1938,29 @@ def generate_extension_case():
19381938
dictionaries=[dict0])
19391939

19401940

1941+
def generate_extension_wrapped_union_case():
1942+
# Unions wrapped in an extension type, exercising the extension/union
1943+
# interaction across implementations (see the C++ fix in GH-50623).
1944+
sparse_union_type = ExtensionType(
1945+
'sparse-union-extension', '',
1946+
SparseUnionField('', [get_field('f1', 'int32'),
1947+
get_field('f2', 'utf8')],
1948+
type_ids=[5, 7]))
1949+
dense_union_type = ExtensionType(
1950+
'dense-union-extension', '',
1951+
DenseUnionField('', [get_field('f1', 'int16'),
1952+
get_field('f2', 'binary')],
1953+
type_ids=[10, 20]))
1954+
1955+
fields = [
1956+
ExtensionField('sparse_union_ext', sparse_union_type),
1957+
ExtensionField('dense_union_ext', dense_union_type),
1958+
]
1959+
1960+
batch_sizes = [0, 7]
1961+
return _generate_file("extension_union", fields, batch_sizes)
1962+
1963+
19411964
def get_generated_json_files(tempdir=None):
19421965
tempdir = tempdir or tempfile.mkdtemp(prefix='arrow-integration-')
19431966

@@ -2047,6 +2070,8 @@ def get_generated_json_files(tempdir=None):
20472070
# TODO(https://github.com/apache/arrow/issues/38045)
20482071
.skip_format(SKIP_FLIGHT, '.NET')
20492072
.skip_tester('Ruby'),
2073+
2074+
generate_extension_wrapped_union_case(),
20502075
]
20512076

20522077
generated_paths = []

0 commit comments

Comments
 (0)