Return-Path: X-Original-To: apmail-metamodel-dev-archive@minotaur.apache.org Delivered-To: apmail-metamodel-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 962E818AF9 for ; Fri, 16 Oct 2015 21:09:05 +0000 (UTC) Received: (qmail 86539 invoked by uid 500); 16 Oct 2015 21:09:05 -0000 Delivered-To: apmail-metamodel-dev-archive@metamodel.apache.org Received: (qmail 86511 invoked by uid 500); 16 Oct 2015 21:09:05 -0000 Mailing-List: contact dev-help@metamodel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@metamodel.apache.org Delivered-To: mailing list dev@metamodel.apache.org Received: (qmail 86454 invoked by uid 99); 16 Oct 2015 21:09:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Oct 2015 21:09:05 +0000 Date: Fri, 16 Oct 2015 21:09:05 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@metamodel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (METAMODEL-198) Where clauses on timestamp loses the nanoseconds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 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)