Note that instanceof checks return false if the object is null, even if the statically known type matches the type in the check. So unless we know that the object is non-null, simply removing the check isn't safe. I haven't checked if that's a problem in the code that's touched by the patch, but thought I'd raise the issue.
good point, i'll take a look and resubmit
determined the places where instanceof checks might detect null values, and replace with null checking. The rest of the places the instanceof was removed.
Attaching patch 1a, which is the original patch with some additional changes:
o removed one more instanceof in SubqueryNode
o made checkColumnOrdering in MergeSort private and rewrote the comment. Still not sure if checking if the column is null adds value, but keeping it is no big deal (the method is only called from a sanity block)
o merged two SanityManager.DEBUG blocks.
Running the tests, will commit if they pass.
Committed to trunk with revision 1145926.
[bulk update] Close all resolved issues that haven't been updated for more than one year.