Repository: trafodion
Updated Branches:
  refs/heads/master 994e9eb03 -> e8da2ec7d


http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/ExpLOBaccess.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.h b/core/sql/exp/ExpLOBaccess.h
index 416c3cc..4097d62 100644
--- a/core/sql/exp/ExpLOBaccess.h
+++ b/core/sql/exp/ExpLOBaccess.h
@@ -49,6 +49,8 @@
 #include "Globals.h"
 #include <seabed/ms.h>
 #include <seabed/fs.h>
+#include "ex_stdh.h"
+#include "ExStats.h"
 #ifdef LOB_DEBUG_STANDALONE
 #define Int64 long long
 #define Lng32 long
@@ -56,18 +58,10 @@
 #endif
 
 #define SQ_USE_HDFS 1
-
-
-
 #include "hdfs.h"
-
-
-
-
 using namespace std;
 
 
-
 class ExLobGlobals;
 // This class defines the request used to construct the message to send over 
 // to the mxlobsrvr process. It's currently not used. All lob functionailty is 
@@ -149,6 +143,7 @@ class ExLobRequest
 
 Ex_Lob_Error ExLobsOper (
     char        *lobName,          // lob name
+    ExHdfsScanStats *hdfsAccessStats, // Statistics for Lob access
     char        *handleIn,         // input handle (for cli calls)
     Int32       handleInLen,       // input handle len
     char       *hdfsServer,       // server where hdfs fs resides
@@ -394,7 +389,7 @@ class ExLob : public NABasicObject
 {
   public:
     
-    ExLob(NAHeap * heap);  // default constructor
+    ExLob(NAHeap * heap, ExHdfsScanStats *hdfsAccessStats);  // default 
constructor
     virtual ~ExLob(); // default desctructor
 
     void setUseLibHdfs(NABoolean useLibHdfs)
@@ -490,7 +485,7 @@ class ExLob : public NABasicObject
 
   Ex_Lob_Error emptyDirectory(char* dirPath, ExLobGlobals* lobGlobals);
 
-  ExLobStats *getStats() { return &stats_; }
+  ExHdfsScanStats *getStats() { return stats_; }
   NAHeap *getLobGlobalHeap() { return lobGlobalHeap_;}
   Ex_Lob_Error getLength(char *handleIn, Int32 handleInLen,Int64 
&outLobLen,LobsSubOper so, Int64 transId);
   Ex_Lob_Error getOffset(char *handleIn, Int32 handleInLen,Int64 
&outOffset,LobsSubOper so, Int64 transId);
@@ -515,7 +510,7 @@ class ExLob : public NABasicObject
     hdfsFS fs_;
     hdfsFile fdData_;
     int openFlags_;
-    ExLobStats stats_;
+    ExHdfsScanStats *stats_;
     bool prefetchQueued_;
     NAHeap *lobGlobalHeap_;
     NABoolean lobTrace_;

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/ExpLOBenums.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBenums.h b/core/sql/exp/ExpLOBenums.h
index 9729cbc..4d140a2 100644
--- a/core/sql/exp/ExpLOBenums.h
+++ b/core/sql/exp/ExpLOBenums.h
@@ -249,8 +249,6 @@ typedef enum {
    Lob_Drop,
    Lob_Check_Status,
 
-   Lob_Stats,
-
    Lob_Print, // debugging purposes
 
    Lob_Empty_Directory,

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/ExpLOBinterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.cpp b/core/sql/exp/ExpLOBinterface.cpp
index 93035ed..3320a83 100644
--- a/core/sql/exp/ExpLOBinterface.cpp
+++ b/core/sql/exp/ExpLOBinterface.cpp
@@ -47,6 +47,7 @@ Lng32 ExpLOBinterfaceInit(ExLobGlobals *& exLobGlob, NAHeap 
*lobHeap,
   Int32 dummyParam2 = 0;
 
   err = ExLobsOper((char*)"dummy",
+                   NULL, 
                   NULL, 0,
                   NULL, 0, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -104,6 +105,7 @@ Lng32 ExpLOBinterfacePerformGC(ExLobGlobals *& exLobGlob, 
char *lobName,void *de
   Int64 cliError = -1; 
   Int32 dummyParam2 = 0;
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0,
                   hdfsServer, hdfsPort, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -132,6 +134,7 @@ Lng32 ExpLOBinterfaceRestoreLobDataFile(ExLobGlobals *& 
exLobGlob, char *hdfsSer
   Int64 cliError = -1; 
   Int32 dummyParam2 = 0;
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0,
                   hdfsServer, hdfsPort, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -159,6 +162,7 @@ Lng32 ExpLOBinterfacePurgeBackupLobDataFile(ExLobGlobals *& 
exLobGlob, char *hdf
   Int64 cliError = -1; 
   Int32 dummyParam2 = 0;
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0,
                   hdfsServer, hdfsPort, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -186,6 +190,7 @@ Lng32 ExpLOBinterfaceCleanup(ExLobGlobals *& exLobGlob)
   Int64 cliError = -1; 
   Int32 dummyParam2 = 0;
   err = ExLobsOper((char *)"dummy",
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0,
                   NULL, 0, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -224,6 +229,7 @@ Lng32 ExpLOBinterfaceCreate(
   Int64 cliError = -1;
   
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0, 
                   lobHdfsServer, lobHdfsPort,
                   NULL, dummyParam2, 0, dummyParam, 
@@ -279,6 +285,7 @@ Lng32 ExpLOBinterfaceDataModCheck(ExLobGlobals * exLobGlob,
   *(Lng32*)&blackBox[sizeof(modTS)+sizeof(numOfPartLevels)] = failedLocBufLen;
   failedModTS = -1;
   err = ExLobsOper((char*)"",
+                   NULL, // ExHdfsScanStats * 
                    NULL, 0,
                    lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -338,6 +345,7 @@ Lng32 ExpLOBinterfaceEmptyDirectory(
   Int64 cliError = -1;
 
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                    NULL, 0,
                    lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 0, dummyParam,
@@ -371,6 +379,7 @@ Lng32 ExpLOBinterfaceDrop(ExLobGlobals * exLobGlob,  char * 
lobHdfsServer ,
   Int64 cliError = -1;
   
   err = ExLobsOper(lobName,
+                   NULL, // ExHdfsScanStats * 
                   NULL, 0,
                   lobHdfsServer, lobHdfsPort, 
                   NULL, dummyParam2, 0, dummyParam, 
@@ -403,6 +412,7 @@ Lng32 ExpLOBInterfacePurgedata(ExLobGlobals * exLobGlob,
   
   
   err = ExLobsOper(lobName, 
+                   NULL, // ExHdfsScanStats * 
                   NULL,0, 
                   NULL, 0,
                   NULL, dummyParam2, 0, dummyParam, 
@@ -424,6 +434,7 @@ Lng32 ExpLOBInterfacePurgedata(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * exLobGlob, 
+                               ExHdfsScanStats *hdfsAccessStats,
                               char * lobName,
                               char * lobLoc,
                               Lng32 lobType,
@@ -440,6 +451,7 @@ Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * exLobGlob,
   LobsStorage ls = (LobsStorage)lobType;
 
   err = ExLobsOper(lobName, 
+                   hdfsAccessStats,
                   NULL, 0, 
                   lobHdfsServer, lobHdfsPort,
                   NULL, dummyParam2, 0, dummyParam, 
@@ -463,6 +475,7 @@ Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * exLobGlob,
 
 
 Lng32 ExpLOBInterfaceInsert(ExLobGlobals * exLobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * tgtLobName,
                            char * lobStorageLocation,
                            Lng32 lobType,
@@ -518,6 +531,7 @@ Lng32 ExpLOBInterfaceInsert(ExLobGlobals * exLobGlob,
 
   //  Int64 lobLen = (tgtLobLen ? *tgtLobLen : 0);
   err = ExLobsOper(tgtLobName, 
+                   hdfsAccessStats,
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                   outLobHandle, *outHandleLen,
@@ -560,6 +574,7 @@ Lng32 ExpLOBInterfaceInsert(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobHdfsServer ,
                                  Lng32 lobHdfsPort ,
                                  char * tgtLobName,
@@ -594,6 +609,7 @@ Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob,
   LobsStorage ls = (LobsStorage)lobType;
  
   err = ExLobsOper(tgtLobName, 
+                   hdfsAccessStats,
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    outLobHandle, *outHandleLen,
@@ -627,6 +643,7 @@ Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * exLobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobHdfsServer ,
                                  Lng32 lobHdfsPort ,
                                  char * tgtLobName,
@@ -640,7 +657,6 @@ Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * exLobGlob,
                                  Lng32 checkStatus,
                                  Lng32 waitedOp,
                                  LobsSubOper so,
-                                 
                                  Int64 &tgtDescSyskey,
                                  Int64 tgtLobLen,
                                  char * srcLobData, 
@@ -667,6 +683,7 @@ Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * exLobGlob,
   else if ((so == Lob_Buffer) || (so == Lob_Memory))
     srcLen = tgtLobLen;
   err = ExLobsOper(tgtLobName, 
+                   hdfsAccessStats,
                    lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort, // hdfs server/port
                    outLobHandle, *outHandleLen,
@@ -697,9 +714,9 @@ Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * exLobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobHdfsServer ,
                            Lng32 lobHdfsPort,
-
                            char * tgtLobName,
                            char * lobStorageLocation,
                            Lng32 handleLen,
@@ -711,7 +728,6 @@ Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * exLobGlob,
                            Lng32 checkStatus,
                            Lng32 waitedOp,
                            LobsSubOper so,
-                           
                            Int64 &tgtDescSyskey,
                            Int64 tgtLobLen,
                            char * srcLobData, 
@@ -738,6 +754,7 @@ Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * exLobGlob,
     sourceLen = tgtLobLen;
 
   err = ExLobsOper(tgtLobName, 
+                   hdfsAccessStats,
                    lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort, // hdfs server/port
                    outLobHandle, *outHandleLen,
@@ -770,10 +787,11 @@ Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceDelete(ExLobGlobals * exLobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobHdfsServer ,
                            Lng32 lobHdfsPort ,
                            char * lobName,
-                   char * lobLoc,
+                           char * lobLoc,
                            Lng32 handleLen,
                            char * lobHandle,
                            Int64 &requestTag,
@@ -799,6 +817,7 @@ Lng32 ExpLOBInterfaceDelete(ExLobGlobals * exLobGlob,
     }
 
   err = ExLobsOper(lobName, 
+                   hdfsAccessStats,
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort, // hdfs server/port
                    NULL, dummyParam2, 
@@ -829,12 +848,12 @@ Lng32 ExpLOBInterfaceDelete(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceSelect(ExLobGlobals * exLobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobName, 
                            char * lobLoc,
                            Lng32 lobType,
                            char * lobHdfsServer,
                            Lng32 lobHdfsPort,
-                          
                            Lng32 handleLen,
                            char * lobHandle,
                            Int64 &requestTag,
@@ -871,6 +890,7 @@ Lng32 ExpLOBInterfaceSelect(ExLobGlobals * exLobGlob,
   LobsStorage ls = (LobsStorage)lobType;
 
   err = ExLobsOper(lobName, 
+                   hdfsAccessStats,
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -906,6 +926,7 @@ Lng32 ExpLOBInterfaceSelect(ExLobGlobals * exLobGlob,
 }
 
 Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * exLobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobName, 
                                  char * lobLoc,
                                  Lng32 lobType,
@@ -971,6 +992,7 @@ Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * exLobGlob,
   LobsStorage ls = (LobsStorage)lobType;
 
   err = ExLobsOper(lobName, 
+                   hdfsAccessStats,
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -1026,6 +1048,7 @@ Lng32 ExpLOBInterfaceGetLobLength(ExLobGlobals * 
exLobGlob,
   else 
     so = Lob_Buffer;
   err = ExLobsOper(lobName, 
+                   NULL, // ExHdfsScanStats * 
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -1084,6 +1107,7 @@ Lng32 ExpLOBInterfaceGetOffset(ExLobGlobals * exLobGlob,
   else 
     so = Lob_Buffer;
   err = ExLobsOper(lobName, 
+                   NULL, // ExHdfsScanStats * 
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -1139,6 +1163,7 @@ Lng32 ExpLOBInterfaceGetFileName(ExLobGlobals * exLobGlob,
   else 
     so = Lob_Buffer;
   err = ExLobsOper(lobName, 
+                   NULL, // ExHdfsScanStats * 
                   lobHandle, handleLen, 
                   lobHdfsServer, lobHdfsPort,
                    NULL, dummyParam2, 
@@ -1166,41 +1191,6 @@ Lng32 ExpLOBInterfaceGetFileName(ExLobGlobals * 
exLobGlob,
   
   return LOB_ACCESS_SUCCESS;
 }
-Lng32 ExpLOBinterfaceStats(
-                           ExLobGlobals * exLobGlob, 
-                           ExLobStats * lobStats,
-                           char * lobName, char * lobLoc,
-                           Lng32 lobType,
-                           char * lobHdfsServer,
-                           Lng32 lobHdfsPort)
-{
-  Ex_Lob_Error err;
-
-  Int64 dummyParam= 0;
-  Int32 dummyParam2 = 0;
-  Ex_Lob_Error status;
-  Int64 cliError = -1;
-  
-  err = ExLobsOper(lobName,
-                  NULL, 0, 
-                  lobHdfsServer, lobHdfsPort,
-                  NULL, dummyParam2, 0, dummyParam, 
-                   dummyParam, 0, dummyParam, status, cliError, 
-                  lobLoc, (LobsStorage)lobType, 
-                  (char*)lobStats, 0,
-                  0,NULL,
-                  Lob_Stats,
-                  Lob_None,
-                   1, // waited op
-                  exLobGlob,
-                  0, NULL, 0
-                  );
-
-  if (err != LOB_OPER_OK)
-    return -err;
-  else
-    return 0;
-}
  
 char * getLobErrStr(Lng32 errEnum)
 {

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/ExpLOBinterface.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.h b/core/sql/exp/ExpLOBinterface.h
index 54435a3..32ae777 100644
--- a/core/sql/exp/ExpLOBinterface.h
+++ b/core/sql/exp/ExpLOBinterface.h
@@ -26,6 +26,8 @@
 #include "NAVersionedObject.h"
 #include "ComQueue.h"
 #include "ex_globals.h"
+#include "ExStats.h"
+
 class HdfsFileInfo
 {
  public:
@@ -116,12 +118,15 @@ Lng32 ExpLOBInterfacePurgedata(ExLobGlobals * lobGlob,
                               char * lobLoc);
 
 Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * lobGlob, 
+                               ExHdfsScanStats *hdfsAccessStats,
                               char * lobName,
                               char * lobLoc,
                               Lng32 lobType,
                               char * lobHdfsServer ,
                               Lng32 lobHdfsPort );
+
 Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobHdfsServer ,
                                  Lng32 lobHdfsPort ,
                                  char * tgtLobName,
@@ -146,6 +151,7 @@ Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob,
 
                                   );
 Lng32 ExpLOBInterfaceInsert(ExLobGlobals * lobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * tgtLobName,
                            char * lobLocation,
                            Lng32 lobType,
@@ -182,6 +188,7 @@ Lng32 ExpLOBInterfaceInsert(ExLobGlobals * lobGlob,
                            );
 
 Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * lobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobHdfsServer ,
                            Lng32 lobHdfsPort,   
                            char * tgtLobName,
@@ -212,6 +219,7 @@ Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * lobGlob,
                             Int64 lobGCLimit = 0);
 
 Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * lobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobHdfsServer ,
                                  Lng32 lobHdfsPort ,
                                  char * tgtLobName,
@@ -243,6 +251,7 @@ Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * lobGlob,
                                  );
 
 Lng32 ExpLOBInterfaceDelete(ExLobGlobals * lobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobHdfsServer ,
                            Lng32 lobHdfsPort ,
                            char * lobName,
@@ -256,6 +265,7 @@ Lng32 ExpLOBInterfaceDelete(ExLobGlobals * lobGlob,
                            Lng32 waitedOp);
 
 Lng32 ExpLOBInterfaceSelect(ExLobGlobals * lobGlob, 
+                            ExHdfsScanStats *hdfsAccessStats,
                            char * lobName, 
                            char * lobLoc,
                            Lng32  lobType,
@@ -276,6 +286,7 @@ Lng32 ExpLOBInterfaceSelect(ExLobGlobals * lobGlob,
                            Int32 inputFlags=0);
 
 Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * lobGlob, 
+                                  ExHdfsScanStats *hdfsAccessStats,
                                  char * lobName, 
                                  char * lobLoc,
                                  Lng32 lobType,
@@ -299,14 +310,6 @@ Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * lobGlob,
                                   Int32 *hdfsDetailError = NULL
                                  );
 
-Lng32 ExpLOBinterfaceStats(ExLobGlobals * lobGlob, 
-                          ExLobStats * lobStats,
-                          char * lobName,
-                          char * lobLoc,
-                          Lng32 lobType = (Lng32)Lob_HDFS_File,
-                          char * lobHdfsServer = (char *)"default",
-                          Lng32 lobHdfsPort = 0);
-
 char * getLobErrStr(Lng32 errEnum);
 
 Lng32 ExpLOBinterfacePerformGC(ExLobGlobals *& lobGlob, char *lobName,void 
*descChunksArray, Int32 numEntries, char *hdfsServer, Int32 hdfsPort,char 
*LOBlOC,Int64 lobMaxChunkMemSize);

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/ExpLOBprocess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBprocess.cpp b/core/sql/exp/ExpLOBprocess.cpp
index e117160..190be7e 100644
--- a/core/sql/exp/ExpLOBprocess.cpp
+++ b/core/sql/exp/ExpLOBprocess.cpp
@@ -485,10 +485,6 @@ Ex_Lob_Error ExLobGlobals::initialize()
     return LOB_OPER_OK;
 }
 
-
-
-
-
 Ex_Lob_Error ExLobGlobals::getLobPtr(char *lobName, ExLob *& lobPtr)
 {
     Ex_Lob_Error err;
@@ -500,7 +496,7 @@ Ex_Lob_Error ExLobGlobals::getLobPtr(char *lobName, ExLob 
*& lobPtr)
 
     if (it == lobMap->end())
     {
-        lobPtr = new (lobGlobals->getHeap())ExLob(lobGlobals->getHeap());
+        lobPtr = new (lobGlobals->getHeap())ExLob(lobGlobals->getHeap(),NULL);
         if (lobPtr == NULL) 
           return LOB_ALLOC_ERROR;
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/exp_clause.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_clause.h b/core/sql/exp/exp_clause.h
index ad51e4f..3f785ef 100644
--- a/core/sql/exp/exp_clause.h
+++ b/core/sql/exp/exp_clause.h
@@ -542,6 +542,11 @@ public:
     globals_ = glob;
   }
 
+  void setTcb(const ex_tcb *tcb)
+  {
+    tcb_ = (ex_tcb *)tcb;
+  }
+
   Int16 getInstrArrayIndex() { return instrArrayIndex_; }
   void setInstrArrayIndex(Int16 index) { instrArrayIndex_ = index; }
 
@@ -550,6 +555,11 @@ protected:
   {
     return globals_;
   }
+  
+  ex_tcb *getTcb()
+  {
+    return tcb_;
+  }
 
 private:  
   ExClausePtr                nextClause_;          // 00-07
@@ -585,13 +595,14 @@ private:
   // Not valid for EID expressions.
   // Only used for SQ.
   ExGlobalsPtr globals_;                           // 40-47
-
+ 
+  ex_tcb *tcb_;                              // 48-55
   // ---------------------------------------------------------------------
   // Fillers for potential future extensions without changing class size.
   // When a new member is added, size of this filler should be reduced so
   // that the size of the object remains the same (and is modulo 8).
   // ---------------------------------------------------------------------
-  char                       fillers_[16];          // 52-63
+  char                       fillers_[8];          // 56-63
 };
 
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/exp/exp_fixup.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_fixup.cpp b/core/sql/exp/exp_fixup.cpp
index 479ff44..c2cb36c 100644
--- a/core/sql/exp/exp_fixup.cpp
+++ b/core/sql/exp/exp_fixup.cpp
@@ -228,7 +228,7 @@ ex_expr::exp_return_type ex_expr::fixup(Lng32 /*base*/, 
unsigned short mode,
        return retcode;
 
       clause->setExeGlobals(glob);
-
+      clause->setTcb(tcb); 
       clause = clause->getNextClause();
     }
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/generator/GenExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExplain.cpp 
b/core/sql/generator/GenExplain.cpp
index f766873..da9e873 100644
--- a/core/sql/generator/GenExplain.cpp
+++ b/core/sql/generator/GenExplain.cpp
@@ -958,60 +958,60 @@ HbaseAccess::addSpecificExplainInfo(ExplainTupleMaster 
*explainTuple,
     description += "small_scanner: " ;
     description += "ON " ;
   }
-  size_t BUFFER_SIZE=512;
-  char buf[BUFFER_SIZE];
+  size_t TMP_BUFFER_SIZE=512;
+  char buf[TMP_BUFFER_SIZE];
 
   if ((((ComTdbHbaseAccess 
*)tdb)->getHbasePerfAttributes()->dopParallelScanner())>0.0) {
      description += "parallel_scanner: " ;
-     snprintf(buf, BUFFER_SIZE, "%g ", ((ComTdbHbaseAccess 
*)tdb)->getHbasePerfAttributes()->dopParallelScanner());
+     snprintf(buf, TMP_BUFFER_SIZE, "%g ", ((ComTdbHbaseAccess 
*)tdb)->getHbasePerfAttributes()->dopParallelScanner());
      description += buf;
   }
 
   if ( getProbes().getValue() > 0.0 ) {
     description += "probes: "; // total number of probes
-    snprintf(buf, BUFFER_SIZE, "%g ", getProbes().getValue());
+    snprintf(buf, TMP_BUFFER_SIZE, "%g ", getProbes().getValue());
     description += buf;
   }
 
   if ( getSuccessfulProbes().getValue() > 0.0 ) {
     description += "successful_probes: "; // # of probes returning data
-    snprintf(buf, BUFFER_SIZE, "%g ", getSuccessfulProbes().getValue());
+    snprintf(buf, TMP_BUFFER_SIZE, "%g ", getSuccessfulProbes().getValue());
     description += buf;
   }
 
   if ( getUniqueProbes().getValue() > 0.0 ) {
      description += "unique_probes: "; // # of probes returning 1 row
-     snprintf(buf, BUFFER_SIZE, "%g ", getUniqueProbes().getValue());
+     snprintf(buf, TMP_BUFFER_SIZE, "%g ", getUniqueProbes().getValue());
      description += buf;
   }
 
   if ( getDuplicatedSuccProbes().getValue() > 0.0 ) {
      description += "duplicated_succ_probes: "; // # of succ probes returning
-     snprintf(buf, BUFFER_SIZE, "%g ", getDuplicatedSuccProbes().getValue());  
// more than 1 row
+     snprintf(buf, TMP_BUFFER_SIZE, "%g ", 
getDuplicatedSuccProbes().getValue());  // more than 1 row
      description += buf;
   }
 
   if ( getEstRowsAccessed().getValue() ) {
      description += "rows_accessed: "; // #  rows accessed
-     snprintf(buf, BUFFER_SIZE, "%g ", getEstRowsAccessed().getValue());
+     snprintf(buf, TMP_BUFFER_SIZE, "%g ", getEstRowsAccessed().getValue());
      description += buf;
   }
   if (((ComTdbHbaseAccess 
*)tdb)->getHbaseSnapshotScanAttributes()->getUseSnapshotScan())
   {
     description += "use_snapshot_scan: ";
-    snprintf(buf, BUFFER_SIZE, "%s ", "TRUE" );
+    snprintf(buf, TMP_BUFFER_SIZE, "%s ", "TRUE" );
     description += buf;
 
     description += "full_table_name: ";
-    snprintf(buf, BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getTableName());
+    snprintf(buf, TMP_BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getTableName());
     description += buf;
 
     description += "snapshot_name: ";
-    snprintf(buf, BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getHbaseSnapshotScanAttributes()->getSnapshotName());
+    snprintf(buf, TMP_BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getHbaseSnapshotScanAttributes()->getSnapshotName());
     description += buf;
 
     description += "snapshot_temp_location: ";
-    snprintf(buf, BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getHbaseSnapshotScanAttributes()->getSnapScanTmpLocation());
+    snprintf(buf, TMP_BUFFER_SIZE, "%s ", ((ComTdbHbaseAccess 
*)tdb)->getHbaseSnapshotScanAttributes()->getSnapScanTmpLocation());
     description += buf;
 
   }
@@ -1036,7 +1036,7 @@ HbaseAccess::addSpecificExplainInfo(ExplainTupleMaster 
*explainTuple,
   // now get columns_retrieved
   description += "columns_retrieved: ";
   //sprintf(buf, "%d ", retrievedCols().entries());
-  snprintf(buf, BUFFER_SIZE, "%d ", 
getIndexDesc()->getIndexColumns().entries());
+  snprintf(buf, TMP_BUFFER_SIZE, "%d ", 
getIndexDesc()->getIndexColumns().entries());
   description += buf;
   */
 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/abda16ef/core/sql/regress/core/FILTERRTS
----------------------------------------------------------------------
diff --git a/core/sql/regress/core/FILTERRTS b/core/sql/regress/core/FILTERRTS
index 3832ed8..336b16a 100755
--- a/core/sql/regress/core/FILTERRTS
+++ b/core/sql/regress/core/FILTERRTS
@@ -113,4 +113,5 @@ s/STORE\n[0-9 ,]*/STORE @pertableStats@/
 /pertableStats/{N
 s/pertableStats\n[0-9 ,]*/@pertableStats@/
 }
+s/pertableStats[0-9 ,()|a-z]*/@pertableStats@/
 " $fil

Reply via email to