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:44 UTC
[1/4] incubator-trafodion git commit: [TRAFODION-2467] HBase region
start key straddling a datetime key error
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 81c247996 -> 06d26c4d6
[TRAFODION-2467] HBase region start key straddling a datetime key error
Make sure we complete a partial region start key for a datetime column
such that year, month and day are set to at least 1.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/911ca41a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/911ca41a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/911ca41a
Branch: refs/heads/master
Commit: 911ca41ad8c073285665f4c6eb128b2e0e5030fb
Parents: 715d8b0
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Feb 1 04:00:17 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Feb 1 04:00:17 2017 +0000
----------------------------------------------------------------------
core/sql/optimizer/NATable.cpp | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/911ca41a/core/sql/optimizer/NATable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NATable.cpp b/core/sql/optimizer/NATable.cpp
index ea15cc4..51106c9 100644
--- a/core/sql/optimizer/NATable.cpp
+++ b/core/sql/optimizer/NATable.cpp
@@ -1449,9 +1449,38 @@ static ItemExpr * getRangePartitionBoundaryValuesFromEncodedKeys(
break;
case NA_DATETIME_TYPE:
+ // those types should tolerate zeroing out trailing bytes, but
+ // not filling with 0xFF
+ if (isDescending)
+ columnIsPartiallyProvided = FALSE;
+ else if (numBytesInProvidedVal < 4)
+ {
+ // 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
+ // 4 bytes, 2 byte big-endian year, 1 byte
+ // month, 1 byte day
+
+ if (actEncodedKey[valOffset] != 0 && numBytesInProvidedVal == 1)
+ // only 1 byte of a year > 255 provided, in
+ // this case leave the second byte zero,
+ // only change the second byte to 1 if the
+ // first byte is non-zero
+ numBytesInProvidedVal = 2;
+
+ // set bytes 1, 2, 3 (year LSB, month, day) to
+ // 1 if they are not provided and zero
+ for (int ymd=numBytesInProvidedVal; ymd<4; ymd++)
+ if (actEncodedKey[valOffset+ymd] == 0)
+ actEncodedKey[valOffset+ymd] = 1;
+ }
+ break;
+
case NA_INTERVAL_TYPE:
// those types should tolerate zeroing out trailing bytes, but
- // not filling with 0xFF
+ // not filling with 0xFF
if (isDescending)
columnIsPartiallyProvided = FALSE;
break;
[4/4] incubator-trafodion git commit: Merge [TRAFODION-2467] HBase
region start key straddling a datetime key error PR-941
Posted by hz...@apache.org.
Merge [TRAFODION-2467] HBase region start key straddling a datetime key error PR-941
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/06d26c4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/06d26c4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/06d26c4d
Branch: refs/heads/master
Commit: 06d26c4d691aea93c0d5277e5918d205e35078dc
Parents: 81c2479 a5e5c24
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Feb 1 19:52:29 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Feb 1 19:52:29 2017 +0000
----------------------------------------------------------------------
core/sql/optimizer/NATable.cpp | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[2/4] incubator-trafodion git commit: fixing a typo
Posted by hz...@apache.org.
fixing a typo
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/b08f755f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/b08f755f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/b08f755f
Branch: refs/heads/master
Commit: b08f755ff6cc18faf5c0e45219da17182a85a141
Parents: 911ca41
Author: Hans Zeller <hz...@apache.org>
Authored: Wed Feb 1 04:06:41 2017 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Wed Feb 1 04:06:41 2017 +0000
----------------------------------------------------------------------
core/sql/optimizer/NATable.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b08f755f/core/sql/optimizer/NATable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NATable.cpp b/core/sql/optimizer/NATable.cpp
index 51106c9..002c1ed 100644
--- a/core/sql/optimizer/NATable.cpp
+++ b/core/sql/optimizer/NATable.cpp
@@ -1467,7 +1467,7 @@ static ItemExpr * getRangePartitionBoundaryValuesFromEncodedKeys(
// only 1 byte of a year > 255 provided, in
// this case leave the second byte zero,
// only change the second byte to 1 if the
- // first byte is non-zero
+ // first byte is also zero
numBytesInProvidedVal = 2;
// set bytes 1, 2, 3 (year LSB, month, day) to
[3/4] incubator-trafodion git commit: Rework,
fix for bug found by Dave.
Posted by hz...@apache.org.
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