Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyang-li committed Jan 14, 2025
1 parent f516fbb commit 3c7bff1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp-ch/local-engine/Parser/RelParsers/ReadRelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ DB::QueryPlanPtr ReadRelParser::parse(DB::QueryPlanPtr query_plan, const substra

if (isReadRelFromJavaIter(read))
read_step = parseReadRelWithJavaIter(read);
else if (isReadRelFromLocalFile(read))
read_step = parseReadRelWithLocalFile(read);
else if (isReadRelFromRange(read))
read_step = parseReadRelWithRange(read);
else if (isReadRelFromLocalFile(read))
read_step = parseReadRelWithLocalFile(read);

query_plan = std::make_unique<DB::QueryPlan>();
steps.emplace_back(read_step.get());
Expand Down Expand Up @@ -111,7 +111,7 @@ bool ReadRelParser::isReadRelFromLocalFile(const substrait::ReadRel & rel)
if (rel.has_local_files())
return !isReadRelFromJavaIter(rel);
else
return !rel.has_extension_table() && !isReadRelFromMergeTree(rel);
return !rel.has_extension_table() && !isReadRelFromMergeTree(rel) && !isReadRelFromRange(rel);
}

bool ReadRelParser::isReadRelFromMergeTree(const substrait::ReadRel & rel)
Expand Down
1 change: 1 addition & 0 deletions cpp-ch/local-engine/local_engine_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ JNIEXPORT jstring Java_org_apache_gluten_vectorized_BatchIterator_nativeFetchMet
const local_engine::LocalExecutor * executor = reinterpret_cast<local_engine::LocalExecutor *>(executor_address);
const auto metric = executor->getMetric();
const String metrics_json = metric ? local_engine::RelMetricSerializer::serializeRelMetric(metric) : "";
// std::cout << "metrics_json: " << metrics_json << std::endl;

return local_engine::charTojstring(env, metrics_json.c_str());
LOCAL_ENGINE_JNI_METHOD_END(env, nullptr)
Expand Down

0 comments on commit 3c7bff1

Please sign in to comment.