File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
service/src/physical_plans
binder/bind_table_reference Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,7 @@ impl PhysicalPlanBuilder {
164164
165165 // 2. Build physical plan.
166166 // Choose physical join type by join conditions
167- if matches ! (
168- join. join_type,
169- JoinType :: Asof | JoinType :: LeftAsof | JoinType :: RightAsof
170- ) {
167+ if join. join_type . is_asof_join ( ) {
171168 let left_rel_expr = RelExpr :: with_s_expr ( s_expr. left_child ( ) ) ;
172169 let right_rel_expr = RelExpr :: with_s_expr ( s_expr. right_child ( ) ) ;
173170 let left_prop = left_rel_expr. derive_relational_prop ( ) ?;
Original file line number Diff line number Diff line change @@ -452,10 +452,7 @@ impl Binder {
452452 build_side_cache_info,
453453 } ;
454454
455- if matches ! (
456- logical_join. join_type,
457- JoinType :: Asof | JoinType :: LeftAsof | JoinType :: RightAsof
458- ) {
455+ if logical_join. join_type . is_asof_join ( ) {
459456 self . rewrite_asof ( logical_join, left_child, right_child)
460457 } else {
461458 Ok ( SExpr :: create_binary (
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ impl JoinType {
118118 JoinType :: InnerAny | JoinType :: LeftAny | JoinType :: RightAny
119119 )
120120 }
121+
122+ pub fn is_asof_join ( & self ) -> bool {
123+ matches ! (
124+ self ,
125+ JoinType :: Asof | JoinType :: LeftAsof | JoinType :: RightAsof
126+ )
127+ }
121128}
122129
123130impl Display for JoinType {
You can’t perform that action at this time.
0 commit comments