[teiid-issues] [JBoss JIRA] (TEIID-6030) OFFSET LIMIT is not work in multiple joins SOQLs
by Renat Eskenin (Jira)
[ https://issues.redhat.com/browse/TEIID-6030?page=com.atlassian.jira.plugi... ]
Renat Eskenin edited comment on TEIID-6030 at 9/9/20 7:34 AM:
--------------------------------------------------------------
If you just remove task.Request_Type__c as \"{Task}/Request_Type__c\", and task.Type = :type you get same behavior
was (Author: i3draven):
If you just remove Type and task.Type = :type you get same behavior
> OFFSET LIMIT is not work in multiple joins SOQLs
> ------------------------------------------------
>
> Key: TEIID-6030
> URL: https://issues.redhat.com/browse/TEIID-6030
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> In simple teiid spring boot applicatio we call SQL
> {code}
> 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
> {code}
> And get Exception
> {code}
> 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
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
2 hours, 2 minutes