[teiid-issues] [JBoss JIRA] (TEIID-2422) Offer support for a timestampdiff based upon calendar fields

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Tue Mar 5 19:20:56 EST 2013


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

Steven Hawkins commented on TEIID-2422:
---------------------------------------

My thought here is to preserve the current via a config switch (which could be in the dqp config or handled as a hint/vdb scoped) and propose changing the default handling for 8.3 over to the calendar method.  The rationale is that the calendar form is more broadly supported (which means more correct pushdown handling - which is currently dubious) and that is consistent with Teiid timestampadd function, which is calendar based.

Generally the same answer will be seen for fractional/second results, but every other interval could return a different answer based upon the values.
                
> Offer support for a timestampdiff based upon calendar fields
> ------------------------------------------------------------
>
>                 Key: TEIID-2422
>                 URL: https://issues.jboss.org/browse/TEIID-2422
>             Project: Teiid
>          Issue Type: Quality Risk
>          Components: Query Engine
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>
> There is little consistency among timestampdiff implementations, however ours seems to be based off of the db2 (http://pic.dhe.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db2z9.doc.sqlref/src/tpc/db2z_bif_timestampdiff.htm) timestampdiff in terms of intervals - but does not make all the same assumptions in the calculation of the answer.
> It would be good to provide an option so that our timestampdiff or another system function would calculate differences based upon calendar fields (following the behavior of SQL Server) rather than just based upon the interval - for example the months between 2012-02-20 and 2012-03-01 would report 1 rather than the current answer of 0).
> There is also a general issue with the consistency of the results with the pushdowned versions of timestampdiff as vendor support varies.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list