simlaudato / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

Constant created between two data scans gets inserted into their join #887

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This plan:
data-scan []<-[$$36, $$2] <- emergencyTest:CHPReports -- |UNPARTITIONED|
  assign [$$1] <- [edu.uci.ics.asterix.om.base.ADayTimeDuration@927c0] -- |UNPARTITIONED|
    data-scan []<-[$$35, $$0] <- emergencyTest:NearbySheltersDuringTornadoDangerChannelSubscriptions -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

Will be rewritten as this plan:
join (TRUE) -- |UNPARTITIONED|
  assign [$$1] <- [edu.uci.ics.asterix.om.base.ADayTimeDuration@927c0] -- |UNPARTITIONED|
    data-scan []<-[$$35, $$0] <- emergencyTest:NearbySheltersDuringTornadoDangerChannelSubscriptions -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|
  data-scan []<-[$$36, $$2] <- emergencyTest:CHPReports -- |UNPARTITIONED|
    empty-tuple-source -- |UNPARTITIONED|

In this case, the assignment to $$1 was independent of the join, so it should 
not have been pushed into the join. This causes issues with further 
optimization of the plan. Correct solutions may be either to leave it above the 
join or to put it below the join

Original issue reported on code.google.com by sjaco...@ucr.edu on 19 May 2015 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by sjaco...@ucr.edu on 19 May 2015 at 6:44