Rewriting the join generation code to treat the "ON" clause as an
expression and use the querycompiler's parse_expr method to parse it