Skip to content
Open
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
8 changes: 0 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ members = [
"native-engine/auron-memmgr",
]

[workspace.lints.rust]
# Pending processing (temporarily allow)
unused_variables = "allow"
dead_code = "allow"
unused_imports = "allow"
unused_must_use = "allow"
deprecated = "allow"

[workspace.lints.clippy]
unwrap_used = "deny"
panic = "deny"
Expand Down
4 changes: 2 additions & 2 deletions native-engine/auron-planner/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use arrow::{
};
use base64::{Engine, prelude::BASE64_URL_SAFE_NO_PAD};
use datafusion::{
common::{ExprSchema, Result, ScalarValue, stats::Precision},
common::{Result, ScalarValue, stats::Precision},
datasource::{
file_format::file_compression_type::FileCompressionType,
listing::{FileRange, PartitionedFile},
Expand All @@ -40,7 +40,7 @@ use datafusion::{
expressions::{LikeExpr, SCAndExpr, SCOrExpr, in_list},
},
physical_plan::{
ColumnStatistics, ExecutionPlan, PhysicalExpr, Statistics, expressions as phys_expr,
ColumnStatistics, ExecutionPlan, Statistics, expressions as phys_expr,
expressions::{
BinaryExpr, CaseExpr, CastExpr, Column, IsNotNullExpr, IsNullExpr, Literal,
NegativeExpr, NotExpr, PhysicalSortExpr,
Expand Down
11 changes: 6 additions & 5 deletions native-engine/datafusion-ext-commons/src/arrow/eq_comparator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,12 @@ pub mod tests {
}

#[test]
fn test_bytes() {
test_bytes_impl::<Utf8Type>();
test_bytes_impl::<LargeUtf8Type>();
test_bytes_impl::<BinaryType>();
test_bytes_impl::<LargeBinaryType>();
fn test_bytes() -> Result<()> {
let _ = test_bytes_impl::<Utf8Type>();
let _ = test_bytes_impl::<LargeUtf8Type>();
let _ = test_bytes_impl::<BinaryType>();
let _ = test_bytes_impl::<LargeBinaryType>();
Comment on lines +747 to +750
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The test is silencing potential errors from test_bytes_impl by using let _ = instead of propagating them with the ? operator. If test_bytes_impl fails, the test will still pass instead of failing. Each call should use the ? operator to propagate errors, for example: test_bytes_impl::<Utf8Type>()?;

Copilot uses AI. Check for mistakes.
Ok(())
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::{
any::Any,
convert::TryInto,
fmt::{Debug, Formatter},
hash::{Hash, Hasher},
hash::Hash,
sync::Arc,
};

Expand Down
1 change: 1 addition & 0 deletions native-engine/datafusion-ext-exprs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub mod string_contains;
pub mod string_ends_with;
pub mod string_starts_with;

#[allow(dead_code)]
fn down_cast_any_ref(any: &dyn Any) -> &dyn Any {
if any.is::<PhysicalExprRef>() {
any.downcast_ref::<PhysicalExprRef>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use std::{
any::Any,
fmt::{Debug, Display, Formatter},
hash::{Hash, Hasher},
io::Write,
sync::Arc,
};

Expand Down
2 changes: 1 addition & 1 deletion native-engine/datafusion-ext-functions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mod spark_unscaled_value;
#[allow(clippy::panic)] // Temporarily allow panic to refactor to Result later
pub fn create_auron_ext_function(
name: &str,
spark_partition_id: usize,
#[allow(unused_variables)] spark_partition_id: usize,
) -> Result<ScalarFunctionImplementation> {
// auron ext functions, if used for spark should be start with 'Spark_',
// if used for flink should be start with 'Flink_',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
use std::{
any::Any,
fmt::{Debug, Display, Formatter},
io::{Cursor, Read, Write},
sync::Arc,
};

use arrow::{
array::{
Array, ArrayAccessor, ArrayRef, BinaryArray, BinaryBuilder, StructArray, as_struct_array,
make_array,
},
array::{Array, ArrayRef, StructArray, as_struct_array, make_array},
datatypes::{DataType, Field, Schema, SchemaRef},
ffi::{FFI_ArrowArray, FFI_ArrowSchema, from_ffi, from_ffi_and_data_type},
record_batch::{RecordBatch, RecordBatchOptions},
Expand All @@ -39,7 +35,7 @@ use datafusion::{
physical_expr::PhysicalExprRef,
};
use datafusion_ext_commons::{
UninitializedInit, downcast_any,
downcast_any,
io::{read_len, write_len},
};
use jni::objects::{GlobalRef, JObject};
Expand Down
3 changes: 2 additions & 1 deletion native-engine/datafusion-ext-plans/src/limit_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl ExecutionPlan for LimitExec {

fn statistics(&self) -> Result<Statistics> {
Statistics::with_fetch(
self.input.statistics()?,
self.input.partition_statistics(None)?,
self.schema(),
Some(self.limit),
self.offset,
Expand Down Expand Up @@ -194,6 +194,7 @@ fn execute_limit_with_offset(

#[cfg(test)]
mod test {
#![allow(deprecated)]
use std::sync::Arc;

use arrow::{
Expand Down
2 changes: 2 additions & 0 deletions native-engine/datafusion-ext-plans/src/parquet_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

//! Execution plan for reading Parquet files

#![allow(deprecated)] // Deprecated method: fetch_parquet_metadata
use std::{any::Any, fmt, fmt::Formatter, ops::Range, pin::Pin, sync::Arc};

use arrow::datatypes::SchemaRef;
Expand Down Expand Up @@ -465,6 +466,7 @@ impl AsyncFileReader for ParquetFileReaderRef {
}
}

#[allow(dead_code)]
fn expr_contains_decimal_type(expr: &PhysicalExprRef, schema: &SchemaRef) -> Result<bool> {
if matches!(expr.data_type(schema)?, DataType::Decimal128(..)) {
return Ok(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#![allow(deprecated)] // Deprecated method: set_max_statistics_size
use std::{any::Any, fmt::Formatter, io::Write, sync::Arc};

use arrow::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ impl ExecutionPlan for RssShuffleWriterExec {
}

fn statistics(&self) -> Result<Statistics> {
self.input.statistics()
self.input.partition_statistics(None)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl ExecutionPlan for ShuffleWriterExec {
}

fn statistics(&self) -> Result<Statistics> {
self.input.statistics()
self.input.partition_statistics(None)
}
}

Expand Down
7 changes: 4 additions & 3 deletions native-engine/datafusion-ext-plans/src/sort_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl ExecutionPlan for SortExec {

fn statistics(&self) -> Result<Statistics> {
Statistics::with_fetch(
self.input.statistics()?,
self.input.partition_statistics(None)?,
self.schema(),
self.limit,
self.offset,
Expand Down Expand Up @@ -718,7 +718,7 @@ impl ExternalSorter {
if !in_mem_blocks.is_empty() {
let mut merger = Merger::try_new(self.clone(), in_mem_blocks)?;
if self.skip > 0 {
merger.skip_rows::<InMemRowsKeyCollector>(self.skip, output_batch_size);
let _ = merger.skip_rows::<InMemRowsKeyCollector>(self.skip, output_batch_size);
}
while let Some((key_collector, pruned_batch)) =
merger.next::<InMemRowsKeyCollector>(output_batch_size)?
Expand All @@ -744,7 +744,7 @@ impl ExternalSorter {
let spill_blocks = spills.into_iter().map(|spill| spill.block).collect();
let mut merger = Merger::try_new(self.to_arc(), spill_blocks)?;
if self.skip > 0 {
merger.skip_rows::<InMemRowsKeyCollector>(self.skip, output_batch_size);
let _ = merger.skip_rows::<InMemRowsKeyCollector>(self.skip, output_batch_size);
}
while let Some((key_collector, pruned_batch)) =
merger.next::<InMemRowsKeyCollector>(output_batch_size)?
Expand Down Expand Up @@ -1580,6 +1580,7 @@ mod test {

#[cfg(test)]
mod fuzztest {
#![allow(deprecated)]
use std::{sync::Arc, time::Instant};

use arrow::{
Expand Down
Loading