Skip to content

Commit

Permalink
build(c): don't expose Nanoarrow symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Mar 17, 2024
1 parent 3c87d77 commit 0398dba
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion c/driver/postgresql/copy/postgres_copy_writer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ TEST(PostgresCopyUtilsTest, PostgresCopyWriteNumeric) {
ArrowSchemaInit(&schema.value);
ASSERT_EQ(ArrowSchemaSetTypeStruct(&schema.value, 1), 0);
ASSERT_EQ(
AdbcNsArrowSchemaSetTypeDecimal(schema.value.children[0], type, precision, scale),
PrivateArrowSchemaSetTypeDecimal(schema.value.children[0], type, precision, scale),
0);
ASSERT_EQ(ArrowSchemaSetName(schema.value.children[0], "col"), 0);
ASSERT_EQ(adbc_validation::MakeBatch<ArrowDecimal*>(&schema.value, &array.value,
Expand Down
4 changes: 2 additions & 2 deletions c/driver/postgresql/postgresql_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ static void BM_PostgresqlDecimalWrite(benchmark::State& state) {
}

for (size_t i = 0; i < ncols; i++) {
if (AdbcNsArrowSchemaSetTypeDecimal(schema.value.children[i], type, precision,
scale) != NANOARROW_OK) {
if (PrivateArrowSchemaSetTypeDecimal(schema.value.children[i], type, precision,
scale) != NANOARROW_OK) {
state.SkipWithError("Call to ArrowSchemaSetTypeDecimal failed!");
error.release(&error);
return;
Expand Down
2 changes: 1 addition & 1 deletion c/driver/postgresql/postgresql_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ TEST_P(PostgresDecimalTest, SelectValue) {
ArrowSchemaInit(&schema.value);
ASSERT_EQ(ArrowSchemaSetTypeStruct(&schema.value, 1), 0);
ASSERT_EQ(
AdbcNsArrowSchemaSetTypeDecimal(schema.value.children[0], type, precision, scale),
PrivateArrowSchemaSetTypeDecimal(schema.value.children[0], type, precision, scale),
0);
ASSERT_EQ(ArrowSchemaSetName(schema.value.children[0], "col"), 0);

Expand Down
2 changes: 1 addition & 1 deletion c/vendor/nanoarrow/nanoarrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
(NANOARROW_VERSION_MAJOR * 10000 + NANOARROW_VERSION_MINOR * 100 + \
NANOARROW_VERSION_PATCH)

#define NANOARROW_NAMESPACE AdbcNs
#define NANOARROW_NAMESPACE Private

#endif
// Licensed to the Apache Software Foundation (ASF) under one
Expand Down
4 changes: 3 additions & 1 deletion c/vendor/vendor_nanoarrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ main() {
# resulting bundle is perfectly synchronized with the commit we've pulled.
pushd "$SCRATCH"
mkdir build && cd build
cmake .. -DNANOARROW_BUNDLE=ON -DNANOARROW_NAMESPACE=AdbcNs
# Do not use "adbc" in the namespace name since our scripts expose all
# such symbols
cmake .. -DNANOARROW_BUNDLE=ON -DNANOARROW_NAMESPACE=Private
cmake --build .
cmake --install . --prefix=../dist-adbc
popd
Expand Down

0 comments on commit 0398dba

Please sign in to comment.