Muhammad Gelbana created DRILL-5515: ---------------------------------------
Summary: "IS NO DISTINCT FROM" and it's equivalent form aren't handled likewise Key: DRILL-5515 URL: https://issues.apache.org/jira/browse/DRILL-5515 Project: Apache Drill Issue Type: Bug Components: Query Planning & Optimization Affects Versions: 1.10.0, 1.9.0 Reporter: Muhammad Gelbana The following query fails to execute {code:sql}SELECT * FROM (SELECT `UserID` FROM `dfs`.`path_ot_parquet` tc) `t0` INNER JOIN (SELECT `UserID` FROM `dfs`.`path_ot_parquet` tc) `t1` ON (`t0`.`UserID` IS NOT DISTINCT FROM `t1`.`UserID`){code} and produces the following error message {noformat}org.apache.drill.common.exceptions.UserRemoteException: UNSUPPORTED_OPERATION ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join [Error Id: 0bd41e06-ccd7-45d6-a038-3359bf5a4a7f on mgelbana-incorta:31010]{noformat} While the query's equivalent form runs fine {code:sql}SELECT * FROM (SELECT `UserID` FROM `dfs`.`path_ot_parquet` tc) `t0` INNER JOIN (SELECT `UserID` FROM `dfs`.`path_ot_parquet` tc) `t1` ON (`t0`.`UserID` = `t1`.`UserID` OR (`t0`.`UserID` IS NULL AND `t1`.`UserID` IS NULL)){code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)