We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb43b2a commit 0734b06Copy full SHA for 0734b06
sql/planbuilder/set_op.go
@@ -227,12 +227,10 @@ func colIdsForRel(n sql.Node) []sql.ColumnId {
227
}
228
229
return ids
230
- case plan.TableIdNode:
+ case *plan.SetOp:
231
// 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
-
+ return colIdsForRel(n.Left())
+ case plan.TableIdNode:
236
cols := n.Columns()
237
if tn, ok := n.(sql.TableNode); ok {
238
if pkt, ok := tn.UnderlyingTable().(sql.PrimaryKeyTable); ok && len(pkt.PrimaryKeySchema().Schema) != len(n.Schema()) {
0 commit comments