Skip to content

Commit

Permalink
Disregard nodes which are update targets when selecting source tables
Browse files Browse the repository at this point in the history
  • Loading branch information
findinpath authored and ebyhr committed Mar 29, 2024
1 parent 342448c commit 9d0b9f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private WriterTarget createWriterTarget(WriterTarget target, PlanNode planNode)
private static List<TableHandle> findSourceTableHandles(PlanNode startNode)
{
return PlanNodeSearcher.searchFrom(startNode)
.where(TableScanNode.class::isInstance)
.where(node -> node instanceof TableScanNode tableScanNode && !tableScanNode.isUpdateTarget())
.findAll()
.stream()
.map(TableScanNode.class::cast)
Expand Down

0 comments on commit 9d0b9f4

Please sign in to comment.