fixed join hang when subquery failed
added integer join key type coherence