[teiid-issues] [JBoss JIRA] (TEIID-1903) count() function with salesforce adaptor not behaving correctly

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Fri Jan 20 10:04:18 EST 2012


    [ https://issues.jboss.org/browse/TEIID-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660793#comment-12660793 ] 

Steven Hawkins commented on TEIID-1903:
---------------------------------------

That would be expected behavior given the salesforce capabilities.  For planning purposes count(*) and count(expression) are treated differently.  We also don't look to rewrite count(literal) to count(*) - while that is logical, on many platforms there can be a performance difference, so we leave that up to how the user enters the query.

The salesforce capabilities were originally targeted at an older salesforce api version.  Now that 18 or later supports more aggregate functions and group by this issue would best be resolved as an enhancement to support those features.
                
> count() function with salesforce adaptor not behaving correctly
> ---------------------------------------------------------------
>
>                 Key: TEIID-1903
>                 URL: https://issues.jboss.org/browse/TEIID-1903
>             Project: Teiid
>          Issue Type: Bug
>          Components: Salesforce Connector
>    Affects Versions: 7.5
>         Environment: java version "1.6.0_20"
> OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-x86_64)
> OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
> on
> Red Hat Enterprise Linux Server release 5.7 (Tikanga)
>            Reporter: Graeme Gillies
>            Assignee: Steven Hawkins
>
> Hi,
> I noticed the following strange behaviour with the salesforce connector. In the below example, Bugzilla is normal JDBC datasource to a mysqldb, while SFDC is a salesforce.com datasource
> {noformat}
> EngVDBR=> select count(*) from Bugzilla.bugs;
>  count  
> --------
>  604680
> (1 row)
> EngVDBR=> select count(*) from SFDC.salesforce.Case_;
>  count  
> --------
>  455487
> (1 row)
> EngVDBR=> select count(1) from SFDC.salesforce.Case_;
> ERROR:  SalesforceAPI: The number of result rows has exceeded the maximum result rows "100,000"
> DETAIL:  org.teiid.jdbc.TeiidSQLException: SalesforceAPI: The number of result rows has exceeded the maximum result rows "100,000"
> EngVDBR=> select count(1) from Bugzilla.bugs;
>  count  
> --------
>  604680
> (1 row)
> EngVDBR=>
> {noformat}
> I would have expected count(1) on salesforce to work the same as count(*), but it returns the maxrows error even though it should only return one row.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list