This is an automated email from the ASF dual-hosted git repository. richox pushed a commit to branch dev-v6.0.0-decimal-cast in repository https://gitbox.apache.org/repos/asf/auron.git
commit 043dff1f5c1dfd9dedeb92c81763e2353064743d Author: zhangli20 <[email protected]> AuthorDate: Sat Mar 7 15:18:53 2026 +0800 disable max/min + nested params conversion (https://team.corp.kuaishou.com/task/T10892667) --- .../src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala | 4 ++++ .../org/apache/spark/sql/execution/blaze/plan/NativeWindowBase.scala | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala b/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala index f798dcee..2bcb756a 100644 --- a/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala +++ b/spark-extension/src/main/scala/org/apache/spark/sql/blaze/NativeConverters.scala @@ -1057,9 +1057,13 @@ object NativeConverters extends Logging { e.aggregateFunction match { case e: Max => + assert(!e.child.dataType.isInstanceOf[ArrayType] && !e.child.dataType.isInstanceOf[MapType] && !e.child.dataType.isInstanceOf[StructType], + s"Max on complex types (Array/Map/Struct) is not supported in native execution. Expression: ${e}") aggBuilder.setAggFunction(pb.AggFunction.MAX) aggBuilder.addChildren(convertExpr(e.child)) case e: Min => + assert(!e.child.dataType.isInstanceOf[ArrayType] && !e.child.dataType.isInstanceOf[MapType] && !e.child.dataType.isInstanceOf[StructType], + s"Min on complex types (Array/Map/Struct) is not supported in native execution. Expression: ${e}") aggBuilder.setAggFunction(pb.AggFunction.MIN) aggBuilder.addChildren(convertExpr(e.child)) case e: Sum if e.dataType.isInstanceOf[AtomicType] => diff --git a/spark-extension/src/main/scala/org/apache/spark/sql/execution/blaze/plan/NativeWindowBase.scala b/spark-extension/src/main/scala/org/apache/spark/sql/execution/blaze/plan/NativeWindowBase.scala index 4ccf4112..870ca51e 100644 --- a/spark-extension/src/main/scala/org/apache/spark/sql/execution/blaze/plan/NativeWindowBase.scala +++ b/spark-extension/src/main/scala/org/apache/spark/sql/execution/blaze/plan/NativeWindowBase.scala @@ -136,6 +136,8 @@ abstract class NativeWindowBase( assert( spec.frameSpecification == RowNumber().frame, // only supports RowFrame(Unbounded, CurrentRow) s"window frame not supported: ${spec.frameSpecification}") + assert(!e.child.dataType.isInstanceOf[ArrayType] && !e.child.dataType.isInstanceOf[MapType] && !e.child.dataType.isInstanceOf[StructType], + s"Max on complex types (Array/Map/Struct) is not supported in native execution. Expression: ${e}") windowExprBuilder.setFuncType(pb.WindowFunctionType.Agg) windowExprBuilder.setAggFunc(pb.AggFunction.MAX) windowExprBuilder.addChildren(NativeConverters.convertExpr(e.child)) @@ -144,6 +146,8 @@ abstract class NativeWindowBase( assert( spec.frameSpecification == RowNumber().frame, // only supports RowFrame(Unbounded, CurrentRow) s"window frame not supported: ${spec.frameSpecification}") + assert(!e.child.dataType.isInstanceOf[ArrayType] && !e.child.dataType.isInstanceOf[MapType] && !e.child.dataType.isInstanceOf[StructType], + s"Min on complex types (Array/Map/Struct) is not supported in native execution. Expression: ${e}") windowExprBuilder.setFuncType(pb.WindowFunctionType.Agg) windowExprBuilder.setAggFunc(pb.AggFunction.MIN) windowExprBuilder.addChildren(NativeConverters.convertExpr(e.child))
