From 1daadfe867f7c486fd2cc5f754bb0e40001a38a2 Mon Sep 17 00:00:00 2001 From: Rok Mihevc Date: Thu, 9 May 2024 00:51:32 +0200 Subject: [PATCH] Add status info to docs --- cpp/src/arrow/CMakeLists.txt | 3 +-- cpp/src/arrow/extension/CMakeLists.txt | 5 +---- cpp/src/arrow/extension_type.cc | 5 ++--- docs/source/format/CanonicalExtensions.rst | 2 ++ docs/source/status.rst | 2 ++ python/pyarrow/tests/test_extension_type.py | 4 ++-- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index 4e47f287da5b2..6b0ac8c23c75a 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -374,6 +374,7 @@ set(ARROW_SRCS datum.cc device.cc extension_type.cc + extension/bool8.cc extension/uuid.cc pretty_print.cc record_batch.cc @@ -907,10 +908,8 @@ endif() if(ARROW_JSON) arrow_add_object_library(ARROW_JSON - extension/bool8.cc extension/fixed_shape_tensor.cc extension/opaque.cc - extension/uuid_array.cc json/options.cc json/chunked_builder.cc json/chunker.cc diff --git a/cpp/src/arrow/extension/CMakeLists.txt b/cpp/src/arrow/extension/CMakeLists.txt index 5318590d42b60..612e4355f4cc3 100644 --- a/cpp/src/arrow/extension/CMakeLists.txt +++ b/cpp/src/arrow/extension/CMakeLists.txt @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -set(CANONICAL_EXTENSION_TESTS uuid_test.cc) +set(CANONICAL_EXTENSION_TESTS bool8_test.cc opaque_test.cc uuid_test.cc) if(ARROW_JSON) list(APPEND CANONICAL_EXTENSION_TESTS fixed_shape_tensor_test.cc) @@ -24,9 +24,6 @@ endif() add_arrow_test(test SOURCES ${CANONICAL_EXTENSION_TESTS} - bool8_test.cc - opaque_test.cc - uuid_test.cc PREFIX "arrow-canonical-extensions") diff --git a/cpp/src/arrow/extension_type.cc b/cpp/src/arrow/extension_type.cc index 7f85298ed2711..8ea8139030cf2 100644 --- a/cpp/src/arrow/extension_type.cc +++ b/cpp/src/arrow/extension_type.cc @@ -147,11 +147,10 @@ static void CreateGlobalRegistry() { g_registry = std::make_shared(); #ifdef ARROW_JSON - std::vector> ext_types{extension::bool8(), ::arrow::extension::uuid()}; + std::vector> ext_types{extension::bool8(), extension::uuid()}; #else std::vector> ext_types{ - extension::bool8(), ::arrow::extension::uuid()}; - std::vector> ext_types{::arrow::extension::uuid()}; + extension::bool8(), extension::fixed_shape_tensor(int64(), {}), extension::uuid()}; #endif // Register canonical extension types diff --git a/docs/source/format/CanonicalExtensions.rst b/docs/source/format/CanonicalExtensions.rst index 5658f949ceeaa..1106f8aaffdd3 100644 --- a/docs/source/format/CanonicalExtensions.rst +++ b/docs/source/format/CanonicalExtensions.rst @@ -272,6 +272,8 @@ JSON In the future, additional fields may be added, but they are not required to interpret the array. +.. _uuid_extension: + UUID ==== diff --git a/docs/source/status.rst b/docs/source/status.rst index c232aa280befb..5e4b7627ca50e 100644 --- a/docs/source/status.rst +++ b/docs/source/status.rst @@ -119,6 +119,8 @@ Data Types +-----------------------+-------+-------+-------+------------+-------+-------+-------+-------+ | Variable shape tensor | | | | | | | | | +-----------------------+-------+-------+-------+------------+-------+-------+-------+-------+ +| UUID | ✓ | | | | | | | | ++-----------------------+-------+-------+-------+------------+-------+-------+-------+-------+ Notes: diff --git a/python/pyarrow/tests/test_extension_type.py b/python/pyarrow/tests/test_extension_type.py index 6de925fc95b46..5e68ab79600dd 100644 --- a/python/pyarrow/tests/test_extension_type.py +++ b/python/pyarrow/tests/test_extension_type.py @@ -287,7 +287,7 @@ def test_ext_type__storage_type(): def test_ext_type_byte_width(): # Test for fixed-size binary types - ty = UuidType() + ty = pa.UuidType() assert ty.byte_width == 16 ty = ParamExtType(5) assert ty.byte_width == 5 @@ -300,7 +300,7 @@ def test_ext_type_byte_width(): def test_ext_type_bit_width(): # Test for fixed-size binary types - ty = UuidType() + ty = pa.UuidType() assert ty.bit_width == 128 ty = ParamExtType(5) assert ty.bit_width == 40