rewrite query9, to see if expand is better than hash join
Merge branch '2.0-maint' into 2.1-maint