You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/07/18 16:20:40 UTC

[15/16] incubator-trafodion git commit: Reworks

Reworks


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

Branch: refs/heads/master
Commit: 3d2bceb7d49ed751be3415c8104cdc7a5ac26011
Parents: 301e22b
Author: Dave Birdsall <db...@apache.org>
Authored: Fri Jul 15 20:47:59 2016 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Fri Jul 15 20:47:59 2016 +0000

----------------------------------------------------------------------
 core/sql/comexe/ComTdb.h                 |  2 ++
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp | 18 +++++++++++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3d2bceb7/core/sql/comexe/ComTdb.h
----------------------------------------------------------------------
diff --git a/core/sql/comexe/ComTdb.h b/core/sql/comexe/ComTdb.h
index 3d63372..080ea45 100644
--- a/core/sql/comexe/ComTdb.h
+++ b/core/sql/comexe/ComTdb.h
@@ -957,6 +957,8 @@ class ComTdbVirtTableKeyInfo : public ComTdbVirtTableBase
   const char * colName;
   Lng32   keySeqNum;
   Lng32   tableColNum;
+
+  enum { ASCENDING_ORDERING = 0, DESCENDING_ORDERING = 1 };
   Lng32   ordering;  // 0 means ascending, 1 means descending
                      // (see, for example, CmpSeabaseDDL::buildKeyInfoArray)
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3d2bceb7/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index 4ecb097..5b4cc2f 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -70,6 +70,7 @@
 #include "CmpSeabaseDDLroutine.h"
 #include "hdfs.h"
 #include "StmtDDLAlterLibrary.h"
+#include "logmxevent_traf.h"
 
 void cleanupLOBDataDescFiles(const char*, int, const char *);
 
@@ -437,7 +438,7 @@ short CmpSeabaseDDL::convertColAndKeyInfoArrays(
           ComTdbVirtTableKeyInfo &ki = btKeyInfoArray[ii];
           if (strcmp(ci.colName, ki.colName) == 0)
             {
-              if (ki.ordering == 0)
+              if (ki.ordering == ComTdbVirtTableKeyInfo::ASCENDING_ORDERING)
                 nac->setClusteringKey(ASCENDING);
               else // ki.ordering should be 1
                 nac->setClusteringKey(DESCENDING);
@@ -667,7 +668,7 @@ short CmpSeabaseDDL::processDDLandCreateDescs(
 
           ki.tableColNum = colNumber;
           ki.keySeqNum = i+1;
-          ki.ordering = 0;
+          ki.ordering = ComTdbVirtTableKeyInfo::ASCENDING_ORDERING;
           ki.nonKeyCol = 1;
           
           ki.hbaseColFam = new(CTXTHEAP) char[strlen(SEABASE_DEFAULT_COL_FAMILY) + 1];
@@ -908,6 +909,11 @@ short CmpSeabaseDDL::createMDdescs(MDDescsInfo *&trafMDDescsInfo)
   if (trafMDDescsInfo)
     NADELETEBASIC(trafMDDescsInfo, CTXTHEAP);
   trafMDDescsInfo = NULL;
+
+  char msg[80];
+  str_sprintf(msg,"CmpSeabaseDDL::createMDdescs failed, breadCrumb = %d",breadCrumb);
+  SQLMXLoggingArea::logSQLMXDebugEvent(msg, -1, __LINE__);
+
   return -1;
 }
                                               
@@ -5926,7 +5932,9 @@ short CmpSeabaseDDL::buildKeyInfoArray(
         }
         
       keyInfoArray[index].ordering = 
-        ((*keyArray)[index]->getColumnOrdering() == COM_ASCENDING_ORDER ? 0 : 1);
+        ((*keyArray)[index]->getColumnOrdering() == COM_ASCENDING_ORDER ? 
+          ComTdbVirtTableKeyInfo::ASCENDING_ORDERING : 
+          ComTdbVirtTableKeyInfo::DESCENDING_ORDERING);
       keyInfoArray[index].nonKeyCol = 0;
 
       if ((colInfoArray) &&
@@ -7016,6 +7024,10 @@ void CmpSeabaseDDL::initSeabaseMD(NABoolean ddlXns, NABoolean minimal)
 
   endXnIfStartedHere(&cliInterface, xnWasStartedHere, -1);
 
+  char msg[80];
+  str_sprintf(msg,"CmpSeabaseDDL::initSeabaseMD failed, breadCrumb = %d",breadCrumb);
+  SQLMXLoggingArea::logSQLMXDebugEvent(msg, -1, __LINE__);
+
   return;
 }