add subquery extraction implementation in JoinCompiler