You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2016/08/10 00:33:24 UTC
[1/3] incubator-trafodion git commit: [TRAFODION-2119] create table
report strange WARNING when using store by and
allow_nullable_unique_key_constraint CQD
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 39e30d1f6 -> 87e4ca4d1
[TRAFODION-2119] create table report strange WARNING when using store by and allow_nullable_unique_key_constraint CQD
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a1176dae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a1176dae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a1176dae
Branch: refs/heads/master
Commit: a1176daec0bab29ee16822ef446e426caa8bf4ea
Parents: 37901fb
Author: Liu Ming <mi...@esgyn.cn>
Authored: Fri Aug 5 01:18:55 2016 +0000
Committer: Liu Ming <mi...@esgyn.cn>
Committed: Fri Aug 5 01:18:55 2016 +0000
----------------------------------------------------------------------
core/sql/common/CharType.cpp | 2 +-
core/sql/optimizer/EncodedKeyValue.cpp | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a1176dae/core/sql/common/CharType.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/CharType.cpp b/core/sql/common/CharType.cpp
index 0491a94..aa6f209 100644
--- a/core/sql/common/CharType.cpp
+++ b/core/sql/common/CharType.cpp
@@ -1217,7 +1217,7 @@ void CharType::minMaxRepresentableValue(void* bufPtr,
if (stringLiteral)
{
NABoolean isNull = FALSE;
- NABoolean res = createSQLLiteral((const char *) bufPtr, *stringLiteral, isNull, h);
+ NABoolean res = createSQLLiteral((const char *) bufPtr - getSQLnullHdrSize(), *stringLiteral, isNull, h);
assert(res);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a1176dae/core/sql/optimizer/EncodedKeyValue.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/EncodedKeyValue.cpp b/core/sql/optimizer/EncodedKeyValue.cpp
index 3698031..ce1fb28 100644
--- a/core/sql/optimizer/EncodedKeyValue.cpp
+++ b/core/sql/optimizer/EncodedKeyValue.cpp
@@ -69,7 +69,14 @@ NAString * getMinMaxValue(TrafDesc * column,
Lng32 buflen = type->getTotalSize();
char * buf = new char[buflen]; // deleted at the end of this method
-
+ if (type->supportsSQLnullPhysical())
+ {
+ Lng32 nullHdrSize = type->getSQLnullHdrSize();
+ for(int i = 0; i < nullHdrSize; i++)
+ buf[i] = '\0';
+ buflen-= nullHdrSize;
+ }
+
NABoolean nullValue = FALSE;
if (highKey == FALSE)
{
[3/3] incubator-trafodion git commit: Merge [TRAFODION-2119] PR-642
427aa4adc521725747e73ae31c488068472aac13
Posted by su...@apache.org.
Merge [TRAFODION-2119] PR-642 427aa4adc521725747e73ae31c488068472aac13
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/87e4ca4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/87e4ca4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/87e4ca4d
Branch: refs/heads/master
Commit: 87e4ca4d18c4652079e8b2c5fe387bbb1099471e
Parents: 39e30d1 7ee17b2
Author: Suresh Subbiah <su...@apache.org>
Authored: Wed Aug 10 00:32:54 2016 +0000
Committer: Suresh Subbiah <su...@apache.org>
Committed: Wed Aug 10 00:32:54 2016 +0000
----------------------------------------------------------------------
core/sql/common/CharType.cpp | 4 +++-
core/sql/optimizer/EncodedKeyValue.cpp | 18 +++++++++++++-----
2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
[2/3] incubator-trafodion git commit: fix issues in previous commit
Posted by su...@apache.org.
fix issues in previous commit
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7ee17b2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7ee17b2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7ee17b2c
Branch: refs/heads/master
Commit: 7ee17b2c0f6b73f663136b8aa2787bf162f56688
Parents: a1176da
Author: Liu Ming <mi...@esgyn.cn>
Authored: Tue Aug 9 02:17:19 2016 +0000
Committer: Liu Ming <mi...@esgyn.cn>
Committed: Tue Aug 9 02:17:19 2016 +0000
----------------------------------------------------------------------
core/sql/common/CharType.cpp | 2 ++
core/sql/optimizer/EncodedKeyValue.cpp | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7ee17b2c/core/sql/common/CharType.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/CharType.cpp b/core/sql/common/CharType.cpp
index aa6f209..4babc92 100644
--- a/core/sql/common/CharType.cpp
+++ b/core/sql/common/CharType.cpp
@@ -1217,6 +1217,8 @@ void CharType::minMaxRepresentableValue(void* bufPtr,
if (stringLiteral)
{
NABoolean isNull = FALSE;
+ //the bufPtr passed in point to the postion after null header
+ //createSQLLiteral requires the input pointer to be the begin of the buffer
NABoolean res = createSQLLiteral((const char *) bufPtr - getSQLnullHdrSize(), *stringLiteral, isNull, h);
assert(res);
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7ee17b2c/core/sql/optimizer/EncodedKeyValue.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/EncodedKeyValue.cpp b/core/sql/optimizer/EncodedKeyValue.cpp
index ce1fb28..c2027ed 100644
--- a/core/sql/optimizer/EncodedKeyValue.cpp
+++ b/core/sql/optimizer/EncodedKeyValue.cpp
@@ -68,10 +68,11 @@ NAString * getMinMaxValue(TrafDesc * column,
return NULL;
Lng32 buflen = type->getTotalSize();
+ Lng32 nullHdrSize = 0;
char * buf = new char[buflen]; // deleted at the end of this method
if (type->supportsSQLnullPhysical())
{
- Lng32 nullHdrSize = type->getSQLnullHdrSize();
+ nullHdrSize = type->getSQLnullHdrSize();
for(int i = 0; i < nullHdrSize; i++)
buf[i] = '\0';
buflen-= nullHdrSize;
@@ -82,7 +83,7 @@ NAString * getMinMaxValue(TrafDesc * column,
{
// low key needed
if (NOT key->keysDesc()->isDescending()) // ascending
- type->minRepresentableValue(buf, &buflen,
+ type->minRepresentableValue(buf + nullHdrSize, &buflen,
&minMaxValue,
h) ;
else
@@ -94,7 +95,7 @@ NAString * getMinMaxValue(TrafDesc * column,
}
else
{
- type->maxRepresentableValue(buf, &buflen,
+ type->maxRepresentableValue(buf + nullHdrSize, &buflen,
&minMaxValue,
h) ;
}
@@ -111,12 +112,12 @@ NAString * getMinMaxValue(TrafDesc * column,
nullValue = TRUE;
}
else
- type->maxRepresentableValue(buf, &buflen,
+ type->maxRepresentableValue(buf + nullHdrSize, &buflen,
&minMaxValue,
h) ;
}
else
- type->minRepresentableValue(buf, &buflen,
+ type->minRepresentableValue(buf + nullHdrSize, &buflen,
&minMaxValue,
h) ;
}