You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by hz...@apache.org on 2017/02/01 19:53:46 UTC

[3/4] incubator-trafodion git commit: Rework, fix for bug found by Dave.

Rework, fix for bug found by Dave.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a5e5c24e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a5e5c24e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a5e5c24e

Branch: refs/heads/master
Commit: a5e5c24eda00bb67e0dec27d0280d8d36ddf0d77
Parents: b08f755
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Feb 1 16:40:29 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Feb 1 16:40:29 2017 +0000

----------------------------------------------------------------------
 core/sql/optimizer/NATable.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a5e5c24e/core/sql/optimizer/NATable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NATable.cpp b/core/sql/optimizer/NATable.cpp
index 002c1ed..7a90179 100644
--- a/core/sql/optimizer/NATable.cpp
+++ b/core/sql/optimizer/NATable.cpp
@@ -1453,13 +1453,15 @@ static ItemExpr * getRangePartitionBoundaryValuesFromEncodedKeys(
                     // not filling with 0xFF
                     if (isDescending)
                       columnIsPartiallyProvided = FALSE;
-                    else if (numBytesInProvidedVal < 4)
+                    else if (numBytesInProvidedVal < 4 &&
+                             static_cast<const DatetimeType *>(pkType)->getSubtype() !=
+                             DatetimeType::SUBTYPE_SQLTime)
                       {
                         // avoid filling year, month, day with a zero,
                         // convert those to a 1
 
                         // sorry, this makes use of the knowledge that
-                        // encoded date/time/timestamp all start with
+                        // encoded date and timestamp all start with
                         // 4 bytes, 2 byte big-endian year, 1 byte
                         // month, 1 byte day