metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (METAMODEL-198) Where clauses on timestamp loses the nanoseconds
Date Fri, 16 Oct 2015 21:09:05 GMT

    [ https://issues.apache.org/jira/browse/METAMODEL-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14961363#comment-14961363
] 

ASF GitHub Bot commented on METAMODEL-198:
------------------------------------------

GitHub user ankit2711 opened a pull request:

    https://github.com/apache/metamodel/pull/58

    Fix METAMODEL-198.

     This fixes the issue but the changes are done in the FormatHelper. Few more test cases
added for Timestamp values. 
    Trying to apply a fix for Timestamp operand in the DefaultQueryRewriter
    does get overriden by the logic written in the FormatHelper which is
    called by super.rewriteFilterItems(FilterItem). 
    The FormatHelper again detects based on the columnType and changes the
    values to be Date losing the nanoseconds.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ankit2711/metamodel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/58.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #58
    
----
commit ac10d56e18c0a51cc57e6e8da1694aacf6a28f56
Author: ankit2711 <ak.ankitkumar@gmail.com>
Date:   2015-10-16T21:06:41Z

    Fix METAMODEL-198. This fixes the issue but the changes are done in the
    FormatHelper. 
    Trying to apply a fix for Timestamp operand in the DefaultQueryRewriter
    does get overriden by the logic written in the FormatHelper which is
    called by super.rewriteFilterItems(FilterItem). 
    The FormatHelper again detects based on the columnType and changes the
    values to be Date losing the nanoseconds.

----


> Where clauses on timestamp loses the nanoseconds
> ------------------------------------------------
>
>                 Key: METAMODEL-198
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-198
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Ankit Kumar
>
> Queries having where clause on timestamp column in databases loses the nanoseconds. 
> This is happening because the Timestamp values are converted to Date object using the
new Date(long timeInMilliseconds).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message