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-45798: [C++] Add extension directory to Meson #45799

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
36 changes: 36 additions & 0 deletions cpp/src/arrow/extension/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

canonical_extension_tests = ['bool8_test.cc', 'json_test.cc', 'uuid_test.cc']

if needs_json
canonical_extension_tests += [
'fixed_shape_tensor_test.cc',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all compiles fine, although at runtime I am getting a few test failures:

[ RUN      ] TestExtensionType.RoundtripBatch
../src/arrow/testing/gtest_util.cc:560: Failure
Failed
Left schema: f0: extension<arrow.fixed_shape_tensor[value_type=int64, shape=[3,4], dim_names=[x,y]]>
Right schema: f0: fixed_size_list<item: int64>[12]
-- metadata --
ARROW:extension:metadata: {"shape":[3,4],"dim_names":["x","y"]}
ARROW:extension:name: arrow.fixed_shape_tensor

../src/arrow/testing/gtest_util.cc:560: Failure
Failed
Left schema: f0: extension<arrow.fixed_shape_tensor[value_type=int64, shape=[3,4], dim_names=[x,y]]>
Right schema: f0: fixed_size_list<item: int64>[12]
-- metadata --
ARROW:extension:metadata: {"shape":[3,4],"dim_names":["x","y"]}
ARROW:extension:name: arrow.fixed_shape_tensor

...

[ RUN      ] TestExtensionType.RoundtripBatchFromTensor
../src/arrow/testing/gtest_util.cc:560: Failure
Failed
Left schema: f0: extension<arrow.fixed_shape_tensor[value_type=int64, shape=[3,4], dim_names=[x,y]]>
-- metadata --
ARROW:extension:metadata: {"shape":[3,4],"dim_names":["x","y"]}
ARROW:extension:name: arrow.fixed_shape_tensor
Right schema: f0: fixed_size_list<item: int64>[12]
-- metadata --
ARROW:extension:metadata: {"shape":[3,4],"dim_names":["x","y"]}
ARROW:extension:name: arrow.fixed_shape_tensor
ARROW:extension:metadata: {"shape":[3,4],"dim_names":["x","y"]}
ARROW:extension:name: arrow.fixed_shape_tensor

...

[ RUN      ] OpaqueType.BatchRoundTrip
../src/arrow/extension/opaque_test.cc:191: Failure
Expected equality of these values:
  *batch->schema()
    Which is: field: extension<arrow.opaque[storage_type=binary, type_name=geometry, vendor_name=adbc.postgresql]>
  *written->schema()
    Which is: field: binary

@lidavidm I see you are the only one who has touched the opaque file. Any idea what I should be looking at to debug the opaque test failure?

'opaque_test.cc',
]
endif

exc = executable(
'arrow-canonical-extensions-test',
sources: canonical_extension_tests,
dependencies: [arrow_test_dep],
)
test('arrow-canonical-extensions-test', exc)

install_headers(
['bool8.h', 'fixed_shape_tensor.h', 'json.h', 'opaque.h', 'uuid.h'],
)
1 change: 1 addition & 0 deletions cpp/src/arrow/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,5 @@ pkg.generate(

subdir('testing')

subdir('extension')
subdir('util')
Loading