[teiid-issues] [JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
Renat Eskenin (Jira)
issues at jboss.org
Tue Dec 3 02:51:00 EST 2019
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13820072#comment-13820072 ]
Renat Eskenin edited comment on TEIID-5856 at 12/3/19 2:50 AM:
---------------------------------------------------------------
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
https://issues.jboss.org/browse/TEIID-5861
was (Author: i3draven):
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the teiid-issues
mailing list