soumyakanti3578 commented on code in PR #6673:
URL: https://github.com/apache/hive/pull/6673#discussion_r4031522305


##########
ql/src/test/results/clientpositive/jdbc/postgres/cbo_query15.q.out:
##########
@@ -0,0 +1,29 @@
+CBO PLAN:
+HiveSortLimit(sort0=[$0], dir0=[ASC], fetch=[100])
+  HiveProject(ca_zip=[$0], _c1=[$1])
+    HiveAggregate(group=[{1}], agg#0=[sum($8)])
+      HiveJoin(condition=[AND(=($7, $4), OR($2, $9, $3))], joinType=[inner], 
algorithm=[none], cost=[not available])

Review Comment:
   From a quick investigation, it looks like this was blocked by:
   ```
   EXPR$0=[IN(substr($2, 1, 5), '80348':VARCHAR(2147483647)
   ```
   present in a Project below the Join.
   
   Although `SqlDialect.supportsFunction()` checks the 
`BUILT_IN_OPERATORS_LIST` which actually contains 
`SqlStdOperatorTable.SUBSTRING`, we still return `false` because the hive 
function is not mapped to `SqlStdOperatorTable.SUBSTRING`. If we remove substr 
from the query, the Joins are pushed below.
   
   I will create a follow-up to work on this after this PR is merged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to