File tree Expand file tree Collapse file tree
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/catalyst/analysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919package org .apache .paimon .spark .catalyst .analysis
2020
21- import org .apache .paimon .spark .SparkTableWithRowLevelOps
2221import org .apache .paimon .spark .commands .DeleteFromPaimonTableCommand
2322import org .apache .paimon .table .FileStoreTable
2423
@@ -39,12 +38,8 @@ object PaimonDeleteTable extends Rule[LogicalPlan] with RowLevelHelper {
3938 // trip.
4039 AnalysisHelper .allowInvokingTransformsInAnalyzer {
4140 plan.transformDown {
42- // Skip tables that expose SupportsRowLevelOperations: Spark's built-in RewriteDeleteFromTable
43- // handles them via the V2 row-level path, and hijacking the plan here would force V1
44- // fallback on configurations (e.g. row-tracking, data-evolution) that require V2 semantics.
4541 case d @ DeleteFromTable (PaimonRelation (table), condition)
46- if d.resolved && ! table.isInstanceOf [SparkTableWithRowLevelOps ] &&
47- shouldFallbackToV1Delete(table, condition) =>
42+ if d.resolved && shouldFallbackToV1Delete(table, condition) =>
4843 checkPaimonTable(table.getTable)
4944
5045 table.getTable match {
Original file line number Diff line number Diff line change 1818
1919package org .apache .paimon .spark .catalyst .analysis
2020
21- import org .apache .paimon .spark .{ SparkTable , SparkTableWithRowLevelOps }
21+ import org .apache .paimon .spark .SparkTable
2222import org .apache .paimon .spark .catalyst .analysis .expressions .ExpressionHelper
2323import org .apache .paimon .spark .commands .{MergeIntoPaimonDataEvolutionTable , MergeIntoPaimonTable }
2424
@@ -49,15 +49,8 @@ trait PaimonMergeIntoBase
4949 // trip.
5050 AnalysisHelper .allowInvokingTransformsInAnalyzer {
5151 plan.transformDown {
52- // Skip tables that expose SupportsRowLevelOperations: Spark's built-in RewriteMergeIntoTable
53- // handles them via the V2 row-level path, and hijacking the plan here would force V1
54- // fallback on configurations (e.g. row-tracking, data-evolution) that require V2 semantics.
5552 case merge : MergeIntoTable
56- if merge.resolved && PaimonRelation .isPaimonTable(merge.targetTable) &&
57- ! PaimonRelation
58- .getPaimonRelation(merge.targetTable)
59- .table
60- .isInstanceOf [SparkTableWithRowLevelOps ] =>
53+ if merge.resolved && PaimonRelation .isPaimonTable(merge.targetTable) =>
6154 val relation = PaimonRelation .getPaimonRelation(merge.targetTable)
6255 val v2Table = relation.table.asInstanceOf [SparkTable ]
6356 val dataEvolutionEnabled = v2Table.coreOptions.dataEvolutionEnabled()
Original file line number Diff line number Diff line change 1818
1919package org .apache .paimon .spark .catalyst .analysis
2020
21- import org .apache .paimon .spark .SparkTableWithRowLevelOps
2221import org .apache .paimon .spark .commands .UpdatePaimonTableCommand
2322import org .apache .paimon .table .FileStoreTable
2423
@@ -45,11 +44,7 @@ object PaimonUpdateTable
4544 // trip. The pattern guard keeps the rewrite restricted to fully resolved plans.
4645 AnalysisHelper .allowInvokingTransformsInAnalyzer {
4746 plan.transformDown {
48- // Skip tables that expose SupportsRowLevelOperations: Spark's built-in RewriteUpdateTable
49- // handles them via the V2 row-level path, and hijacking the plan here would force V1
50- // fallback on configurations (e.g. row-tracking, data-evolution) that require V2 semantics.
51- case u @ UpdateTable (PaimonRelation (table), assignments, condition)
52- if u.resolved && ! table.isInstanceOf [SparkTableWithRowLevelOps ] =>
47+ case u @ UpdateTable (PaimonRelation (table), assignments, condition) if u.resolved =>
5348 checkPaimonTable(table.getTable)
5449
5550 table.getTable match {
You can’t perform that action at this time.
0 commit comments