Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2792#discussion_r228189848
--- Diff: store/CSDK/src/CarbonReader.cpp ---
@@ -79,21 +78,19 @@ jobject CarbonReader::build() {
jmethodID buildID = jniEnv->GetMethodID(carbonReaderBuilderClass,
"build",
"()Lorg/apache/carbondata/sdk/file/CarbonReader;");
carbonReaderObject =
jniEnv->CallObjectMethod(carbonReaderBuilderObject, buildID);
+ jclass carbonReader = jniEnv->GetObjectClass(carbonReaderObject);
+ hasNextID = jniEnv->GetMethodID(carbonReader, "hasNext", "()Z");
--- End diff --
hasNextId is for method of class, only need one times.
If move to haCarbonReader::hasNext(), it will increase read carbon file
time
---