trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsharma00 <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #634: JIRA TRAFODION-2137 metadata access p...
Date Tue, 02 Aug 2016 22:36:17 GMT
Github user anoopsharma00 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/634#discussion_r73251153
  
    --- Diff: 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;
    --- End diff --
    
    leftover from previous code. Can change it to Int32  for a later checkin.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message