diff --git a/core/src/main/antlr4/com/databricks/labs/remorph/parsers/snowflake/SnowflakeParser.g4 b/core/src/main/antlr4/com/databricks/labs/remorph/parsers/snowflake/SnowflakeParser.g4 index 2afde49c2..307add05c 100644 --- a/core/src/main/antlr4/com/databricks/labs/remorph/parsers/snowflake/SnowflakeParser.g4 +++ b/core/src/main/antlr4/com/databricks/labs/remorph/parsers/snowflake/SnowflakeParser.g4 @@ -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 diff --git a/core/src/main/scala/com/databricks/labs/remorph/parsers/snowflake/rules/DeleteOnMultipleColumns.scala b/core/src/main/scala/com/databricks/labs/remorph/parsers/snowflake/rules/DeleteOnMultipleColumns.scala index a204312fb..700dc954f 100644 --- a/core/src/main/scala/com/databricks/labs/remorph/parsers/snowflake/rules/DeleteOnMultipleColumns.scala +++ b/core/src/main/scala/com/databricks/labs/remorph/parsers/snowflake/rules/DeleteOnMultipleColumns.scala @@ -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 = { +// +// } + } \ No newline at end of file