This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new 313a9d94f Fix clippy warnings for Rust 1.93 (#3239)
313a9d94f is described below
commit 313a9d94fcd8dc16091cda1076a9ad25b9d190b5
Author: Andy Grove <[email protected]>
AuthorDate: Thu Jan 22 10:42:15 2026 -0700
Fix clippy warnings for Rust 1.93 (#3239)
---
native/core/src/execution/jni_api.rs | 10 ++--------
native/core/src/parquet/schema_adapter.rs | 5 ++---
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/native/core/src/execution/jni_api.rs
b/native/core/src/execution/jni_api.rs
index 56569bc69..680cf80c7 100644
--- a/native/core/src/execution/jni_api.rs
+++ b/native/core/src/execution/jni_api.rs
@@ -503,12 +503,7 @@ pub unsafe extern "system" fn
Java_org_apache_comet_Native_executePlan(
let task_ctx = exec_context.session_ctx.task_ctx();
// Each Comet native execution corresponds to a single Spark
partition,
// so we should always execute partition 0.
- let stream = exec_context
- .root_op
- .as_ref()
- .unwrap()
- .native_plan
- .execute(0, task_ctx)?;
+ let stream = root_op.native_plan.execute(0, task_ctx)?;
exec_context.stream = Some(stream);
} else {
// Pull input batches
@@ -619,8 +614,7 @@ pub extern "system" fn
Java_org_apache_comet_Native_releasePlan(
/// Updates the metrics of the query plan.
fn update_metrics(env: &mut JNIEnv, exec_context: &mut ExecutionContext) ->
CometResult<()> {
- if exec_context.root_op.is_some() {
- let native_query = exec_context.root_op.as_ref().unwrap();
+ if let Some(native_query) = &exec_context.root_op {
let metrics = exec_context.metrics.as_obj();
update_comet_metric(env, metrics, native_query)
} else {
diff --git a/native/core/src/parquet/schema_adapter.rs
b/native/core/src/parquet/schema_adapter.rs
index b321d902a..1e0d30c83 100644
--- a/native/core/src/parquet/schema_adapter.rs
+++ b/native/core/src/parquet/schema_adapter.rs
@@ -209,10 +209,9 @@ impl SchemaMapper for SchemaMapping {
// If this field only exists in the table, and not in the
file, then we need to
// populate a default value for it.
|| {
- if self.default_values.is_some() {
+ if let Some(default_values) = &self.default_values {
// We have a map of default values, see if this
field is in there.
- if let Some(value) =
-
self.default_values.as_ref().unwrap().get(&field_idx)
+ if let Some(value) = default_values.get(&field_idx)
// Default value exists, construct a column from
it.
{
let cv = if field.data_type() ==
&value.data_type() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]