[ https://issues.apache.org/jira/browse/ASTERIXDB-3589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Maxon reassigned ASTERIXDB-3589: ------------------------------------ Assignee: murali krishna > Complex join predicate needs to be replaced with expressions from assign > statements > ----------------------------------------------------------------------------------- > > Key: ASTERIXDB-3589 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-3589 > Project: Apache AsterixDB > Issue Type: Bug > Components: *DB - AsterixDB > Reporter: murali krishna > Assignee: murali krishna > Priority: Minor > > Consider part of the following plan from q05 ch2. > select (true) > assign [$$109] <- [numeric-mod(numeric-multiply($$107, $$108), > 10000)] <<<< > data-scan []<-[$$107, $$108, $$s] <- Default.stock > empty-tuple-source > Later on in the plan there is a join predicate that references $$109. > join (and(eq($$103, $$107), eq($$100, $$107), eq($$109, $$106))) > eq ($$109, $$106) needs to replaced with > eq(numeric-mod(numeric-multiply($$107, $$108), 10000), $$106). > Otherwise, we will assume it a simple col = col join predicate which will > yield an incorrect selectivity value. Our only option is to join the > corresponding samples here as this is a complex expression. > This is a subtle bug because we already handle this case when the assign > [$$109] operator appears between join operators in the plan. In this case, > it appeared in the leafinput which we had not handled previously. > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)