Github user anoopsharma00 commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1481#discussion_r176166576
--- Diff: core/sql/common/ComSmallDefs.h ---
@@ -609,47 +609,59 @@ enum ComColumnClass { COM_UNKNOWN_CLASS
#define COM_ALTERED_USER_COLUMN_LIT "C "
enum ComColumnDefaultClass { COM_CURRENT_DEFAULT
+ , COM_CURRENT_UT_DEFAULT
--- End diff --
that is a good point. If a new value is being added to an existing enum in
common/ComSmallDefs.h and that value will be stored in metadata, then it cannot
be added in the middle of that enum. It should be added at the end.
Better yet, assign a number to the enums so they dont cause an issue if a
new
value is added in the middle.
Something like:
enum ComColumnDefaultClass { COM_CURRENT_DEFAULT = 0
, COM_NO_DEFAULT = 1
, COM_NULL_DEFAULT = 2
, COM_USER_DEFINED_DEFAULT = 3
, COM_USER_FUNCTION_DEFAULT = 4
, COM_IDENTITY_GENERATED_BY_DEFAULT = 5
, COM_IDENTITY_GENERATED_ALWAYS = 6
, COM_ALWAYS_COMPUTE_COMPUTED_COLUMN_DEFAULT = 7
, COM_ALWAYS_DEFAULT_COMPUTED_COLUMN_DEFAULT = 8
};
---