trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [4/6] incubator-trafodion git commit: Fix for seabase/TEST022 failure Changes as per the review comments of PR-178
Date Thu, 19 Nov 2015 17:12:56 GMT
Fix for seabase/TEST022 failure
Changes as per the review comments of PR-178


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

Branch: refs/heads/master
Commit: f1396daf2ab97300af8b8b0469864e9d633fb783
Parents: 89764ec
Author: selvaganesang <selva.govindarajan@esgyn.com>
Authored: Wed Nov 18 14:39:26 2015 +0000
Committer: selvaganesang <selva.govindarajan@esgyn.com>
Committed: Wed Nov 18 14:39:26 2015 +0000

----------------------------------------------------------------------
 core/sql/generator/GenPreCode.cpp        | 6 +++---
 core/sql/generator/GenRelUpdate.cpp      | 2 +-
 core/sql/generator/Generator.h           | 2 +-
 core/sql/regress/seabase/TEST022         | 2 +-
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp | 7 +++++++
 5 files changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f1396daf/core/sql/generator/GenPreCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp
index af69c10..c730c4e 100644
--- a/core/sql/generator/GenPreCode.cpp
+++ b/core/sql/generator/GenPreCode.cpp
@@ -9488,7 +9488,7 @@ ItemExpr * IndexColumn::preCodeGen(Generator * generator)
   return i;
 }
 
-ItemExpr * Generator::addCompDecodeForDerialization(ItemExpr * ie)
+ItemExpr * Generator::addCompDecodeForDerialization(ItemExpr * ie, NABoolean isAlignedFormat)
 {
   if (!ie)
     return NULL;
@@ -9496,7 +9496,7 @@ ItemExpr * Generator::addCompDecodeForDerialization(ItemExpr * ie)
   if ((ie->getOperatorType() == ITM_BASECOLUMN) ||
       (ie->getOperatorType() == ITM_INDEXCOLUMN))
     {
-      if (HbaseAccess::isEncodingNeededForSerialization(ie))
+      if (! isAlignedFormat && HbaseAccess::isEncodingNeededForSerialization(ie))
 	{
 	  ItemExpr * newNode = new(wHeap()) CompDecode
 	    (ie, &ie->getValueId().getType(), FALSE, TRUE);
@@ -9516,7 +9516,7 @@ ItemExpr * Generator::addCompDecodeForDerialization(ItemExpr * ie)
 
   for (Lng32 i = 0; i < ie->getArity(); i++)
     {
-      ItemExpr * nie = addCompDecodeForDerialization(ie->child(i));
+      ItemExpr * nie = addCompDecodeForDerialization(ie->child(i), isAlignedFormat);
       if (nie)
 	ie->setChild(i, nie);
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f1396daf/core/sql/generator/GenRelUpdate.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenRelUpdate.cpp b/core/sql/generator/GenRelUpdate.cpp
index 2716689..da7c8ea 100644
--- a/core/sql/generator/GenRelUpdate.cpp
+++ b/core/sql/generator/GenRelUpdate.cpp
@@ -2531,7 +2531,7 @@ short HbaseInsert::codeGen(Generator *generator)
 	getCheckConstraints().rebuildExprTree(ITM_AND, TRUE, TRUE);
 
       if (getTableDesc()->getNATable()->hasSerializedEncodedColumn())
-	constrTree = generator->addCompDecodeForDerialization(constrTree);
+	constrTree = generator->addCompDecodeForDerialization(constrTree, isAlignedFormat);
 
       expGen->generateExpr(constrTree->getValueId(), ex_expr::exp_SCAN_PRED,
 			   &insConstraintExpr);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f1396daf/core/sql/generator/Generator.h
----------------------------------------------------------------------
diff --git a/core/sql/generator/Generator.h b/core/sql/generator/Generator.h
index 6c37b50..3706f65 100644
--- a/core/sql/generator/Generator.h
+++ b/core/sql/generator/Generator.h
@@ -1632,7 +1632,7 @@ public:
   void setPlanExpirationTimestamp(Int64 t);
   Int64 getPlanExpirationTimestamp() { return planExpirationTimestamp_; }
 
-  ItemExpr * addCompDecodeForDerialization(ItemExpr * ie);
+  ItemExpr * addCompDecodeForDerialization(ItemExpr * ie, NABoolean isAlignedFormat);
 
   void setHBaseNumCacheRows(double rowsAccessed, 
                             ComTdbHbaseAccess::HbasePerfAttributes * hbpa,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f1396daf/core/sql/regress/seabase/TEST022
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/TEST022 b/core/sql/regress/seabase/TEST022
index 8efd469..58339b4 100644
--- a/core/sql/regress/seabase/TEST022
+++ b/core/sql/regress/seabase/TEST022
@@ -20,7 +20,7 @@
 -- under the License.
 --
 -- @@@ END COPYRIGHT @@@
-
+cqd hbase_delete_costing 'off';
 log LOG022 clear;
 
 cqd hbase_native_iud 'ON';

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/f1396daf/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index fdb9330..4bb9e85 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -2089,6 +2089,13 @@ NABoolean CmpSeabaseDDL::enabledForSerialization(NAColumn * nac)
   return FALSE;
 }
 
+// NAColumn in memory is expected to have the correct HbaseColFlags for
+// serialization depending on if it belongs to index or table. 
+// Index and Table row format can be different now. However, it is
+// recommended that the function is called only when it is not aligned
+// row format. The existing callers are verified to be working correctly
+// even though some callers don't adhere to this recommendation
+
 NABoolean CmpSeabaseDDL::isEncodingNeededForSerialization(NAColumn * nac)
 {
   const NAType *givenType = nac->getType();


Mime
View raw message