From 2e817b6fe3dab94576aa494f8fcf532461d25a82 Mon Sep 17 00:00:00 2001 From: comphead Date: Mon, 8 Apr 2024 14:31:50 -0700 Subject: [PATCH] merge --- core/src/execution/datafusion/planner.rs | 4 +++- .../scala/org/apache/comet/CometSparkSessionExtensions.scala | 1 + .../main/scala/org/apache/comet/serde/QueryPlanSerde.scala | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/execution/datafusion/planner.rs b/core/src/execution/datafusion/planner.rs index f97d2f6af..798889b12 100644 --- a/core/src/execution/datafusion/planner.rs +++ b/core/src/execution/datafusion/planner.rs @@ -26,7 +26,8 @@ use datafusion::{ execution::FunctionRegistry, functions::math, logical_expr::{ - BuiltinScalarFunction, Operator as DataFusionOperator, ScalarFunctionDefinition, + expr::find_df_window_func, BuiltinScalarFunction, Operator as DataFusionOperator, + ScalarFunctionDefinition, WindowFrame, WindowFrameBound, WindowFrameUnits, }, physical_expr::{ execution_props::ExecutionProps, @@ -1325,6 +1326,7 @@ impl PhysicalPlanner { sort_exprs, window_frame.into(), &input_schema, + false, // TODO: Ignore nulls ) .map_err(|e| ExecutionError::DataFusionError(e.to_string())) } diff --git a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala index b17ed4d79..d58b72f46 100644 --- a/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala +++ b/spark/src/main/scala/org/apache/comet/CometSparkSessionExtensions.scala @@ -39,6 +39,7 @@ import org.apache.spark.sql.execution.datasources.v2.BatchScanExec import org.apache.spark.sql.execution.datasources.v2.parquet.ParquetScan import org.apache.spark.sql.execution.exchange.{BroadcastExchangeExec, ReusedExchangeExec, ShuffleExchangeExec} import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, ShuffledHashJoinExec, SortMergeJoinExec} +import org.apache.spark.sql.execution.window.WindowExec import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types._ diff --git a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala index 3e1082859..f769ed026 100644 --- a/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala +++ b/spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala @@ -37,6 +37,7 @@ import org.apache.spark.sql.execution.adaptive.{BroadcastQueryStageExec, Shuffle import org.apache.spark.sql.execution.aggregate.HashAggregateExec import org.apache.spark.sql.execution.exchange.{BroadcastExchangeExec, ReusedExchangeExec, ShuffleExchangeExec} import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, HashJoin, ShuffledHashJoinExec, SortMergeJoinExec} +import org.apache.spark.sql.execution.window.WindowExec import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.UTF8String