Skip to content

Commit

Permalink
[Spark] Fix compaction for cdc table (#498)
Browse files Browse the repository at this point in the history
Signed-off-by: chenxu <chenxu@dmetasoul.com>
Co-authored-by: chenxu <chenxu@dmetasoul.com>
  • Loading branch information
xuchen-plus and dmetasoul01 committed Jun 19, 2024
1 parent e15c8e7 commit 404222f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ trait TransactionalWrite {
val cdcColName = cdcCol.get
data.withColumn(cdcColName,
when(col(cdcColName) === "update", "insert")
.otherwise(col(cdcColName))
).where(s"$cdcColName != 'delete'")
} else {
data
Expand Down

0 comments on commit 404222f

Please sign in to comment.