You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (Jira)" <ji...@apache.org> on 2020/11/16 21:11:00 UTC
[jira] [Commented] (ASTERIXDB-2679) Predicate pushdown through join
not working in functions
[ https://issues.apache.org/jira/browse/ASTERIXDB-2679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17233081#comment-17233081 ]
Dmitry Lychagin commented on ASTERIXDB-2679:
--------------------------------------------
It's caused by m.* in the UDF body. Use m instead of m.* and the predicate will be pushed down.
var.* is not a trivial operation. We might now not know whether the 'name' field comes from. What if 'm' also has the 'name' field?
There might be cases where we could identify the source of that field and push the predicate down, but we currently don't perform that analysis.
> Predicate pushdown through join not working in functions
> --------------------------------------------------------
>
> Key: ASTERIXDB-2679
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2679
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: *DB - AsterixDB, SQL - Translator SQL++
> Affects Versions: 0.9.5
> Reporter: Gift Sinthong
> Assignee: Dmitry Lychagin
> Priority: Major
> Fix For: 0.9.5
>
> Attachments: function.txt, no-function.txt
>
>
> Using TinySocial, why doesn't the following function and query
> {code:java}
> create function userJoinMessage(){
> select u.id,u.name, m.* from
> GleambookUsers u, GleambookMessages m
> where u.id = m.authorId
> };
> select t.name, t.message
> from userJoinMessage() t
> where t.name like 'M%';
> {code}
> have the same query plan as
> {code:java}
> select u.name, m.message from
> GleambookUsers u, GleambookMessages m
> where u.id = m.authorId
> and u.name like 'M%';{code}
> in which the name predicate is pushed below the join?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)