Description
The fix for TRAFODION-2569 caused a regression with nested joins on salted tables: If the salted table ends up as the inner table of a join, we omit computed predicates on the salt column. A similar problem where the join predicate is missing from the key can also happen to any table, salted or non-salted.
The problem happened when I removed the call to removeIndexInfo in file memo.cpp. The FilterRule0 code called Scan::copyIndexInfo(), which is not correct when pushing predicates into a scan node, because additional indexes could become interesting.
The "kludge" in memo.cpp compensated for this by calling removeIndexInfo(), then calling addIndexInfo(). A better way is probably to call addIndexInfo() in the first place in the filter rule.
Also, method copyIndexInfo should copy the computed predicates, since the only place where they are computed is in addIndexInfo().
I probably still won't be able to remove the "kludge" in memo.cpp.
Attachments
Issue Links
- links to