You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2017/10/15 22:07:22 UTC

[3/9] incubator-trafodion git commit: [TRAFODION-2768] Make Trafodion code base to compile in RH7

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpCriDesc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpCriDesc.cpp b/core/sql/exp/ExpCriDesc.cpp
index d982efc..ce68eea 100644
--- a/core/sql/exp/ExpCriDesc.cpp
+++ b/core/sql/exp/ExpCriDesc.cpp
@@ -54,7 +54,7 @@ ex_cri_desc::ex_cri_desc(const unsigned short numTuples, void * space_) :
   unsigned short i;
   for (i=0; i< numTuples; i++)
     {
-      tupleDesc_[i] = NULL;
+      tupleDesc_[i] = (ExpTupleDescPtrPtr)NULL;
     };
 
   flags_ = 0;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpHbaseInterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpHbaseInterface.cpp b/core/sql/exp/ExpHbaseInterface.cpp
index da04c7c..44ce725 100644
--- a/core/sql/exp/ExpHbaseInterface.cpp
+++ b/core/sql/exp/ExpHbaseInterface.cpp
@@ -123,7 +123,7 @@ Int32 ExpHbaseInterface_JNI::deleteColumns(
 
   int numReqRows = 100;
   retcode = htc_->startScan(transID, "", "", columns, -1, FALSE, FALSE, numReqRows, FALSE,
-       NULL, NULL, NULL, NULL);
+       NULL, NULL, NULL);
   if (retcode != HTC_OK)
     return retcode;
 
@@ -205,7 +205,7 @@ Lng32  ExpHbaseInterface::fetchAllRows(
   }
 
   retcode = scanOpen(tblName, "", "", columns, -1, FALSE, FALSE, FALSE, 100, TRUE, NULL,
-       NULL, NULL, NULL);
+       NULL, NULL);
   if (retcode != HBASE_ACCESS_SUCCESS)
     return retcode;
   while (retcode == HBASE_ACCESS_SUCCESS)
@@ -1171,7 +1171,7 @@ Lng32 ExpHbaseInterface_JNI::isEmpty(
   LIST(HbaseStr) columns(heap_);
 
   retcode = scanOpen(tblName, "", "", columns, -1, FALSE, FALSE, FALSE, 100, TRUE, NULL,
-       NULL, NULL, NULL);
+       NULL, NULL);
   if (retcode != HBASE_ACCESS_SUCCESS)
     return -HBASE_OPEN_ERROR;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.cpp b/core/sql/exp/ExpLOB.cpp
index 8557c83..ec69403 100644
--- a/core/sql/exp/ExpLOB.cpp
+++ b/core/sql/exp/ExpLOB.cpp
@@ -56,7 +56,7 @@
 #include "ex_god.h"
 
 
-Lng32 ExpLOBoper::initLOBglobal(void *& exLobGlobals, void * lobHeap, void *currContext, char *hdfsServer ,Int32 port)
+Lng32 ExpLOBoper::initLOBglobal(ExLobGlobals *& exLobGlobals, NAHeap *lobHeap, ContextCli *currContext, char *hdfsServer ,Int32 port)
 {
   // call ExeLOBinterface to initialize lob globals
   ExpLOBinterfaceInit(exLobGlobals, lobHeap,currContext,FALSE, hdfsServer,  port);
@@ -151,7 +151,7 @@ char * ExpLOBoper::ExpGetLOBMDName(Lng32 schNameLen, char * schName,
 
   return outBuf;
 }
-Lng32 ExpLOBoper::createLOB(void * exLobGlob, void *currContext, void * lobHeap, 
+Lng32 ExpLOBoper::createLOB(ExLobGlobals * exLobGlob, ContextCli *currContext, NAHeap * lobHeap, 
 			    char * lobLoc,Int32 hdfsPort,char *hdfsServer,
 			    Int64 uid, Lng32 num, Int64 lobMaxSize )
 {
@@ -166,16 +166,16 @@ Lng32 ExpLOBoper::createLOB(void * exLobGlob, void *currContext, void * lobHeap,
   // Call ExeLOBinterface to create the LOB
   if (exLobGlob == NULL)
     {
-      rc = initLOBglobal(exLobGlobL, lobHeap,currContext,hdfsServer,hdfsPort);
+      rc = initLOBglobal(exLobGlob, lobHeap,currContext,hdfsServer,hdfsPort);
       if (rc)
 	return rc;
     }
   else
     exLobGlobL = exLobGlob;
 
-  rc = ExpLOBinterfaceCreate(exLobGlobL, lobName, lobLoc, Lob_HDFS_File,hdfsServer,lobMaxSize, hdfsPort);
+  rc = ExpLOBinterfaceCreate(exLobGlob, lobName, lobLoc, Lob_HDFS_File,hdfsServer,lobMaxSize, hdfsPort);
   if (exLobGlob == NULL)
-     ExpLOBinterfaceCleanup(exLobGlobL, lobHeap);
+     ExpLOBinterfaceCleanup(exLobGlob, lobHeap);
   return rc;
 }
 void ExpLOBoper::calculateNewOffsets(ExLobInMemoryDescChunksEntry *dcArray, Lng32 numEntries)
@@ -215,10 +215,10 @@ void ExpLOBoper::calculateNewOffsets(ExLobInMemoryDescChunksEntry *dcArray, Lng3
   return ;
 }
 
-Lng32 ExpLOBoper::compactLobDataFile(void *exLobGlob,ExLobInMemoryDescChunksEntry *dcArray,Int32 numEntries,char *tgtLobName,Int64 lobMaxChunkMemSize, void *lobHeap, void *currContext,char *hdfsServer, Int32 hdfsPort, char *lobLoc)
+Lng32 ExpLOBoper::compactLobDataFile(ExLobGlobals *exLobGlob,ExLobInMemoryDescChunksEntry *dcArray,Int32 numEntries,char *tgtLobName,Int64 lobMaxChunkMemSize, NAHeap *lobHeap,  ContextCli *currContext,char *hdfsServer, Int32 hdfsPort, char *lobLoc)
 {
   Int32 rc = 0;
-  void * exLobGlobL = NULL;
+  ExLobGlobals * exLobGlobL = NULL;
   // Call ExeLOBinterface to create the LOB
   if (exLobGlob == NULL)
     {
@@ -237,10 +237,10 @@ Lng32 ExpLOBoper::compactLobDataFile(void *exLobGlob,ExLobInMemoryDescChunksEntr
   return rc;
 }
 
-Int32 ExpLOBoper::restoreLobDataFile(void *exLobGlob, char *lobName, void *lobHeap, void *currContext,char *hdfsServer, Int32 hdfsPort, char *lobLoc)
+Int32 ExpLOBoper::restoreLobDataFile(ExLobGlobals *exLobGlob, char *lobName, NAHeap *lobHeap, ContextCli *currContext,char *hdfsServer, Int32 hdfsPort, char *lobLoc)
 {
   Int32 rc = 0;
-  void * exLobGlobL = NULL;
+  ExLobGlobals * exLobGlobL = NULL;
    if (exLobGlob == NULL)
     {
       rc = initLOBglobal(exLobGlobL, lobHeap,currContext, hdfsServer,hdfsPort);
@@ -256,10 +256,10 @@ Int32 ExpLOBoper::restoreLobDataFile(void *exLobGlob, char *lobName, void *lobHe
 
 }
 
-Int32 ExpLOBoper::purgeBackupLobDataFile(void *exLobGlob,char *lobName, void *currContext,void *lobHeap, char * hdfsServer, Int32 hdfsPort, char *lobLoc)
+Int32 ExpLOBoper::purgeBackupLobDataFile(ExLobGlobals *exLobGlob,char *lobName, NAHeap *lobHeap, ContextCli *currContext, char * hdfsServer, Int32 hdfsPort, char *lobLoc)
 {
   Int32 rc = 0;
-  void * exLobGlobL = NULL;
+  ExLobGlobals * exLobGlobL = NULL;
   if (exLobGlob == NULL)
     {
       rc = initLOBglobal(exLobGlobL, lobHeap,currContext,hdfsServer,hdfsPort);
@@ -275,7 +275,7 @@ Int32 ExpLOBoper::purgeBackupLobDataFile(void *exLobGlob,char *lobName, void *cu
 }
 
 
-Lng32 ExpLOBoper::dropLOB(void * exLobGlob, void * lobHeap, void *currContext,
+Lng32 ExpLOBoper::dropLOB(ExLobGlobals * exLobGlob, NAHeap * lobHeap, ContextCli *currContext,
 			  char * lobLoc,Int32 hdfsPort, char *hdfsServer,
 			  Int64 uid, Lng32 num)
 {
@@ -286,7 +286,7 @@ Lng32 ExpLOBoper::dropLOB(void * exLobGlob, void * lobHeap, void *currContext,
     return -1;
 
   Lng32 rc = 0;
-  void * exLobGlobL = NULL;
+  ExLobGlobals * exLobGlobL = NULL;
   // Call ExeLOBinterface to create the LOB
   if (exLobGlob == NULL)
     {
@@ -303,7 +303,7 @@ Lng32 ExpLOBoper::dropLOB(void * exLobGlob, void * lobHeap, void *currContext,
   return rc;
 }
 
-Lng32 ExpLOBoper::purgedataLOB(void * exLobGlob, char * lobLoc, 
+Lng32 ExpLOBoper::purgedataLOB(ExLobGlobals * exLobGlob, char * lobLoc, 
                                
 			       Int64 uid, Lng32 num)
 {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOB.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.h b/core/sql/exp/ExpLOB.h
index 58979a8..f475461 100644
--- a/core/sql/exp/ExpLOB.h
+++ b/core/sql/exp/ExpLOB.h
@@ -44,6 +44,9 @@
 #include "exp_clause.h"
 #include "ExpLOBenums.h"
 
+class ContextCli;
+class ExLobGlobals;
+
 
 class ExLobInMemoryDescChunksEntry;
 ////////////////////////////////
@@ -128,7 +131,7 @@ class LOBglobals : public NABasicObject {
 	lobLoadInfo_ = new(heap) LobLoadInfo(heap);
       };
   ~LOBglobals() { NADELETE(lobLoadInfo_,LobLoadInfo,heap_); lobLoadInfo_=NULL;}
-  void* &lobAccessGlobals() { return lobAccessGlobals_; };
+  ExLobGlobals* &lobAccessGlobals() { return lobAccessGlobals_; };
   LobLoadInfo * lobLoadInfo() { return lobLoadInfo_; }
 
   Int64 &xnId() { return xnId_; };
@@ -150,7 +153,7 @@ class LOBglobals : public NABasicObject {
   NABoolean getCurrLobOperInProgress() { return currLobOperInProgress_; }
  private:
   CollHeap * heap_;
-  void * lobAccessGlobals_;
+  ExLobGlobals * lobAccessGlobals_;
   LobLoadInfo * lobLoadInfo_;
 
   // transaction id of the current transaction in progress.
@@ -233,23 +236,23 @@ public:
 				Int64 uid,  
 				char * outBuf, Lng32 outBufLen);
   static void calculateNewOffsets(ExLobInMemoryDescChunksEntry *dcArray, Lng32 numEntries);
-  static Lng32 compactLobDataFile(void *lobGlob, ExLobInMemoryDescChunksEntry *dcArray, Int32 numEntries, char *tgtLobName, Int64 lobMaxChunkSize, void *lobHeap,void *currContext,char *hdfsServer, Int32 hdfsPort,char *lobLocation);
-  static Int32 restoreLobDataFile(void *lobGlob, char *lobName, void *lobHeap, void *currContext,char *hdfsServer, Int32 hdfsPort,char *lobLocation );
-  static Int32 purgeBackupLobDataFile(void *lobGlob,char *lobName, void *lobHeap, void *currContext, char *hdfsServer, Int32 hdfsPort, char *lobLocation);
+  static Lng32 compactLobDataFile(ExLobGlobals *lobGlob, ExLobInMemoryDescChunksEntry *dcArray, Int32 numEntries, char *tgtLobName, Int64 lobMaxChunkSize, NAHeap *lobHeap, ContextCli *currContext,char *hdfsServer, Int32 hdfsPort,char *lobLocation);
+  static Int32 restoreLobDataFile(ExLobGlobals *lobGlob, char *lobName, NAHeap *lobHeap, ContextCli *currContext,char *hdfsServer, Int32 hdfsPort,char *lobLocation );
+  static Int32 purgeBackupLobDataFile(ExLobGlobals *lobGlob,char *lobName, NAHeap *lobHeap, ContextCli *currContext, char *hdfsServer, Int32 hdfsPort, char *lobLocation);
 
-  static Lng32 createLOB(void * lobGlob, void *currContext,void * lobHeap,
+  static Lng32 createLOB(ExLobGlobals * lobGlob, ContextCli *currContext,NAHeap * lobHeap,
 			 char * lobLoc, Int32 hdfsPort, char *hdfsServer,
 			 Int64 uid, Lng32 lobNum, Int64 lobMAxSize);
 
-  static Lng32 dropLOB(void * lobGlob, void *currContext,void * lobHeap, 
+  static Lng32 dropLOB(ExLobGlobals * lobGlob, NAHeap *lobHeap, ContextCli *currContext, 
 		       char * lobLoc,Int32 hdfsPort, char *hdfsServer,
 		       Int64 uid, Lng32 lobNum);
 
-  static Lng32 purgedataLOB(void * lobGlob, 
+  static Lng32 purgedataLOB(ExLobGlobals * lobGlob, 
 			    char * lobLob,
 			    Int64 uid, Lng32 lobNum);
 
-  static Lng32 initLOBglobal(void *& lobGlob, void * heap, void *currContext,char *server, Int32 port );
+  static Lng32 initLOBglobal(ExLobGlobals *& lobGlob, NAHeap *heap, ContextCli *currContext,char *server, Int32 port );
 
   // Extracts values from the LOB handle stored at ptr
   static Lng32 extractFromLOBhandle(Int16 *flags,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOBaccess.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.cpp b/core/sql/exp/ExpLOBaccess.cpp
index 455fec1..e6dc148 100644
--- a/core/sql/exp/ExpLOBaccess.cpp
+++ b/core/sql/exp/ExpLOBaccess.cpp
@@ -1152,7 +1152,9 @@ Ex_Lob_Error ExLob::insertSelect(ExLob *srcLobPtr,
   Int32 cliRC;
   Int16 flags;
   Lng32  lobNum;
-  Int64 descNumOut,descNumIn,descSyskey = 0;
+  Int64 descNumOut = 0;
+  Int64 descNumIn = 0;
+  Int64 descSyskey = 0;
   Int32 lobType = 0;
   Int64 uid, inDescSyskey, descPartnKey;
   short schNameLen;
@@ -2513,7 +2515,7 @@ Ex_Lob_Error ExLobsOper (
 			 LobsOper    operation,         // LOB operation
 			 LobsSubOper subOperation,      // LOB sub operation
 			 Int64       waited,            // waited or nowaited
-			 void        *&globPtr,         // ptr to the Lob objects. 
+			 ExLobGlobals        *&globPtr,         // ptr to the Lob objects. 
 			 Int64       transId,
 			 void        *blackBox,         // black box to be sent to cli
 			 Int32       blackBoxLen,       // length of black box

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOBaccess.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBaccess.h b/core/sql/exp/ExpLOBaccess.h
index 3a5a8ca..9246d6e 100644
--- a/core/sql/exp/ExpLOBaccess.h
+++ b/core/sql/exp/ExpLOBaccess.h
@@ -171,7 +171,7 @@ Ex_Lob_Error ExLobsOper (
     LobsOper    operation,         // LOB operation
     LobsSubOper subOperation,      // LOB sub operation
     Int64       waited,            // waited or nowaited
-    void        *&globPtr,         // ptr to the Lob objects. 
+    ExLobGlobals *&globPtr,         // ptr to the Lob objects. 
     Int64       transId,
     void        *blackBox,         // black box to be sent to cli
     Int32       blackBoxLen,        // length of black box

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOBinterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.cpp b/core/sql/exp/ExpLOBinterface.cpp
index 9b58344..8b4dd4e 100644
--- a/core/sql/exp/ExpLOBinterface.cpp
+++ b/core/sql/exp/ExpLOBinterface.cpp
@@ -34,8 +34,8 @@ using std::ofstream;
 #include "ExpLOBinterface.h"
 #include "ex_globals.h"
 
-Lng32 ExpLOBinterfaceInit(void *& exLobGlob, void * lobHeap,
-                          void *currContext,NABoolean isHiveRead,
+Lng32 ExpLOBinterfaceInit(ExLobGlobals *& exLobGlob, NAHeap * lobHeap,
+                          ContextCli *currContext,NABoolean isHiveRead,
                           char *hdfsServer, 
                           Int32 port)
 {
@@ -95,7 +95,7 @@ Lng32 ExpLOBinterfaceInit(void *& exLobGlob, void * lobHeap,
     return 0;
 }
 
-Lng32 ExpLOBinterfacePerformGC(void *& exLobGlob, char *lobName,void *descChunksArray, Int32 numEntries, char *hdfsServer, Int32 hdfsPort,char *lobLoc,Int64 lobMaxChunkMemSize)
+Lng32 ExpLOBinterfacePerformGC(ExLobGlobals *& exLobGlob, char *lobName,void *descChunksArray, Int32 numEntries, char *hdfsServer, Int32 hdfsPort,char *lobLoc,Int64 lobMaxChunkMemSize)
 {
   Ex_Lob_Error err;
   Ex_Lob_Error status;
@@ -123,7 +123,7 @@ Lng32 ExpLOBinterfacePerformGC(void *& exLobGlob, char *lobName,void *descChunks
     return 0;
 }
 
-Lng32 ExpLOBinterfaceRestoreLobDataFile(void *& exLobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName)
+Lng32 ExpLOBinterfaceRestoreLobDataFile(ExLobGlobals *& exLobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName)
 {
   Ex_Lob_Error err;
   Ex_Lob_Error status;
@@ -150,7 +150,7 @@ Lng32 ExpLOBinterfaceRestoreLobDataFile(void *& exLobGlob, char *hdfsServer, Int
   else
     return 0;
 }
-Lng32 ExpLOBinterfacePurgeBackupLobDataFile(void *& exLobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName)
+Lng32 ExpLOBinterfacePurgeBackupLobDataFile(ExLobGlobals *& exLobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName)
 {
   Ex_Lob_Error err;
   Ex_Lob_Error status;
@@ -177,7 +177,7 @@ Lng32 ExpLOBinterfacePurgeBackupLobDataFile(void *& exLobGlob, char *hdfsServer,
   else
     return 0;
 }
-Lng32 ExpLOBinterfaceCleanup(void *& exLobGlob, void * lobHeap)
+Lng32 ExpLOBinterfaceCleanup(ExLobGlobals *& exLobGlob, NAHeap * lobHeap)
 {
   Ex_Lob_Error err;
   Ex_Lob_Error status;
@@ -206,7 +206,7 @@ Lng32 ExpLOBinterfaceCleanup(void *& exLobGlob, void * lobHeap)
 }
 
 Lng32 ExpLOBinterfaceCreate(
-			    void * exLobGlob, char * lobName, char * lobLoc,
+			    ExLobGlobals * exLobGlob, char * lobName, char * lobLoc,
 			    Lng32 lobType,
 			    char * lobHdfsServer,
 			    Int64 lobMaxSize,
@@ -252,7 +252,7 @@ Lng32 ExpLOBinterfaceCreate(
 //         -LOB_*_ERROR, if error.
 
 
-Lng32 ExpLOBinterfaceDataModCheck(void * exLobGlob,
+Lng32 ExpLOBinterfaceDataModCheck(ExLobGlobals * exLobGlob,
                                   char * dirPath,
                                   char * lobHdfsServer,
                                   Lng32  lobHdfsPort,
@@ -316,7 +316,7 @@ Lng32 ExpLOBinterfaceDataModCheck(void * exLobGlob,
 }
 
 Lng32 ExpLOBinterfaceEmptyDirectory(
-                            void * exLobGlob,
+                            ExLobGlobals * exLobGlob,
                             char * lobName,
                             char * lobLoc,
                             Lng32 lobType,
@@ -356,7 +356,7 @@ Lng32 ExpLOBinterfaceEmptyDirectory(
   else
     return 0;
 }
-Lng32 ExpLOBinterfaceDrop(void * exLobGlob,  char * lobHdfsServer ,
+Lng32 ExpLOBinterfaceDrop(ExLobGlobals * exLobGlob,  char * lobHdfsServer ,
 			  Lng32 lobHdfsPort,char * lobName, char * lobLoc)
 {
   Ex_Lob_Error err;
@@ -387,7 +387,7 @@ Lng32 ExpLOBinterfaceDrop(void * exLobGlob,  char * lobHdfsServer ,
     return 0;
 }
 
-Lng32 ExpLOBInterfacePurgedata(void * exLobGlob,  
+Lng32 ExpLOBInterfacePurgedata(ExLobGlobals * exLobGlob,  
 			       char * lobName, char * lobLoc)
 {
   Ex_Lob_Error err;
@@ -419,7 +419,7 @@ Lng32 ExpLOBInterfacePurgedata(void * exLobGlob,
     return LOB_ACCESS_SUCCESS;
 }
 
-Lng32 ExpLOBinterfaceCloseFile(void * exLobGlob, 
+Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * exLobGlob, 
 			       char * lobName,
 			       char * lobLoc,
 			       Lng32 lobType,
@@ -458,7 +458,7 @@ Lng32 ExpLOBinterfaceCloseFile(void * exLobGlob,
 }
 
 
-Lng32 ExpLOBInterfaceInsert(void * exLobGlob, 
+Lng32 ExpLOBInterfaceInsert(ExLobGlobals * exLobGlob, 
 			    char * tgtLobName,
 			    char * lobStorageLocation,
 			    Lng32 lobType,
@@ -555,7 +555,7 @@ Lng32 ExpLOBInterfaceInsert(void * exLobGlob,
   return 0;
 }
 
-Lng32 ExpLOBInterfaceInsertSelect(void * exLobGlob, 
+Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob, 
 				  char * lobHdfsServer ,
 				  Lng32 lobHdfsPort ,
 				  char * tgtLobName,
@@ -606,6 +606,7 @@ Lng32 ExpLOBInterfaceInsertSelect(void * exLobGlob,
 		   exLobGlob,
 		   xnId, 
 		   blackBox, blackBoxLen,
+                   NULL, // compression
 		   lobMaxSize,
 		   lobMaxChunkMemSize,
                    lobGCLimit,
@@ -622,7 +623,7 @@ Lng32 ExpLOBInterfaceInsertSelect(void * exLobGlob,
   return 0;
 }
 
-Lng32 ExpLOBInterfaceUpdateAppend(void * exLobGlob, 
+Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * exLobGlob, 
 				  char * lobHdfsServer ,
 				  Lng32 lobHdfsPort ,
 				  char * tgtLobName,
@@ -692,7 +693,7 @@ Lng32 ExpLOBInterfaceUpdateAppend(void * exLobGlob,
   return 0;
 }
 
-Lng32 ExpLOBInterfaceUpdate(void * exLobGlob, 
+Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * exLobGlob, 
 			    char * lobHdfsServer ,
 			    Lng32 lobHdfsPort,
 
@@ -765,7 +766,7 @@ Lng32 ExpLOBInterfaceUpdate(void * exLobGlob,
   return 0;
 }
 
-Lng32 ExpLOBInterfaceDelete(void * exLobGlob, 
+Lng32 ExpLOBInterfaceDelete(ExLobGlobals * exLobGlob, 
 			    char * lobHdfsServer ,
 			    Lng32 lobHdfsPort ,
 			    char * lobName,
@@ -824,7 +825,7 @@ Lng32 ExpLOBInterfaceDelete(void * exLobGlob,
 
 }
 
-Lng32 ExpLOBInterfaceSelect(void * exLobGlob, 
+Lng32 ExpLOBInterfaceSelect(ExLobGlobals * exLobGlob, 
 			    char * lobName, 
 			    char * lobLoc,
 			    Lng32 lobType,
@@ -901,7 +902,7 @@ Lng32 ExpLOBInterfaceSelect(void * exLobGlob,
   return 0;
 }
 
-Lng32 ExpLOBInterfaceSelectCursor(void * exLobGlob, 
+Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * exLobGlob, 
 				  char * lobName, 
 				  char * lobLoc,
 				  Lng32 lobType,
@@ -996,7 +997,7 @@ Lng32 ExpLOBInterfaceSelectCursor(void * exLobGlob,
 }
 
 
-Lng32 ExpLOBInterfaceGetLobLength(void * exLobGlob, 
+Lng32 ExpLOBInterfaceGetLobLength(ExLobGlobals * exLobGlob, 
 				  char * lobName, 
 				  char * lobLoc,
 				  Lng32 lobType,
@@ -1050,7 +1051,7 @@ Lng32 ExpLOBInterfaceGetLobLength(void * exLobGlob,
   return LOB_ACCESS_SUCCESS;
 }
 Lng32 ExpLOBinterfaceStats(
-			    void * exLobGlob, 
+			    ExLobGlobals * exLobGlob, 
 			    ExLobStats * lobStats,
 			    char * lobName, char * lobLoc,
 			    Lng32 lobType,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpLOBinterface.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.h b/core/sql/exp/ExpLOBinterface.h
index 88b6fe9..df6c142 100644
--- a/core/sql/exp/ExpLOBinterface.h
+++ b/core/sql/exp/ExpLOBinterface.h
@@ -80,11 +80,11 @@ enum ExpLOBinterfaceInputFlags
     ERROR_IF_TGT_FILE_EXISTS_ =  0x0004
   };
 
-Lng32 ExpLOBinterfaceInit(void *& lobGlob, void * lobHeap, void *currContext,NABoolean isHiveRead, char *hdfsServer="default", Int32 port=0);
+Lng32 ExpLOBinterfaceInit(ExLobGlobals *& lobGlob, NAHeap *lobHeap, ContextCli *currContext,NABoolean isHiveRead, char *hdfsServer=(char *)"default", Int32 port=0);
 
-Lng32 ExpLOBinterfaceCleanup(void *& lobGlob, void * lobHeap);
+Lng32 ExpLOBinterfaceCleanup(ExLobGlobals *& lobGlob, NAHeap *lobHeap);
 
-Lng32 ExpLOBinterfaceCreate(void * lobGlob, 
+Lng32 ExpLOBinterfaceCreate(ExLobGlobals * lobGlob, 
 			    char * lobName,
 			    char * lobLoc,
 			    Lng32 lobType = (Lng32)Lob_HDFS_File,
@@ -95,23 +95,23 @@ Lng32 ExpLOBinterfaceCreate(void * lobGlob,
 	                    short  replication =0,
 	                    int    blocksize=0);
 
-Lng32 ExpLOBinterfaceDrop(void * lobGlob,
+Lng32 ExpLOBinterfaceDrop(ExLobGlobals * lobGlob,
 			  char * lobHdfsServer ,
 			  Lng32 lobHdfsPort ,
 			  char * lobName,
 			  char * lobLoc);
 
-Lng32 ExpLOBInterfacePurgedata(void * lobGlob, 			      
+Lng32 ExpLOBInterfacePurgedata(ExLobGlobals * lobGlob, 			      
 			       char * lobName,
 			       char * lobLoc);
 
-Lng32 ExpLOBinterfaceCloseFile(void * lobGlob, 
+Lng32 ExpLOBinterfaceCloseFile(ExLobGlobals * lobGlob, 
 			       char * lobName,
 			       char * lobLoc,
 			       Lng32 lobType,
 			       char * lobHdfsServer ,
 			       Lng32 lobHdfsPort );
-Lng32 ExpLOBInterfaceInsertSelect(void * exLobGlob, 
+Lng32 ExpLOBInterfaceInsertSelect(ExLobGlobals * exLobGlob, 
 				  char * lobHdfsServer ,
 				  Lng32 lobHdfsPort ,
 				  char * tgtLobName,
@@ -135,7 +135,7 @@ Lng32 ExpLOBInterfaceInsertSelect(void * exLobGlob,
                                   int    blocksize=0
 
                                   );
-Lng32 ExpLOBInterfaceInsert(void * lobGlob, 
+Lng32 ExpLOBInterfaceInsert(ExLobGlobals * lobGlob, 
 			    char * tgtLobName,
 			    char * lobLocation,
 			    Lng32 lobType,
@@ -171,7 +171,7 @@ Lng32 ExpLOBInterfaceInsert(void * lobGlob,
 			    int    blocksize=0
 			    );
 
-Lng32 ExpLOBInterfaceUpdate(void * lobGlob, 
+Lng32 ExpLOBInterfaceUpdate(ExLobGlobals * lobGlob, 
 			    char * lobHdfsServer ,
 			    Lng32 lobHdfsPort,	 
 			    char * tgtLobName,
@@ -201,7 +201,7 @@ Lng32 ExpLOBInterfaceUpdate(void * lobGlob,
 			    Int64 lobMaxChunkMemSize = 0,
                             Int64 lobGCLimit = 0);
 
-Lng32 ExpLOBInterfaceUpdateAppend(void * lobGlob, 
+Lng32 ExpLOBInterfaceUpdateAppend(ExLobGlobals * lobGlob, 
 				  char * lobHdfsServer ,
 				  Lng32 lobHdfsPort ,
 				  char * tgtLobName,
@@ -232,7 +232,7 @@ Lng32 ExpLOBInterfaceUpdateAppend(void * lobGlob,
                                   Int64 lobGCLimit = 0
 				  );
 
-Lng32 ExpLOBInterfaceDelete(void * lobGlob, 
+Lng32 ExpLOBInterfaceDelete(ExLobGlobals * lobGlob, 
 			    char * lobHdfsServer ,
 			    Lng32 lobHdfsPort ,
 			    char * lobName,
@@ -245,7 +245,7 @@ Lng32 ExpLOBInterfaceDelete(void * lobGlob,
 			    Lng32 checkStatus,
 			    Lng32 waitedOp);
 
-Lng32 ExpLOBInterfaceSelect(void * lobGlob, 
+Lng32 ExpLOBInterfaceSelect(ExLobGlobals * lobGlob, 
 			    char * lobName, 
 			    char * lobLoc,
 			    Lng32  lobType,
@@ -265,7 +265,7 @@ Lng32 ExpLOBInterfaceSelect(void * lobGlob,
 			    Int64 lobMaxChunkMemlen,
 			    Int32 inputFlags=0);
 
-Lng32 ExpLOBInterfaceSelectCursor(void * lobGlob, 
+Lng32 ExpLOBInterfaceSelectCursor(ExLobGlobals * lobGlob, 
 				  char * lobName, 
 				  char * lobLoc,
 				  Lng32 lobType,
@@ -289,7 +289,7 @@ Lng32 ExpLOBInterfaceSelectCursor(void * lobGlob,
                                   Int32 *hdfsDetailError = NULL
 				  );
 
-Lng32 ExpLOBinterfaceStats(void * lobGlob, 
+Lng32 ExpLOBinterfaceStats(ExLobGlobals * lobGlob, 
 			   ExLobStats * lobStats,
 			   char * lobName,
 			   char * lobLoc,
@@ -299,9 +299,9 @@ Lng32 ExpLOBinterfaceStats(void * lobGlob,
 
 char * getLobErrStr(Lng32 errEnum);
 
-Lng32 ExpLOBinterfacePerformGC(void *& lobGlob, char *lobName,void *descChunksArray, Int32 numEntries, char *hdfsServer, Int32 hdfsPort,char *LOBlOC,Int64 lobMaxChunkMemSize);
-Lng32 ExpLOBinterfaceRestoreLobDataFile(void *& lobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName);
-Lng32 ExpLOBinterfacePurgeBackupLobDataFile(void *& lobGlob,  char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName);
+Lng32 ExpLOBinterfacePerformGC(ExLobGlobals *& lobGlob, char *lobName,void *descChunksArray, Int32 numEntries, char *hdfsServer, Int32 hdfsPort,char *LOBlOC,Int64 lobMaxChunkMemSize);
+Lng32 ExpLOBinterfaceRestoreLobDataFile(ExLobGlobals *& lobGlob, char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName);
+Lng32 ExpLOBinterfacePurgeBackupLobDataFile(ExLobGlobals *& lobGlob,  char *hdfsServer, Int32 hdfsPort,char *lobLoc,char *lobName);
 
 // dirPath: path to needed directory (includes directory name)
 // modTS is the latest timestamp on any file/dir under dirPath.
@@ -311,7 +311,7 @@ Lng32 ExpLOBinterfacePurgeBackupLobDataFile(void *& lobGlob,  char *hdfsServer,
 //   failedLocBuf: buffer where path/name of failed dir/file will be returned.
 //   failedLocBufLen: IN: max len of buf. OUT: actual length of data.
 // Return: 1, if check fails. 0, if passes. -1, if error.
-Lng32 ExpLOBinterfaceDataModCheck(void * lobGlob,
+Lng32 ExpLOBinterfaceDataModCheck(ExLobGlobals * lobGlob,
                                   char * dirPath,
                                   char * lobHdfsServer,
                                   Lng32  lobHdfsPort,
@@ -321,7 +321,7 @@ Lng32 ExpLOBinterfaceDataModCheck(void * lobGlob,
                                   char * failedLocBuf,
                                   Int32 &failedLocBufLen);
 
-Lng32 ExpLOBinterfaceEmptyDirectory(void * lobGlob,
+Lng32 ExpLOBinterfaceEmptyDirectory(ExLobGlobals * lobGlob,
                             char * lobName,
                             char * lobLoc,
                             Lng32 lobType = (Lng32)Lob_Empty_Directory,
@@ -331,7 +331,7 @@ Lng32 ExpLOBinterfaceEmptyDirectory(void * lobGlob,
                             short  replication =0,
                             int    blocksize=0);
 
-Lng32 ExpLOBInterfaceGetLobLength(void * exLobGlob, 
+Lng32 ExpLOBInterfaceGetLobLength(ExLobGlobals * exLobGlob, 
 				  char * lobName, 
 				  char * lobLoc,
 				  Lng32 lobType,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpPCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCode.cpp b/core/sql/exp/ExpPCode.cpp
index 30dafca..d773a0d 100644
--- a/core/sql/exp/ExpPCode.cpp
+++ b/core/sql/exp/ExpPCode.cpp
@@ -228,7 +228,7 @@ void PCodeSegment::convAddrToOffsetInPCode(void * space) {
     Int32 addrBuf[6];
     Int32 *addrs = PCode::getEmbeddedAddresses(pcode[0], addrBuf);
     for(Int32 i = 0; addrs[i] > 0; i++) {
-      if ( (char*)pcode[addrs[i]] != NULL )
+      if ( (char*)((long)pcode[addrs[i]]) != NULL )
         *(Long*)&(pcode[addrs[i]]) =
                 ((Space*)space)->convertToOffset((char*)*(Long*)&(pcode[addrs[i]]));
     }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpPCodeOptimizations.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptimizations.cpp b/core/sql/exp/ExpPCodeOptimizations.cpp
index 326c614..bb10be6 100644
--- a/core/sql/exp/ExpPCodeOptimizations.cpp
+++ b/core/sql/exp/ExpPCodeOptimizations.cpp
@@ -2211,7 +2211,7 @@ void PCodeCfg::optimize()
                 ( cachedNewConstsLen < cachedNEConstsLen ) )
            {
               // Store offset into evalPtr_
-              expr_->setEvalPtr((ex_expr::evalPtrType)( cachedNewConstsLen ));
+              expr_->setEvalPtr((ex_expr::evalPtrType)((long)cachedNewConstsLen));
 
               // Mark this expression appropriately so that the native function gets called
               expr_->setPCodeMoveFastpath(TRUE);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpPCodeOptimizations.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptimizations.h b/core/sql/exp/ExpPCodeOptimizations.h
index 8df61e9..da30ede 100644
--- a/core/sql/exp/ExpPCodeOptimizations.h
+++ b/core/sql/exp/ExpPCodeOptimizations.h
@@ -1723,7 +1723,7 @@ public:
 
     NExDbgInfoPtr_ = expr->getNExDbgInfoPtr() ;
     if ( NExDbgInfoPtr_ &&
-         ( NExDbgInfoPtr_ > (NExDbgInfo *)(expr->getConstsLength()) )
+         ( NExDbgInfoPtr_ > (NExDbgInfo *)((long)(expr->getConstsLength())) )
        )
        NExprDbgLvl_    = NExDbgInfoPtr_->getNExDbgLvl() ;
     else

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPCodeOptsNativeExpr.cpp b/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
index 9ebd530..2429c96 100755
--- a/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
+++ b/core/sql/exp/ExpPCodeOptsNativeExpr.cpp
@@ -5808,7 +5808,7 @@ void PCodeCfg::layoutNativeCode()
   }
 #endif // NExprDbgLvl >= VV_I0
 
-  Int32 opc;
+  Int32 opc = PCIT::Op_END;
   CollIndex i, j, PCBlkIndex;
 
   Int32 skipInst = 0;
@@ -9281,7 +9281,7 @@ void PCodeCfg::layoutNativeCode()
 
 #if 1 /* Use #if 0 to generate/compile, but NOT actually execute generated code */
   // Store offset into evalPtr_
-  expr_->setEvalPtr((ex_expr::evalPtrType)(*offPtr));
+  expr_->setEvalPtr((ex_expr::evalPtrType)((long)*offPtr));
 
   // Mark this expression appropriately so that the native function gets called
   expr_->setPCodeMoveFastpath(TRUE);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/ExpPackDefs.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpPackDefs.cpp b/core/sql/exp/ExpPackDefs.cpp
index 4c67134..d924b9d 100644
--- a/core/sql/exp/ExpPackDefs.cpp
+++ b/core/sql/exp/ExpPackDefs.cpp
@@ -657,7 +657,7 @@ Lng32 ex_expr::unpack(void *base, void * reallocator)
      currClausePtr = nextClause;
   }
   else
-     currClausePtr = NULL;
+     currClausePtr = (ExClausePtr)NULL;
 
   while (currClausePtr != (ExClausePtr)NULL)
   {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/exp_bignum.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_bignum.cpp b/core/sql/exp/exp_bignum.cpp
index 8e5878b..c0f0f69 100644
--- a/core/sql/exp/exp_bignum.cpp
+++ b/core/sql/exp/exp_bignum.cpp
@@ -54,7 +54,7 @@ BigNum::BigNum(Lng32 length, Lng32 precision, short scale, short unSigned)
     precision_(precision),
     scale_(scale),
     unSigned_(unSigned),
-    tempSpacePtr_(NULL)
+    tempSpacePtr_(0)
 {
   setClassID(BigNumID);  
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/exp_clause.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_clause.cpp b/core/sql/exp/exp_clause.cpp
index 15b23f0..3de521b 100644
--- a/core/sql/exp/exp_clause.cpp
+++ b/core/sql/exp/exp_clause.cpp
@@ -169,7 +169,7 @@ ex_clause::ex_clause(clause_type type,
   operType_    = oper_type;
   numOperands_ = num_operands;
   pciLink_     = NULL;
-  nextClause_  = NULL;
+  nextClause_  = (ExClausePtr)NULL;
   flags_       = 0;
   //  instruction_   = -1;
   instrArrayIndex_ = -1;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/exp_conv.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_conv.cpp b/core/sql/exp/exp_conv.cpp
index 1d51814..df1e608 100644
--- a/core/sql/exp/exp_conv.cpp
+++ b/core/sql/exp/exp_conv.cpp
@@ -3694,7 +3694,7 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    -1199999999LL, -11999999999LL, -119999999999LL, -1199999999999LL,
    -11999999999999LL, -119999999999999LL, -1199999999999999LL,
    -11999999999999999LL, -119999999999999999LL, -1199999999999999999LL, 
-   0x8000000000000000LL},  //REC_INT_YEAR_MONTH 197
+   LONG_MAX},  //REC_INT_YEAR_MONTH 197
 
   {0, -9, -99, -999, -9999, -99999, -999999, -9999999, -99999999,
    -999999999LL, -9999999999LL, -99999999999LL, -999999999999LL,
@@ -3713,7 +3713,7 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    -2399999999999LL, -23999999999999LL, -239999999999999LL,
    -2399999999999999LL, -23999999999999999LL,
    -239999999999999999LL, -2399999999999999999LL,
-   0x8000000000000000LL},  // REC_INT_DAY_HOUR 200
+   LONG_MAX},  // REC_INT_DAY_HOUR 200
 
   {0, -9, -99, -999, -9999, -99999, -999999, -9999999, -99999999,
    -999999999LL, -9999999999LL, -99999999999LL, -999999999999LL,
@@ -3725,14 +3725,14 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    -5999999999LL, -59999999999LL, -599999999999LL, -5999999999999LL,
    -59999999999999LL, -599999999999999LL, -5999999999999999LL,
    -59999999999999999LL, -599999999999999999LL, -5999999999999999999LL, 
-   0x8000000000000000LL},  //REC_INT_HOUR_MINUTE 202
+   LONG_MAX},  //REC_INT_HOUR_MINUTE 202
    
 
   {0, -14399, -143999, -1439999, -14399999, -143999999, -1439999999,
    -14399999999LL, -143999999999LL, -1439999999999LL, -14399999999999LL,
    -143999999999999LL, -1439999999999999LL, -14399999999999999LL,
-   -143999999999999999LL, -1439999999999999999LL, 0x8000000000000000LL, 
-   0x8000000000000000LL, 0x8000000000000000LL},  //REC_INT_DAY_MINUTE 203
+   -143999999999999999LL, -1439999999999999999LL, LONG_MAX, 
+   LONG_MAX, LONG_MAX},  //REC_INT_DAY_MINUTE 203
 
   {0, -9, -99, -999, -9999, -99999, -999999, -9999999, -99999999,
    -999999999LL, -9999999999LL, -99999999999LL, -999999999999LL,
@@ -3747,7 +3747,7 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    // 0123456789012    01234567890123    012345678901234
     -59999999999999999LL, -599999999999999999LL, -5999999999999999999LL,
    // 0123456789012345    01234567890123456    012345678901234567
-     0x8000000000000000LL
+     LONG_MAX
    //  0123012301230123
   },  //REC_INT_MINUTE_SECOND 205
 
@@ -3756,9 +3756,9 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    //                                              012345678901
    -359999999999999LL, -3599999999999999LL, -35999999999999999LL,
    // 0123456789012     01234567890123     012345678901234   
-   -359999999999999999LL, -3599999999999999999LL, 0x8000000000000000LL, 
+   -359999999999999999LL, -3599999999999999999LL, LONG_MAX, 
    // 0123456789012345     01234567890123456    0123012301230123 
-   0x8000000000000000LL, 0x8000000000000000LL 
+   LONG_MAX, LONG_MAX 
   },  //REC_INT_HOUR_SECOND 206
 
   {0, -863999, -8639999, -86399999, -863999999, -8639999999LL, -86399999999LL,
@@ -3766,9 +3766,9 @@ Int64 getMinIntervalValue(Lng32 targetPrecision,
    //  012345678      0123456789      01234567890      012345678901
    -8639999999999999LL, -86399999999999999LL, -863999999999999999LL, 
    //  0123456789012      01234567890123      012345678901234
-   -8639999999999999999LL, 0x8000000000000000LL, 0x8000000000000000LL,    
+   -8639999999999999999LL, LONG_MAX, LONG_MAX,    
    //  0123456789012345    0123012301230123    
-   0x8000000000000000LL, 0x8000000000000000LL   
+   LONG_MAX, LONG_MAX   
   } // REC_INT_DAY_SECOND 207
 
   };

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/exp_eval.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_eval.cpp b/core/sql/exp/exp_eval.cpp
index b260938..00fbcc4 100644
--- a/core/sql/exp/exp_eval.cpp
+++ b/core/sql/exp/exp_eval.cpp
@@ -380,9 +380,9 @@ ex_expr::exp_return_type ex_expr::evalClauses(ex_clause *clause,
 		}
 	      else
 		{
-		  *opdata = (char*)((*op)->getOffset());
-		  *nulldata = (char*)((*op)->getNullIndOffset());
-		  *vardata = (char*)((*op)->getVCLenIndOffset());
+		  *opdata = (char*)((long)((*op)->getOffset()));
+		  *nulldata = (char*)((long)((*op)->getNullIndOffset()));
+		  *vardata = (char*)((long)((*op)->getVCLenIndOffset()));
 		}
 	    }
 	  else
@@ -2417,7 +2417,7 @@ ex_expr::exp_return_type ex_expr::evalPCode(PCodeBinary* pCode32,
           // If the operand is NULL, leave 0 on the stack, otherwise a non-zero.
           NABoolean valueNull = ExpAlignedFormat::isNullValue((char *)src,
                                                               (Int16)pCode[2]);
-          opData[pCode[3]] = (char *)(valueNull ? 0 : 1);
+          opData[pCode[3]] = (char *)((long)(valueNull ? 0 : 1));
           pCodeOpc = pCode[4];
           pCode += 5;
         }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/exp/exp_function.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp
index b0e01de..1f757fa 100644
--- a/core/sql/exp/exp_function.cpp
+++ b/core/sql/exp/exp_function.cpp
@@ -5155,11 +5155,11 @@ ex_expr::exp_return_type ExFunctionSVariance::eval(char *op_data[],
 						   ComDiagsArea **diagsArea)
 {
   
-  double sumOfValSquared;
-  double sumOfVal;
-  double countOfVal;
+  double sumOfValSquared = 0;
+  double sumOfVal = 0;
+  double countOfVal = 1;
   double avgOfVal;
-  double result;
+  double result = 0;
 
   if(getDoubleValue(&sumOfValSquared, op_data[1], getOperand(1),
                     heap, diagsArea)) {
@@ -5199,11 +5199,11 @@ ex_expr::exp_return_type ExFunctionSStddev::eval(char *op_data[],
 						 ComDiagsArea **diagsArea)
 {
   
-  double sumOfValSquared;
-  double sumOfVal;
-  double countOfVal;
+  double sumOfValSquared = 0;
+  double sumOfVal = 0;
+  double countOfVal = 1;
   double avgOfVal;
-  double result;
+  double result = 0;
 
   if(getDoubleValue(&sumOfValSquared, op_data[1], getOperand(1),
                     heap, diagsArea)) {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/export/NAVersionedObject.h
----------------------------------------------------------------------
diff --git a/core/sql/export/NAVersionedObject.h b/core/sql/export/NAVersionedObject.h
index 4a569fa..b84933d 100644
--- a/core/sql/export/NAVersionedObject.h
+++ b/core/sql/export/NAVersionedObject.h
@@ -207,7 +207,7 @@ public:
                                    { ptr_ = (Type *)ptr; return *this; }
   
     inline NABasicPtrTempl<Type> & operator = (const Int32 ptr)
-                                   { ptr_ = (Type *)ptr; return *this; }
+                                   { ptr_ = (Type *)((long)ptr); return *this; }
   
     inline NABasicPtrTempl<Type> & operator = (const Type * const ptr)
                                    { ptr_ = (Type *)ptr; return *this; }
@@ -230,7 +230,7 @@ public:
                                                { return (ptr_ == ptr); }
   
     inline Int32 operator != (const Int32 ptr) const
-                                       { return (ptr_ != (Type *)ptr); }
+                                       { return (ptr_ != (Type *)((long)ptr)); }
   
     inline Int32 operator != (const NABasicPtrTempl<Type> & other) const
                                         { return (ptr_ != other.ptr_); }
@@ -486,11 +486,11 @@ public:
   
     inline NAOpenObjectPtrTempl<Type> &
       operator = (const Int32 ptr)
-                                   { ptr_ = (Type *)ptr; return *this; }
+                                   { ptr_ = (Type *)((long)ptr); return *this; }
   
     inline
       NAOpenObjectPtrTempl<Type> & operator = (const Type * const ptr)
-                                   { ptr_ = (Type *)ptr; return *this; }
+                                   { ptr_ = (Type *)((long)ptr); return *this; }
   
     inline
       NAOpenObjectPtrTempl<Type> &
@@ -788,7 +788,7 @@ public:
   
     inline NAVersionedObjectPtrTempl<Type> &
       operator = (const Int32 ptr)
-                                   { ptr_ = (Type *)ptr; return *this; }
+                                   { ptr_ = (Type *)((long)ptr); return *this; }
   
     inline
       NAVersionedObjectPtrTempl<Type> &
@@ -1149,7 +1149,7 @@ public:
   
     inline NAVersionedObjectPtrArrayTempl<PtrType> &
       operator = (const Int32 ptr)
-                                { ptr_ = (PtrType *)ptr; return *this; }
+                                { ptr_ = (PtrType *)((long)ptr); return *this; }
   
     inline
       NAVersionedObjectPtrArrayTempl<PtrType> &

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/generator/GenExpGenerator.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenExpGenerator.cpp b/core/sql/generator/GenExpGenerator.cpp
index b219701..cde3481 100644
--- a/core/sql/generator/GenExpGenerator.cpp
+++ b/core/sql/generator/GenExpGenerator.cpp
@@ -246,7 +246,7 @@ Attributes * ExpGenerator::convertNATypeToAttributes
   // classes contain methods used to perform operations on this type.
   // ----------------------------------------------------------------
 
-  Attributes   *result;
+  Attributes   *result = NULL;
   const NAType *naType = &naType_x;
 
   Int32 rsSize = 0;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/langman/LmResultSetJava.cpp
----------------------------------------------------------------------
diff --git a/core/sql/langman/LmResultSetJava.cpp b/core/sql/langman/LmResultSetJava.cpp
index 8651237..6f664c2 100644
--- a/core/sql/langman/LmResultSetJava.cpp
+++ b/core/sql/langman/LmResultSetJava.cpp
@@ -339,7 +339,7 @@ LmResultSetJava::initType2ResultSet(Int32 paramPos,
   }
 
   setCtxHandle( (SQLCTX_HANDLE)ia[1] );
-  setStmtID( (SQLSTMT_ID *)ia[2] );
+  setStmtID( (SQLSTMT_ID *)((long)ia[2]) );
 
   firstBufferedRow_		= ia[3];
   lastBufferedRow_		= ia[4];

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/nskgmake/Makerules.linux
----------------------------------------------------------------------
diff --git a/core/sql/nskgmake/Makerules.linux b/core/sql/nskgmake/Makerules.linux
index 9d90ebe..a5ae1c3 100755
--- a/core/sql/nskgmake/Makerules.linux
+++ b/core/sql/nskgmake/Makerules.linux
@@ -244,6 +244,7 @@ endif
 
 # -short-wchar: Have the compiler treat wchar_t as a 2-byte character. 
 SYS_CXXFLAGS += -fshort-wchar -std=c++0x
+SYS_CXXFLAGS += -Wno-conversion-null
 SYS_CXXFLAGS += -fcheck-new
 CFLAGS += -fshort-wchar
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index a23e311..dcd6897 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -6069,7 +6069,8 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
   }
 #endif  
 
-  ItemExpr *boundExpr, *boundExpr_0, *boundExpr_1 ;
+  ItemExpr *boundExpr = NULL;
+  ItemExpr *boundExpr_0, *boundExpr_1 ;
 
   boundExpr_0 = child(0)->bindNode(bindWA);
   if (bindWA->errStatus())
@@ -9472,7 +9473,7 @@ ItemExpr *UDFunction::bindNode(BindWA *bindWA)
 
     // IS req 6: Check ROUTINE_TYPE column of ROUTINES table.
     // Emit error if invalid type.
-    ComRoutineType udrType;
+    ComRoutineType udrType = COM_UNKNOWN_ROUTINE_TYPE;
     if (CmpCommon::getDefault(COMP_BOOL_191) == DF_OFF)
       {
         udrType = udfMetadata->routineDesc()->UDRType ;
@@ -12671,7 +12672,6 @@ ItemExpr *HbaseColumnCreate::bindNode(BindWA *bindWA)
     return getValueId().getItemExpr();
 
   ItemExpr * boundExpr = NULL;
-
   short numEntries = hccol_->entries();
   colValMaxLen_ = 0;
   NAType * firstType = NULL;
@@ -12681,7 +12681,7 @@ ItemExpr *HbaseColumnCreate::bindNode(BindWA *bindWA)
   for (short i = 0; i < numEntries; i++)
     {
       HbaseColumnCreateOptions * hcco = (*hccol_)[i];
-      HbaseColumnCreate::HbaseColumnCreateOptions::ConvType co;
+      HbaseColumnCreate::HbaseColumnCreateOptions::ConvType co = HbaseColumnCreate::HbaseColumnCreateOptions::NONE;
 
       ItemExpr * colName = hcco->colName();
       colName = colName->bindNode(bindWA);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/BindRelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindRelExpr.cpp b/core/sql/optimizer/BindRelExpr.cpp
index b585b36..68415d3 100644
--- a/core/sql/optimizer/BindRelExpr.cpp
+++ b/core/sql/optimizer/BindRelExpr.cpp
@@ -5456,7 +5456,7 @@ RelExpr *RelRoot::bindNode(BindWA *bindWA)
 	      ExeUtilLobExtract * le =
 		new (PARSERHEAP()) ExeUtilLobExtract
 		(lef, ExeUtilLobExtract::TO_STRING_,
-		 NULL, NULL, lef->getTgtSize(), 0,
+		 0, 0, lef->getTgtSize(), 0,
 		 NULL, NULL, NULL, child(0), PARSERHEAP());
 	      le->setHandleInStringFormat(FALSE);
 	      setChild(0, le);
@@ -11037,7 +11037,7 @@ RelExpr* Insert::xformUpsertToEfficientTree(BindWA *bindWA)
   ValueIdSet sequenceFunction ;		
  
   //Retrieve all the system and user columns of the left join output
-  ValueIdList  ljOutCols = NULL;
+  ValueIdList  ljOutCols = 0;
   boundLJ->getRETDesc()->getValueIdList(ljOutCols);
   //Retrieve the null instantiated part of the LJ output
   ValueIdList ljNullInstColumns = lj->nullInstantiatedOutput();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/CompilerTracking.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/CompilerTracking.cpp b/core/sql/optimizer/CompilerTracking.cpp
index 2a8cc60..d52e1da 100644
--- a/core/sql/optimizer/CompilerTracking.cpp
+++ b/core/sql/optimizer/CompilerTracking.cpp
@@ -673,8 +673,8 @@ CompilerTrackingInfo::logIntervalInPrivateTable()
 
   ExeCliInterface cliInterface(
        CmpCommon::statementHeap(),
-       NULL,
-       NULL, 
+       0,
+       0, 
        CmpCommon::context()->sqlSession()->getParentQid());
 
   if( cliInterface.beginWork() >= 0 )

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/EstLogProp.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/EstLogProp.h b/core/sql/optimizer/EstLogProp.h
index 3400dd1..6460c14 100644
--- a/core/sql/optimizer/EstLogProp.h
+++ b/core/sql/optimizer/EstLogProp.h
@@ -65,6 +65,7 @@ class EstLogProp : public NABasicObject
 public:
   INTRUSIVE_SHARED_PTR(EstLogProp);
 
+
   // ---------------------------------------------------------------------
   // In order to handle ANTI_SEMI_JOINS, we need the inputForSemiTSJ flag
   // to be an enum, not just an NABoolean

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/HDFSHook.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/HDFSHook.h b/core/sql/optimizer/HDFSHook.h
index 1c60d0f..f6f64fa 100644
--- a/core/sql/optimizer/HDFSHook.h
+++ b/core/sql/optimizer/HDFSHook.h
@@ -52,6 +52,7 @@ class HivePartitionAndBucketKey;
 class HHDFSTableStats;
 class OsimHHDFSStatsBase;
 class OptimizerSimulator;
+class ExLobGlobals;
 
 typedef CollIndex HostId;
 typedef Int64 BucketNum;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/ItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ItemExpr.cpp b/core/sql/optimizer/ItemExpr.cpp
index 154d39a..09cc906 100644
--- a/core/sql/optimizer/ItemExpr.cpp
+++ b/core/sql/optimizer/ItemExpr.cpp
@@ -15132,7 +15132,7 @@ ConstValue* ItemExpr::evaluate(CollHeap* heap)
 
 ItemExpr * ItmLagOlapFunction::copyTopNode(ItemExpr *derivedNode, CollHeap* outHeap)
 {
-    ItemExpr *result;
+    ItemExpr *result = NULL;
 
     if (derivedNode == NULL)
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/NATable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NATable.cpp b/core/sql/optimizer/NATable.cpp
index 8c417d1..5f80d4e 100644
--- a/core/sql/optimizer/NATable.cpp
+++ b/core/sql/optimizer/NATable.cpp
@@ -1267,8 +1267,7 @@ ItemExpr * getRangePartitionBoundaryValues
                         (const char * keyValueBuffer,
 			 const Lng32   keyValueBufferSize,
 			 NAMemory* heap,
-                          CharInfo::CharSet strCharSet = CharInfo::UTF8
-                         )
+                         CharInfo::CharSet strCharSet = CharInfo::UTF8)
 {
   char * keyValue;             // the string for the key value
   ItemExpr * partKeyValue;     // -> dynamically allocated expression
@@ -5009,7 +5008,7 @@ NABoolean NATable::fetchObjectUIDForNativeTable(const CorrName& corrName,
 
    // Do a metadata read, if table descriptor has not been passed in
    //
-   TrafDesc * table_desc;
+  TrafDesc * table_desc = NULL;
    Int32 *maxIndexLevelsPtr = new (STMTHEAP) Int32;
    if (!inTableDesc)
      {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/OptLogRelExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/OptLogRelExpr.cpp b/core/sql/optimizer/OptLogRelExpr.cpp
index da94d5a..f2ddd49 100644
--- a/core/sql/optimizer/OptLogRelExpr.cpp
+++ b/core/sql/optimizer/OptLogRelExpr.cpp
@@ -5181,9 +5181,9 @@ Scan::synthLogProp(NormWA * normWAPtr)
     setBaseCardinality (MIN_ONE (getTableDesc()->getNATable()->getEstRowCount())) ;
 
   if ((CURRSTMT_OPTDEFAULTS->histDefaultSampleSize() > 0) &&
-      (RelExpr *)this->getRETDesc() &&
-      (RelExpr *)this->getRETDesc()->getBindWA() &&
-      (RelExpr *)this->getRETDesc()->getBindWA()->inDDL())
+      this->getRETDesc() &&
+      this->getRETDesc()->getBindWA() &&
+      this->getRETDesc()->getBindWA()->inDDL())
   {
     CURRSTMT_OPTDEFAULTS->setHistDefaultSampleSize(0);
   }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/OptRange.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/OptRange.cpp b/core/sql/optimizer/OptRange.cpp
index 8a6ef24..e8acea4 100644
--- a/core/sql/optimizer/OptRange.cpp
+++ b/core/sql/optimizer/OptRange.cpp
@@ -2245,7 +2245,7 @@ Int64 getInt64Value(ConstValue* val, const NAType* rangeColType,
   // Scale factor for approximate (floating-point) constant values.
   double dblScaleFactor = pow(10, rangeColumnScale);
   Int64 i64val = 0;
-  Float64 flt64val;
+  Float64 flt64val = 0;
 
   if (constValNumType->isDecimal())
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/OptimizerSimulator.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/OptimizerSimulator.cpp b/core/sql/optimizer/OptimizerSimulator.cpp
index 39088cf..7b7fa38 100644
--- a/core/sql/optimizer/OptimizerSimulator.cpp
+++ b/core/sql/optimizer/OptimizerSimulator.cpp
@@ -599,7 +599,7 @@ void OptimizerSimulator::dumpHistograms()
         debugMessage("Dumping histograms for %s\n", name->getQualifiedNameAsAnsiString().data());
         //dump histograms data to hdfs
         query =   "UNLOAD WITH NULL_STRING '\\N' INTO ";
-        query +=  "'"UNLOAD_HDFS_DIR"/";
+        query +=  "'" UNLOAD_HDFS_DIR"/";
         query +=  ComUser::getCurrentUsername();
         query +=  "/";
         query +=  std::to_string((long long unsigned int)(getpid())).c_str();
@@ -669,7 +669,7 @@ void OptimizerSimulator::dumpHistograms()
         }
         
         query =  "UNLOAD WITH NULL_STRING '\\N' INTO ";
-        query += "'"UNLOAD_HDFS_DIR"/";
+        query += "'" UNLOAD_HDFS_DIR"/";
         query += ComUser::getCurrentUsername();
         query += "/";
         query += std::to_string((long long unsigned int)(getpid())).c_str();
@@ -767,7 +767,7 @@ void OptimizerSimulator::dumpHiveHistograms()
         
         //dump histograms data to hdfs
         query =   "UNLOAD WITH NULL_STRING '\\N' INTO ";
-        query +=  "'"UNLOAD_HDFS_DIR"/";
+        query +=  "'" UNLOAD_HDFS_DIR"/";
         query +=  ComUser::getCurrentUsername();
         query +=  "/";
         query +=  std::to_string((long long unsigned int)(getpid())).c_str();
@@ -826,7 +826,7 @@ void OptimizerSimulator::dumpHiveHistograms()
         }
         
         query =  "UNLOAD WITH NULL_STRING '\\N' INTO ";
-        query += "'"UNLOAD_HDFS_DIR"/";
+        query += "'" UNLOAD_HDFS_DIR"/";
         query += ComUser::getCurrentUsername();
         query += "/";
         query += std::to_string((long long unsigned int)(getpid())).c_str();
@@ -1603,7 +1603,7 @@ short OptimizerSimulator::loadHistogramsTable(NAString* modifiedPath, QualifiedN
                           "  , V4             LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
                           "  , V5             VARCHAR(250) CHARACTER SET UCS2 COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
                           "  , V6             VARCHAR(250) CHARACTER SET UCS2 COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
-                          "  , constraint "HBASE_HIST_PK" primary key"
+                          "  , constraint " HBASE_HIST_PK" primary key"
                           "  (TABLE_UID ASC, HISTOGRAM_ID ASC, COL_POSITION ASC)"
                           " )";
     retcode = executeFromMetaContext(cmd.data());
@@ -1688,7 +1688,7 @@ short OptimizerSimulator::loadHistogramIntervalsTable(NAString* modifiedPath, Qu
                        "  , V4                LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
                        "  , V5                VARCHAR(250) CHARACTER SET UCS2 COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
                        "  , V6                VARCHAR(250) CHARACTER SET UCS2 COLLATE DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED"
-                       "  , constraint "HBASE_HISTINT_PK" primary key"
+                       "  , constraint " HBASE_HISTINT_PK" primary key"
                        "     (TABLE_UID ASC, HISTOGRAM_ID ASC, INTERVAL_NUMBER ASC)"
                        " )";
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/SynthType.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/SynthType.cpp b/core/sql/optimizer/SynthType.cpp
index ceab243..5494472 100644
--- a/core/sql/optimizer/SynthType.cpp
+++ b/core/sql/optimizer/SynthType.cpp
@@ -6782,7 +6782,8 @@ const NAType *LOBupdate::synthesizeType()
   // Return blob type
 
   ValueId vid1,vid2 ;
-  const NAType *typ1,*typ2 = NULL;
+  const NAType *typ1 = NULL;
+  const NAType *typ2 = NULL;
 
   if(child(0))
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/optimizer/UdfDllInteraction.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/UdfDllInteraction.cpp b/core/sql/optimizer/UdfDllInteraction.cpp
index b9dbd46..79df4ae 100644
--- a/core/sql/optimizer/UdfDllInteraction.cpp
+++ b/core/sql/optimizer/UdfDllInteraction.cpp
@@ -222,7 +222,7 @@ NABoolean TMUDFDllInteraction::describeParamsAndMaxOutputs(
       const ValueIdList &childCols = childInfo->getOutputs();
       const tmudr::PartitionInfo &childPartInfo = invocationInfo->in(c).getQueryPartitioning();
       const tmudr::OrderInfo &childOrderInfo = invocationInfo->in(c).getQueryOrdering();
-      TMUDFInputPartReq childPartType;
+      TMUDFInputPartReq childPartType = NO_PARTITIONING; 
       ValueIdSet childPartKey;
       ValueIdList childOrderBy;
 
@@ -1520,7 +1520,7 @@ NABoolean TMUDFInternalSetup::setPredicateInfoFromValueIdSet(
 
             if (val != NULL && columnNum != NULL_COLL_INDEX)
               {
-                tmudr::PredicateInfo::PredOperator predOp;
+                tmudr::PredicateInfo::PredOperator predOp = tmudr::PredicateInfo::UNKNOWN_OP;
 
                 pi = new tmudr::ComparisonPredicateInfo;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/parser/SqlParserAux.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/SqlParserAux.cpp b/core/sql/parser/SqlParserAux.cpp
index 43db45a..7ef5295 100644
--- a/core/sql/parser/SqlParserAux.cpp
+++ b/core/sql/parser/SqlParserAux.cpp
@@ -1899,7 +1899,7 @@ NABoolean PicStream::skipCount (UInt32*result, const char pattern, NABoolean isC
             char len_unit_array[11]; // len("CHARACTERS") = 10
             len_unit_array[0] = ch;  // store 'c'
             Int32 n = sgetn(len_unit_array+1, 9); // get the rest of "haracters"
-            len_unit_array[10] = NULL;
+            len_unit_array[10] = 0;
             assert(n == 9 && strcasecmp(len_unit_array, "CHARACTERS") == 0);
 
             skipWhite();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/parser/StmtDDLCreate.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/StmtDDLCreate.cpp b/core/sql/parser/StmtDDLCreate.cpp
index 8aae850..9a9c4df 100644
--- a/core/sql/parser/StmtDDLCreate.cpp
+++ b/core/sql/parser/StmtDDLCreate.cpp
@@ -1411,7 +1411,7 @@ StmtDDLCreateIndex::StmtDDLCreateIndex(NABoolean isUnique,
           isPartitionByClauseSpec_(FALSE),
           isDivisionClauseSpec_(FALSE),
           pDivisionClauseParseNode_(NULL),
-          isHbaseOptionsSpec_(NULL),
+          isHbaseOptionsSpec_(FALSE),
 	  pHbaseOptionsParseNode_(NULL),
           pSaltOptions_(NULL),
           isParallelExec_(FALSE),
@@ -3764,7 +3764,7 @@ StmtDDLCreateTable::StmtDDLCreateTable(const QualifiedName & aTableQualName,
 	  isMVFileAttributeClauseSpec_(FALSE),
           isDivisionByClauseSpec_(FALSE),
           pDivisionByClauseParseNode_(NULL),
-	  isHbaseOptionsSpec_(NULL),
+	  isHbaseOptionsSpec_(FALSE),
 	  pHbaseOptionsParseNode_(NULL),
           pSaltOptions_(NULL),
           isStoreByClauseSpec_(FALSE),

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index d8e85b0..983b96a 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -6015,7 +6015,7 @@ TOK_TABLE '(' TOK_INTERNALSP '(' character_string_literal ')' ')'
       new (PARSERHEAP ()) ExeUtilLobExtract
       (handle, 
        ExeUtilLobExtract::TO_STRING_,
-       NULL, NULL, 0, 0);
+       0, 0, 0, 0);
 
     $$ = lle;
   }
@@ -7200,7 +7200,7 @@ joined_table :  '(' joined_table ')'   { $$ = $2; }
 
 full_outer : TOK_FULL 
              { 
-                $$ = NULL;
+                $$ = 0;
              }
              | TOK_FULL TOK_OUTER
              {
@@ -15883,7 +15883,7 @@ exe_util_lob_extract : TOK_EXTRACT TOK_LOBLENGTH '(' TOK_LOB QUOTED_STRING  ')'
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::RETRIEVE_LENGTH_,
-		    returnLengthAddr, NULL, 0, 0);
+		    returnLengthAddr, 0, 0, 0);
 
 		 $$ = lle;
 	       }
@@ -15896,7 +15896,7 @@ exe_util_lob_extract : TOK_EXTRACT TOK_LOBLENGTH '(' TOK_LOB QUOTED_STRING  ')'
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::RETRIEVE_LENGTH_,
-		    -1, NULL, 0, 0);
+		    -1, 0, 0, 0);
 
 		 $$ = lle;
 	       }
@@ -15913,7 +15913,7 @@ exe_util_lob_extract : TOK_EXTRACT TOK_LOBLENGTH '(' TOK_LOB QUOTED_STRING  ')'
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, 0);
+		    0, 0, rowSize, 0);
 
 		 $$ = lle;
 		 */
@@ -15950,7 +15950,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_FILE_,
-		    NULL, NULL, 
+		    0, 0, 
 		    0, 
 		    0,
 		    (char*)$7->data());
@@ -15968,7 +15968,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_FILE_,
-		    NULL, NULL, 
+		    0, 0, 
 		    ExeUtilLobExtract::ERROR_IF_NOT_EXISTS, 
 		    ExeUtilLobExtract::TRUNCATE_EXISTING,
 		    (char*)$7->data());
@@ -15986,7 +15986,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_FILE_,
-		    NULL, NULL, 
+		    0, 0, 
 		    0, 
 		    ExeUtilLobExtract::TRUNCATE_EXISTING ,
 		    (char*)$7->data());
@@ -16004,7 +16004,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_FILE_,
-		    NULL, NULL, 
+		    0, 0, 
 		    0,
 		    ExeUtilLobExtract::APPEND_OR_CREATE,
 		    (char*)$7->data());
@@ -16023,7 +16023,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, 
 		    ExeUtilLobExtract::TO_FILE_,
-		    NULL, NULL, 
+		    0, 0, 
 		    ExeUtilLobExtract::ERROR_IF_NOT_EXISTS, 
 		    0,
 		    (char*)$7->data(),FALSE);
@@ -16044,7 +16044,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (handle, //(char*)$5->data(), 
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, bufSize); 
+		    0, 0, rowSize, bufSize); 
                     $$ = lle;
                  */
 	       }
@@ -16059,7 +16059,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, 0,
+		    0, 0, rowSize, 0,
 		    (char*)$4->data());
 
 		 $$ = lle;
@@ -16076,7 +16076,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, 0,
+		    0, 0, rowSize, 0,
 		    (char*)$4->data(), (char*)$6->data());
 
 		 $$ = lle; 
@@ -16094,7 +16094,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, bufSize,
+		    0, 0, rowSize, bufSize,
 		    (char*)$4->data(), (char*)$6->data());
 
 		 $$ = lle;
@@ -16111,7 +16111,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_STRING_,
-		    NULL, NULL, rowSize, 0,
+		    0, 0, rowSize, 0,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 $$ = lle;
@@ -16128,7 +16128,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_STRING_,
-		    NULL, NULL, offset, 0,
+		    0, 0, offset, 0,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 $$ = lle;
@@ -16145,7 +16145,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_STRING_,
-		    NULL, NULL, offset, 0,
+		    0, 0, offset, 0,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 lle->withCreate() = TRUE;
@@ -16164,7 +16164,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_FILE_,
-		    NULL, NULL, offset, 0,
+		    0, 0, offset, 0,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 $$ = lle;
@@ -16181,7 +16181,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_FILE_,
-		    NULL, NULL, offset, 0,
+		    0, 0, offset, 0,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 lle->withCreate() = TRUE;
@@ -16200,7 +16200,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_FILE_,
-		    NULL, NULL, offset, bufSize,
+		    0, 0, offset, bufSize,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 $$ = lle;
@@ -16218,7 +16218,7 @@ TOK_SIZE points to the address of an Int64 container This size is the input spec
 		   new (PARSERHEAP ()) ExeUtilLobExtract
 		   (NULL,
 		    ExeUtilLobExtract::TO_EXTERNAL_FROM_FILE_,
-		    NULL, NULL, offset, bufSize,
+		    0, 0, offset, bufSize,
 		    (char*)$4->data(), (char*)$6->data(), (char*)$8->data());
 
 		 lle->withCreate() = TRUE;
@@ -22842,35 +22842,35 @@ optional_showddl_action_name_clause : empty
            $$ = $2; // CorrName * actual_routine_action_name
          }
 
-group_list : id_group_list                               { $$ = NULL; }
-           | TOK_EVERY TOK_KEY                           { $$ = NULL; }
-           | TOK_EVERY TOK_COLUMN                        { $$ = NULL; }
-           | TOK_EXISTING TOK_COLUMN                     { $$ = NULL; } 
-           | TOK_EXISTING TOK_COLUMNS                    { $$ = NULL; } 
-           | TOK_NECESSARY TOK_COLUMN                    { $$ = NULL; } 
-           | TOK_NECESSARY TOK_COLUMNS                   { $$ = NULL; } 
-           | TOK_EVERY TOK_KEY ',' id_group_list         { $$ = NULL; }
-           | TOK_EVERY TOK_COLUMN ',' id_group_list      { $$ = NULL; }
-           | TOK_EXISTING TOK_COLUMN ',' id_group_list   { $$ = NULL; }
-           | TOK_EXISTING TOK_COLUMNS ',' id_group_list  { $$ = NULL; }
-           | TOK_NECESSARY TOK_COLUMN ',' id_group_list  { $$ = NULL; }
-           | TOK_NECESSARY TOK_COLUMNS ',' id_group_list { $$ = NULL; }
-
-id_group_list : id_group                    { $$ = NULL; }
-              | id_group ',' id_group_list  { $$ = NULL; }
-
-id_group : identifier                                  { $$ = NULL; }
-         | '(' id_list ')'                             { $$ = NULL; }
-         | identifier TOK_TO identifier                { $$ = NULL; }
-         | '(' identifier ')' TOK_TO identifier        { $$ = NULL; }
-         | identifier TOK_TO '(' identifier ')'        { $$ = NULL; }
-         | '(' identifier ')' TOK_TO '('identifier ')' { $$ = NULL; }
-
-id_list : identifier              { $$ = NULL; }
-        | identifier ',' id_list  { $$ = NULL; }
-
-showstats_opts : empty       { $$ = NULL; }
-               | TOK_DETAIL  { $$ = NULL; }
+group_list : id_group_list                               { $$ = 0; }
+           | TOK_EVERY TOK_KEY                           { $$ = 0; }
+           | TOK_EVERY TOK_COLUMN                        { $$ = 0; }
+           | TOK_EXISTING TOK_COLUMN                     { $$ = 0; } 
+           | TOK_EXISTING TOK_COLUMNS                    { $$ = 0; } 
+           | TOK_NECESSARY TOK_COLUMN                    { $$ = 0; } 
+           | TOK_NECESSARY TOK_COLUMNS                   { $$ = 0; } 
+           | TOK_EVERY TOK_KEY ',' id_group_list         { $$ = 0; }
+           | TOK_EVERY TOK_COLUMN ',' id_group_list      { $$ = 0; }
+           | TOK_EXISTING TOK_COLUMN ',' id_group_list   { $$ = 0; }
+           | TOK_EXISTING TOK_COLUMNS ',' id_group_list  { $$ = 0; }
+           | TOK_NECESSARY TOK_COLUMN ',' id_group_list  { $$ = 0; }
+           | TOK_NECESSARY TOK_COLUMNS ',' id_group_list { $$ = 0; }
+
+id_group_list : id_group                    { $$ = 0; }
+              | id_group ',' id_group_list  { $$ = 0; }
+
+id_group : identifier                                  { $$ = 0; }
+         | '(' id_list ')'                             { $$ = 0; }
+         | identifier TOK_TO identifier                { $$ = 0; }
+         | '(' identifier ')' TOK_TO identifier        { $$ = 0; }
+         | identifier TOK_TO '(' identifier ')'        { $$ = 0; }
+         | '(' identifier ')' TOK_TO '('identifier ')' { $$ = 0; }
+
+id_list : identifier              { $$ = 0; }
+        | identifier ',' id_list  { $$ = 0; }
+
+showstats_opts : empty       { $$ = 0; }
+               | TOK_DETAIL  { $$ = 0; }
 
 /* type showcontrolEnum */
 optional_comma_match_clause : empty	  { $$ = Describe::MATCH_NONE_; }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sort/Qsort.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/Qsort.cpp b/core/sql/sort/Qsort.cpp
index 4699f30..a98dd14 100644
--- a/core/sql/sort/Qsort.cpp
+++ b/core/sql/sort/Qsort.cpp
@@ -570,8 +570,8 @@ NABoolean Qsort::iterativeQuickSort(RecKeyBuffer keysToSort[], Int64 left, Int64
   if (stack == NULL)
   {
   sortError_->setErrorInfo( EScrNoMemory   //sort error
-                    ,NULL          //syserr: the actual FS error
-                    ,NULL          //syserrdetail
+                    ,0          //syserr: the actual FS error
+                    ,0          //syserrdetail
                     ,"Qsort::iterativeQuicksort"     //methodname
                     );
     return SORT_FAILURE;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sort/RunDirectory.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/RunDirectory.cpp b/core/sql/sort/RunDirectory.cpp
index e9172fc..01a0b65 100644
--- a/core/sql/sort/RunDirectory.cpp
+++ b/core/sql/sort/RunDirectory.cpp
@@ -104,8 +104,8 @@ Lng32 RunDirectory::startNewRun(SBN scrblocknum)
    if (newRDListPtr == NULL)
     {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-			       ,NULL          //syserr: the actual FS error
-			       ,NULL          //syserrdetail
+			       ,0          //syserr: the actual FS error
+			       ,0          //syserrdetail
 			       ,"RunDirectory::startNewRun"     //methodname
 			       );
       return SORT_FAILURE;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sort/ScratchFileConnection.h
----------------------------------------------------------------------
diff --git a/core/sql/sort/ScratchFileConnection.h b/core/sql/sort/ScratchFileConnection.h
index 9c74004..345aef0 100644
--- a/core/sql/sort/ScratchFileConnection.h
+++ b/core/sql/sort/ScratchFileConnection.h
@@ -51,7 +51,7 @@ public :
         ExSubtask *eventHandler,
         IpcEnvironment *env,
         ex_tcb *tcb,
-        char *eye = eye_SCRATCH_FILE_CONNECTION);
+        char *eye = (char *)eye_SCRATCH_FILE_CONNECTION);
     ~ScratchFileConnection();
     void ioStarted();
     void ioStopped();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sort/ScratchFileMap.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/ScratchFileMap.cpp b/core/sql/sort/ScratchFileMap.cpp
index e7cb8cc..9af19e5 100644
--- a/core/sql/sort/ScratchFileMap.cpp
+++ b/core/sql/sort/ScratchFileMap.cpp
@@ -186,8 +186,8 @@ ScratchFile* ScratchFileMap::createNewScrFile(
   if((numScratchFiles_ + 1) >= maxScratchFiles_)
   {
     sortError_->setErrorInfo( EThresholdReached   //sort error
-                     ,NULL          //syserr: the actual FS error
-                     ,NULL          //syserrdetail
+                     ,0          //syserr: the actual FS error
+                     ,0          //syserrdetail
                      ,"ScratchFileMap::createNewScrFile"    
                      );
     return NULL; 
@@ -214,8 +214,8 @@ ScratchFile* ScratchFileMap::createNewScrFile(
   if (tempFileMap->scrFile_ == NULL)
   {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-			       ,NULL          //syserr: the actual FS error
-			       ,NULL          //syserrdetail
+			       ,0          //syserr: the actual FS error
+			       ,0          //syserrdetail
 			       ,"ScratchFileMap::createNewScratchFile"     //methodname
 			       );
       return NULL;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/ec9ec171/core/sql/sort/ScratchSpace.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sort/ScratchSpace.cpp b/core/sql/sort/ScratchSpace.cpp
index 221c7d5..c05dd41 100644
--- a/core/sql/sort/ScratchSpace.cpp
+++ b/core/sql/sort/ScratchSpace.cpp
@@ -109,8 +109,8 @@ scratchMgmtOption_(scratchMgmtOption)
     if (scrFilesMap_ == NULL)
     {
         sortError_->setErrorInfo( EScrNoMemory   //sort error
-            ,NULL          //syserr: the actual FS error
-            ,NULL          //syserrdetail
+            ,0          //syserr: the actual FS error
+            ,0          //syserrdetail
             ,"ScratchSpace::ScratchSpace"     //methodname
             );
         
@@ -266,8 +266,8 @@ RESULT ScratchSpace::CreateANewScrFileAndWrite(char *buffer, Int32 blockNum, UIn
     if(fileIndex < 0)
     {
         sortError_->setErrorInfo(EUnexpectErr// should not happen
-            ,NULL            //syserr: the actual FS error
-            ,NULL            //syserrdetail
+            ,0            //syserr: the actual FS error
+            ,0            //syserrdetail
             ,"ScratchSpace::CreateANewScrFileAndWrite, getFreeFileHandle" //methodname
             );
         return SCRATCH_FAILURE;
@@ -400,8 +400,8 @@ RESULT ScratchSpace::writeThru(char* buf, ULng32 len,
     if(scratchMaxOpens_ > 1)
     {
       sortError_->setErrorInfo( EUnexpectErr   //sort error
-                       ,NULL               //syserr: the actual FS error
-                       ,NULL               //syserrdetail
+                       ,0               //syserr: the actual FS error
+                       ,0               //syserrdetail
                        ,"ScratchSpace::writeThru" //methodname
                       );
       return SCRATCH_FAILURE;
@@ -417,8 +417,8 @@ RESULT ScratchSpace::writeThru(char* buf, ULng32 len,
       if ((maxBlocks > 0) && (totalNumOfScrBlocks_ > maxBlocks))
       {
         sortError_->setErrorInfo( EThresholdReached   //sort error
-                                 ,NULL               //syserr: the actual FS error
-                                 ,NULL               //syserrdetail
+                                 ,0               //syserr: the actual FS error
+                                 ,0               //syserrdetail
                                  ,"ScratchSpace::writeThru"     //methodname
                                 );
        return SCRATCH_FAILURE;
@@ -436,8 +436,8 @@ RESULT ScratchSpace::writeThru(char* buf, ULng32 len,
         if(fileIndex != 0)
         {
             sortError_->setErrorInfo(EUnexpectErr// should not happen
-                ,NULL            //syserr: the actual FS error
-                ,NULL            //syserrdetail
+                ,0            //syserr: the actual FS error
+                ,0            //syserrdetail
                 ,"ScratchSpace::writeThru, getFreeFileHandle" //methodname
                 );
             return SCRATCH_FAILURE;
@@ -546,8 +546,8 @@ RESULT ScratchSpace::readThru(char *buf,
 
     if ((blockNum < 0) ||( blockNum > totalNumOfScrBlocks_)) {
         sortError_->setErrorInfo( EInvScrBlockNum       //sort error
-            ,NULL                  //syserr: the actual FS err
-            ,NULL                  //syserrdetail
+            ,0                  //syserr: the actual FS err
+            ,0                  //syserrdetail
             ,"ScratchSpace::readThru" //methodname
             );
         return SCRATCH_FAILURE;
@@ -571,8 +571,8 @@ RESULT ScratchSpace::readThru(char *buf,
       if (currentReadScrFile_ == NULL)
       {
           sortError_->setErrorInfo( EScrFileNotFound      //sort error
-                                   ,NULL                  //syserr: the actual FS err
-                                   ,NULL                  //syserrdetail
+                                   ,0                  //syserr: the actual FS err
+                                   ,0                  //syserrdetail
                                    ,"ScratchSpace::readThru" //methodname
                                    );
 
@@ -588,8 +588,8 @@ RESULT ScratchSpace::readThru(char *buf,
     if(fileIndex < 0)
     {
         sortError_->setErrorInfo(EUnexpectErr// should not happen
-            ,NULL            //syserr: the actual FS error
-            ,NULL            //syserrdetail
+            ,0            //syserr: the actual FS error
+            ,0            //syserrdetail
             ,"ScratchSpace::readThru, getFreeFileHandle" //methodname
             );
         return SCRATCH_FAILURE;
@@ -630,8 +630,8 @@ RESULT ScratchSpace::writeFile(char* block,
             scrFilesMap_->getFirstScrBlockNum(currentWriteScrFile_);
         if (firstBlockNum == -1) {
             sortError_->setErrorInfo( EScrFileNotFound//sort error
-                ,NULL            //syserr: the actual FS error
-                ,NULL            //syserrdetail
+                ,0            //syserr: the actual FS error
+                ,0            //syserrdetail
                 ,"ScratchSpace::WriteFile" //methodname
                 );
             return SCRATCH_FAILURE;
@@ -653,8 +653,8 @@ RESULT ScratchSpace::writeFile(char* block,
             if(fileIndex < 0)
             {
                 sortError_->setErrorInfo(EUnexpectErr// should not happen
-                    ,NULL            //syserr: the actual FS error
-                    ,NULL            //syserrdetail
+                    ,0            //syserr: the actual FS error
+                    ,0            //syserrdetail
                     ,"ScratchSpace::WriteFile, getFreeFileHandle" //methodname
                     );
                 return SCRATCH_FAILURE;
@@ -994,8 +994,8 @@ NABoolean ScratchSpace:: generateDiskTable(SortError *sorterror)
     if (diskPool_ == NULL)
     {
         sortError_->setErrorInfo( EScrNoMemory   //sort error
-            ,NULL          //syserr: the actual FS error
-            ,NULL          //syserrdetail
+            ,0          //syserr: the actual FS error
+            ,0          //syserrdetail
             ,"ScratchSpace::generateDiskTable"     //methodname
             );
         return SORT_FAILURE;
@@ -1011,8 +1011,8 @@ NABoolean ScratchSpace:: generateDiskTable(SortError *sorterror)
     {
         
         sortError_->setErrorInfo( EScrNoDisks         //sort error
-            ,NULL               //syserr: the actual FS error
-            ,NULL               //syserrdetail
+            ,0               //syserr: the actual FS error
+            ,0               //syserrdetail
             ,"ScratchSpace::generateDiskTable"     //methodname
             );
         return SORT_FAILURE;
@@ -1248,7 +1248,7 @@ SortScratchSpace::SortScratchSpace(CollHeap* heap,
                                    scratchMgmtOption)
 {
   blockHead_.thisBlockNum_ = 0L;
-  blockHead_.nextBlockNum_ = NULL;
+  blockHead_.nextBlockNum_ = 0;
   blockHead_.runNum_       = 0;
   blockHead_.numRecs_      = 0;
   blockHead_.bytesUsed_    = OVERHEAD;
@@ -1269,8 +1269,8 @@ SortScratchSpace::SortScratchSpace(CollHeap* heap,
   if (runDirectory_ == NULL)
   {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-          ,NULL          //syserr: the actual FS error
-          ,NULL          //syserrdetail
+          ,0          //syserr: the actual FS error
+          ,0          //syserrdetail
           ,"SortScratchSpace::SortScratchSpace"     //methodname
           );
       
@@ -1328,8 +1328,8 @@ RESULT SortScratchSpace::setupSortMergeBufferPool(Int32 numBuffers)
     if (mb->scrBlock_ == 0)
     {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-          ,NULL          //syserr: the actual FS error
-          ,NULL          //syserrdetail
+          ,0          //syserr: the actual FS error
+          ,0          //syserrdetail
           ,"SortScratchSpace::setupSortMergeBufferPool2"     //methodname
           );
       cleanupSortMergeBufferPool();
@@ -1529,8 +1529,8 @@ RESULT SortScratchSpace::initiateSortMergeNodeRead(SortMergeNode *sortMergeNode,
     if(mb == NULL)
     {
         sortError_->setErrorInfo(EUnexpectErr    //sort error
-            ,NULL                     //syserr: the actual FS err
-            ,NULL                     //syserrdetail
+            ,0                     //syserr: the actual FS err
+            ,0                     //syserrdetail
             ,"ScratchSpace::initiateSortMergeNodeRead" //methodname
             );
         return SCRATCH_FAILURE;
@@ -1542,8 +1542,8 @@ RESULT SortScratchSpace::initiateSortMergeNodeRead(SortMergeNode *sortMergeNode,
     if (mb->currentScrFile_ == NULL) 
     {
       sortError_->setErrorInfo(EScrFileNotFound    //sort error
-                              ,NULL                     //syserr: the actual FS err
-                              ,NULL                     //syserrdetail
+                              ,0                     //syserr: the actual FS err
+                              ,0                     //syserrdetail
                               ,"ScratchSpace::initiateSortMergeBufferRead" //methodname
                               );
       return SCRATCH_FAILURE;
@@ -1620,8 +1620,8 @@ RESULT SortScratchSpace::readSortMergeNode(SortMergeNode *sortMergeNode,
             //We should not reach here at all. (blockHead_.nextBlockNum_ == -1) check
             //being done above should take of this.
             sortError_->setErrorInfo(EUnexpectErr    //sort error
-                                      ,NULL                     //syserr: the actual FS err
-                                      ,NULL                     //syserrdetail
+                                      ,0                     //syserr: the actual FS err
+                                      ,0                     //syserrdetail
                                       ,"SortScratchSpace::readSortMergeNode" //methodname
                                       );
              return SCRATCH_FAILURE;
@@ -1635,8 +1635,8 @@ RESULT SortScratchSpace::readSortMergeNode(SortMergeNode *sortMergeNode,
           if (retval == READ_EOF) 
           {
               sortError_->setErrorInfo( EScrEOF      //sort error
-                  ,NULL         //syserr: the actual FS err
-                  ,NULL         //syserrdetail
+                  ,0         //syserr: the actual FS err
+                  ,0         //syserrdetail
                   ,"SortScratchSpace:readSortMergeBuffer" //methodname
                   );
           }
@@ -1768,8 +1768,8 @@ RESULT SortScratchSpace::cleanupScratchFiles(Lng32 inRun)
   if(beginBlockNum == EOF)
   {
     sortError_->setErrorInfo(EInvRunNumber   //sort error
-                     ,NULL          //syserr: the actual FS error
-                     ,NULL          //syserrdetail
+                     ,0          //syserr: the actual FS error
+                     ,0          //syserrdetail
                      ,"SortScratchSpace::cleanupScratchFiles"
                      );
     return SCRATCH_FAILURE;
@@ -1881,8 +1881,8 @@ RESULT HashScratchSpace::readThru(char *buf, UInt32 clusterID, ClusterPassBack *
   if((Int32)blockNumToRead <= 0)
   {
     sortError_->setErrorInfo( EInvScrBlockNum      //sort error
-                     ,NULL         //syserr: the actual FS err
-                     ,NULL         //syserrdetail
+                     ,0         //syserr: the actual FS err
+                     ,0         //syserrdetail
                      ,"HashScratchSpace::readThru" //methodname
                     );
     
@@ -2149,8 +2149,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
     if (temp == NULL)   
     {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-          ,NULL          //syserr: the actual FS error
-          ,NULL          //syserrdetail
+          ,0          //syserr: the actual FS error
+          ,0          //syserrdetail
           ,"HashScratchSpace::registerClusterBlock"     //methodname
           ); 
       return SCRATCH_FAILURE;
@@ -2169,8 +2169,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
     if (temp == NULL)   
     {
       sortError_->setErrorInfo( EScrNoMemory   //sort error
-          ,NULL          //syserr: the actual FS error
-          ,NULL          //syserrdetail
+          ,0          //syserr: the actual FS error
+          ,0          //syserrdetail
           ,"HashScratchSpace::registerClusterBlock"     //methodname
           ); 
       return SCRATCH_FAILURE;
@@ -2194,8 +2194,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
         if (temp == NULL)   
         {
           sortError_->setErrorInfo( EScrNoMemory   //sort error
-              ,NULL          //syserr: the actual FS error
-              ,NULL          //syserrdetail
+              ,0          //syserr: the actual FS error
+              ,0          //syserrdetail
               ,"HashScratchSpace::registerClusterBlock"     //methodname
               ); 
           return SCRATCH_FAILURE;
@@ -2216,8 +2216,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
         if (temp == NULL)   
         {
           sortError_->setErrorInfo( EScrNoMemory   //sort error
-              ,NULL          //syserr: the actual FS error
-              ,NULL          //syserrdetail
+              ,0          //syserr: the actual FS error
+              ,0          //syserrdetail
               ,"HashScratchSpace::registerClusterBlock"     //methodname
               ); 
           return SCRATCH_FAILURE;
@@ -2236,8 +2236,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
       if (tempClusterDList_ == NULL)   
       {
         sortError_->setErrorInfo( EScrNoMemory   //sort error
-            ,NULL          //syserr: the actual FS error
-            ,NULL          //syserrdetail
+            ,0          //syserr: the actual FS error
+            ,0          //syserrdetail
             ,"HashScratchSpace::registerClusterBlock"     //methodname
             ); 
         return SCRATCH_FAILURE;
@@ -2253,8 +2253,8 @@ RESULT HashScratchSpace::registerClusterBlock(UInt32 clusterID, DWORD blockNum)
       if (temp == NULL)   
       {
         sortError_->setErrorInfo( EScrNoMemory   //sort error
-            ,NULL          //syserr: the actual FS error
-            ,NULL          //syserrdetail
+            ,0          //syserr: the actual FS error
+            ,0          //syserrdetail
             ,"HashScratchSpace::registerClusterBlock"     //methodname
             ); 
         return SCRATCH_FAILURE;