Skip to content
Closed
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
4 changes: 4 additions & 0 deletions ci/scripts/jni_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ Darwin)
esac

: "${ARROW_JAVA_BUILD_TESTS:=${ARROW_BUILD_TESTS:-ON}}"
: "${ARROW_VCPKG:=OFF}"
: "${CMAKE_BUILD_TYPE:=release}"
read -ra EXTRA_CMAKE_OPTIONS <<<"${JAVA_JNI_CMAKE_ARGS:-}"
# Must set ARROW_VCPKG because upstream Findutf8proc.cmake checks that to
# determine what to do
cmake \
-S "${source_dir}" \
-B "${build_dir}" \
-DARROW_VCPKG="${ARROW_VCPKG}" \
Copy link
Member

Choose a reason for hiding this comment

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

Can we use ARROW_DEPENDENCY_SOURCE=VCPKG instead? It sets ARROW_VCPKG internally.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this and it doesn't seem to work: I don't think the Java JNI CMake code has anything to detect this. Also, Findutf8proc.cmake installed by Arrow's CMake checks ARROW_VCPKG, but I don't see any other code installed to set this.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, OK. I'll fix it in apache/arrow.

Copy link
Member

Choose a reason for hiding this comment

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

apache/arrow#46565 will fix this.

-DARROW_JAVA_JNI_ENABLE_DATASET="${ARROW_DATASET:-OFF}" \
-DARROW_JAVA_JNI_ENABLE_GANDIVA="${ARROW_GANDIVA:-OFF}" \
-DARROW_JAVA_JNI_ENABLE_ORC="${ARROW_ORC:-OFF}" \
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/jni_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export ARROW_GANDIVA
export ARROW_ORC
: "${ARROW_PARQUET:=ON}"
: "${ARROW_S3:=ON}"
export ARROW_VCPKG=ON # influences jni_build.sh
: "${CMAKE_BUILD_TYPE:=release}"
: "${CMAKE_UNITY_BUILD:=ON}"
: "${VCPKG_ROOT:=/opt/vcpkg}"
Expand Down
2 changes: 1 addition & 1 deletion gandiva/src/main/cpp/jni_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ DataTypePtr ProtoTypeToDataType(const gandiva::types::ExtGandivaType& ext_type)
return arrow::date64();
case gandiva::types::DECIMAL:
// TODO: error handling
return arrow::decimal(ext_type.precision(), ext_type.scale());
return arrow::decimal128(ext_type.precision(), ext_type.scale());
case gandiva::types::TIME32:
return ProtoTypeToTime32(ext_type);
case gandiva::types::TIME64:
Expand Down
Loading