server/msplanner.py
changeset 442 b1cf7611f8b3
parent 433 95cb5b6e15c6
child 940 15dcdc863965
child 1120 1c24cde4bf72
equal deleted inserted replaced
441:49e4717e2371 442:b1cf7611f8b3
   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: