This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new af146c808 fix(c/validation): exercise binary view input in ingestion 
test (#4777)
af146c808 is described below

commit af146c808ba2d55db852964b4386aee95781df52
Author: Fredrik Fornwall <[email protected]>
AuthorDate: Wed Sep 16 03:14:38 2026 +0200

    fix(c/validation): exercise binary view input in ingestion test (#4777)
    
    Fix `TestSqlIngestBinaryView` to bind a `BINARY_VIEW` array instead of
    `LARGE_BINARY`. Add a 32-byte value to exercise storage beyond the
    12-byte inline storage.
    
    `TestSqlIngestLargeBinary` already covers `LARGE_BINARY` ingestion, so
    no coverage is lost.
    
    Signed-off-by: Fredrik Fornwall <[email protected]>
---
 c/validation/adbc_validation_statement.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/c/validation/adbc_validation_statement.cc 
b/c/validation/adbc_validation_statement.cc
index 42421e97a..95ef804f3 100644
--- a/c/validation/adbc_validation_statement.cc
+++ b/c/validation/adbc_validation_statement.cc
@@ -348,11 +348,16 @@ void StatementTest::TestSqlIngestBinaryView() {
   }
 
   ASSERT_NO_FATAL_FAILURE(TestSqlIngestType<std::vector<std::byte>>(
-      NANOARROW_TYPE_LARGE_BINARY,
-      {std::nullopt, std::vector<std::byte>{},
+      NANOARROW_TYPE_BINARY_VIEW,
+      {std::nullopt,
+       // Empty vectors trigger a null-pointer memcpy in nanoarrow.
+       // TODO: Restore after vendoring the fix:
+       // https://github.com/apache/arrow-nanoarrow/pull/940
+       // std::vector<std::byte>{},
        std::vector<std::byte>{std::byte{0x00}, std::byte{0x01}},
        std::vector<std::byte>{std::byte{0x01}, std::byte{0x02}, 
std::byte{0x03},
                               std::byte{0x04}},
+       std::vector<std::byte>(32, std::byte{0x05}),
        std::vector<std::byte>{std::byte{0xfe}, std::byte{0xff}}},
       false));
 }

Reply via email to