[teiid-issues] [JBoss JIRA] (TEIID-5295) Comparisons of timestamps don't work correctly for MongoDB

Jan Martiska (JIRA) issues at jboss.org
Wed Mar 28 02:11:00 EDT 2018


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

Jan Martiska commented on TEIID-5295:
-------------------------------------

[~shawkins] It's in the view model:
{noformat}
CREATE FOREIGN TABLE SmallA
(...)
TIMEVALUE time
(...)
{noformat}

Is this supposed to ignore the date-part stored in MongoDB and only view the time part? Do I get this correctly?
Oh right I see I used "timestamps" in the title, should have used "time values", I'll fix that.

> Comparisons of timestamps don't work correctly for MongoDB
> ----------------------------------------------------------
>
>                 Key: TEIID-5295
>                 URL: https://issues.jboss.org/browse/TEIID-5295
>             Project: Teiid
>          Issue Type: Bug
>          Components: Misc. Connectors
>    Affects Versions: 8.12.11.6_4
>            Reporter: Jan Martiska
>            Assignee: Steven Hawkins
>
> Examples of queries which don't behave as expected when running against MongoDB:
> {noformat}
> SELECT BQT1.SmallA.TimeValue FROM BQT1.SmallA WHERE BQT1.SmallA.TimeValue > '17:00:00'
> {noformat}
> returns ALL timevalues which are not null
> {noformat}
> SELECT BQT1.SmallA.TimeValue FROM BQT1.SmallA WHERE BQT1.SmallA.TimeValue < '17:00:00'
> {noformat}
> returns NO timevalues even though there are some less than 17:00
> {noformat}
> SELECT BQT1.SmallA.TimeValue FROM BQT1.SmallA WHERE BQT1.SmallA.TimeValue = '15:00:00'
> {noformat}
> returns nothing
> {noformat}
> SELECT BQT1.SmallA.IntKey FROM BQT1.SmallA WHERE BQT1.SmallA.TimeValue IN (convert('05:00:00', time), convert('15:00:00', time))
> {noformat}
> returns nothing



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the teiid-issues mailing list