Skip to content

Commit

Permalink
revert to original grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-db committed Oct 15, 2024
1 parent d938515 commit cc8fe09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3553,7 +3553,7 @@ searchCondition
;

predicate
: EXISTS? L_PAREN (subquery | exprList) R_PAREN? IN L_PAREN subquery R_PAREN # predExists
: EXISTS L_PAREN subquery R_PAREN # predExists
| expression comparisonOperator expression # predBinop
| expression comparisonOperator (ALL | SOME | ANY) L_PAREN subquery R_PAREN # predASA
| expression IS NOT? NULL # predIsNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ class DeleteOnMultipleColumns extends Rule[LogicalPlan] {
}

private def transformSubquery(target: LogicalPlan, subquery: Exists): LogicalPlan = {
// Assuming the subquery is a SELECT DISTINCT query
print("--------- subquery.relation: " + subquery.relation)
// ScalarSubquery(subquery.relation)
val table = subquery.relation
// Exists(Seq(ScalarSubquery(Project(table, Seq(Id("1"))))))
Project(table, Seq(Id("1")))
// val table = target
Filter(Project(NamedTable(subquery.relation.toString, Map(), is_streaming = false), Seq(Id("1")))
, Equals(Id("1"), Id("1")))
}

// private def createWhereCondition(source): LogicalPlan = {
//
// }

}

0 comments on commit cc8fe09

Please sign in to comment.