Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/60#discussion_r37246902
--- Diff: core/sql/optimizer/NATable.cpp ---
@@ -1472,58 +1478,161 @@ static ItemExpr *
getRangePartitionBoundaryValuesFromEncodedKeys(
// value. Note that the buffer has a prefix of some bytes
with actual key
// values, followed by bytes that are zeroed out.
+ // the number of bytes actually provided in the key (not
filled in)
+ int numBytesInProvidedVal = encodedKeyLen-valOffset;
+
+ if (nullHdrSize && numBytesInProvidedVal <= 0)
--- End diff --
Couldn't this happen, for example?
currOffset = 10
encodedKeyLen = 11
nullHdrSize = 2
valOffset = 12
In other words, the partially provided key covers only the NULL indicator
or part of it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---