You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/17 18:55:26 UTC
[jira] [Commented] (TRAFODION-2442) timstamp can't compare with
date type
[ https://issues.apache.org/jira/browse/TRAFODION-2442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15826603#comment-15826603 ]
ASF GitHub Bot commented on TRAFODION-2442:
-------------------------------------------
GitHub user anoopsharma00 opened a pull request:
https://github.com/apache/incubator-trafodion/pull/916
TRAFODION-2442 timestamp/date comparison bug. And couple other fixes.
-- TRAFODION-2442 timestamp comparison with date returns incorrect results.
that has been fixed. Date value is expanded to timestamp datatype and
then compared.
Fix is for timestamp/date comparison only.
TIMESTAMP comparison to TIME, and DATE comparison to TIME is not allowed.
-- row length of aligned format tables is now calculated correctly and
stored in metadata.
-- optimizer cost method for sort had a high limit of MEMORY_UNITS_SIZE
default set to 20M. For large rows in the range of 10 Mb,
this caused an overflow.
Fix is to allocate space for MAXOF default and size of 2 rows.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_trafr21_br
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/916.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 #916
----
commit fe46974da6feb2bf5ba675f1622b07b7ae503a01
Author: Anoop Sharma <an...@esgyn.com>
Date: 2017-01-17T18:50:25Z
TRAFODION-2442 timestamp/date comparison bug. And couple other fixes.
-- TRAFODION-2442 timestamp comparison with date returns incorrect results.
that has been fixed. Date value is expanded to timestamp datatype and
then compared.
Fix is for timestamp/date comparison only.
TIMESTAMP comparison to TIME, and DATE comparison to TIME is not allowed.
-- row length of aligned format tables is now calculated correctly and
stored in metadata.
-- optimizer cost method for sort had a high limit of MEMORY_UNITS_SIZE
default set to 20M. For large rows in the range of 10 Mb,
this caused an overflow.
Fix is to allocate space for MAXOF default and size of 2 rows.
----
> timstamp can't compare with date type
> -------------------------------------
>
> Key: TRAFODION-2442
> URL: https://issues.apache.org/jira/browse/TRAFODION-2442
> Project: Apache Trafodion
> Issue Type: Bug
> Reporter: Joshua Liu
> Assignee: Anoop Sharma
>
> SQL>select * from timestamp_test1 where a > date '2016-12-13';
> A
> --------------------------
> 2016-12-12 00:00:00.000000
> 2017-01-10 00:00:00.000000
> --- 2 row(s) selected.
> we can see that 2016-12-12 00:00:00.000000 is large than '2016-12-13'
> from the plan, we can see:
> explain select * from timestamp_test1 where a > date '2016-12-13';
> …
> STATEMENT ................ select *
> from timestamp_test1
> where a > date '2016-12-13';
> …
> …
> executor_predicates .... (A > 65535-138-245 00:149:238.32757 ...0)
> --- SQL operation complete.
> here predicates is A > 65535-138-245 00:149:238.32757 which is abnormal
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)