Skip to content

Commit e865a64

Browse files
committed
Remove check for graph for now
1 parent 1d67cdd commit e865a64

File tree

1 file changed

+23
-25
lines changed
  • lib/graphfusion-logical/src/paths/path_node

1 file changed

+23
-25
lines changed

lib/graphfusion-logical/src/paths/path_node/rewrite.rs

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,8 @@ impl PathToJoinsRule {
183183
lhs: &PropertyPathExpression,
184184
rhs: &PropertyPathExpression,
185185
) -> DFResult<LogicalPlanBuilder> {
186-
let lhs = self
187-
.rewrite_property_path_expression(graph, lhs)?
188-
.alias("lhs")?;
189-
let rhs = self
190-
.rewrite_property_path_expression(graph, rhs)?
191-
.alias("rhs")?;
186+
let lhs = self.rewrite_property_path_expression(graph, lhs)?;
187+
let rhs = self.rewrite_property_path_expression(graph, rhs)?;
192188
join_path_sequence(lhs, rhs)
193189
}
194190

@@ -277,25 +273,27 @@ fn join_path_sequence(
277273
lhs: LogicalPlanBuilder,
278274
rhs: LogicalPlanBuilder,
279275
) -> DFResult<LogicalPlanBuilder> {
280-
lhs.join_on(
281-
rhs.build()?,
282-
JoinType::Inner,
283-
[
284-
ENC_AS_NATIVE_BOOLEAN.call(vec![ENC_SAME_TERM.call(vec![
285-
Expr::from(Column::new(Some("lhs"), COL_GRAPH)),
286-
Expr::from(Column::new(Some("rhs"), COL_GRAPH)),
287-
])]),
288-
ENC_AS_NATIVE_BOOLEAN.call(vec![ENC_SAME_TERM.call(vec![
289-
Expr::from(Column::new(Some("lhs"), COL_TARGET)),
290-
Expr::from(Column::new(Some("rhs"), COL_SOURCE)),
291-
])]),
292-
],
293-
)?
294-
.project([
295-
col(Column::new(Some("lhs"), COL_GRAPH)),
296-
col(Column::new(Some("lhs"), COL_SOURCE)).alias(COL_SOURCE),
297-
col(Column::new(Some("rhs"), COL_TARGET)).alias(COL_TARGET),
298-
])
276+
lhs.alias("lhs")?
277+
.join_on(
278+
rhs.alias("rhs")?.build()?,
279+
JoinType::Inner,
280+
[
281+
// TODO: I think this should be part
282+
// ENC_AS_NATIVE_BOOLEAN.call(vec![ENC_SAME_TERM.call(vec![
283+
// Expr::from(Column::new(Some("lhs"), COL_GRAPH)),
284+
// Expr::from(Column::new(Some("rhs"), COL_GRAPH)),
285+
// ])]),
286+
ENC_AS_NATIVE_BOOLEAN.call(vec![ENC_SAME_TERM.call(vec![
287+
Expr::from(Column::new(Some("lhs"), COL_TARGET)),
288+
Expr::from(Column::new(Some("rhs"), COL_SOURCE)),
289+
])]),
290+
],
291+
)?
292+
.project([
293+
col(Column::new(Some("lhs"), COL_GRAPH)).alias(COL_GRAPH),
294+
col(Column::new(Some("lhs"), COL_SOURCE)).alias(COL_SOURCE),
295+
col(Column::new(Some("rhs"), COL_TARGET)).alias(COL_TARGET),
296+
])
299297
}
300298

301299
/// Creates a union that represents an alternative of two paths.

0 commit comments

Comments
 (0)