equal
deleted
inserted
replaced
997 # finally: join parts, deal with aggregat/group/sorts if necessary |
997 # finally: join parts, deal with aggregat/group/sorts if necessary |
998 if atemptable is not None: |
998 if atemptable is not None: |
999 step = AggrStep(plan, selection, select, atemptable, temptable) |
999 step = AggrStep(plan, selection, select, atemptable, temptable) |
1000 step.children = steps |
1000 step.children = steps |
1001 elif len(steps) > 1: |
1001 elif len(steps) > 1: |
1002 if select.need_intersect: |
1002 if select.need_intersect or any(select.need_intersect |
|
1003 for step in steps |
|
1004 for select in step.union.children): |
1003 if temptable: |
1005 if temptable: |
1004 step = IntersectFetchStep(plan) |
1006 step = IntersectFetchStep(plan) |
1005 else: |
1007 else: |
1006 step = IntersectStep(plan) |
1008 step = IntersectStep(plan) |
1007 else: |
1009 else: |