diff --git a/packages/thrift-layer/lib/heavy_types.js b/packages/thrift-layer/lib/heavy_types.js index 2f4054b..60bf72b 100644 --- a/packages/thrift-layer/lib/heavy_types.js +++ b/packages/thrift-layer/lib/heavy_types.js @@ -368,6 +368,7 @@ TColumnType = function(args) { this.is_physical = null; this.col_id = null; this.default_value = null; + this.comment = null; if (args) { if (args.col_name !== undefined && args.col_name !== null) { this.col_name = args.col_name; @@ -393,6 +394,9 @@ TColumnType = function(args) { if (args.default_value !== undefined && args.default_value !== null) { this.default_value = args.default_value; } + if (args.comment !== undefined && args.comment !== null) { + this.comment = args.comment; + } } }; TColumnType.prototype = {}; @@ -466,6 +470,13 @@ TColumnType.prototype.read = function(input) { input.skip(ftype); } break; + case 9: + if (ftype == Thrift.Type.STRING) { + this.comment = input.readString().value; + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -517,6 +528,11 @@ TColumnType.prototype.write = function(output) { output.writeString(this.default_value); output.writeFieldEnd(); } + if (this.comment !== null && this.comment !== undefined) { + output.writeFieldBegin('comment', Thrift.Type.STRING, 9); + output.writeString(this.comment); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; @@ -4433,6 +4449,7 @@ TTableDetails = function(args) { this.table_type = null; this.refresh_info = null; this.sharded_column_name = null; + this.comment = null; if (args) { if (args.row_desc !== undefined && args.row_desc !== null) { this.row_desc = Thrift.copyList(args.row_desc, [TColumnType]); @@ -4470,6 +4487,9 @@ TTableDetails = function(args) { if (args.sharded_column_name !== undefined && args.sharded_column_name !== null) { this.sharded_column_name = args.sharded_column_name; } + if (args.comment !== undefined && args.comment !== null) { + this.comment = args.comment; + } } }; TTableDetails.prototype = {}; @@ -4585,6 +4605,13 @@ TTableDetails.prototype.read = function(input) { input.skip(ftype); } break; + case 13: + if (ftype == Thrift.Type.STRING) { + this.comment = input.readString().value; + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -4665,6 +4692,11 @@ TTableDetails.prototype.write = function(output) { output.writeString(this.sharded_column_name); output.writeFieldEnd(); } + if (this.comment !== null && this.comment !== undefined) { + output.writeFieldBegin('comment', Thrift.Type.STRING, 13); + output.writeString(this.comment); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return;