Skip to content

Commit 8ffc1d3

Browse files
authored
MINOR: Fix JNI code after upstream DCHECK change (#706)
## What's Changed Upstream renamed the public DCHECK macros to ARROW_DCHECK (apache/arrow#46015)
1 parent c29fcfc commit 8ffc1d3

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.github/workflows/rc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ jobs:
261261
# bundled Protobuf.
262262
brew uninstall protobuf
263263
264+
# We need Flatbuffers 24, not the latest version
265+
# Homebrew does not offer older versions, so remove the Homebrew
266+
# package and rely on Arrow using a bundled version instead
267+
brew uninstall flatbuffers
268+
264269
brew bundle --file=Brewfile
265270
- name: Prepare ccache
266271
run: |

dataset/src/main/cpp/jni_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ReservationListenableMemoryPool::~ReservationListenableMemoryPool() {}
187187
std::string Describe(JNIEnv* env, jthrowable t) {
188188
jclass describer_class =
189189
env->FindClass("org/apache/arrow/dataset/jni/JniExceptionDescriber");
190-
DCHECK_NE(describer_class, nullptr);
190+
ARROW_DCHECK_NE(describer_class, nullptr);
191191
jmethodID describe_method = env->GetStaticMethodID(
192192
describer_class, "describe", "(Ljava/lang/Throwable;)Ljava/lang/String;");
193193
std::string description = JStringToCString(
@@ -197,7 +197,7 @@ std::string Describe(JNIEnv* env, jthrowable t) {
197197

198198
bool IsErrorInstanceOf(JNIEnv* env, jthrowable t, std::string class_name) {
199199
jclass java_class = env->FindClass(class_name.c_str());
200-
DCHECK_NE(java_class, nullptr) << "Could not find Java class " << class_name;
200+
ARROW_DCHECK_NE(java_class, nullptr) << "Could not find Java class " << class_name;
201201
return env->IsInstanceOf(t, java_class);
202202
}
203203

gandiva/src/main/cpp/expression_registry_helper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void ArrowToProtobuf(DataTypePtr type, gandiva::types::ExtGandivaType* gandiva_d
138138
default:
139139
// un-supported types. test ensures that
140140
// when one of these are added build breaks.
141-
DCHECK(false);
141+
ARROW_DCHECK(false);
142142
}
143143
}
144144

gandiva/src/main/cpp/jni_common.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ Status JavaResizableBuffer::Resize(const int64_t new_size, bool shrink_to_fit) {
751751
}
752752

753753
RETURN_NOT_OK(Reserve(new_size));
754-
DCHECK_GE(capacity_, new_size);
754+
ARROW_DCHECK_GE(capacity_, new_size);
755755
size_ = new_size;
756756
return Status::OK();
757757
}

0 commit comments

Comments
 (0)