trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ansha...@apache.org
Subject [03/10] incubator-trafodion git commit: metadata access performance improvement for accessing traf objects
Date Tue, 02 Aug 2016 23:24:35 GMT
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/sqlcat/ReadTableDef.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcat/ReadTableDef.cpp b/core/sql/sqlcat/ReadTableDef.cpp
index c6b3ecb..31bafb7 100644
--- a/core/sql/sqlcat/ReadTableDef.cpp
+++ b/core/sql/sqlcat/ReadTableDef.cpp
@@ -56,28 +56,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-  
-#include "NLSConversion.h"
-
-#ifdef NA_LITTLE_ENDIAN
-  #include "ComSysUtils.h"
-  #define  ENCODE(xxx)		xxx->encode()
-  #define  REVERSEBYTES(xxx)	xxx = (Lng32) reversebytes((ULng32) xxx)
-#else
-  #define  ENCODE(xxx)
-  #define  REVERSEBYTES(xxx)
-#endif
-
-#include "fs/feerrors.h"	// FEOK, FENOTOPEN, FEPATHDOWN, etc.
-
-extern "C" {
-int_16 TMF_SETTXHANDLE_(short *);
-int_16 TMF_GETTXHANDLE_(short *);
-int_16 GETTRANSID(short *);
-int_16 TMF_GETCURRENTTCBREF_(short *);
-int_16 BEGINTRANSACTION(int *tag);
-}
-
 #include "CmpCommon.h"		// HEAP stuff
 #include "CmpContext.h"		// CmpCommon::context()->readTableDef_
 #include "DefaultValidator.h"	// for ValidateCollationList
@@ -96,48 +74,6 @@ int_16 BEGINTRANSACTION(int *tag);
 extern Lng32 SQLCODE;
 
 //------------------------------------------------------------------------
-// Static variables declarations
-//------------------------------------------------------------------------
-
-
-#define NODETYPE_MX	header.nodetype	  // desc_structPtr->NODETYPE_MX
-
-// MX SqlCat simulator xxx_desc_struct
-#define STRUCTMX(xxx)	xxx ## _desc_struct
-
-// MX SqlCat simulator DESC_XXX_TYPE
-#define TYPEMX(XXX)	DESC_ ## XXX ## _TYPE
-
-// xxx_desc_struct * xxx = (xxx_desc_struct *) &top->body
-#define CASTMX(xxx)	STRUCTMX(xxx) * xxx = (STRUCTMX(xxx) *)&top->body
-
-// Guardian LargeInt is little-endian:  least significant bits are on the right.
-// So mpvar[0] is to left of i.e. more significant than mpvar[1].
-// NNNN Truncation error (64 to 32 bits overflow) in ReadTableDef $String0.
-// (If this #define is ever used, then create error message for NNNN.)
-#define FMT_LARGEINT(arr)						\
-			arr[0] << "," << arr[1] << endl
-
-#define COUT(var,fld)							\
-			cout << "  " << setw(20) 			\
-			     << #fld << "  " << var->fld << endl
-
-// For compilers that don't cast enums to int 	// NT_PORT mhr 03/14/97
-#define COUT_ENUM(var,fld)						\
-			cout << "  " << setw(20) 			\
-			     << #fld << "  " << (Int32)var->fld << endl
-
-#define COUT_STRING(var,fld)						\
-			if (var->fld) COUT(var,fld);			\
-			else						\
-			  cout << "  " << setw(20)			\
-			       << #fld << " is null" << endl
-
-#define COUT_LARGEINT(var,fld)						\
-			cout << "  " << setw(20) 			\
-			     << #fld << "  " << FMT_LARGEINT(var->fld)
-
-//------------------------------------------------------------------------
 // Constructor
 //------------------------------------------------------------------------
 
@@ -158,343 +94,3 @@ ReadTableDef::~ReadTableDef()
 }
 
 
-
-//------------------------------------------------------------------------
-// displayTreeMX()
-//------------------------------------------------------------------------
-void ReadTableDef::displayTree(const desc_struct * top) const
-{
-  displayTreeMX(top, "");
-}
-
-void ReadTableDef::displayTreeMX(const desc_struct * top,
-                                  const char * caller) const
-{
-  if (top == NULL) return;
-
-  char title[50];
-  snprintf(title, sizeof(title),
-          ", type %d, address %p, parent %s\n",
-          top->NODETYPE_MX, (void *)top, caller);
-  #undef  TITLE
-  #define TITLE(XXX)    cout << "### " << XXX << title;         \
-                        strcpy(title, XXX)
-
-  cout.setf(ios::right);
-
-  switch (top->NODETYPE_MX)
-    {
-    case TYPEMX(CHECK_CONSTRNTS):
-      {
-        TITLE("CHECK_CONSTRNTS");
-        CASTMX(check_constrnts);
-        COUT(check_constrnts, seqnumber);
-        COUT_STRING(check_constrnts, constrnt_text);
-      }
-      break;
-
-    case TYPEMX(COLUMNS):
-      {
-        TITLE("COLUMNS");
-        CASTMX(columns);
-        COUT(columns, tablename);
-        COUT(columns, colname);
-        COUT(columns, colnumber);
-        COUT(columns, datatype);
-        COUT(columns, length);
-        COUT(columns, scale);
-        COUT(columns, precision);
-        COUT_ENUM(columns, datetimestart);
-        COUT_ENUM(columns, datetimeend);
-        COUT(columns, datetimefractprec);
-        COUT(columns, intervalleadingprec);
-        COUT(columns, offset);
-        COUT(columns, null_flag);
-        COUT(columns, upshift);
-        COUT(columns, colclass);
-        COUT(columns, uec);
-        COUT_STRING(columns, highval);
-        COUT_STRING(columns, lowval);
-
-        Int32 defaultValueInLocaleLen = 
-#pragma nowarn(1506)   // warning elimination 
-              NAWstrlen((NAWchar*)(columns->defaultvalue));
-#pragma warn(1506)  // warning elimination 
-        char* defaultValueInLocale = new HEAP char[defaultValueInLocaleLen+1];
-
-        CharInfo::CharSet mapCharSet = SqlParser_ISO_MAPPING;
-
-        Int32 x = UnicodeStringToLocale(mapCharSet,
-                 (NAWchar*)(columns->defaultvalue), defaultValueInLocaleLen,
-                 defaultValueInLocale, defaultValueInLocaleLen+1
-                             );
-        if (columns->defaultvalue)  {
-          cout << "  " << setw(20) << "defaultvalue"
-               << "  " << defaultValueInLocale << endl;
-        } else {
-          cout << "  " << setw(20) << "defaultvalue" << " is null" << endl;
-        }
-        NADELETEBASIC(defaultValueInLocale, HEAP);
-      }
-      break;
-
-    case TYPEMX(CONSTRNTS):
-      {
-        TITLE("CONSTRNTS");
-        CASTMX(constrnts);
-        COUT(constrnts, constrntname);
-        COUT(constrnts, tablename);
-        COUT_ENUM(constrnts, type);
-        COUT(constrnts, colcount);
-        COUT_STRING(constrnts, indexname);
-        displayTreeMX(constrnts->check_constrnts_desc, title);
-        displayTreeMX(constrnts->constr_key_cols_desc, title);
-        displayTreeMX(constrnts->referenced_constrnts_desc, title);
-        displayTreeMX(constrnts->referencing_constrnts_desc, title);
-      }
-      break;
-
-    case TYPEMX(CONSTRNT_KEY_COLS):
-      {
-        TITLE("CONSTRNT_KEY_COLS");
-        CASTMX(constrnt_key_cols);
-        COUT(constrnt_key_cols, colname);
-        COUT(constrnt_key_cols, position);
-      }
-      break;
-
-    case TYPEMX(FILES):
-      {
-        TITLE("FILES");
-        CASTMX(files);
-        COUT_ENUM(files, fileorganization);
-        COUT(files, audit);
-        COUT(files, auditcompress);
-        COUT(files, compressed);
-        displayTreeMX(files->partns_desc, title);
-      }
-      break;
-
-    case TYPEMX(HISTOGRAM):
-      {
-        TITLE("HISTOGRAM");
-        CASTMX(histogram);
-        COUT(histogram, tablename);
-        COUT(histogram, tablecolnumber);
-        COUT(histogram, histid);
-        COUT(histogram, colposition);
-        COUT(histogram, rowcount);
-        COUT(histogram, uec);
-        COUT_STRING(histogram, highval);
-        COUT_STRING(histogram, lowval);
-        displayTreeMX(histogram->hist_interval_desc, title);
-      }
-      break;
-
-    case TYPEMX(HIST_INTERVAL):
-      {
-        TITLE("HIST_INTERVAL");
-        CASTMX(hist_interval);
-        COUT(hist_interval, histid);
-        COUT(hist_interval, intnum);
-        COUT(hist_interval, intboundary);
-        COUT(hist_interval, rowcount);
-        COUT(hist_interval, uec);
-      }
-      break;
-
-    case TYPEMX(INDEXES):
-      {
-        TITLE("INDEXES");
-        CASTMX(indexes);
-        COUT(indexes, tablename);
-        COUT(indexes, indexname);
-        COUT(indexes, keytag);
-        COUT(indexes, record_length);
-        COUT(indexes, colcount);
-        COUT(indexes, unique);
-        displayTreeMX(indexes->files_desc, title);
-        displayTreeMX(indexes->keys_desc, title);
-    displayTreeMX(indexes->non_keys_desc, title);
-      }
-      break;
-
-    case TYPEMX(KEYS):
-      {
-        TITLE("KEYS");
-        CASTMX(keys);
-        COUT(keys, indexname);
-        COUT(keys, keyseqnumber);
-        COUT(keys, tablecolnumber);
-        COUT(keys, ordering);
-      }
-      break;
-
-    case TYPEMX(PARTNS):
-      {
-        TITLE("PARTNS");
-        CASTMX(partns);
-        COUT(partns, tablename);
-        COUT(partns, primarypartition);
-        COUT(partns, partitionname);
-        COUT_STRING(partns, firstkey);
-      }
-      break;
-
-    case TYPEMX(REF_CONSTRNTS):
-      {
-        TITLE("REF_CONSTRNTS");
-        CASTMX(ref_constrnts);
-        COUT(ref_constrnts, constrntname);
-        COUT(ref_constrnts, tablename);
-      }
-      break;
-
-    case TYPEMX(TABLE):
-      {
-        TITLE("TABLE");
-        CASTMX(table);
-        COUT_LARGEINT(table, createtime);
-        COUT_LARGEINT(table, redeftime);
-        COUT(table, tablename);
-        COUT(table, record_length);
-        COUT(table, colcount);
-        COUT(table, constr_count);
-        COUT(table, rowcount);
-        displayTreeMX(table->files_desc, title);
-        displayTreeMX(table->columns_desc, title);
-        displayTreeMX(table->views_desc, title);
-        displayTreeMX(table->indexes_desc, title);
-        displayTreeMX(table->constrnts_desc, title);
-        if (table->constrnts_tables_desc != top)
-          displayTreeMX(table->constrnts_tables_desc, title);
-        displayTreeMX(table->referenced_tables_desc, title);
-        displayTreeMX(table->referencing_tables_desc, title);
-        displayTreeMX(table->histograms_desc, title);
-      }
-      break;
-
-    case TYPEMX(VIEW):
-      {
-        TITLE("VIEW");
-        CASTMX(view);
-        COUT(view, viewname);
-        COUT_STRING(view, viewtext);
-        COUT_STRING(view, viewchecktext);
-        COUT(view, updatable);
-        COUT(view, insertable);
-      }
-      break;
-
-    default:
-      {
-        TITLE("??? UNKNOWN ???");
-      }
-      break;
-    }  // switch
-
-  displayTreeMX (top->header.next, title);
-
-} // displayTreeMX
-
-
-//------------------------------------------------------------------------
-// deleteTreeMX()
-//------------------------------------------------------------------------
-void ReadTableDef::deleteTree(desc_struct * top) const
-{
-  deleteTreeMX(top);
-}
-
-void ReadTableDef::deleteTreeMX(desc_struct * top) const
-{
-  if (top == NULL) return;
-
-  switch (top->NODETYPE_MX)
-    {
-    case TYPEMX(CHECK_CONSTRNTS):
-      break;
-
-    case TYPEMX(COLUMNS):
-      break;
-
-    case TYPEMX(CONSTRNTS):
-      {
-	CASTMX(constrnts);
-	deleteTreeMX(constrnts->check_constrnts_desc);
-	deleteTreeMX(constrnts->constr_key_cols_desc);
-	deleteTreeMX(constrnts->referenced_constrnts_desc);
-	deleteTreeMX(constrnts->referencing_constrnts_desc);
-      }
-      break;
-
-    case TYPEMX(CONSTRNT_KEY_COLS):
-      break;
-
-    case TYPEMX(FILES):
-      {
-	CASTMX(files);
-	deleteTreeMX(files->partns_desc);
-      }
-      break;
-
-    case TYPEMX(HISTOGRAM):
-      {
-	CASTMX(histogram);
-	deleteTreeMX(histogram->hist_interval_desc);
-      }
-      break;
-
-    case TYPEMX(HIST_INTERVAL):
-      break;
-
-    case TYPEMX(INDEXES):
-      {
-	CASTMX(indexes);
-	deleteTreeMX(indexes->keys_desc);
-    deleteTreeMX(indexes->non_keys_desc);
-	deleteTreeMX(indexes->files_desc);
-      }
-      break;
-
-    case TYPEMX(KEYS):
-      break;
-
-    case TYPEMX(PARTNS):
-      break;
-
-    case TYPEMX(REF_CONSTRNTS):
-      break;
-
-    case TYPEMX(TABLE):
-      {
-	CASTMX(table);
-	deleteTreeMX(table->columns_desc);
-	deleteTreeMX(table->views_desc);
-	deleteTreeMX(table->files_desc);
-	deleteTreeMX(table->indexes_desc);
-	deleteTreeMX(table->constrnts_desc);
-	if (table->constrnts_tables_desc != top)
-	  deleteTreeMX(table->constrnts_tables_desc);
-	deleteTreeMX(table->referenced_tables_desc);
-	deleteTreeMX(table->referencing_tables_desc);
-	deleteTreeMX(table->histograms_desc);
-      }
-      break;
-
-    case TYPEMX(VIEW):
-      break;
-
-    default:
-      {
-	cerr << "ReadTableDef: memory leak at node type " << top->NODETYPE_MX
-	     << endl;
-      }
-      break;
-    }  // switch
-
-  deleteTreeMX (top->header.next);
-  NADELETEBASIC(top, HEAP);
-
-} // deleteTreeWMX
-

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/sqlcat/ReadTableDef.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcat/ReadTableDef.h b/core/sql/sqlcat/ReadTableDef.h
index 21ca81d..e813745 100644
--- a/core/sql/sqlcat/ReadTableDef.h
+++ b/core/sql/sqlcat/ReadTableDef.h
@@ -46,9 +46,6 @@
 #include "ObjectNames.h"
 #include "ComSmallDefs.h"        // added for ComDiskFileFormat enum
 
-// SQL/MX SqlCat definitions
-#include "desc.h"
-
 #include "sqlca.h"
 
 // Forward references
@@ -87,23 +84,9 @@ public:
   // destructor
   ~ReadTableDef();
 
-  void deleteTree(desc_struct * top) const;
-  void displayTree(const desc_struct * top) const;	// debugging only 
-
 private:
   void initSQLCA(NABoolean force = FALSE);
 
-  void deleteTreeMX(desc_struct * top) const;
-  void displayTreeMX(const desc_struct * top,
-                      const char * caller) const;       // debugging only
-
-  // Versioning Light: Methods for Lazy Update
-#if 0
-  void dealWithCLIError (void);
-  short lazyUpdateNeedSeparateTx (void);
-  void lazyUpdate (const ComObjectName & objectName);
-#endif //if 0
-
   // data members
   TransactionState      transactionState_;
   NABoolean		transInProgress_;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/sqlcat/TrafDDLdesc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcat/TrafDDLdesc.cpp b/core/sql/sqlcat/TrafDDLdesc.cpp
new file mode 100644
index 0000000..112bfac
--- /dev/null
+++ b/core/sql/sqlcat/TrafDDLdesc.cpp
@@ -0,0 +1,617 @@
+/**********************************************************************
+// @@@ START COPYRIGHT @@@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// @@@ END COPYRIGHT @@@
+//
+**********************************************************************/
+
+#include "TrafDDLdesc.h"
+#include "CmpCommon.h"
+
+// -----------------------------------------------------------------------
+// Allocate one of the primitive structs and initialize to all zeroes.
+// Uses HEAP (StatementHeap) of CmpCommon or space.
+// -----------------------------------------------------------------------
+TrafDesc *TrafAllocateDDLdesc(desc_nodetype nodetype, Space * space)
+{
+  size_t size = 0;
+  TrafDesc * desc_ptr = NULL;
+
+  switch (nodetype)
+    {
+    case DESC_CHECK_CONSTRNTS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafCheckConstrntsDesc();
+      break;
+    case DESC_COLUMNS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafColumnsDesc();
+      break;
+    case DESC_CONSTRNTS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafConstrntsDesc();
+      break;
+    case DESC_CONSTRNT_KEY_COLS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafConstrntKeyColsDesc();
+      break;
+    case DESC_FILES_TYPE:
+      desc_ptr = new GENHEAP(space) TrafFilesDesc();
+      break;
+    case DESC_HBASE_RANGE_REGION_TYPE:
+      desc_ptr = new GENHEAP(space) TrafHbaseRegionDesc();
+      break;
+    case DESC_HISTOGRAM_TYPE:
+      desc_ptr = new GENHEAP(space) TrafHistogramDesc();
+      break;
+    case DESC_HIST_INTERVAL_TYPE:
+      desc_ptr = new GENHEAP(space) TrafHistIntervalDesc();
+      break;
+    case DESC_INDEXES_TYPE:
+      desc_ptr = new GENHEAP(space) TrafIndexesDesc();
+      break;
+    case DESC_KEYS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafKeysDesc();
+      break;
+    case DESC_LIBRARY_TYPE:
+      desc_ptr = new GENHEAP(space) TrafLibraryDesc();
+      break;
+     case DESC_PARTNS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafPartnsDesc();
+      break;
+    case DESC_REF_CONSTRNTS_TYPE:
+      desc_ptr = new GENHEAP(space) TrafRefConstrntsDesc();
+      break;
+    case DESC_ROUTINE_TYPE:
+      desc_ptr = new GENHEAP(space) TrafRoutineDesc();
+      break;
+    case DESC_SEQUENCE_GENERATOR_TYPE:   
+      desc_ptr = new GENHEAP(space) TrafSequenceGeneratorDesc();
+      break;
+    case DESC_TABLE_TYPE:
+      desc_ptr = new GENHEAP(space) TrafTableDesc();
+      break;
+    case DESC_VIEW_TYPE:
+      desc_ptr = new GENHEAP(space) TrafViewDesc();
+      break;	       
+    case DESC_USING_MV_TYPE: 
+      desc_ptr = new GENHEAP(space) TrafUsingMvDesc();
+      break;
+    default:
+      assert(FALSE);
+      break;
+    }
+
+  // if not being allocated from space, memset all bytes to 0.
+  // If allocated from space, it will be set to 0 during space allocation.
+  if (! space)
+    memset((char*)desc_ptr+sizeof(TrafDesc), 0, 
+           desc_ptr->getClassSize()-sizeof(TrafDesc));
+
+  return desc_ptr;
+
+}
+
+TrafDesc::TrafDesc(UInt16 nodeType) 
+  : NAVersionedObject(nodeType),
+    nodetype(nodeType),
+    version(CURR_VERSION),
+    descFlags(0),
+    next(NULL)
+{}
+
+Lng32 TrafDesc::validateSize()
+{
+  if (getImageSize() != getClassSize())
+    return -1;
+
+  return 0;
+}
+
+Lng32 TrafDesc::validateVersion()
+{
+  if (version != CURR_VERSION)
+    return -1;
+
+  return 0;
+}
+
+Lng32 TrafDesc::migrateToNewVersion(
+     NAVersionedObject *&newImage)
+{
+  short tempimagesize = getClassSize();
+  // -----------------------------------------------------------------
+  // The base class implementation of migrateToNewVersion() is only
+  // called with newImage == NULL when the same function is not
+  // redefined at the subclass. That means no new version of that
+  // subclass has been invented yet.
+  // -----------------------------------------------------------------
+  if (newImage == NULL)
+    {
+      if (validateSize())
+        return -1;
+
+      if (validateVersion())
+        return -1;
+    }
+
+  return NAVersionedObject::migrateToNewVersion(newImage);
+}
+
+char *TrafDesc::findVTblPtr(short classID)
+{
+  char *vtblptr = NULL;
+
+  switch (classID)
+    {
+    case DESC_CHECK_CONSTRNTS_TYPE:
+      GetVTblPtr(vtblptr, TrafCheckConstrntsDesc);
+      break;
+    case DESC_COLUMNS_TYPE:
+      GetVTblPtr(vtblptr, TrafColumnsDesc);
+      break;
+    case DESC_CONSTRNTS_TYPE:
+      GetVTblPtr(vtblptr, TrafConstrntsDesc);
+      break;
+    case DESC_CONSTRNT_KEY_COLS_TYPE:
+      GetVTblPtr(vtblptr, TrafConstrntKeyColsDesc);
+      break;
+    case DESC_FILES_TYPE:
+      GetVTblPtr(vtblptr, TrafFilesDesc);
+      break;
+    case DESC_HBASE_RANGE_REGION_TYPE:
+      GetVTblPtr(vtblptr, TrafHbaseRegionDesc);
+      break;
+    case DESC_HISTOGRAM_TYPE:
+      GetVTblPtr(vtblptr, TrafHistogramDesc);
+      break;
+    case DESC_HIST_INTERVAL_TYPE:
+      GetVTblPtr(vtblptr, TrafHistIntervalDesc);
+      break;
+    case DESC_INDEXES_TYPE:
+      GetVTblPtr(vtblptr, TrafIndexesDesc);
+      break;
+    case DESC_KEYS_TYPE:
+      GetVTblPtr(vtblptr, TrafKeysDesc);
+      break;
+    case DESC_LIBRARY_TYPE:
+      GetVTblPtr(vtblptr, TrafLibraryDesc);
+      break;
+     case DESC_PARTNS_TYPE:
+      GetVTblPtr(vtblptr, TrafPartnsDesc);
+      break;
+    case DESC_REF_CONSTRNTS_TYPE:
+      GetVTblPtr(vtblptr, TrafRefConstrntsDesc);
+      break;
+    case DESC_ROUTINE_TYPE:
+      GetVTblPtr(vtblptr, TrafRoutineDesc);
+      break;
+    case DESC_SEQUENCE_GENERATOR_TYPE:   
+      GetVTblPtr(vtblptr, TrafSequenceGeneratorDesc);
+      break;
+    case DESC_TABLE_TYPE:
+      GetVTblPtr(vtblptr, TrafTableDesc);
+      break;
+    case DESC_VIEW_TYPE:
+      GetVTblPtr(vtblptr, TrafViewDesc);
+      break;	       
+    case DESC_USING_MV_TYPE: 
+      GetVTblPtr(vtblptr, TrafUsingMvDesc);
+      break;
+    default:
+      assert(FALSE);
+      break;
+    }
+
+  return vtblptr;
+}
+
+// pack and unpack methods for various descriptor structs
+
+Long TrafDesc::pack(void * space)
+{
+  next.pack(space);
+
+  return NAVersionedObject::pack(space);
+}
+
+Lng32 TrafDesc::unpack(void * base, void * reallocator)
+{
+  if(next.unpack(base, reallocator)) return -1;
+
+  return NAVersionedObject::unpack(base, reallocator);
+}
+
+Long TrafCheckConstrntsDesc::pack(void * space)
+{
+  constrnt_text = (constrnt_text ? (char*)(((Space*)space)->convertToOffset(constrnt_text)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafCheckConstrntsDesc::unpack(void * base, void * reallocator)
+{
+  constrnt_text = (constrnt_text ? (char*)((char*)base - (Long)constrnt_text) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafColumnsDesc::pack(void * space)
+{
+  colname = (colname ? (char*)(((Space*)space)->convertToOffset(colname)) : NULL);
+
+  pictureText = (pictureText ? (char*)(((Space*)space)->convertToOffset(pictureText)) : NULL);
+
+  defaultvalue = (defaultvalue ? (char*)(((Space*)space)->convertToOffset(defaultvalue)) : NULL);
+  heading = (heading ? (char*)(((Space*)space)->convertToOffset(heading)) : NULL);
+  computed_column_text = (computed_column_text ? (char*)(((Space*)space)->convertToOffset(computed_column_text)) : NULL);
+
+  hbaseColFam = (hbaseColFam ? (char*)(((Space*)space)->convertToOffset(hbaseColFam)) : NULL);
+  hbaseColQual = (hbaseColQual ? (char*)(((Space*)space)->convertToOffset(hbaseColQual)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafColumnsDesc::unpack(void * base, void * reallocator)
+{
+  colname = (colname ? (char*)((char*)base - (Long)colname) : NULL);
+
+  pictureText = (pictureText ? (char*)((char*)base - (Long)pictureText) : NULL);
+
+  defaultvalue = (defaultvalue ? (char*)((char*)base - (Long)defaultvalue) : NULL);
+  heading = (heading ? (char*)((char*)base - (Long)heading) : NULL);
+  computed_column_text = (computed_column_text ? (char*)((char*)base - (Long)computed_column_text) : NULL);
+
+  hbaseColFam = (hbaseColFam ? (char*)((char*)base - (Long)hbaseColFam) : NULL);
+  hbaseColQual = (hbaseColQual ? (char*)((char*)base - (Long)hbaseColQual) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafConstrntsDesc::pack(void * space)
+{
+  constrntname = (constrntname ? (char*)(((Space*)space)->convertToOffset(constrntname)) : NULL);
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+  
+  check_constrnts_desc.pack(space);
+  constr_key_cols_desc.pack(space);
+  referenced_constrnts_desc.pack(space);
+  referencing_constrnts_desc.pack(space);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafConstrntsDesc::unpack(void * base, void * reallocator)
+{
+  constrntname = (constrntname ? (char*)((char*)base - (Long)constrntname) : NULL);
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+
+  if (check_constrnts_desc.unpack(base, reallocator)) return -1;
+  if (constr_key_cols_desc.unpack(base, reallocator)) return -1;
+  if (referenced_constrnts_desc.unpack(base, reallocator)) return -1;
+  if (referencing_constrnts_desc.unpack(base, reallocator)) return -1;
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafConstrntKeyColsDesc::pack(void * space)
+{
+  colname = (colname ? (char*)(((Space*)space)->convertToOffset(colname)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafConstrntKeyColsDesc::unpack(void * base, void * reallocator)
+{
+  colname = (colname ? (char*)((char*)base - (Long)colname) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+
+Long TrafFilesDesc::pack(void * space)
+{
+  partns_desc.pack(space);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafFilesDesc::unpack(void * base, void * reallocator)
+{
+  if (partns_desc.unpack(base, reallocator)) return -1;
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafHbaseRegionDesc::pack(void * space)
+{
+  beginKey = (beginKey ? (char*)(((Space*)space)->convertToOffset(beginKey)) : NULL);
+  endKey = (endKey ? (char*)(((Space*)space)->convertToOffset(endKey)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafHbaseRegionDesc::unpack(void * base, void * reallocator)
+{
+  beginKey = (beginKey ? (char*)((char*)base - (Long)beginKey) : NULL);
+  endKey = (endKey ? (char*)((char*)base - (Long)endKey) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafHistogramDesc::pack(void * space)
+{
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+  histid = (histid ? (char*)(((Space*)space)->convertToOffset(histid)) : NULL);
+  highval = (highval ? (char*)(((Space*)space)->convertToOffset(highval)) : NULL);
+  lowval = (lowval ? (char*)(((Space*)space)->convertToOffset(lowval)) : NULL);
+
+  hist_interval_desc.pack(space);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafHistogramDesc::unpack(void * base, void * reallocator)
+{
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+  histid = (histid ? (char*)((char*)base - (Long)histid) : NULL);
+  highval = (highval ? (char*)((char*)base - (Long)highval) : NULL);
+  lowval = (lowval ? (char*)((char*)base - (Long)lowval) : NULL);
+
+  if (hist_interval_desc.unpack(base, reallocator)) return -1;
+  
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafHistIntervalDesc::pack(void * space)
+{
+  histid = (histid ? (char*)(((Space*)space)->convertToOffset(histid)) : NULL);
+  intboundary = (intboundary ? (char*)(((Space*)space)->convertToOffset(intboundary)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafHistIntervalDesc::unpack(void * base, void * reallocator)
+{
+  histid = (histid ? (char*)((char*)base - (Long)histid) : NULL);
+  intboundary = (intboundary ? (char*)((char*)base - (Long)intboundary) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafIndexesDesc::pack(void * space)
+{
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+  indexname = (indexname ? (char*)(((Space*)space)->convertToOffset(indexname)) : NULL);
+  hbaseCreateOptions = (hbaseCreateOptions ? (char*)(((Space*)space)->convertToOffset(hbaseCreateOptions)) : NULL);
+
+  files_desc.pack(space);
+  keys_desc.pack(space);
+  non_keys_desc.pack(space);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafIndexesDesc::unpack(void * base, void * reallocator)
+{
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+  indexname = (indexname ? (char*)((char*)base - (Long)indexname) : NULL);
+  hbaseCreateOptions = (hbaseCreateOptions ? (char*)((char*)base - (Long)hbaseCreateOptions) : NULL);
+
+  if (files_desc.unpack(base, reallocator)) return -1;
+  if (keys_desc.unpack(base, reallocator)) return -1;
+  if (non_keys_desc.unpack(base, reallocator)) return -1;
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafKeysDesc::pack(void * space)
+{
+  keyname = (keyname ? (char*)(((Space*)space)->convertToOffset(keyname)) : NULL);
+  hbaseColFam = (hbaseColFam ? (char*)(((Space*)space)->convertToOffset(hbaseColFam)) : NULL);
+  hbaseColQual = (hbaseColQual ? (char*)(((Space*)space)->convertToOffset(hbaseColQual)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafKeysDesc::unpack(void * base, void * reallocator)
+{
+  keyname = (keyname ? (char*)((char*)base - (Long)keyname) : NULL);
+  hbaseColFam = (hbaseColFam ? (char*)((char*)base - (Long)hbaseColFam) : NULL);
+  hbaseColQual = (hbaseColQual ? (char*)((char*)base - (Long)hbaseColQual) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafLibraryDesc::pack(void * space)
+{
+  libraryName = (libraryName ? (char*)(((Space*)space)->convertToOffset(libraryName)) : NULL);
+  libraryFilename = (libraryFilename ? (char*)(((Space*)space)->convertToOffset(libraryFilename)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafLibraryDesc::unpack(void * base, void * reallocator)
+{
+  libraryName = (libraryName ? (char*)((char*)base - (Long)libraryName) : NULL);
+  libraryFilename = (libraryFilename ? (char*)((char*)base - (Long)libraryFilename) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafPartnsDesc::pack(void * space)
+{
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+  partitionname = (partitionname ? (char*)(((Space*)space)->convertToOffset(partitionname)) : NULL);
+  logicalpartitionname = (logicalpartitionname ? (char*)(((Space*)space)->convertToOffset(logicalpartitionname)) : NULL);
+  firstkey = (firstkey ? (char*)(((Space*)space)->convertToOffset(firstkey)) : NULL);
+  encodedkey = (encodedkey ? (char*)(((Space*)space)->convertToOffset(encodedkey)) : NULL);
+  lowKey = (lowKey ? (char*)(((Space*)space)->convertToOffset(lowKey)) : NULL);
+  highKey = (highKey ? (char*)(((Space*)space)->convertToOffset(highKey)) : NULL);
+  givenname = (givenname ? (char*)(((Space*)space)->convertToOffset(givenname)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafPartnsDesc::unpack(void * base, void * reallocator)
+{
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+  partitionname = (partitionname ? (char*)((char*)base - (Long)partitionname) : NULL);
+  logicalpartitionname = (logicalpartitionname ? (char*)((char*)base - (Long)logicalpartitionname) : NULL);
+  firstkey = (firstkey ? (char*)((char*)base - (Long)firstkey) : NULL);
+  encodedkey = (encodedkey ? (char*)((char*)base - (Long)encodedkey) : NULL);
+  lowKey = (lowKey ? (char*)((char*)base - (Long)lowKey) : NULL);
+  highKey = (highKey ? (char*)((char*)base - (Long)highKey) : NULL);
+  givenname = (givenname ? (char*)((char*)base - (Long)givenname) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafRefConstrntsDesc::pack(void * space)
+{
+  constrntname = (constrntname ? (char*)(((Space*)space)->convertToOffset(constrntname)) : NULL);
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafRefConstrntsDesc::unpack(void * base, void * reallocator)
+{
+  constrntname = (constrntname ? (char*)((char*)base - (Long)constrntname) : NULL);
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafRoutineDesc::pack(void * space)
+{
+  routineName = (routineName ? (char*)(((Space*)space)->convertToOffset(routineName)) : NULL);
+  externalName = (externalName ? (char*)(((Space*)space)->convertToOffset(externalName)) : NULL);
+  librarySqlName = (librarySqlName ? (char*)(((Space*)space)->convertToOffset(librarySqlName)) : NULL);
+  libraryFileName = (libraryFileName ? (char*)(((Space*)space)->convertToOffset(libraryFileName)) : NULL);
+  signature = (signature ? (char*)(((Space*)space)->convertToOffset(signature)) : NULL);
+
+  params.pack(space);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafRoutineDesc::unpack(void * base, void * reallocator)
+{
+  routineName = (routineName ? (char*)((char*)base - (Long)routineName) : NULL);
+  externalName = (externalName ? (char*)((char*)base - (Long)externalName) : NULL);
+  librarySqlName = (librarySqlName ? (char*)((char*)base - (Long)librarySqlName) : NULL);
+  libraryFileName = (libraryFileName ? (char*)((char*)base - (Long)libraryFileName) : NULL);
+  signature = (signature ? (char*)((char*)base - (Long)signature) : NULL);
+
+  if (params.unpack(base, reallocator)) return -1;
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafSequenceGeneratorDesc::pack(void * space)
+{
+  sgLocation = (sgLocation ? (char*)(((Space*)space)->convertToOffset(sgLocation)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafSequenceGeneratorDesc::unpack(void * base, void * reallocator)
+{
+  sgLocation = (sgLocation ? (char*)((char*)base - (Long)sgLocation) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafTableDesc::pack(void * space)
+{
+  tablename = (tablename ? (char*)(((Space*)space)->convertToOffset(tablename)) : NULL);
+  snapshotName = (snapshotName ? (char*)(((Space*)space)->convertToOffset(snapshotName)) : NULL);
+  default_col_fam = (default_col_fam ? (char*)(((Space*)space)->convertToOffset(default_col_fam)) : NULL);
+  all_col_fams = (all_col_fams ? (char*)(((Space*)space)->convertToOffset(all_col_fams)) : NULL);
+
+  columns_desc.pack(space);
+  indexes_desc.pack(space);
+  constrnts_desc.pack(space);
+  views_desc.pack(space);
+  constrnts_tables_desc.pack(space);
+  referenced_tables_desc.pack(space);
+  referencing_tables_desc.pack(space);
+  histograms_desc.pack(space);
+  files_desc.pack(space);
+  hbase_regionkey_desc.pack(space);
+  sequence_generator_desc.pack(space);
+
+  return TrafDesc::pack(space);  
+}
+
+Lng32 TrafTableDesc::unpack(void * base, void * reallocator)
+{
+  tablename = (tablename ? (char*)((char*)base - (Long)tablename) : NULL);
+  snapshotName = (snapshotName ? (char*)((char*)base - (Long)snapshotName) : NULL);
+  default_col_fam = (default_col_fam ? (char*)((char*)base - (Long)default_col_fam) : NULL);
+  all_col_fams = (all_col_fams ? (char*)((char*)base - (Long)all_col_fams) : NULL);
+
+  if (columns_desc.unpack(base, reallocator)) return -1;
+  if (indexes_desc.unpack(base, reallocator)) return -1;
+  if (constrnts_desc.unpack(base, reallocator)) return -1;
+  if (views_desc.unpack(base, reallocator)) return -1;
+  if (constrnts_tables_desc.unpack(base, reallocator)) return -1;
+  if (referenced_tables_desc.unpack(base, reallocator)) return -1;
+  if (referencing_tables_desc.unpack(base, reallocator)) return -1;
+  if (histograms_desc.unpack(base, reallocator)) return -1;
+  if (files_desc.unpack(base, reallocator)) return -1;
+  if (hbase_regionkey_desc.unpack(base, reallocator)) return -1;
+  if (sequence_generator_desc.unpack(base, reallocator)) return -1;
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafUsingMvDesc::pack(void * space)
+{
+  mvName = (mvName ? (char*)(((Space*)space)->convertToOffset(mvName)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafUsingMvDesc::unpack(void * base, void * reallocator)
+{
+  mvName = (mvName ? (char*)((char*)base - (Long)mvName) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}
+
+Long TrafViewDesc::pack(void * space)
+{
+  viewname = (viewname ? (char*)(((Space*)space)->convertToOffset(viewname)) : NULL);
+  viewfilename = (viewfilename ? (char*)(((Space*)space)->convertToOffset(viewfilename)) : NULL);
+
+  viewtext = (viewtext ? (char*)(((Space*)space)->convertToOffset(viewtext)) : NULL);
+  viewchecktext = (viewchecktext ? (char*)(((Space*)space)->convertToOffset(viewchecktext)) : NULL);
+
+  return TrafDesc::pack(space);
+}
+
+Lng32 TrafViewDesc::unpack(void * base, void * reallocator)
+{
+  viewname = (viewname ? (char*)((char*)base - (Long)viewname) : NULL);
+  viewfilename = (viewfilename ? (char*)((char*)base - (Long)viewfilename) : NULL);
+
+  viewtext = (viewtext ? (char*)((char*)base - (Long)viewtext) : NULL);
+  viewchecktext = (viewchecktext ? (char*)((char*)base - (Long)viewchecktext) : NULL);
+
+  return TrafDesc::unpack(base, reallocator);
+}

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/sqlcat/TrafDDLdesc.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcat/TrafDDLdesc.h b/core/sql/sqlcat/TrafDDLdesc.h
new file mode 100644
index 0000000..3a599e6
--- /dev/null
+++ b/core/sql/sqlcat/TrafDDLdesc.h
@@ -0,0 +1,1120 @@
+/**********************************************************************
+// @@@ START COPYRIGHT @@@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+// @@@ END COPYRIGHT @@@
+//
+**********************************************************************/
+#ifndef TRAF_DDL_DESC_H
+#define TRAF_DDL_DESC_H
+
+#include "Platform.h"
+#include "NAVersionedObject.h"
+#include "charinfo.h"
+#include "ComSmallDefs.h"
+
+#define GENHEAP(h)    (h ? (NAMemory*)h : CmpCommon::statementHeap())
+
+enum ConstraintType { UNIQUE_CONSTRAINT, PRIMARY_KEY_CONSTRAINT, REF_CONSTRAINT,
+		      CHECK_CONSTRAINT
+		    };
+
+enum desc_nodetype {
+  DESC_UNKNOWN_TYPE = 0,
+  DESC_CHECK_CONSTRNTS_TYPE,
+  DESC_COLUMNS_TYPE,
+  DESC_CONSTRNTS_TYPE,
+  DESC_CONSTRNT_KEY_COLS_TYPE,
+  DESC_FILES_TYPE,
+  DESC_HBASE_RANGE_REGION_TYPE,
+  DESC_HISTOGRAM_TYPE,
+  DESC_HIST_INTERVAL_TYPE,
+  DESC_INDEXES_TYPE,
+  DESC_KEYS_TYPE,
+  DESC_PARTNS_TYPE,
+  DESC_REF_CONSTRNTS_TYPE,
+  DESC_TABLE_TYPE,
+  DESC_USING_MV_TYPE,  // MV  -- marks an MV using this object
+  DESC_VIEW_TYPE,
+  DESC_SCHEMA_LABEL_TYPE,
+  DESC_SEQUENCE_GENERATOR_TYPE,
+  DESC_ROUTINE_TYPE,
+  DESC_LIBRARY_TYPE
+};
+
+class TrafDesc;
+typedef NAVersionedObjectPtrTempl<TrafDesc> DescStructPtr;
+
+class TrafCheckConstrntsDesc;
+class TrafColumnsDesc;
+class TrafConstrntsDesc;
+class TrafConstrntKeyColsDesc;
+class TrafHbaseRegionDesc;
+class TrafHistogramDesc;
+class TrafHistIntervalDesc;
+class TrafFilesDesc;
+class TrafKeysDesc;
+class TrafIndexesDesc;
+class TrafLibraryDesc;
+class TrafPartnsDesc;
+class TrafRefConstrntsDesc;
+class TrafRoutineDesc;
+class TrafSequenceGeneratorDesc;
+class TrafTableDesc;
+class TrafUsingMvDesc;
+class TrafViewDesc;
+
+class TrafDesc : public NAVersionedObject {
+public:
+  enum {CURR_VERSION = 1};
+
+  TrafDesc(UInt16 nodeType);
+  TrafDesc() : NAVersionedObject(-1) {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafDesc); }
+
+  virtual Lng32 migrateToNewVersion(NAVersionedObject *&newImage);
+
+  virtual char *findVTblPtr(short classID);
+
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  Lng32 validateSize();
+  Lng32 validateVersion();
+ 
+  UInt16 nodetype;
+  UInt16 version;
+  UInt32 descFlags;
+  DescStructPtr next;
+  char* descExtension; // extension of descriptor, if it needs to be extended
+
+  virtual TrafCheckConstrntsDesc *checkConstrntsDesc() const { return NULL; }
+  virtual TrafColumnsDesc *columnsDesc() const { return NULL; }
+  virtual TrafConstrntsDesc *constrntsDesc() const { return NULL; }
+  virtual TrafConstrntKeyColsDesc *constrntKeyColsDesc() const { return NULL; }
+  virtual TrafFilesDesc *filesDesc() const { return NULL; }
+  virtual TrafHbaseRegionDesc *hbaseRegionDesc() const { return NULL; }
+  virtual TrafHistogramDesc *histogramDesc() const { return NULL; }
+  virtual TrafHistIntervalDesc *histIntervalDesc() const { return NULL; }
+  virtual TrafKeysDesc *keysDesc() const { return NULL; }
+  virtual TrafIndexesDesc *indexesDesc() const { return NULL; }
+  virtual TrafLibraryDesc *libraryDesc() const { return NULL; }
+  virtual TrafPartnsDesc *partnsDesc() const { return NULL; }
+  virtual TrafRefConstrntsDesc *refConstrntsDesc() const { return NULL; }
+  virtual TrafRoutineDesc *routineDesc() const { return NULL; }
+  virtual TrafSequenceGeneratorDesc *sequenceGeneratorDesc() const { return NULL; }
+  virtual TrafTableDesc *tableDesc() const { return NULL; }
+  virtual TrafUsingMvDesc *usingMvDesc() const { return NULL; }
+  virtual TrafViewDesc *viewDesc() const { return NULL; }
+
+};
+
+class TrafCheckConstrntsDesc : public TrafDesc {
+public:
+  TrafCheckConstrntsDesc() : TrafDesc(DESC_CHECK_CONSTRNTS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafCheckConstrntsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafCheckConstrntsDesc *checkConstrntsDesc() const { return (TrafCheckConstrntsDesc*)this; }
+
+  char* constrnt_text;
+  char filler[16];
+};
+
+class TrafColumnsDesc : public TrafDesc {
+public:
+  TrafColumnsDesc() : TrafDesc(DESC_COLUMNS_TYPE) 
+  {};
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafColumnsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafColumnsDesc *columnsDesc() const { return (TrafColumnsDesc*)this; }
+
+  enum ColumnsDescFlags
+    { 
+      NULLABLE           = 0x0001,  
+      ADDED              = 0x0002,
+      UPSHIFTED          = 0x0004,
+      CASEINSENSITIVE    = 0x0008,
+      OPTIONAL           = 0x0010
+    };
+
+  void setNullable(NABoolean v) 
+  {(v ? columnsDescFlags |= NULLABLE : columnsDescFlags &= ~NULLABLE); };
+  NABoolean isNullable() { return (columnsDescFlags & NULLABLE) != 0; };
+
+  void setAdded(NABoolean v) 
+  {(v ? columnsDescFlags |= ADDED : columnsDescFlags &= ~ADDED); };
+  NABoolean isAdded() { return (columnsDescFlags & ADDED) != 0; };
+
+  void setUpshifted(NABoolean v) 
+  {(v ? columnsDescFlags |= UPSHIFTED : columnsDescFlags &= ~UPSHIFTED); };
+  NABoolean isUpshifted() { return (columnsDescFlags & UPSHIFTED) != 0; };
+
+  void setCaseInsensitive(NABoolean v) 
+  {(v ? columnsDescFlags |= CASEINSENSITIVE : columnsDescFlags &= ~CASEINSENSITIVE); };
+  NABoolean isCaseInsensitive() { return (columnsDescFlags & CASEINSENSITIVE) != 0; };
+
+  void setOptional(NABoolean v) 
+  {(v ? columnsDescFlags |= OPTIONAL : columnsDescFlags &= ~OPTIONAL); };
+  NABoolean isOptional() { return (columnsDescFlags & OPTIONAL) != 0; };
+
+  rec_datetime_field datetimeStart() 
+  { return (rec_datetime_field)datetimestart;}
+  rec_datetime_field datetimeEnd() 
+  { return (rec_datetime_field)datetimeend;}
+
+  ComColumnDefaultClass defaultClass() 
+  { return (ComColumnDefaultClass)defaultClass_;}
+  void setDefaultClass(ComColumnDefaultClass v)
+  { defaultClass_ = (Int16)v;}
+
+  CharInfo::CharSet characterSet() 
+  { return (CharInfo::CharSet)character_set;}
+  CharInfo::CharSet encodingCharset() 
+  { return (CharInfo::CharSet)encoding_charset;}
+  CharInfo::Collation  collationSequence()
+  {return (CharInfo::Collation)collation_sequence; }
+
+  ComParamDirection paramDirection() 
+  { return (ComParamDirection)paramDirection_;}
+  void setParamDirection(ComParamDirection v)
+  {paramDirection_ = (Int16)v; }
+
+  char* colname;
+
+  Int32 colnumber;
+  Int32 datatype;
+
+  Int32 offset;
+  Lng32 length;
+
+  Lng32 scale;
+  Lng32 precision;
+
+  Int16/*rec_datetime_field*/ datetimestart, datetimeend;
+  Int16 datetimefractprec, intervalleadingprec;
+
+  Int16/*ComColumnDefaultClass*/ defaultClass_;
+  Int16/*CharInfo::CharSet*/     character_set;
+  Int16/*CharInfo::CharSet*/     encoding_charset;
+  Int16/*CharInfo::Collation*/   collation_sequence;
+
+  ULng32 hbaseColFlags;
+  Int16/*ComParamDirection*/ paramDirection_;
+  char colclass; // 'S' -- system generated, 'U' -- user created
+  char filler0;
+
+  Int64 colFlags;
+  Int64 columnsDescFlags; // my flags
+
+  char* pictureText;
+  char* defaultvalue;
+  char* heading;
+  char* computed_column_text;
+  char* hbaseColFam;
+  char* hbaseColQual;
+
+  char filler[24];
+};
+
+class TrafConstrntKeyColsDesc : public TrafDesc {
+public:
+  TrafConstrntKeyColsDesc() : TrafDesc(DESC_CONSTRNT_KEY_COLS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafConstrntKeyColsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafConstrntKeyColsDesc *constrntKeyColsDesc() const { return (TrafConstrntKeyColsDesc*)this; }
+
+  char* colname;
+  Int32  position;
+
+  Int64 constrntKeyColsDescFlags; // my flags
+
+  char filler[16];
+};
+
+class TrafConstrntsDesc : public TrafDesc {
+public:
+  TrafConstrntsDesc() : TrafDesc(DESC_CONSTRNTS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafConstrntsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafConstrntsDesc *constrntsDesc() const { return (TrafConstrntsDesc*)this; }
+
+  enum ConstrntsDescFlags
+    { 
+      ENFORCED           = 0x0001
+    };
+
+  void setEnforced(NABoolean v) 
+  {(v ? constrntsDescFlags |= ENFORCED : constrntsDescFlags &= ~ENFORCED); };
+  NABoolean isEnforced() { return (constrntsDescFlags & ENFORCED) != 0; };
+
+  char* constrntname;
+  char* tablename;
+
+  Int16 /*ConstraintType*/ type;
+  Int16 fillerInt16;
+  Int32  colcount;
+
+  Int64 constrntsDescFlags; // my flags
+
+  DescStructPtr check_constrnts_desc;
+  DescStructPtr constr_key_cols_desc;
+  DescStructPtr referenced_constrnts_desc;
+  DescStructPtr referencing_constrnts_desc;
+
+  char filler[24];
+};
+
+class TrafFilesDesc : public TrafDesc {
+public:
+  TrafFilesDesc() : TrafDesc(DESC_FILES_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafFilesDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafFilesDesc *filesDesc() const { return (TrafFilesDesc*)this; }
+
+  enum FilesDescFlags
+    { 
+      AUDITED           = 0x0001
+    };
+
+  void setAudited(NABoolean v) 
+  {(v ? filesDescFlags |= AUDITED : filesDescFlags &= ~AUDITED); };
+  NABoolean isAudited() { return (filesDescFlags & AUDITED) != 0; };
+
+  Int64 filesDescFlags; // my flags
+  DescStructPtr partns_desc;
+};
+
+class TrafHbaseRegionDesc : public TrafDesc {
+public:
+  TrafHbaseRegionDesc() : TrafDesc(DESC_HBASE_RANGE_REGION_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafHbaseRegionDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafHbaseRegionDesc *hbaseRegionDesc() const { return (TrafHbaseRegionDesc*)this; }
+
+  Int64  hbaseRegionDescFlags; // my flags
+
+  Lng32  beginKeyLen;
+  Lng32  endKeyLen;
+
+  char*  beginKey;
+  char*  endKey;
+
+  char filler[16];
+};
+
+class TrafHistogramDesc : public TrafDesc {
+public:
+  TrafHistogramDesc() : TrafDesc(DESC_HISTOGRAM_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafHistogramDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafHistogramDesc *histogramDesc() const { return (TrafHistogramDesc*)this; }
+
+  char*   tablename;
+  char*   histid;
+
+  Int32   tablecolnumber;
+  Int32   colposition;
+
+  Float32 rowcount;
+  Float32 uec;
+
+  char*   highval;
+  char*   lowval;
+
+  Int64 histogramDescFlags; // my flags
+
+  DescStructPtr hist_interval_desc;
+
+  char filler[24];
+};
+
+class TrafHistIntervalDesc : public TrafDesc {
+public:
+  TrafHistIntervalDesc() : TrafDesc(DESC_HIST_INTERVAL_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafHistIntervalDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafHistIntervalDesc *histIntervalDesc() const { return (TrafHistIntervalDesc*)this; }
+
+  char*   histid;
+  char*   intboundary;
+
+  Float32  rowcount;
+  Float32  uec;
+
+  Int32   intnum;
+  Int32   fillerInt32;
+
+  Int64 histIntervalDescFlags; // my flags
+
+  char filler[16];
+};
+
+class TrafIndexesDesc : public TrafDesc {
+public:
+  TrafIndexesDesc() : TrafDesc(DESC_INDEXES_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafIndexesDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafIndexesDesc *indexesDesc() const { return (TrafIndexesDesc*)this; }
+
+  enum IndexesDescFlags
+    { 
+      SYSTEM_TABLE_CODE = 0x0001,  
+      EXPLICIT          = 0x0002,
+      VOLATILE          = 0x0004,
+      IN_MEM_OBJ        = 0x0008,
+      UNIQUE            = 0x0010
+    };
+
+  void setSystemTableCode(NABoolean v) 
+  {(v ? indexesDescFlags |= SYSTEM_TABLE_CODE : indexesDescFlags &= ~SYSTEM_TABLE_CODE); };
+  NABoolean isSystemTableCode() { return (indexesDescFlags & SYSTEM_TABLE_CODE) != 0; };
+
+  void setExplicit(NABoolean v) 
+  {(v ? indexesDescFlags |= EXPLICIT : indexesDescFlags &= ~EXPLICIT); };
+  NABoolean isExplicit() { return (indexesDescFlags & EXPLICIT) != 0; };
+
+  void setVolatile(NABoolean v) 
+  {(v ? indexesDescFlags |= VOLATILE : indexesDescFlags &= ~VOLATILE); };
+  NABoolean isVolatile() { return (indexesDescFlags & VOLATILE) != 0; };
+
+  void setInMemoryObject(NABoolean v) 
+  {(v ? indexesDescFlags |= IN_MEM_OBJ : indexesDescFlags &= ~IN_MEM_OBJ); };
+  NABoolean isInMemoryObject() { return (indexesDescFlags & IN_MEM_OBJ) != 0; };
+
+  void setUnique(NABoolean v) 
+  {(v ? indexesDescFlags |= UNIQUE : indexesDescFlags &= ~UNIQUE); };
+  NABoolean isUnique() { return (indexesDescFlags & UNIQUE) != 0; };
+
+  ComPartitioningScheme partitioningScheme() 
+  { return (ComPartitioningScheme)partitioningScheme_; }
+  void setPartitioningScheme(ComPartitioningScheme v) 
+  { partitioningScheme_ = (Int16)v; }
+  ComRowFormat rowFormat() { return (ComRowFormat)rowFormat_; }
+  void setRowFormat(ComRowFormat v) { rowFormat_ = (Int16)v; }
+
+  char* tablename;  // name of the base table
+  char* indexname;  // physical name of index. Different from ext_indexname
+                    // for ARK tables.
+  Int64 indexUID;
+
+  Int32 keytag;
+  Int32 record_length;
+  Int32 colcount;
+  Int32 blocksize;
+
+  Int16 /*ComPartitioningScheme*/ partitioningScheme_; 
+  Int16 /*ComRowFormat*/          rowFormat_;
+  Lng32 numSaltPartns; // number of salted partns created for a seabase table.
+
+  Int64 indexesDescFlags; // my flags
+
+  char*  hbaseCreateOptions;
+
+  DescStructPtr files_desc;
+
+  // Clustering keys columns
+  DescStructPtr keys_desc;
+
+  // Columns that are not part of the clustering key.
+  // Used specially for vertical partition column(s).
+  DescStructPtr non_keys_desc;
+
+  char filler[24];
+};
+
+class TrafKeysDesc : public TrafDesc {
+public:
+  TrafKeysDesc() : TrafDesc(DESC_KEYS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafKeysDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafKeysDesc *keysDesc() const { return (TrafKeysDesc*)this; }
+
+  enum KeysDescFlags
+    { 
+      DESCENDING           = 0x0001
+    };
+
+  void setDescending(NABoolean v) 
+  {(v ? keysDescFlags |= DESCENDING : keysDescFlags &= ~DESCENDING); };
+  NABoolean isDescending() { return (keysDescFlags & DESCENDING) != 0; };
+
+  char* keyname;
+  Int32 keyseqnumber;
+  Int32 tablecolnumber;
+
+  Int64 keysDescFlags; // my flags
+
+  char* hbaseColFam;
+  char* hbaseColQual;
+
+  char filler[16];
+};
+
+class TrafLibraryDesc : public TrafDesc {
+public:
+  TrafLibraryDesc() : TrafDesc(DESC_LIBRARY_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafLibraryDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafLibraryDesc *libraryDesc() const { return (TrafLibraryDesc*)this; }
+
+  char* libraryName;
+  char* libraryFilename;
+  Int64 libraryUID;
+  Int32 libraryVersion;
+  Int32 libraryOwnerID;
+  Int32 librarySchemaOwnerID;
+
+  char filler[20];
+};
+
+class TrafPartnsDesc : public TrafDesc {
+public:
+  TrafPartnsDesc() : TrafDesc(DESC_PARTNS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafPartnsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafPartnsDesc *partnsDesc() const { return (TrafPartnsDesc*)this; }
+
+  char*  tablename;
+  Int32 primarypartition;
+  char*  partitionname;
+  char*  logicalpartitionname;
+  char*  firstkey;
+  Lng32 firstkeylen;         //soln:10-031112-1256
+  Lng32 encodedkeylen;
+  char*  encodedkey;
+  char*  lowKey;
+  char*  highKey;
+  Int32    indexlevel;
+  Int32  priExt;
+  Int32  secExt;
+  Int32  maxExt;
+  char*  givenname;
+};
+
+class TrafRefConstrntsDesc : public TrafDesc {
+public:
+  TrafRefConstrntsDesc() : TrafDesc(DESC_REF_CONSTRNTS_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafRefConstrntsDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafRefConstrntsDesc *refConstrntsDesc() const { return (TrafRefConstrntsDesc*)this; }
+
+  Int64 refConstrntsDescFlags; // my flags
+  char* constrntname;
+  char* tablename;
+
+  char filler[16];
+};
+
+class TrafRoutineDesc : public TrafDesc {
+public:
+  TrafRoutineDesc() : TrafDesc(DESC_ROUTINE_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafRoutineDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafRoutineDesc *routineDesc() const { return (TrafRoutineDesc*)this; }
+
+  Int64 objectUID;
+  char* routineName;
+  char* externalName;
+  char* librarySqlName;
+  char* libraryFileName;
+  char* signature;
+  ComSInt32 paramsCount;
+  DescStructPtr params;
+  ComRoutineLanguage language;
+  ComRoutineType UDRType;
+  ComRoutineSQLAccess sqlAccess;
+  ComRoutineTransactionAttributes transactionAttributes;
+  ComSInt32 maxResults;
+  ComRoutineParamStyle paramStyle;
+  NABoolean isDeterministic;
+  NABoolean isCallOnNull;
+  NABoolean isIsolate;
+  ComRoutineExternalSecurity externalSecurity;
+  ComRoutineExecutionMode executionMode;
+  Int32 stateAreaSize;
+  ComRoutineParallelism parallelism;
+  Int32 owner;
+  Int32 schemaOwner;
+
+  Int64 routineDescFlags; // my flags
+
+  char filler[24];
+};
+
+class TrafSequenceGeneratorDesc : public TrafDesc {
+public:
+  TrafSequenceGeneratorDesc() : TrafDesc(DESC_SEQUENCE_GENERATOR_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafSequenceGeneratorDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafSequenceGeneratorDesc *sequenceGeneratorDesc() const { return (TrafSequenceGeneratorDesc*)this; }
+
+  ComSequenceGeneratorType sgType() 
+  { return (ComSequenceGeneratorType)sgType_; }
+  void setSgType(ComSequenceGeneratorType v) 
+  { sgType_ = (Int16)v; }
+
+  Int64                     startValue;
+  Int64                     increment;
+
+  Int16 /*ComSequenceGeneratorType*/  sgType_;
+  Int16 /*ComSQLDataType*/  sqlDataType;
+  Int16 /*ComFSDataType*/   fsDataType;
+  Int16                     cycleOption;
+
+  Int64                     maxValue;
+  Int64                     minValue;
+  Int64                     cache;
+  Int64                     objectUID;
+  char*                     sgLocation;
+  Int64                     nextValue;
+  Int64                     redefTime;
+
+  Int64 sequenceGeneratorDescFlags; // my flags
+
+  char filler[16];
+};
+
+class TrafTableDesc : public TrafDesc {
+public:
+  TrafTableDesc() : TrafDesc(DESC_TABLE_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafTableDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafTableDesc *tableDesc() const { return (TrafTableDesc*)this; }
+
+  enum TableDescFlags
+    { 
+      SYSTEM_TABLE_CODE = 0x0001,  
+      UMD_TABLE         = 0x0002,
+      MV_TABLE          = 0x0004,
+      IUD_LOG           = 0x0008,
+      MV_MD_OBJECT      = 0x0010,
+      SYN_TRANS_DONE    = 0x0020,
+      VOLATILE          = 0x0040,
+      IN_MEM_OBJ        = 0x0080,
+      DROPPABLE         = 0x0100,
+      INSERT_ONLY       = 0x0200
+    };
+
+  void setSystemTableCode(NABoolean v) 
+  {(v ? tableDescFlags |= SYSTEM_TABLE_CODE : tableDescFlags &= ~SYSTEM_TABLE_CODE); };
+  NABoolean isSystemTableCode() { return (tableDescFlags & SYSTEM_TABLE_CODE) != 0; };
+
+  void setUMDTable(NABoolean v) 
+  {(v ? tableDescFlags |= UMD_TABLE : tableDescFlags &= ~UMD_TABLE); };
+  NABoolean isUMDTable() { return (tableDescFlags & UMD_TABLE) != 0; };
+
+  void setMVTable(NABoolean v) 
+  {(v ? tableDescFlags |= MV_TABLE : tableDescFlags &= ~MV_TABLE); };
+  NABoolean isMVTable() { return (tableDescFlags & MV_TABLE) != 0; };
+
+  void setIUDLog(NABoolean v) 
+  {(v ? tableDescFlags |= IUD_LOG : tableDescFlags &= ~IUD_LOG); };
+  NABoolean isIUDLog() { return (tableDescFlags & IUD_LOG) != 0; };
+
+  void setMVMetadataObject(NABoolean v) 
+  {(v ? tableDescFlags |= MV_MD_OBJECT : tableDescFlags &= ~MV_MD_OBJECT); };
+  NABoolean isMVMetadataObject() { return (tableDescFlags & MV_MD_OBJECT) != 0; };
+
+  void setSynonymTranslationDone(NABoolean v) 
+  {(v ? tableDescFlags |= SYN_TRANS_DONE : tableDescFlags &= ~SYN_TRANS_DONE); };
+  NABoolean isSynonymTranslationDone() { return (tableDescFlags & SYN_TRANS_DONE) != 0; };
+
+  void setVolatileTable(NABoolean v) 
+  {(v ? tableDescFlags |= VOLATILE : tableDescFlags &= ~VOLATILE); };
+  NABoolean isVolatileTable() { return (tableDescFlags & VOLATILE) != 0; };
+
+  void setInMemoryObject(NABoolean v) 
+  {(v ? tableDescFlags |= IN_MEM_OBJ : tableDescFlags &= ~IN_MEM_OBJ); };
+  NABoolean isInMemoryObject() { return (tableDescFlags & IN_MEM_OBJ) != 0; };
+
+  void setDroppable(NABoolean v) 
+  {(v ? tableDescFlags |= DROPPABLE : tableDescFlags &= ~DROPPABLE); };
+  NABoolean isDroppable() { return (tableDescFlags & DROPPABLE) != 0; };
+
+  void setInsertOnly(NABoolean v) 
+  {(v ? tableDescFlags |= INSERT_ONLY : tableDescFlags &= ~INSERT_ONLY); };
+  NABoolean isInsertOnly() { return (tableDescFlags & INSERT_ONLY) != 0; };
+
+  ComInsertMode insertMode() { return (ComInsertMode)insertMode_;}
+  void setInsertMode(ComInsertMode v) {insertMode_ = (Int16)v;}
+
+  ComPartitioningScheme partitioningScheme() 
+  { return (ComPartitioningScheme)partitioningScheme_; }
+  void setPartitioningScheme(ComPartitioningScheme v) 
+  { partitioningScheme_ = (Int16)v; }
+  ComRowFormat rowFormat() { return (ComRowFormat)rowFormat_; }
+  void setRowFormat(ComRowFormat v) { rowFormat_ = (Int16)v; }
+  ComObjectType objectType() { return (ComObjectType)objectType_; }
+  void setObjectType(ComObjectType v) { objectType_ = (Int16)v; }
+
+  char* tablename;
+
+  Int64 createTime;
+  Int64 redefTime;
+  Int64 cacheTime;
+
+  Int32 mvAttributesBitmap;
+  Int32 record_length;
+  Int32 colcount;
+  Int32 constr_count;
+
+  Int16 /*ComInsertMode*/ insertMode_;
+  Int16 /*ComPartitioningScheme*/ partitioningScheme_; 
+  Int16 /*ComRowFormat*/  rowFormat_;
+  Int16 /*ComObjectType*/ objectType_; 
+
+  Int64 catUID;
+  Int64 schemaUID;
+  Int64 objectUID;
+
+  Lng32 owner;
+  Lng32 schemaOwner;
+
+  char*  snapshotName;
+  char*  default_col_fam;
+  char*  all_col_fams;
+  Int64 objectFlags;
+  Int64 tablesFlags;
+
+  Int64 tableDescFlags; // my flags
+
+  DescStructPtr columns_desc;
+  DescStructPtr indexes_desc;
+  DescStructPtr constrnts_desc;
+  DescStructPtr views_desc;
+  DescStructPtr constrnts_tables_desc;
+  DescStructPtr referenced_tables_desc;
+  DescStructPtr referencing_tables_desc;
+  DescStructPtr histograms_desc;
+  DescStructPtr files_desc;
+
+  // for hbase's region keys
+  DescStructPtr hbase_regionkey_desc;
+  DescStructPtr sequence_generator_desc;
+
+  char filler[32];
+};
+
+class TrafUsingMvDesc : public TrafDesc {
+public:
+  TrafUsingMvDesc() : TrafDesc(DESC_USING_MV_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafUsingMvDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafUsingMvDesc *usingMvDesc() const { return (TrafUsingMvDesc*)this; }
+
+  ComMVRefreshType refreshType() { return (ComMVRefreshType)refreshType_;}
+  void setRefreshType(ComMVRefreshType v) 
+  { refreshType_ = (Int16)v;}
+
+  char* mvName;
+  Int32  rewriteEnabled;
+  Int32  isInitialized;
+  Int16 /*ComMVRefreshType*/ refreshType_; // unknown here means "non incremental"
+
+  char filler[14];
+};
+
+class TrafViewDesc : public TrafDesc {
+public:
+  TrafViewDesc() : TrafDesc(DESC_VIEW_TYPE)
+  {}
+
+  // ---------------------------------------------------------------------
+  // Redefine virtual functions required for Versioning.
+  //----------------------------------------------------------------------
+  virtual unsigned char getClassVersionID()
+  {
+    return 1;
+  }
+
+  virtual void populateImageVersionIDArray()
+  {
+    setImageVersionID(0,getClassVersionID());
+  }
+
+  virtual short getClassSize()      { return (short)sizeof(TrafViewDesc); }
+ 
+  virtual Long pack(void *space);
+  virtual Lng32 unpack(void * base, void * reallocator);
+
+  virtual TrafViewDesc *viewDesc() const { return (TrafViewDesc*)this; }
+
+  enum ViewDescFlags
+    { 
+      UPDATABLE           = 0x0001,
+      INSERTABLE          = 0x0002
+    };
+
+  void setUpdatable(NABoolean v) 
+  {(v ? viewDescFlags |= UPDATABLE : viewDescFlags &= ~UPDATABLE); };
+  NABoolean isUpdatable() { return (viewDescFlags & UPDATABLE) != 0; };
+
+  void setInsertable(NABoolean v) 
+  {(v ? viewDescFlags |= INSERTABLE : viewDescFlags &= ~INSERTABLE); };
+  NABoolean isInsertable() { return (viewDescFlags & INSERTABLE) != 0; };
+
+  char*  viewname;
+  char*  viewfilename;    // the physical file, to be Opened for auth-cking.
+  char*  viewtext;
+  char*  viewchecktext;
+
+  Int64 viewDescFlags; // my flags
+
+  Int16 /*CharInfo::CharSet*/ viewtextcharset;
+
+  char filler[22];
+};
+
+// if space is passed in, use it. Otherwise use HEAP of CmpCommon
+TrafDesc *TrafAllocateDDLdesc(desc_nodetype nodetype, 
+                                 Space *space);
+
+TrafDesc *TrafMakeColumnDesc
+(
+     const char *tablename,
+     const char *colname,
+     Lng32 &colnumber,		  // INOUT
+     Int32 datatype,
+     Lng32 length,
+     Lng32 &offset,		  // INOUT
+     NABoolean null_flag,
+     SQLCHARSET_CODE datacharset, // i.e., use CharInfo::DefaultCharSet;
+     Space * space
+ );
+
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/sqlcat/desc.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcat/desc.h b/core/sql/sqlcat/desc.h
index f6b8beb..0575b73 100644
--- a/core/sql/sqlcat/desc.h
+++ b/core/sql/sqlcat/desc.h
@@ -24,477 +24,6 @@
 #ifndef DESC_H
 #define DESC_H
 
-typedef Lng32 DataType;
-
-#include "Platform.h"
-#include "dfs2rec.h"
-#include "BaseTypes.h"
-#include "CmpCommon.h"	// defines HEAP for allocate() + all funcs in sqlcat
-#include "ItemConstr.h"	// defines ConstraintType enum
-#include "NAFileSet.h"
-#include "ComSmallDefs.h"
-
-class ElemDDLColDef;
-
-enum ConstraintType { UNIQUE_CONSTRAINT, PRIMARY_KEY_CONSTRAINT, REF_CONSTRAINT,
-		      CHECK_CONSTRAINT, MP_CHECK_CONSTRAINT,
-			// The next value is for catsim only;
-			// in ARK, NOT NULL constraints are CHECK constraints:
-		      CATSIM_NOT_NULL_CONSTRAINT
-		    };
-
-enum desc_nodetype {
-  DESC_UNKNOWN_TYPE = 0,
-  DESC_CHECK_CONSTRNTS_TYPE,
-  DESC_COLUMNS_TYPE,
-  DESC_CONSTRNTS_TYPE,
-  DESC_CONSTRNT_KEY_COLS_TYPE,
-  DESC_FILES_TYPE,
-  DESC_HISTOGRAM_TYPE,
-  DESC_HIST_INTERVAL_TYPE,
-  DESC_INDEXES_TYPE,
-  DESC_KEYS_TYPE,
-  DESC_PARTNS_TYPE,
-  DESC_REF_CONSTRNTS_TYPE,
-  DESC_TABLE_TYPE,
-  DESC_USING_MV_TYPE,  // MV  -- marks an MV using this object
-  DESC_VIEW_TYPE,
-  DESC_SCHEMA_LABEL_TYPE,
-  DESC_SEQUENCE_GENERATOR_TYPE,
-  DESC_HBASE_RANGE_REGION_TYPE,
-  DESC_ROUTINE_TYPE,
-  DESC_LIBRARY_TYPE
-};
-
-typedef ComDiskFileFormat UnderlyingFileType;
-
-struct desc_struct;	// forward reference; fully defined way at bottom
-
-struct header_desc_struct {
-  Int32 nodetype;
-  Int32 OSV;			// Object Schema Version, created at object creation time
-  Int32 OFV;
-  desc_struct *next;
-};
-
-struct table_desc_struct {
-  char *tablename;
-  char *catalogName;
-  char *parentTableName;
-  char *schemalabelfilename;    // the physical file, to be Opened for auth-cking.
-  UnderlyingFileType underlyingFileType;  // SQLMP or SQLMX 
-  ULng32 createtime[2];
-  ULng32 redeftime[2];
-  ULng32 cachetime[2];
-  Int32 issystemtablecode;	// logically belongs in files_desc_struct but..
-
-  Int32 isUMDTable;               // VO: Set to true if the table is one of the histograms UMD tables,
-                                //     the system_defaults UMD table or an odbc_schema UMD table.
-                                //     Otherwise set to false.
-  Int32 isMVtable;  // MV -- mark this table as an MV table
-  Int32 hasIUDLog;    // MV -- does this table have a log ?
-  Int32 isMVMetaDataObject;
-  Int32 isSynonymNameTranslationDone;
-  ComSInt32  mvAttributesBitmap;
-
-  Int32 isVolatile;
-  Int32 isInMemoryObjectDefn;
-  Int32 isDroppable;
-  ComInsertMode insertMode;
-
-  Int32 record_length;
-  Int32 colcount;
-  Int32 constr_count;
-  Cardinality rowcount;
-  ComPartitioningScheme partitioningScheme;   // round robin, range, etc
-  ComAccessPathType accessPathType;     //BT, IX, isVP, hasVP, LobTable --needed for binder check
-  ComRowFormat  rowFormat;
-  ULng32 catUID[2];
-  ULng32 schemaUID[2];
-  ULng32 objectUID[2];
-  Lng32 owner;
-  Lng32 schemaOwner;
-  ComObjectType objectType; 
-  void * rcb;
-  ULng32 rcbLen;
-  ULng32 maxRecLen;
-  ULng32 keyLen;
-  void * privInfo;
-  void * secKeySet;
-  ComBoolean isInsertOnly;
-  char * snapshotName;
-  char * default_col_fam;
-  char * all_col_fams;
-  Int64 objectFlags;
-  Int64 tablesFlags;
-  desc_struct *columns_desc;
-  desc_struct *indexes_desc;
-  desc_struct *constrnts_desc;
-  desc_struct *views_desc;
-  desc_struct *constrnts_tables_desc;
-  desc_struct *referenced_tables_desc;
-  desc_struct *referencing_tables_desc;
-  desc_struct *histograms_desc;
-  desc_struct *files_desc;
-  desc_struct *using_mvs_desc;
-// for hbase's region keys
-  desc_struct *hbase_regionkey_desc;
-  desc_struct *sequence_generator_desc;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-// MV 
-struct using_mv_desc_struct {
-  char *mvName;
-  ComMVRefreshType refreshType; // unknown here means "non incremental"
-  Int32  rewriteEnabled;
-  Int32  isInitialized;
-};
-
-struct view_desc_struct {
-  char * viewname;
-  char * viewfilename;    // the physical file, to be Opened for auth-cking.
-  char * viewtext;
-  char * viewchecktext;
-  Int32 updatable;
-  Int32 insertable;
-  CharInfo::CharSet viewtextcharset;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct indexes_desc_struct {
-  char *tablename;  // name of the base table
-  char *ext_indexname; // (ansi) name of index, as specified in CREATE INDEX
-  char *indexname;  // physical name of index. Different from ext_indexname
-                    // for ARK tables.
-  ULng32 redeftime[2];
-  Int64 indexUID;
-  Int32 issystemtablecode;	// ...but too much bother in ReadTableDef.C
-  // Indicates whether it is a vertical partition or an index
-  ComPartitioningScheme partitioningScheme;     // round robin, range, etc.
-  Int32 isVerticalPartition;
-  Int32 isCreatedExplicitly;
-  Int32 isPacked;
-  Int32 isVolatile;
-
-  // this object was only created in mxcmp memory(catman cache, NAtable
-  // cache. It doesn't exist in metadata or physical labels.
-  // Used to test different access plans without actually creating
-  // the object. 
-  Int32 isInMemoryObjectDefn;
-
-  Int32 notAvailable;
-  Lng32 packingScheme;
-  Lng32 packingFactor;
-  Int32 keytag;
-  Int32 unique;
-  Int32 record_length;
-  Int32 colcount;
-  Int32 blocksize;
-  Lng32 numSaltPartns; // number of salted partns created for a seabase table.
-  char * hbaseCreateOptions;
-  desc_struct *files_desc;
-  // Clustering keys columns
-  desc_struct *keys_desc;
-  // Columns that are not part of the clustering key.
-  // Used specially for vertical partition column(s).
-  desc_struct *non_keys_desc;
-  // Partitioning key columns -- used by NonStop SQL/MX to accommodate
-  // independent partitioning and clustering keys
-  desc_struct *partitioning_keys_desc;
-  ComRowFormat rowFormat;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct files_desc_struct {
-  FileOrganizationEnum fileorganization;
-  Int32 audit;
-  Int32 auditcompress;
-  Int32 clearOnPurge;
-  Int32 lockLength;
-  Int32 fileCode; 
-  Int32 buffered;
-  Int32 compressed;
-  Int32 dcompressed;
-  Int32 icompressed;
-  Int32 blockSize;
-  Int32 decoupledPartitionKeyList;
-  desc_struct *partns_desc;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct keys_desc_struct {
-  char *indexname;
-  char *keyname;
-  Int32  keyseqnumber;
-  Int32  tablecolnumber;
-  Int32  basetablecolnumber;  // for indexes, this is the corresponding base
-                            // table colnum. This is needed for the parallel
-                            // label operations.
-  Int32  ordering; // 0 is ascending, -1 is descending
-  char *hbaseColFam;
-  char *hbaseColQual;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct partns_desc_struct
-{
-  char * tablename;
-  Int32 primarypartition;
-  char * partitionname;
-  char * logicalpartitionname;
-  char * firstkey;
-  Lng32 firstkeylen;         //soln:10-031112-1256
-  Lng32 encodedkeylen;
-  char * encodedkey;
-  char * lowKey;
-  char * highKey;
-  Int32    indexlevel;
-  Int32  priExt;
-  Int32  secExt;
-  Int32  maxExt;
-  char * givenname;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct hbase_region_desc_struct
-{
-  Lng32  beginKeyLen;
-  char * beginKey;
-  Lng32  endKeyLen;
-  char * endKey;
-};
-
-struct columns_desc_struct {
-  char *tablename;
-  char *colname;
-  Int32 colnumber;
-  DataType datatype;
-  char * pictureText;
-  Lng32 length;
-  Lng32 scale;
-  Lng32 precision;
-  rec_datetime_field datetimestart, datetimeend;
-  short datetimefractprec, intervalleadingprec;
-  Lng32 offset;
-  short null_flag;
-  short upshift;
-  short caseinsensitive;
-  char colclass; // 'S' -- system generated, 'U' -- user created
-  short addedColumn;
-  Cardinality uec;
-  char *highval;
-  char *lowval;
-  ComColumnDefaultClass defaultClass;
-  char *defaultvalue;
-  char *heading;
-  CharInfo::CharSet   character_set;
-  CharInfo::CharSet   encoding_charset;
-  CharInfo::Collation collation_sequence;
-  short stored_on_disk;
-  char *computed_column_text;
-  char *hbaseColFam;
-  char *hbaseColQual;
-  ULng32 hbaseColFlags;
-  ComParamDirection paramDirection;
-  NABoolean isOptional; 
-  Int64 colFlags;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct constrnts_desc_struct {
-  char *constrntname;
-  char *tablename;
-  ConstraintType type;
-  Int32  colcount;
-  Int32  isEnforced;
-  char *indexname;
-  desc_struct *check_constrnts_desc;
-  desc_struct *constr_key_cols_desc;
-  desc_struct *referenced_constrnts_desc;
-  desc_struct *referencing_constrnts_desc;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct check_constrnts_desc_struct {
-  Int32 seqnumber;
-  char *constrnt_text;
-  CharInfo::CharSet constrnt_textcharset;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct constrnt_key_cols_desc_struct {
-  char *colname;
-  Int32  position;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct ref_constrnts_desc_struct {
-  char *constrntname;
-  char *tablename;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct histogram_desc_struct
-{
-  char *tablename;
-  Int32  tablecolnumber;
-  char *histid;
-  Int32  colposition;
-  Cardinality rowcount;
-  Cardinality uec;
-  char *highval;
-  char *lowval;
-  desc_struct *hist_interval_desc;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct hist_interval_desc_struct
-{
-  char * histid;
-  Int32    intnum;
-  char * intboundary;
-  Cardinality rowcount;
-  Cardinality uec;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-struct sequence_generator_desc_struct {
-  ComSequenceGeneratorType  sgType;
-  ComSInt64                 startValue;
-  ComSInt64                 increment;
-  ComSQLDataType            sqlDataType;
-  ComFSDataType             fsDataType;
-  ComSInt64                 maxValue;
-  ComSInt64                 minValue;
-  ComBoolean                cycleOption;
-  ComSInt64                  cache;
-  ComSInt64                  objectUID;
-  char *                          sgLocation;
-  ComSInt64                 nextValue;
-  ComSInt64                 redefTime;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif  
-};
-
-struct routine_desc_struct {
-  Int64 objectUID;
-  char *routineName;
-  char *externalName;
-  char *librarySqlName;
-  char *libraryFileName;
-  char *signature;
-  ComSInt32 paramsCount;
-  desc_struct *params;
-  ComRoutineLanguage language;
-  ComRoutineType UDRType;
-  ComRoutineSQLAccess sqlAccess;
-  ComRoutineTransactionAttributes transactionAttributes;
-  ComSInt32 maxResults;
-  ComRoutineParamStyle paramStyle;
-  NABoolean isDeterministic;
-  NABoolean isCallOnNull;
-  NABoolean isIsolate;
-  ComRoutineExternalSecurity externalSecurity;
-  ComRoutineExecutionMode executionMode;
-  Int32 stateAreaSize;
-  ComRoutineParallelism parallelism;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-  Int32 owner;
-  Int32 schemaOwner;
-
-};
-
-struct library_desc_struct {
-  char *libraryName;
-  char *libraryFilename;
-  Int32 libraryVersion;
-  ComSInt64 libraryUID;
-  Int32 libraryOwnerID;
-  Int32 librarySchemaOwnerID;
-#ifdef NA_LITTLE_ENDIAN
-  void encode() {}
-#endif
-};
-
-union body_struct {
-  check_constrnts_desc_struct check_constrnts_desc;
-  columns_desc_struct columns_desc;
-  constrnts_desc_struct constrnts_desc;
-  constrnt_key_cols_desc_struct constrnt_key_cols_desc;
-  files_desc_struct files_desc;
-  histogram_desc_struct histogram_desc;
-  hist_interval_desc_struct hist_interval_desc;
-  indexes_desc_struct indexes_desc;
-  keys_desc_struct keys_desc;
-  partns_desc_struct partns_desc;
-  ref_constrnts_desc_struct ref_constrnts_desc;
-  table_desc_struct table_desc;
-  view_desc_struct view_desc;
-  using_mv_desc_struct  using_mv_desc;  // MV 
-  sequence_generator_desc_struct  sequence_generator_desc;  
-  hbase_region_desc_struct hbase_region_desc;
-  routine_desc_struct routine_desc;
-  library_desc_struct library_desc;
-};
-
-struct desc_struct {
-  header_desc_struct header;
-  body_struct body;
-
-  void pack(char *buffer);
-  Lng32 getLength(void);
-};
-
-// Used by assembleDescs() to populate the fields of each new desc_struct.
-// // buf and len describe the new data extracted from the source (usually from JNI)
-// // target is the new desc_struct object to populate with.
-// // h is the heap from which memory allocation can be done.
-typedef void (*populateFuncT)(char* buf, Int32 len, desc_struct* target, NAMemory* h);
-
-// uses HEAP of CmpCommon!
-desc_struct *readtabledef_allocate_desc(desc_nodetype nodetype);
-
-desc_struct *readtabledef_make_column_desc(
-				const char *tablename,
-				const char *colname,
-				Lng32 &colnumber,		// INOUT
-				DataType datatype,
-				Lng32 length,
-				Lng32 &offset,			// INOUT
-				short null_flag = FALSE,
-				NABoolean tablenameMustBeAllocated = FALSE,
-				desc_struct *passedDesc = NULL,
-				SQLCHARSET_CODE datacharset = SQLCHARSETCODE_UNKNOWN // i.e., use CharInfo::DefaultCharSet;
-				);
+obsolete file, should not be included. Will give syntax error if it is.
 
 #endif


Mime
View raw message