You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Anoop Sharma (JIRA)" <ji...@apache.org> on 2016/05/19 15:37:13 UTC
[jira] [Resolved] (TRAFODION-1808) Query caching is not treating
datetime values with fractional precision correctly
[ https://issues.apache.org/jira/browse/TRAFODION-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anoop Sharma resolved TRAFODION-1808.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0-incubating
Fixed:
>>select time '10:12:23' from t;
(EXPR)
--------
10:12:23
--- 1 row(s) selected.
>>select time '10:12:23.456' from t;
(EXPR)
------------
10:12:23.456
--- 1 row(s) selected.
>>
> Query caching is not treating datetime values with fractional precision correctly
> ---------------------------------------------------------------------------------
>
> Key: TRAFODION-1808
> URL: https://issues.apache.org/jira/browse/TRAFODION-1808
> Project: Apache Trafodion
> Issue Type: Bug
> Reporter: Anoop Sharma
> Assignee: Anoop Sharma
> Fix For: 2.0-incubating
>
>
> During query caching in trafodion. literals are internally converted to param
> values when that query is cached. A subsequent query with the same shape but a different literal passes the new literal as a param value instead of recompiling the query.
> The bug being reported here is related to time/timestamp literals.
> If the original literal is a time or timestamp value and the subsequent literal has its fractional precision greater than the original fraction, then the new value is used after truncating the fractional precision part.
> This is incorrect. Second query should not use the cached first query and recompile it instead.
> In the example below, the second select statement is returning
> incorrect result after truncating the fractional precision:
> >>select time '10:12:23' from t;
> (EXPR)
> --------
> 10:12:23
> --- 1 row(s) selected.
> >>select time '10:12:23.456' from t;
> (EXPR)
> --------
> 10:12:23
> --- 1 row(s) selected.
> >>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)