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 2017/02/02 17:45:40 UTC

[2/3] incubator-trafodion git commit: Rework based on Hans' comment

Rework based on Hans' comment


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

Branch: refs/heads/master
Commit: bd8b30803fb33f5714b4e496dfe47c838160cfa6
Parents: 24e93d8
Author: Dave Birdsall <db...@apache.org>
Authored: Thu Feb 2 17:03:28 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu Feb 2 17:03:28 2017 +0000

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


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bd8b3080/core/sql/parser/SqlParserAux.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/SqlParserAux.cpp b/core/sql/parser/SqlParserAux.cpp
index b61bd30..1be2f05 100644
--- a/core/sql/parser/SqlParserAux.cpp
+++ b/core/sql/parser/SqlParserAux.cpp
@@ -847,6 +847,8 @@ ItemExpr *literalOfNumericPassingScale(NAString *strptr, char sign,
 
   NABoolean createTinyLiteral = 
     ((CmpCommon::getDefault(TRAF_CREATE_TINYINT_LITERAL)) == DF_ON);
+  NABoolean createLargeintUnsignedLiteral =
+    ((CmpCommon::getDefault(TRAF_LARGEINT_UNSIGNED_IO)) == DF_ON);
   
   char numericVal[8];
   short datatype = -1;
@@ -861,9 +863,9 @@ ItemExpr *literalOfNumericPassingScale(NAString *strptr, char sign,
     datatype = (createSignedDatatype ? REC_BIN32_SIGNED : REC_BIN32_UNSIGNED);
     length = sizeof(Lng32);
   } else if (strSize <= 19) {
-    datatype = (createSignedDatatype ? REC_BIN64_SIGNED : REC_BIN64_UNSIGNED);
+    datatype = (createSignedDatatype || !createLargeintUnsignedLiteral ? REC_BIN64_SIGNED : REC_BIN64_UNSIGNED);
     length = sizeof(Int64);
-  } else if ((strSize == 20) && (!createSignedDatatype)) {
+  } else if ((strSize == 20) && (!createSignedDatatype) && (createLargeintUnsignedLiteral)) {
     datatype = REC_BIN64_UNSIGNED;
     length = sizeof(Int64);
   }