@@ -3,21 +3,16 @@ use std::{collections::HashMap, sync::Arc};
3
3
use anyhow:: { bail, Context , Result } ;
4
4
use async_recursion:: async_recursion;
5
5
use datafusion:: {
6
- arrow:: {
7
- compute:: kernels:: filter,
8
- datatypes:: { Schema , SchemaRef } ,
9
- } ,
6
+ arrow:: datatypes:: { Schema , SchemaRef } ,
10
7
datasource:: source_as_provider,
11
8
logical_expr:: Operator ,
12
9
physical_expr,
13
10
physical_plan:: {
14
11
self ,
15
12
aggregates:: AggregateMode ,
16
- explain:: ExplainExec ,
17
13
expressions:: create_aggregate_expr,
18
14
joins:: {
19
- utils:: { ColumnIndex , JoinFilter } ,
20
- PartitionMode ,
15
+ utils:: { ColumnIndex , JoinFilter } , CrossJoinExec , PartitionMode
21
16
} ,
22
17
projection:: ProjectionExec ,
23
18
AggregateExpr , ExecutionPlan , PhysicalExpr ,
@@ -31,7 +26,7 @@ use optd_datafusion_repr::{
31
26
PhysicalFilter , PhysicalHashJoin , PhysicalNestedLoopJoin , PhysicalProjection , PhysicalScan ,
32
27
PhysicalSort , PlanNode , SortOrderExpr , SortOrderType ,
33
28
} ,
34
- PhysicalCollector , Value ,
29
+ PhysicalCollector ,
35
30
} ;
36
31
37
32
use crate :: { physical_collector:: CollectorExec , OptdPlanContext } ;
@@ -320,6 +315,11 @@ impl OptdPlanContext<'_> {
320
315
} ;
321
316
322
317
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
+
323
323
let join_type = match node. join_type ( ) {
324
324
JoinType :: Inner => datafusion:: logical_expr:: JoinType :: Inner ,
325
325
JoinType :: LeftOuter => datafusion:: logical_expr:: JoinType :: Left ,
0 commit comments