http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NAColumn.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NAColumn.cpp b/core/sql/optimizer/NAColumn.cpp
index 9a726a8..812c951 100644
--- a/core/sql/optimizer/NAColumn.cpp
+++ b/core/sql/optimizer/NAColumn.cpp
@@ -39,6 +39,7 @@
 #include "NATable.h"
 #include "Sqlcomp.h"
 #include "ex_error.h"
+#include "TrafDDLdesc.h"
 
 // -----------------------------------------------------------------------
 // Can't be inline because then circular #include-dependencies
@@ -154,17 +155,16 @@ const QualifiedName& NAColumn::getNotNullConstraintName() 
const
 
 // warning elimination (removed "inline")
 static NAString makeTableName(const NATable *table,
-                             const columns_desc_struct *column_desc)
+                             const TrafColumnsDesc *column_desc)
 {
   return NAString(
-             table ?
-               table->getTableName().getQualifiedNameAsAnsiString().data() :
-             column_desc->tablename ?
-               column_desc->tablename : "");
+       table ?
+       table->getTableName().getQualifiedNameAsAnsiString().data() : "");
 }
+
 // warning elimination (removed "inline")
 static NAString makeColumnName(const NATable *table,
-                              const columns_desc_struct *column_desc)
+                              const TrafColumnsDesc *column_desc)
 {
   NAString nam(makeTableName(table, column_desc));
   if (!nam.isNull()) nam += ".";
@@ -173,9 +173,9 @@ static NAString makeColumnName(const NATable *table,
 }
 
 // -----------------------------------------------------------------------
-// Method for creating NAType from desc_struct.
+// Method for creating NAType from TrafDesc.
 // -----------------------------------------------------------------------
-NABoolean NAColumn::createNAType(columns_desc_struct *column_desc      /*IN*/,
+NABoolean NAColumn::createNAType(TrafColumnsDesc *column_desc  /*IN*/,
                                 const NATable *table           /*IN*/,
                                 NAType *&type                  /*OUT*/,
                                 NAMemory *heap                 /*IN*/,
@@ -187,7 +187,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
   //
   #define REC_INTERVAL REC_MIN_INTERVAL
 
-  DataType datatype = column_desc->datatype;
+  Int16 datatype = column_desc->datatype;
   if (REC_MIN_INTERVAL <= datatype && datatype <= REC_MAX_INTERVAL)
     datatype = REC_INTERVAL;
 
@@ -195,7 +195,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
 
   if ( DFS2REC::isAnyCharacter(column_desc->datatype) )
   {
-     if ( CharInfo::isCharSetSupported(column_desc->character_set) == FALSE ) {
+     if ( CharInfo::isCharSetSupported(column_desc->characterSet()) == FALSE ) 
{
        if (!errorCode)
        {
          *CmpCommon::diags() << DgSqlCode(-4082)
@@ -208,7 +208,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
        return TRUE; // error
      }
 
-     if ( CharInfo::is_NCHAR_MP(column_desc->character_set) )
+     if ( CharInfo::is_NCHAR_MP(column_desc->characterSet()) )
         charCount /= SQL_DBCHAR_SIZE;
   }
 
@@ -217,7 +217,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
 
     case REC_BPINT_UNSIGNED :
       type = new (heap)
-      SQLBPInt(column_desc->precision, column_desc->null_flag, FALSE, heap);
+      SQLBPInt(column_desc->precision, column_desc->isNullable(), FALSE, heap);
       break;
 
     case REC_BIN8_SIGNED:
@@ -227,13 +227,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   TRUE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLTiny(TRUE,
-                column_desc->null_flag,
+                column_desc->isNullable(),
                  heap
                 );
       break;
@@ -244,13 +244,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   FALSE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLTiny(FALSE,
-                column_desc->null_flag,
+                column_desc->isNullable(),
                  heap
                 );
       break;
@@ -262,13 +262,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   TRUE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLSmall(TRUE,
-                column_desc->null_flag,
+                column_desc->isNullable(),
                  heap
                 );
       break;
@@ -279,13 +279,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   FALSE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLSmall(FALSE,
-                column_desc->null_flag,
+                column_desc->isNullable(),
                  heap
                 );
       break;
@@ -297,13 +297,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   TRUE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLInt(TRUE,
-              column_desc->null_flag,
+              column_desc->isNullable(),
                heap
               );
       break;
@@ -314,13 +314,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   FALSE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLInt(FALSE,
-              column_desc->null_flag,
+              column_desc->isNullable(),
                heap
               );
       break;
@@ -331,13 +331,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   TRUE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
        SQLLargeInt(TRUE,
-                   column_desc->null_flag,
+                   column_desc->isNullable(),
                     heap
                    );
       break;
@@ -348,13 +348,13 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                   column_desc->precision,
                   column_desc->scale,
                   FALSE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       else
        type = new (heap)
         SQLLargeInt(FALSE,
-                   column_desc->null_flag,
+                   column_desc->isNullable(),
                     heap
                    );
       break;
@@ -363,7 +363,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
        SQLDecimal(column_desc->length,
                   column_desc->scale,
                   FALSE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       break;
@@ -372,7 +372,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
        SQLDecimal(column_desc->length,
                   column_desc->scale,
                   TRUE,
-                  column_desc->null_flag,
+                  column_desc->isNullable(),
                    heap
                   );
       break;
@@ -382,7 +382,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
                  column_desc->scale,
                  TRUE, // is a real bignum
                  FALSE,
-                 column_desc->null_flag,
+                 column_desc->isNullable(),
                  heap
                  );
       break;
@@ -392,65 +392,65 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
                  column_desc->scale,
                  TRUE, // is a real bignum
                  TRUE,
-                 column_desc->null_flag,
+                 column_desc->isNullable(),
                  heap
                  );
       break;
 
     case REC_FLOAT32:
       type = new (heap)
-       SQLReal(column_desc->null_flag, heap, column_desc->precision);
+       SQLReal(column_desc->isNullable(), heap, column_desc->precision);
       break;
 
     case REC_FLOAT64:
       type = new (heap)
-       SQLDoublePrecision(column_desc->null_flag, heap, 
column_desc->precision);
+       SQLDoublePrecision(column_desc->isNullable(), heap, 
column_desc->precision);
       break;
 
     case REC_BYTE_F_DOUBLE:
       charCount /= SQL_DBCHAR_SIZE;        // divide the storage length by 2
       type = new (heap)
        SQLChar(charCount,
-               column_desc->null_flag,
-               column_desc->upshift,
-               column_desc->caseinsensitive,
+               column_desc->isNullable(),
+               column_desc->isUpshifted(),
+               column_desc->isCaseInsensitive(),
                FALSE,
-               column_desc->character_set,
-               column_desc->collation_sequence,
+               column_desc->characterSet(),
+               column_desc->collationSequence(),
                CharInfo::IMPLICIT
                );
       break;
 
     case REC_BYTE_F_ASCII:
-      if (column_desc->character_set == CharInfo::UTF8 ||
-          (column_desc->character_set == CharInfo::SJIS &&
-           column_desc->encoding_charset == CharInfo::SJIS))
+      if (column_desc->characterSet() == CharInfo::UTF8 ||
+          (column_desc->characterSet() == CharInfo::SJIS &&
+           column_desc->encodingCharset() == CharInfo::SJIS))
       {
-        Lng32 maxBytesPerChar = 
CharInfo::maxBytesPerChar(column_desc->character_set);
+        Lng32 maxBytesPerChar = 
CharInfo::maxBytesPerChar(column_desc->characterSet());
         Lng32 sizeInChars = charCount ;  // Applies when CharLenUnit == BYTES
         if ( column_desc->precision > 0 )
            sizeInChars = column_desc->precision;
         type = new (heap)
        SQLChar(CharLenInfo(sizeInChars, charCount/*in_bytes*/),
-               column_desc->null_flag,
-               column_desc->upshift,
-               column_desc->caseinsensitive,
+               column_desc->isNullable(),
+               column_desc->isUpshifted(),
+               column_desc->isCaseInsensitive(),
                FALSE, // varLenFlag
-               column_desc->character_set,
-               column_desc->collation_sequence,
+               column_desc->characterSet(),
+               column_desc->collationSequence(),
                CharInfo::IMPLICIT, // Coercibility
-               column_desc->encoding_charset
+               column_desc->encodingCharset()
                );
       }
       else // keep the old behavior
       type = new (heap)
        SQLChar(charCount,
-               column_desc->null_flag,
-               column_desc->upshift,
-               column_desc->caseinsensitive,
+               column_desc->isNullable(),
+               column_desc->isUpshifted(),
+               column_desc->isCaseInsensitive(),
                FALSE,
-               column_desc->character_set,
-               column_desc->collation_sequence,
+               column_desc->characterSet(),
+               column_desc->collationSequence(),
                CharInfo::IMPLICIT
                );
       break;
@@ -459,32 +459,32 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
       charCount /= SQL_DBCHAR_SIZE;        // divide the storage length by 2
       // fall thru
     case REC_BYTE_V_ASCII:
-      if (column_desc->character_set == CharInfo::SJIS ||
-          column_desc->character_set == CharInfo::UTF8)
+      if (column_desc->characterSet() == CharInfo::SJIS ||
+          column_desc->characterSet() == CharInfo::UTF8)
       {
-        Lng32 maxBytesPerChar = 
CharInfo::maxBytesPerChar(column_desc->character_set);
+        Lng32 maxBytesPerChar = 
CharInfo::maxBytesPerChar(column_desc->characterSet());
         Lng32 sizeInChars = charCount ;  // Applies when CharLenUnit == BYTES
         if ( column_desc->precision > 0 )
            sizeInChars = column_desc->precision;
         type = new (heap)
        SQLVarChar(CharLenInfo(sizeInChars, charCount/*in_bytes*/),
-                  column_desc->null_flag,
-                  column_desc->upshift,
-                  column_desc->caseinsensitive,
-                  column_desc->character_set,
-                  column_desc->collation_sequence,
+                  column_desc->isNullable(),
+                  column_desc->isUpshifted(),
+                  column_desc->isCaseInsensitive(),
+                  column_desc->characterSet(),
+                  column_desc->collationSequence(),
                   CharInfo::IMPLICIT, // Coercibility
-                  column_desc->encoding_charset
+                  column_desc->encodingCharset()
                   );
       }
       else // keep the old behavior
       type = new (heap)
        SQLVarChar(charCount,
-                  column_desc->null_flag,
-                  column_desc->upshift,
-                  column_desc->caseinsensitive,
-                  column_desc->character_set,
-                  column_desc->collation_sequence,
+                  column_desc->isNullable(),
+                  column_desc->isUpshifted(),
+                  column_desc->isCaseInsensitive(),
+                  column_desc->characterSet(),
+                  column_desc->collationSequence(),
                   CharInfo::IMPLICIT
                   );
       break;
@@ -493,47 +493,47 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
       type = new (heap)
        SQLLongVarChar(charCount,
                       FALSE,
-                      column_desc->null_flag,
-                      column_desc->upshift,
-                      column_desc->caseinsensitive,
-                      column_desc->character_set,
-                      column_desc->collation_sequence,
+                      column_desc->isNullable(),
+                      column_desc->isUpshifted(),
+                      column_desc->isCaseInsensitive(),
+                      column_desc->characterSet(),
+                      column_desc->collationSequence(),
                       CharInfo::IMPLICIT
                      );
       break;
     case REC_DATETIME:
       type = DatetimeType::constructSubtype(
-                                           column_desc->null_flag,
-                                           column_desc->datetimestart,
-                                           column_desc->datetimeend,
+                                           column_desc->isNullable(),
+                                           column_desc->datetimeStart(),
+                                           column_desc->datetimeEnd(),
                                            column_desc->datetimefractprec,
                                            heap
                                            );
       CMPASSERT(type);
       if (!type->isSupportedType())
        {
-         column_desc->defaultClass = COM_NO_DEFAULT;           // can't set a 
default for these, either.
+          column_desc->setDefaultClass(COM_NO_DEFAULT);           // can't set 
a default for these, either.
          // 4030 Column is an unsupported combination of datetime fields
-     if (!errorCode)
-     {
-         *CmpCommon::diags() << DgSqlCode(4030)
-           << DgColumnName(makeColumnName(table, column_desc))
-           << DgInt0(column_desc->datetimestart)
-           << DgInt1(column_desc->datetimeend)
-           << DgInt2(column_desc->datetimefractprec);
-     }
-     else
-     {
-       *errorCode = 4030;
-     }
+          if (!errorCode)
+            {
+              *CmpCommon::diags() << DgSqlCode(4030)
+                                  << DgColumnName(makeColumnName(table, 
column_desc))
+                                  << DgInt0(column_desc->datetimeStart())
+                                  << DgInt1(column_desc->datetimeEnd())
+                                  << DgInt2(column_desc->datetimefractprec);
+            }
+          else
+            {
+              *errorCode = 4030;
+            }
        }
       break;
     case REC_INTERVAL:
       type = new (heap)
-         SQLInterval(column_desc->null_flag,
-                   column_desc->datetimestart,
+         SQLInterval(column_desc->isNullable(),
+                   column_desc->datetimeStart(),
                    column_desc->intervalleadingprec,
-                   column_desc->datetimeend,
+                   column_desc->datetimeEnd(),
                    column_desc->datetimefractprec,
                     heap
                    );
@@ -542,7 +542,7 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc   /*IN*/,
          return TRUE;                                            // error
       if (!type->isSupportedType())
       {
-        column_desc->defaultClass = COM_NO_DEFAULT;           // can't set a 
default for these, either.
+        column_desc->setDefaultClass(COM_NO_DEFAULT);           // can't set a 
default for these, either.
         if (!errorCode)
           *CmpCommon::diags() << DgSqlCode(3044) << 
DgString0(column_desc->colname);
         else
@@ -553,17 +553,17 @@ NABoolean NAColumn::createNAType(columns_desc_struct 
*column_desc /*IN*/,
     case REC_BLOB :
       type = new (heap)
        SQLBlob(column_desc->precision, Lob_Invalid_Storage,
-               column_desc->null_flag);
+               column_desc->isNullable());
       break;
 
     case REC_CLOB :
       type = new (heap)
        SQLClob(column_desc->precision, Lob_Invalid_Storage,
-               column_desc->null_flag);
+               column_desc->isNullable());
       break;
 
     case REC_BOOLEAN :
-      type = new (heap) SQLBooleanNative(column_desc->null_flag);
+      type = new (heap) SQLBooleanNative(column_desc->isNullable());
       break;
 
     default:

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NAColumn.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NAColumn.h b/core/sql/optimizer/NAColumn.h
index 2c13c57..4c3d928 100644
--- a/core/sql/optimizer/NAColumn.h
+++ b/core/sql/optimizer/NAColumn.h
@@ -54,7 +54,7 @@ class CheckConstraint;
 class DomainDesc;
 class NATable;
 class NAType;
-struct columns_desc_struct;
+class TrafColumnsDesc;
 
 enum ColumnClass  { SYSTEM_COLUMN, USER_COLUMN, USER_AND_SYSTEM_COLUMNS };
 enum SortOrdering { NOT_ORDERED = 0, ASCENDING = +1, DESCENDING = -1 };
@@ -328,7 +328,7 @@ public:
   inline void setMvSystemAddedColumn() { mvSystemAddedColumn_ = TRUE; }
   inline NABoolean isMvSystemAddedColumn() const { return 
mvSystemAddedColumn_; }
 
-  static NABoolean createNAType(columns_desc_struct *column_desc       /*IN*/,
+  static NABoolean createNAType(TrafColumnsDesc *column_desc   /*IN*/,
                                const NATable *table            /*IN*/,
                                NAType *&type                   /*OUT*/,
                                NAMemory *heap                  /*IN*/,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NAFileSet.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NAFileSet.cpp b/core/sql/optimizer/NAFileSet.cpp
index ea6b840..3f2b699 100644
--- a/core/sql/optimizer/NAFileSet.cpp
+++ b/core/sql/optimizer/NAFileSet.cpp
@@ -76,7 +76,7 @@ NAFileSet::NAFileSet(const QualifiedName & fileSetName,
                     NABoolean isVolatile,
                     NABoolean inMemObjectDefn,
                      Int64 indexUID,
-                     desc_struct *keysDesc,
+                     TrafDesc *keysDesc,
                      HHDFSTableStats *hHDFSTableStats,
                      Lng32 numSaltPartns,
                      NAList<HbaseCreateOption*>* hbaseCreateOptions,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NAFileSet.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NAFileSet.h b/core/sql/optimizer/NAFileSet.h
index ea4414e..92b1c3c 100644
--- a/core/sql/optimizer/NAFileSet.h
+++ b/core/sql/optimizer/NAFileSet.h
@@ -53,7 +53,7 @@ class NAFileSetList;
 // Forward declarations
 // -----------------------------------------------------------------------
 class PartitioningFunction;
-struct desc_struct;
+class TrafDesc;
 class HHDFSTableStats;
 class HbaseCreateOption;
 
@@ -117,7 +117,7 @@ public:
            NABoolean isVolatile,
            NABoolean inMemObjectDefn,
             Int64 indexUID,
-            desc_struct *keysDesc,
+            TrafDesc *keysDesc,
             HHDFSTableStats *hHDFSTableStats,
             Lng32 numSaltPartns,
             NAList<HbaseCreateOption*>* hbaseCreateOptions,
@@ -153,8 +153,8 @@ public:
   const NAColumnArray & getIndexKeyColumns() const
                                               { return indexKeyColumns_; }
 
-  const desc_struct * getKeysDesc() const { return keysDesc_; }
-  desc_struct * getKeysDesc() { return keysDesc_; }
+  const TrafDesc * getKeysDesc() const { return keysDesc_; }
+  TrafDesc * getKeysDesc() { return keysDesc_; }
 
   Lng32 getCountOfFiles() const                  { return countOfFiles_; }
 
@@ -391,7 +391,7 @@ private:
   // uid for index
   Int64 indexUID_;
 
-  desc_struct *keysDesc_;  // needed for parallel label operations.
+  TrafDesc *keysDesc_;  // needed for parallel label operations.
 
   // ---------------------------------------------------------------------
   // Horizontal partitioning:

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NARoutine.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NARoutine.cpp b/core/sql/optimizer/NARoutine.cpp
index bc8c504..e3d8571 100644
--- a/core/sql/optimizer/NARoutine.cpp
+++ b/core/sql/optimizer/NARoutine.cpp
@@ -32,7 +32,7 @@
 **************************************************************************
 */
 #include "BaseTypes.h"
-#include "desc.h"
+#include "TrafDDLdesc.h"
 #include "BindWA.h"
 #include "NAType.h"
 #include "NumericType.h"
@@ -343,29 +343,29 @@ NARoutine::NARoutine (const NARoutine &old, CollHeap *h)
 }
 
 NARoutine::NARoutine(const QualifiedName   &name,
-           const desc_struct    *routine_desc,
+           const TrafDesc    *routine_desc,
            BindWA                *bindWA,
            Int32                 &errorOccurred,
            NAMemory              *heap)
     : name_                   (name, heap)
     , hashKey_                (name, heap) 
-    , language_               (routine_desc->body.routine_desc.language)
-    , UDRType_                (routine_desc->body.routine_desc.UDRType)
-    , sqlAccess_              (routine_desc->body.routine_desc.sqlAccess)
-    , transactionAttributes_  
(routine_desc->body.routine_desc.transactionAttributes)
-    , maxResults_             (routine_desc->body.routine_desc.maxResults)
-    , stateAreaSize_          (routine_desc->body.routine_desc.stateAreaSize)
+    , language_               (routine_desc->routineDesc()->language)
+    , UDRType_                (routine_desc->routineDesc()->UDRType)
+    , sqlAccess_              (routine_desc->routineDesc()->sqlAccess)
+    , transactionAttributes_  
(routine_desc->routineDesc()->transactionAttributes)
+    , maxResults_             (routine_desc->routineDesc()->maxResults)
+    , stateAreaSize_          (routine_desc->routineDesc()->stateAreaSize)
     , externalFile_           ("", heap)
-    , externalPath_           
(routine_desc->body.routine_desc.libraryFileName, heap)
+    , externalPath_           (routine_desc->routineDesc()->libraryFileName, 
heap)
     , externalName_           ("", heap)
-    , librarySqlName_         (routine_desc->body.routine_desc.librarySqlName, 
COM_UNKNOWN_NAME, FALSE, heap) //TODO
-    , signature_              (routine_desc->body.routine_desc.signature, heap)
-    , paramStyle_             (routine_desc->body.routine_desc.paramStyle)
+    , librarySqlName_         (routine_desc->routineDesc()->librarySqlName, 
COM_UNKNOWN_NAME, FALSE, heap) //TODO
+    , signature_              (routine_desc->routineDesc()->signature, heap)
+    , paramStyle_             (routine_desc->routineDesc()->paramStyle)
     , paramStyleVersion_      (COM_ROUTINE_PARAM_STYLE_VERSION_1)
-    , isDeterministic_        (routine_desc->body.routine_desc.isDeterministic)
-    , isCallOnNull_           (routine_desc->body.routine_desc.isCallOnNull )
-    , isIsolate_              (routine_desc->body.routine_desc.isIsolate)
-    , externalSecurity_       
(routine_desc->body.routine_desc.externalSecurity)
+    , isDeterministic_        (routine_desc->routineDesc()->isDeterministic)
+    , isCallOnNull_           (routine_desc->routineDesc()->isCallOnNull )
+    , isIsolate_              (routine_desc->routineDesc()->isIsolate)
+    , externalSecurity_       (routine_desc->routineDesc()->externalSecurity)
     , isExtraCall_            (FALSE) //TODO
     , hasOutParams_           (FALSE)
     , redefTime_              (0)  //TODO
@@ -379,33 +379,33 @@ NARoutine::NARoutine(const QualifiedName   &name,
     , isUniversal_            (0) // TODO
     , actionPosition_         (0) // TODO
     , executionMode_          (COM_ROUTINE_SAFE_EXECUTION)
-    , objectUID_              (routine_desc->body.routine_desc.objectUID)
-    , dllName_                
(routine_desc->body.routine_desc.libraryFileName, heap)
-    , dllEntryPoint_          (routine_desc->body.routine_desc.externalName, 
heap)
+    , objectUID_              (routine_desc->routineDesc()->objectUID)
+    , dllName_                (routine_desc->routineDesc()->libraryFileName, 
heap)
+    , dllEntryPoint_          (routine_desc->routineDesc()->externalName, heap)
     , sasFormatWidth_         ("", heap) //TODO
     , systemName_             ("", heap) // TODO
     , dataSource_             ("", heap) // TODO
     , fileSuffix_             ("", heap) // TODO
     , schemaVersionOfRoutine_ ((COM_VERSION)0) // TODO
-    , objectOwner_            (routine_desc->body.routine_desc.owner)
-    , schemaOwner_            (routine_desc->body.routine_desc.schemaOwner)
+    , objectOwner_            (routine_desc->routineDesc()->owner)
+    , schemaOwner_            (routine_desc->routineDesc()->schemaOwner)
     , privInfo_               (NULL)
     , heap_(heap)
 {
   char parallelism[5];
-  CmGetComRoutineParallelismAsLit(routine_desc->body.routine_desc.parallelism, 
parallelism);
+  CmGetComRoutineParallelismAsLit(routine_desc->routineDesc()->parallelism, 
parallelism);
   comRoutineParallelism_ = ((char *)parallelism);
 
   if (paramStyle_ == COM_STYLE_JAVA_CALL)
   {
-    NAString extName(routine_desc->body.routine_desc.externalName);
+    NAString extName(routine_desc->routineDesc()->externalName);
     size_t pos=extName.last('.');
     externalName_ = extName(pos+1, (extName.length()-pos-1)); // method_name
     externalFile_ = extName.remove (pos); // package_name.class_name 
   }
   else
   {
-    externalName_ = routine_desc->body.routine_desc.externalName;
+    externalName_ = routine_desc->routineDesc()->externalName;
     if (language_ == COM_LANGUAGE_C ||
         language_ == COM_LANGUAGE_CPP)
       {
@@ -434,7 +434,7 @@ NARoutine::NARoutine(const QualifiedName   &name,
       } // if (len > 0)
   }
 
-  ComSInt32 colCount = routine_desc->body.routine_desc.paramsCount;
+  ComSInt32 colCount = routine_desc->routineDesc()->paramsCount;
   NAColumn *newCol = NULL;
   NAType   *newColType = NULL;
   extRoutineName_ = new (heap) ExtendedQualName( name_, heap );
@@ -475,16 +475,16 @@ NARoutine::NARoutine(const QualifiedName   &name,
   normalRowCost_.setIOTime( normIOCost < 0 ? csMinusOne  : normalIOCost);
   normalRowCost_.setMSGTime( normMsgCost < 0 ? csMinusOne  : normalMsgCost);
 
-  const desc_struct *params_desc_list  = 
routine_desc->body.routine_desc.params;
-  const columns_desc_struct *param_desc;
+  TrafDesc *params_desc_list  = routine_desc->routineDesc()->params;
+  TrafColumnsDesc *param_desc;
 
   int i = 0;
   while (params_desc_list)
   {
-    param_desc = &params_desc_list->body.columns_desc;
+    param_desc = params_desc_list->columnsDesc();
 
     // Create the new NAType.
-    if (NAColumn::createNAType((columns_desc_struct *)param_desc, (const 
NATable *)NULL, newColType, heap_))
+    if (NAColumn::createNAType(param_desc->columnsDesc(), (const NATable 
*)NULL, newColType, heap_))
       {
       errorOccurred = TRUE;
       return;
@@ -494,7 +494,7 @@ NARoutine::NARoutine(const QualifiedName   &name,
       memset(param_desc->colname, 0, 2);
     }
 
-    ComParamDirection colDirection = param_desc->paramDirection;
+    ComParamDirection colDirection = param_desc->paramDirection();
     
     // Create the new NAColumn and insert it into the NAColumnArray
     newCol = new (heap) NAColumn(
@@ -507,10 +507,10 @@ NARoutine::NARoutine(const QualifiedName   &name,
          , COM_NO_DEFAULT
          , NULL   // default value
          , UDRCopyString("", heap) // TODO:heading can it have some value
-         , param_desc->upshift
+         , param_desc->isUpshifted()
          , FALSE // addedColumn
          , (ComColumnDirection) colDirection
-         , param_desc->isOptional
+         , param_desc->isOptional()
          , (char *) COM_NORMAL_PARAM_TYPE_LIT
                                 );
        
@@ -566,7 +566,7 @@ NARoutine::NARoutine(const QualifiedName   &name,
 
     direction[i] = (ComColumnDirection) colDirection;
     
-    params_desc_list = params_desc_list->header.next;
+    params_desc_list = params_desc_list->next;
     i++;
   } // for
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/19c96b1e/core/sql/optimizer/NARoutine.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/NARoutine.h b/core/sql/optimizer/NARoutine.h
index d725c0d..395955c 100644
--- a/core/sql/optimizer/NARoutine.h
+++ b/core/sql/optimizer/NARoutine.h
@@ -100,7 +100,7 @@ public:
   // How to set up the NARoutineDB and delete the NARoutineDB entry at the
   // end of the statement, use contextHeap()
   NARoutine(const QualifiedName   &name,
-            const desc_struct    *desc_struct,
+            const TrafDesc    *TrafDesc,
             BindWA                *bindWA,
             Int32                   &errorOccurred,
             NAMemory              *heap = CmpCommon::contextHeap());

Reply via email to