Skip to content

Commit 0734b06

Browse files
committed
mv setop to individual case
1 parent bb43b2a commit 0734b06

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sql/planbuilder/set_op.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,10 @@ func colIdsForRel(n sql.Node) []sql.ColumnId {
227227
}
228228
}
229229
return ids
230-
case plan.TableIdNode:
230+
case *plan.SetOp:
231231
// SetOp nodes need to preserve original schema order to avoid column scrambling in nested UNIONs
232-
if setOp, ok := n.(*plan.SetOp); ok {
233-
return colIdsForRel(setOp.Left())
234-
}
235-
232+
return colIdsForRel(n.Left())
233+
case plan.TableIdNode:
236234
cols := n.Columns()
237235
if tn, ok := n.(sql.TableNode); ok {
238236
if pkt, ok := tn.UnderlyingTable().(sql.PrimaryKeyTable); ok && len(pkt.PrimaryKeySchema().Schema) != len(n.Schema()) {

0 commit comments

Comments
 (0)