Skip to content

Commit

Permalink
spark2 should support DeleteFromTable internally
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Chang committed Jul 17, 2022
1 parent c92b5a3 commit af12dbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.apache.spark.sql.catalyst.expressions.{AttributeReference, Expression
import org.apache.spark.sql.catalyst.parser.ParserInterface
import org.apache.spark.sql.catalyst.plans.JoinType
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.plans.logical.{InsertIntoTable, Join, LogicalPlan}
import org.apache.spark.sql.catalyst.plans.logical.{InsertIntoTable, DeleteFromTable, Join, LogicalPlan}
import org.apache.spark.sql.catalyst.rules.Rule
import org.apache.spark.sql.catalyst.{AliasIdentifier, TableIdentifier}
import org.apache.spark.sql.execution.datasources.parquet.{ParquetFileFormat, Spark24HoodieParquetFileFormat}
Expand Down Expand Up @@ -177,7 +177,7 @@ class Spark2Adapter extends SparkAdapter {
}

override def getDeleteFromTable(table: LogicalPlan, condition: Option[Expression]): LogicalPlan = {
throw new UnsupportedOperationException(s"DeleteFromTable LogicalPlan is not supported on Spark 2.x!")
DeleteFromTable(table, condition)
}

override def getQueryParserFromExtendedSqlParser(session: SparkSession, delegate: ParserInterface,
Expand Down

0 comments on commit af12dbd

Please sign in to comment.