@@ -3,21 +3,16 @@ use std::{collections::HashMap, sync::Arc};
33use anyhow:: { bail, Context , Result } ;
44use async_recursion:: async_recursion;
55use datafusion:: {
6- arrow:: {
7- compute:: kernels:: filter,
8- datatypes:: { Schema , SchemaRef } ,
9- } ,
6+ arrow:: datatypes:: { Schema , SchemaRef } ,
107 datasource:: source_as_provider,
118 logical_expr:: Operator ,
129 physical_expr,
1310 physical_plan:: {
1411 self ,
1512 aggregates:: AggregateMode ,
16- explain:: ExplainExec ,
1713 expressions:: create_aggregate_expr,
1814 joins:: {
19- utils:: { ColumnIndex , JoinFilter } ,
20- PartitionMode ,
15+ utils:: { ColumnIndex , JoinFilter } , CrossJoinExec , PartitionMode
2116 } ,
2217 projection:: ProjectionExec ,
2318 AggregateExpr , ExecutionPlan , PhysicalExpr ,
@@ -31,7 +26,7 @@ use optd_datafusion_repr::{
3126 PhysicalFilter , PhysicalHashJoin , PhysicalNestedLoopJoin , PhysicalProjection , PhysicalScan ,
3227 PhysicalSort , PlanNode , SortOrderExpr , SortOrderType ,
3328 } ,
34- PhysicalCollector , Value ,
29+ PhysicalCollector ,
3530} ;
3631
3732use crate :: { physical_collector:: CollectorExec , OptdPlanContext } ;
@@ -320,6 +315,11 @@ impl OptdPlanContext<'_> {
320315 } ;
321316
322317 let physical_expr = self . from_optd_expr ( node. cond ( ) , & Arc :: new ( filter_schema. clone ( ) ) ) ?;
318+
319+ if let JoinType :: Cross = node. join_type ( ) {
320+ return Ok ( Arc :: new ( CrossJoinExec :: new ( left_exec, right_exec) ) as Arc < dyn ExecutionPlan + ' static > ) ;
321+ }
322+
323323 let join_type = match node. join_type ( ) {
324324 JoinType :: Inner => datafusion:: logical_expr:: JoinType :: Inner ,
325325 JoinType :: LeftOuter => datafusion:: logical_expr:: JoinType :: Left ,
0 commit comments