Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2679

Predicate pushdown through join not working in functions

    XMLWordPrintableJSON

    Details

      Description

      Using TinySocial, why doesn't the following function and query

      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%';
      

      have the same query plan as

      select u.name, m.message from
      GleambookUsers u, GleambookMessages m
      where u.id = m.authorId 
      and u.name like 'M%';

      in which the name predicate is pushed below the join?

        Attachments

        1. function.txt
          2 kB
          Till Westmann
        2. no-function.txt
          2 kB
          Till Westmann

          Activity

            People

            • Assignee:
              dlychagin-cb Dmitry Lychagin
              Reporter:
              psinthon Gift Sinthong
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: