File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ impl PhysicalExpr for CheckedBinaryExpr {
102102 if let Some ( spark_err) = e. downcast_ref :: < SparkError > ( ) {
103103 let wrapped = SparkErrorWithContext :: with_context (
104104 spark_err. clone ( ) ,
105- self . query_context . as_ref ( ) . unwrap ( ) . clone ( ) ,
105+ Arc :: clone ( self . query_context . as_ref ( ) . unwrap ( ) ) ,
106106 ) ;
107107 Err ( DataFusionError :: External ( Box :: new ( wrapped) ) )
108108 } else {
Original file line number Diff line number Diff line change @@ -682,6 +682,7 @@ impl PhysicalPlanner {
682682 }
683683 }
684684
685+ #[ allow( clippy:: too_many_arguments) ]
685686 pub fn create_binary_expr (
686687 & self ,
687688 spark_expr : & Expr ,
Original file line number Diff line number Diff line change @@ -429,6 +429,7 @@ struct AvgDecimalGroupsAccumulator {
429429}
430430
431431impl AvgDecimalGroupsAccumulator {
432+ #[ allow( clippy:: too_many_arguments) ]
432433 pub fn new (
433434 return_data_type : & DataType ,
434435 sum_data_type : & DataType ,
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ pub fn cast_boolean_to_decimal(
4949 && e. to_string ( ) . contains ( "too large to store in a Decimal128" )
5050 {
5151 // Use the scaled value as it's the only non-zero value that could overflow
52- crate :: error:: decimal_overflow_error ( scaled_val, precision, scale) . into ( )
52+ crate :: error:: decimal_overflow_error ( scaled_val, precision, scale)
5353 } else {
5454 SparkError :: Arrow ( Arc :: new ( e) )
5555 }
Original file line number Diff line number Diff line change @@ -2519,7 +2519,7 @@ impl PhysicalExpr for Cast {
25192519 if let Some ( spark_err) = e. downcast_ref :: < crate :: SparkError > ( ) {
25202520 let wrapped = crate :: SparkErrorWithContext :: with_context (
25212521 spark_err. clone ( ) ,
2522- self . query_context . as_ref ( ) . unwrap ( ) . clone ( ) ,
2522+ Arc :: clone ( self . query_context . as_ref ( ) . unwrap ( ) ) ,
25232523 ) ;
25242524 Err ( DataFusionError :: External ( Box :: new ( wrapped) ) )
25252525 } else {
Original file line number Diff line number Diff line change @@ -136,9 +136,9 @@ impl PhysicalExpr for CheckOverflow {
136136 . iter ( )
137137 . find ( |v| {
138138 if let Some ( val) = v {
139- ! arrow:: array:: types:: Decimal128Type :: validate_decimal_precision (
139+ arrow:: array:: types:: Decimal128Type :: validate_decimal_precision (
140140 * val, * precision, * scale
141- ) . is_ok ( )
141+ ) . is_err ( )
142142 } else {
143143 false
144144 }
@@ -151,7 +151,7 @@ impl PhysicalExpr for CheckOverflow {
151151 // Wrap with query_context if present
152152 if let Some ( ctx) = & self . query_context {
153153 DataFusionError :: External ( Box :: new (
154- crate :: SparkErrorWithContext :: with_context ( spark_error, ctx . clone ( ) )
154+ crate :: SparkErrorWithContext :: with_context ( spark_error, Arc :: clone ( ctx ) )
155155 ) )
156156 } else {
157157 DataFusionError :: External ( Box :: new ( spark_error) )
@@ -185,7 +185,7 @@ impl PhysicalExpr for CheckOverflow {
185185 DataFusionError :: External ( Box :: new (
186186 crate :: SparkErrorWithContext :: with_context (
187187 spark_error,
188- ctx . clone ( ) ,
188+ Arc :: clone ( ctx ) ,
189189 ) ,
190190 ) )
191191 } else {
You can’t perform that action at this time.
0 commit comments