Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-6030

OFFSET LIMIT is not work in multiple joins SOQLs

    XMLWordPrintable

Details

    • Hide

      0. Create simple spring boot teiid project
      1. Connect it to salesforce
      3. Make simple SQL request with multiple joins and OFFSET > 2500 LIMIT

      Show
      0. Create simple spring boot teiid project 1. Connect it to salesforce 3. Make simple SQL request with multiple joins and OFFSET > 2500 LIMIT

    Description

      In simple teiid spring boot applicatio we call SQL

      select 
             task.Id as \"{Task}/Id\",
             task.createddate as \"{Task}/CreatedDate\",
             owner.Name as \"{Owner}/Name\",
             contact.Name as \"{Contact}/Name\",
             lead.Name as \"{Lead}/Name\",
             task.ActivityDate as \"{Task}/ActivityDate\",
             task.Request_Type__c as \"{Task}/Request_Type__c\",
             task.subject as \"{Task}/Subject\",
             task.description as \"{Task}/Description\"
      from task
        LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS creator ON task.CreatedById=creator.Id
        LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS owner ON task.OwnerId=owner.Id
        LEFT OUTER JOIN /*+ MAKEDEP */ Contact AS contact ON task.whoid=contact.Id
        LEFT OUTER JOIN /*+ MAKEDEP */ Lead AS lead ON task.whoid=lead.Id
      where creator.Name = :name
      and task.Type = :type
      LIMIT 20 OFFSET 3000
      

      And get Exception

      org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select task.Id as \"{Task}/Id\", task.createddate as \"{Task}/CreatedDate\", owner.Name as \"{Owner}/Name\", contact.Name as \"{Contact}/Name\", lead.Name as \"{Lead}/Name\", task.ActivityDate as \"{Task}/ActivityDate\", task.Request_Type__c as \"{Task}/Request_Type__c\", task.subject as \"{Task}/Subject\", task.description as \"{Task}/Description\" from task LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS creator ON task.CreatedById=creator.Id LEFT OUTER JOIN /*+ MAKEDEP */ \"user\" AS owner ON task.OwnerId=owner.Id LEFT OUTER JOIN /*+ MAKEDEP */ Contact AS contact ON task.whoid=contact.Id LEFT OUTER JOIN /*+ MAKEDEP */ Lead AS lead ON task.whoid=lead.Id where creator.Name = ? and task.Type = ? LIMIT 20 OFFSET 3000 ]; SQL state [50000]; error code [30504]; TEIID30504 salesforce: null; nested exception is org.teiid.jdbc.TeiidSQLException: TEIID30504 salesforce: null
      

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            3draven Renat Eskenin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: