UNPKG

@databricks/sql

Version:

Driver for connection to Databricks SQL via Thrift API.

1,802 lines (1,757 loc) 274 kB
// // Autogenerated by Thrift Compiler (0.19.0) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // "use strict"; var thrift = require('thrift'); var Thrift = thrift.Thrift; var Q = thrift.Q; var Int64 = require('node-int64'); var ttypes = module.exports = {}; ttypes.TProtocolVersion = { '-7' : '__HIVE_JDBC_WORKAROUND', '__HIVE_JDBC_WORKAROUND' : -7, '65281' : '__TEST_PROTOCOL_VERSION', '__TEST_PROTOCOL_VERSION' : 65281, '0' : 'HIVE_CLI_SERVICE_PROTOCOL_V1', 'HIVE_CLI_SERVICE_PROTOCOL_V1' : 0, '1' : 'HIVE_CLI_SERVICE_PROTOCOL_V2', 'HIVE_CLI_SERVICE_PROTOCOL_V2' : 1, '2' : 'HIVE_CLI_SERVICE_PROTOCOL_V3', 'HIVE_CLI_SERVICE_PROTOCOL_V3' : 2, '3' : 'HIVE_CLI_SERVICE_PROTOCOL_V4', 'HIVE_CLI_SERVICE_PROTOCOL_V4' : 3, '4' : 'HIVE_CLI_SERVICE_PROTOCOL_V5', 'HIVE_CLI_SERVICE_PROTOCOL_V5' : 4, '5' : 'HIVE_CLI_SERVICE_PROTOCOL_V6', 'HIVE_CLI_SERVICE_PROTOCOL_V6' : 5, '6' : 'HIVE_CLI_SERVICE_PROTOCOL_V7', 'HIVE_CLI_SERVICE_PROTOCOL_V7' : 6, '7' : 'HIVE_CLI_SERVICE_PROTOCOL_V8', 'HIVE_CLI_SERVICE_PROTOCOL_V8' : 7, '8' : 'HIVE_CLI_SERVICE_PROTOCOL_V9', 'HIVE_CLI_SERVICE_PROTOCOL_V9' : 8, '9' : 'HIVE_CLI_SERVICE_PROTOCOL_V10', 'HIVE_CLI_SERVICE_PROTOCOL_V10' : 9, '42241' : 'SPARK_CLI_SERVICE_PROTOCOL_V1', 'SPARK_CLI_SERVICE_PROTOCOL_V1' : 42241, '42242' : 'SPARK_CLI_SERVICE_PROTOCOL_V2', 'SPARK_CLI_SERVICE_PROTOCOL_V2' : 42242, '42243' : 'SPARK_CLI_SERVICE_PROTOCOL_V3', 'SPARK_CLI_SERVICE_PROTOCOL_V3' : 42243, '42244' : 'SPARK_CLI_SERVICE_PROTOCOL_V4', 'SPARK_CLI_SERVICE_PROTOCOL_V4' : 42244, '42245' : 'SPARK_CLI_SERVICE_PROTOCOL_V5', 'SPARK_CLI_SERVICE_PROTOCOL_V5' : 42245, '42246' : 'SPARK_CLI_SERVICE_PROTOCOL_V6', 'SPARK_CLI_SERVICE_PROTOCOL_V6' : 42246, '42247' : 'SPARK_CLI_SERVICE_PROTOCOL_V7', 'SPARK_CLI_SERVICE_PROTOCOL_V7' : 42247, '42248' : 'SPARK_CLI_SERVICE_PROTOCOL_V8', 'SPARK_CLI_SERVICE_PROTOCOL_V8' : 42248, '42249' : 'SPARK_CLI_SERVICE_PROTOCOL_V9', 'SPARK_CLI_SERVICE_PROTOCOL_V9' : 42249 }; ttypes.TTypeId = { '0' : 'BOOLEAN_TYPE', 'BOOLEAN_TYPE' : 0, '1' : 'TINYINT_TYPE', 'TINYINT_TYPE' : 1, '2' : 'SMALLINT_TYPE', 'SMALLINT_TYPE' : 2, '3' : 'INT_TYPE', 'INT_TYPE' : 3, '4' : 'BIGINT_TYPE', 'BIGINT_TYPE' : 4, '5' : 'FLOAT_TYPE', 'FLOAT_TYPE' : 5, '6' : 'DOUBLE_TYPE', 'DOUBLE_TYPE' : 6, '7' : 'STRING_TYPE', 'STRING_TYPE' : 7, '8' : 'TIMESTAMP_TYPE', 'TIMESTAMP_TYPE' : 8, '9' : 'BINARY_TYPE', 'BINARY_TYPE' : 9, '10' : 'ARRAY_TYPE', 'ARRAY_TYPE' : 10, '11' : 'MAP_TYPE', 'MAP_TYPE' : 11, '12' : 'STRUCT_TYPE', 'STRUCT_TYPE' : 12, '13' : 'UNION_TYPE', 'UNION_TYPE' : 13, '14' : 'USER_DEFINED_TYPE', 'USER_DEFINED_TYPE' : 14, '15' : 'DECIMAL_TYPE', 'DECIMAL_TYPE' : 15, '16' : 'NULL_TYPE', 'NULL_TYPE' : 16, '17' : 'DATE_TYPE', 'DATE_TYPE' : 17, '18' : 'VARCHAR_TYPE', 'VARCHAR_TYPE' : 18, '19' : 'CHAR_TYPE', 'CHAR_TYPE' : 19, '20' : 'INTERVAL_YEAR_MONTH_TYPE', 'INTERVAL_YEAR_MONTH_TYPE' : 20, '21' : 'INTERVAL_DAY_TIME_TYPE', 'INTERVAL_DAY_TIME_TYPE' : 21 }; ttypes.TSparkRowSetType = { '0' : 'ARROW_BASED_SET', 'ARROW_BASED_SET' : 0, '1' : 'COLUMN_BASED_SET', 'COLUMN_BASED_SET' : 1, '2' : 'ROW_BASED_SET', 'ROW_BASED_SET' : 2, '3' : 'URL_BASED_SET', 'URL_BASED_SET' : 3 }; ttypes.TDBSqlCompressionCodec = { '0' : 'NONE', 'NONE' : 0, '1' : 'LZ4_FRAME', 'LZ4_FRAME' : 1, '2' : 'LZ4_BLOCK', 'LZ4_BLOCK' : 2 }; ttypes.TDBSqlArrowLayout = { '0' : 'ARROW_BATCH', 'ARROW_BATCH' : 0, '1' : 'ARROW_STREAMING', 'ARROW_STREAMING' : 1 }; ttypes.TStatusCode = { '0' : 'SUCCESS_STATUS', 'SUCCESS_STATUS' : 0, '1' : 'SUCCESS_WITH_INFO_STATUS', 'SUCCESS_WITH_INFO_STATUS' : 1, '2' : 'STILL_EXECUTING_STATUS', 'STILL_EXECUTING_STATUS' : 2, '3' : 'ERROR_STATUS', 'ERROR_STATUS' : 3, '4' : 'INVALID_HANDLE_STATUS', 'INVALID_HANDLE_STATUS' : 4 }; ttypes.TOperationState = { '0' : 'INITIALIZED_STATE', 'INITIALIZED_STATE' : 0, '1' : 'RUNNING_STATE', 'RUNNING_STATE' : 1, '2' : 'FINISHED_STATE', 'FINISHED_STATE' : 2, '3' : 'CANCELED_STATE', 'CANCELED_STATE' : 3, '4' : 'CLOSED_STATE', 'CLOSED_STATE' : 4, '5' : 'ERROR_STATE', 'ERROR_STATE' : 5, '6' : 'UKNOWN_STATE', 'UKNOWN_STATE' : 6, '7' : 'PENDING_STATE', 'PENDING_STATE' : 7, '8' : 'TIMEDOUT_STATE', 'TIMEDOUT_STATE' : 8 }; ttypes.TOperationType = { '0' : 'EXECUTE_STATEMENT', 'EXECUTE_STATEMENT' : 0, '1' : 'GET_TYPE_INFO', 'GET_TYPE_INFO' : 1, '2' : 'GET_CATALOGS', 'GET_CATALOGS' : 2, '3' : 'GET_SCHEMAS', 'GET_SCHEMAS' : 3, '4' : 'GET_TABLES', 'GET_TABLES' : 4, '5' : 'GET_TABLE_TYPES', 'GET_TABLE_TYPES' : 5, '6' : 'GET_COLUMNS', 'GET_COLUMNS' : 6, '7' : 'GET_FUNCTIONS', 'GET_FUNCTIONS' : 7, '8' : 'UNKNOWN', 'UNKNOWN' : 8 }; ttypes.TGetInfoType = { '0' : 'CLI_MAX_DRIVER_CONNECTIONS', 'CLI_MAX_DRIVER_CONNECTIONS' : 0, '1' : 'CLI_MAX_CONCURRENT_ACTIVITIES', 'CLI_MAX_CONCURRENT_ACTIVITIES' : 1, '2' : 'CLI_DATA_SOURCE_NAME', 'CLI_DATA_SOURCE_NAME' : 2, '8' : 'CLI_FETCH_DIRECTION', 'CLI_FETCH_DIRECTION' : 8, '13' : 'CLI_SERVER_NAME', 'CLI_SERVER_NAME' : 13, '14' : 'CLI_SEARCH_PATTERN_ESCAPE', 'CLI_SEARCH_PATTERN_ESCAPE' : 14, '17' : 'CLI_DBMS_NAME', 'CLI_DBMS_NAME' : 17, '18' : 'CLI_DBMS_VER', 'CLI_DBMS_VER' : 18, '19' : 'CLI_ACCESSIBLE_TABLES', 'CLI_ACCESSIBLE_TABLES' : 19, '20' : 'CLI_ACCESSIBLE_PROCEDURES', 'CLI_ACCESSIBLE_PROCEDURES' : 20, '23' : 'CLI_CURSOR_COMMIT_BEHAVIOR', 'CLI_CURSOR_COMMIT_BEHAVIOR' : 23, '25' : 'CLI_DATA_SOURCE_READ_ONLY', 'CLI_DATA_SOURCE_READ_ONLY' : 25, '26' : 'CLI_DEFAULT_TXN_ISOLATION', 'CLI_DEFAULT_TXN_ISOLATION' : 26, '28' : 'CLI_IDENTIFIER_CASE', 'CLI_IDENTIFIER_CASE' : 28, '29' : 'CLI_IDENTIFIER_QUOTE_CHAR', 'CLI_IDENTIFIER_QUOTE_CHAR' : 29, '30' : 'CLI_MAX_COLUMN_NAME_LEN', 'CLI_MAX_COLUMN_NAME_LEN' : 30, '31' : 'CLI_MAX_CURSOR_NAME_LEN', 'CLI_MAX_CURSOR_NAME_LEN' : 31, '32' : 'CLI_MAX_SCHEMA_NAME_LEN', 'CLI_MAX_SCHEMA_NAME_LEN' : 32, '34' : 'CLI_MAX_CATALOG_NAME_LEN', 'CLI_MAX_CATALOG_NAME_LEN' : 34, '35' : 'CLI_MAX_TABLE_NAME_LEN', 'CLI_MAX_TABLE_NAME_LEN' : 35, '43' : 'CLI_SCROLL_CONCURRENCY', 'CLI_SCROLL_CONCURRENCY' : 43, '46' : 'CLI_TXN_CAPABLE', 'CLI_TXN_CAPABLE' : 46, '47' : 'CLI_USER_NAME', 'CLI_USER_NAME' : 47, '72' : 'CLI_TXN_ISOLATION_OPTION', 'CLI_TXN_ISOLATION_OPTION' : 72, '73' : 'CLI_INTEGRITY', 'CLI_INTEGRITY' : 73, '81' : 'CLI_GETDATA_EXTENSIONS', 'CLI_GETDATA_EXTENSIONS' : 81, '85' : 'CLI_NULL_COLLATION', 'CLI_NULL_COLLATION' : 85, '86' : 'CLI_ALTER_TABLE', 'CLI_ALTER_TABLE' : 86, '90' : 'CLI_ORDER_BY_COLUMNS_IN_SELECT', 'CLI_ORDER_BY_COLUMNS_IN_SELECT' : 90, '94' : 'CLI_SPECIAL_CHARACTERS', 'CLI_SPECIAL_CHARACTERS' : 94, '97' : 'CLI_MAX_COLUMNS_IN_GROUP_BY', 'CLI_MAX_COLUMNS_IN_GROUP_BY' : 97, '98' : 'CLI_MAX_COLUMNS_IN_INDEX', 'CLI_MAX_COLUMNS_IN_INDEX' : 98, '99' : 'CLI_MAX_COLUMNS_IN_ORDER_BY', 'CLI_MAX_COLUMNS_IN_ORDER_BY' : 99, '100' : 'CLI_MAX_COLUMNS_IN_SELECT', 'CLI_MAX_COLUMNS_IN_SELECT' : 100, '101' : 'CLI_MAX_COLUMNS_IN_TABLE', 'CLI_MAX_COLUMNS_IN_TABLE' : 101, '102' : 'CLI_MAX_INDEX_SIZE', 'CLI_MAX_INDEX_SIZE' : 102, '104' : 'CLI_MAX_ROW_SIZE', 'CLI_MAX_ROW_SIZE' : 104, '105' : 'CLI_MAX_STATEMENT_LEN', 'CLI_MAX_STATEMENT_LEN' : 105, '106' : 'CLI_MAX_TABLES_IN_SELECT', 'CLI_MAX_TABLES_IN_SELECT' : 106, '107' : 'CLI_MAX_USER_NAME_LEN', 'CLI_MAX_USER_NAME_LEN' : 107, '115' : 'CLI_OJ_CAPABILITIES', 'CLI_OJ_CAPABILITIES' : 115, '10000' : 'CLI_XOPEN_CLI_YEAR', 'CLI_XOPEN_CLI_YEAR' : 10000, '10001' : 'CLI_CURSOR_SENSITIVITY', 'CLI_CURSOR_SENSITIVITY' : 10001, '10002' : 'CLI_DESCRIBE_PARAMETER', 'CLI_DESCRIBE_PARAMETER' : 10002, '10003' : 'CLI_CATALOG_NAME', 'CLI_CATALOG_NAME' : 10003, '10004' : 'CLI_COLLATION_SEQ', 'CLI_COLLATION_SEQ' : 10004, '10005' : 'CLI_MAX_IDENTIFIER_LEN', 'CLI_MAX_IDENTIFIER_LEN' : 10005 }; ttypes.TCacheLookupResult = { '0' : 'CACHE_INELIGIBLE', 'CACHE_INELIGIBLE' : 0, '1' : 'LOCAL_CACHE_HIT', 'LOCAL_CACHE_HIT' : 1, '2' : 'REMOTE_CACHE_HIT', 'REMOTE_CACHE_HIT' : 2, '3' : 'CACHE_MISS', 'CACHE_MISS' : 3 }; ttypes.TFetchOrientation = { '0' : 'FETCH_NEXT', 'FETCH_NEXT' : 0, '1' : 'FETCH_PRIOR', 'FETCH_PRIOR' : 1, '2' : 'FETCH_RELATIVE', 'FETCH_RELATIVE' : 2, '3' : 'FETCH_ABSOLUTE', 'FETCH_ABSOLUTE' : 3, '4' : 'FETCH_FIRST', 'FETCH_FIRST' : 4, '5' : 'FETCH_LAST', 'FETCH_LAST' : 5 }; ttypes.TJobExecutionStatus = { '0' : 'IN_PROGRESS', 'IN_PROGRESS' : 0, '1' : 'COMPLETE', 'COMPLETE' : 1, '2' : 'NOT_AVAILABLE', 'NOT_AVAILABLE' : 2 }; var TTypeQualifierValue = module.exports.TTypeQualifierValue = function(args) { this.i32Value = null; this.stringValue = null; if (args) { if (args.i32Value !== undefined && args.i32Value !== null) { this.i32Value = args.i32Value; } if (args.stringValue !== undefined && args.stringValue !== null) { this.stringValue = args.stringValue; } } }; TTypeQualifierValue.prototype = {}; TTypeQualifierValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.i32Value = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.stringValue = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTypeQualifierValue.prototype.write = function(output) { output.writeStructBegin('TTypeQualifierValue'); if (this.i32Value !== null && this.i32Value !== undefined) { output.writeFieldBegin('i32Value', Thrift.Type.I32, 1); output.writeI32(this.i32Value); output.writeFieldEnd(); } if (this.stringValue !== null && this.stringValue !== undefined) { output.writeFieldBegin('stringValue', Thrift.Type.STRING, 2); output.writeString(this.stringValue); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TTypeQualifiers = module.exports.TTypeQualifiers = function(args) { this.qualifiers = null; if (args) { if (args.qualifiers !== undefined && args.qualifiers !== null) { this.qualifiers = Thrift.copyMap(args.qualifiers, [ttypes.TTypeQualifierValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field qualifiers is unset!'); } } }; TTypeQualifiers.prototype = {}; TTypeQualifiers.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.MAP) { this.qualifiers = {}; var _rtmp31 = input.readMapBegin(); var _size0 = _rtmp31.size || 0; for (var _i2 = 0; _i2 < _size0; ++_i2) { var key3 = null; var val4 = null; key3 = input.readString(); val4 = new ttypes.TTypeQualifierValue(); val4.read(input); this.qualifiers[key3] = val4; } input.readMapEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTypeQualifiers.prototype.write = function(output) { output.writeStructBegin('TTypeQualifiers'); if (this.qualifiers !== null && this.qualifiers !== undefined) { output.writeFieldBegin('qualifiers', Thrift.Type.MAP, 1); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.qualifiers)); for (var kiter5 in this.qualifiers) { if (this.qualifiers.hasOwnProperty(kiter5)) { var viter6 = this.qualifiers[kiter5]; output.writeString(kiter5); viter6.write(output); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TPrimitiveTypeEntry = module.exports.TPrimitiveTypeEntry = function(args) { this.type = null; this.typeQualifiers = null; if (args) { if (args.type !== undefined && args.type !== null) { this.type = args.type; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field type is unset!'); } if (args.typeQualifiers !== undefined && args.typeQualifiers !== null) { this.typeQualifiers = new ttypes.TTypeQualifiers(args.typeQualifiers); } } }; TPrimitiveTypeEntry.prototype = {}; TPrimitiveTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.type = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.typeQualifiers = new ttypes.TTypeQualifiers(); this.typeQualifiers.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TPrimitiveTypeEntry.prototype.write = function(output) { output.writeStructBegin('TPrimitiveTypeEntry'); if (this.type !== null && this.type !== undefined) { output.writeFieldBegin('type', Thrift.Type.I32, 1); output.writeI32(this.type); output.writeFieldEnd(); } if (this.typeQualifiers !== null && this.typeQualifiers !== undefined) { output.writeFieldBegin('typeQualifiers', Thrift.Type.STRUCT, 2); this.typeQualifiers.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TArrayTypeEntry = module.exports.TArrayTypeEntry = function(args) { this.objectTypePtr = null; if (args) { if (args.objectTypePtr !== undefined && args.objectTypePtr !== null) { this.objectTypePtr = args.objectTypePtr; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field objectTypePtr is unset!'); } } }; TArrayTypeEntry.prototype = {}; TArrayTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.objectTypePtr = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TArrayTypeEntry.prototype.write = function(output) { output.writeStructBegin('TArrayTypeEntry'); if (this.objectTypePtr !== null && this.objectTypePtr !== undefined) { output.writeFieldBegin('objectTypePtr', Thrift.Type.I32, 1); output.writeI32(this.objectTypePtr); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TMapTypeEntry = module.exports.TMapTypeEntry = function(args) { this.keyTypePtr = null; this.valueTypePtr = null; if (args) { if (args.keyTypePtr !== undefined && args.keyTypePtr !== null) { this.keyTypePtr = args.keyTypePtr; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field keyTypePtr is unset!'); } if (args.valueTypePtr !== undefined && args.valueTypePtr !== null) { this.valueTypePtr = args.valueTypePtr; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field valueTypePtr is unset!'); } } }; TMapTypeEntry.prototype = {}; TMapTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.keyTypePtr = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.valueTypePtr = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TMapTypeEntry.prototype.write = function(output) { output.writeStructBegin('TMapTypeEntry'); if (this.keyTypePtr !== null && this.keyTypePtr !== undefined) { output.writeFieldBegin('keyTypePtr', Thrift.Type.I32, 1); output.writeI32(this.keyTypePtr); output.writeFieldEnd(); } if (this.valueTypePtr !== null && this.valueTypePtr !== undefined) { output.writeFieldBegin('valueTypePtr', Thrift.Type.I32, 2); output.writeI32(this.valueTypePtr); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TStructTypeEntry = module.exports.TStructTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { this.nameToTypePtr = Thrift.copyMap(args.nameToTypePtr, [null]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field nameToTypePtr is unset!'); } } }; TStructTypeEntry.prototype = {}; TStructTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.MAP) { this.nameToTypePtr = {}; var _rtmp38 = input.readMapBegin(); var _size7 = _rtmp38.size || 0; for (var _i9 = 0; _i9 < _size7; ++_i9) { var key10 = null; var val11 = null; key10 = input.readString(); val11 = input.readI32(); this.nameToTypePtr[key10] = val11; } input.readMapEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TStructTypeEntry.prototype.write = function(output) { output.writeStructBegin('TStructTypeEntry'); if (this.nameToTypePtr !== null && this.nameToTypePtr !== undefined) { output.writeFieldBegin('nameToTypePtr', Thrift.Type.MAP, 1); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I32, Thrift.objectLength(this.nameToTypePtr)); for (var kiter12 in this.nameToTypePtr) { if (this.nameToTypePtr.hasOwnProperty(kiter12)) { var viter13 = this.nameToTypePtr[kiter12]; output.writeString(kiter12); output.writeI32(viter13); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TUnionTypeEntry = module.exports.TUnionTypeEntry = function(args) { this.nameToTypePtr = null; if (args) { if (args.nameToTypePtr !== undefined && args.nameToTypePtr !== null) { this.nameToTypePtr = Thrift.copyMap(args.nameToTypePtr, [null]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field nameToTypePtr is unset!'); } } }; TUnionTypeEntry.prototype = {}; TUnionTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.MAP) { this.nameToTypePtr = {}; var _rtmp315 = input.readMapBegin(); var _size14 = _rtmp315.size || 0; for (var _i16 = 0; _i16 < _size14; ++_i16) { var key17 = null; var val18 = null; key17 = input.readString(); val18 = input.readI32(); this.nameToTypePtr[key17] = val18; } input.readMapEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TUnionTypeEntry.prototype.write = function(output) { output.writeStructBegin('TUnionTypeEntry'); if (this.nameToTypePtr !== null && this.nameToTypePtr !== undefined) { output.writeFieldBegin('nameToTypePtr', Thrift.Type.MAP, 1); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.I32, Thrift.objectLength(this.nameToTypePtr)); for (var kiter19 in this.nameToTypePtr) { if (this.nameToTypePtr.hasOwnProperty(kiter19)) { var viter20 = this.nameToTypePtr[kiter19]; output.writeString(kiter19); output.writeI32(viter20); } } output.writeMapEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TUserDefinedTypeEntry = module.exports.TUserDefinedTypeEntry = function(args) { this.typeClassName = null; if (args) { if (args.typeClassName !== undefined && args.typeClassName !== null) { this.typeClassName = args.typeClassName; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeClassName is unset!'); } } }; TUserDefinedTypeEntry.prototype = {}; TUserDefinedTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.typeClassName = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TUserDefinedTypeEntry.prototype.write = function(output) { output.writeStructBegin('TUserDefinedTypeEntry'); if (this.typeClassName !== null && this.typeClassName !== undefined) { output.writeFieldBegin('typeClassName', Thrift.Type.STRING, 1); output.writeString(this.typeClassName); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TTypeEntry = module.exports.TTypeEntry = function(args) { this.primitiveEntry = null; this.arrayEntry = null; this.mapEntry = null; this.structEntry = null; this.unionEntry = null; this.userDefinedTypeEntry = null; if (args) { if (args.primitiveEntry !== undefined && args.primitiveEntry !== null) { this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(args.primitiveEntry); } if (args.arrayEntry !== undefined && args.arrayEntry !== null) { this.arrayEntry = new ttypes.TArrayTypeEntry(args.arrayEntry); } if (args.mapEntry !== undefined && args.mapEntry !== null) { this.mapEntry = new ttypes.TMapTypeEntry(args.mapEntry); } if (args.structEntry !== undefined && args.structEntry !== null) { this.structEntry = new ttypes.TStructTypeEntry(args.structEntry); } if (args.unionEntry !== undefined && args.unionEntry !== null) { this.unionEntry = new ttypes.TUnionTypeEntry(args.unionEntry); } if (args.userDefinedTypeEntry !== undefined && args.userDefinedTypeEntry !== null) { this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(args.userDefinedTypeEntry); } } }; TTypeEntry.prototype = {}; TTypeEntry.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.primitiveEntry = new ttypes.TPrimitiveTypeEntry(); this.primitiveEntry.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.arrayEntry = new ttypes.TArrayTypeEntry(); this.arrayEntry.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.mapEntry = new ttypes.TMapTypeEntry(); this.mapEntry.read(input); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.structEntry = new ttypes.TStructTypeEntry(); this.structEntry.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { this.unionEntry = new ttypes.TUnionTypeEntry(); this.unionEntry.read(input); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.userDefinedTypeEntry = new ttypes.TUserDefinedTypeEntry(); this.userDefinedTypeEntry.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTypeEntry.prototype.write = function(output) { output.writeStructBegin('TTypeEntry'); if (this.primitiveEntry !== null && this.primitiveEntry !== undefined) { output.writeFieldBegin('primitiveEntry', Thrift.Type.STRUCT, 1); this.primitiveEntry.write(output); output.writeFieldEnd(); } if (this.arrayEntry !== null && this.arrayEntry !== undefined) { output.writeFieldBegin('arrayEntry', Thrift.Type.STRUCT, 2); this.arrayEntry.write(output); output.writeFieldEnd(); } if (this.mapEntry !== null && this.mapEntry !== undefined) { output.writeFieldBegin('mapEntry', Thrift.Type.STRUCT, 3); this.mapEntry.write(output); output.writeFieldEnd(); } if (this.structEntry !== null && this.structEntry !== undefined) { output.writeFieldBegin('structEntry', Thrift.Type.STRUCT, 4); this.structEntry.write(output); output.writeFieldEnd(); } if (this.unionEntry !== null && this.unionEntry !== undefined) { output.writeFieldBegin('unionEntry', Thrift.Type.STRUCT, 5); this.unionEntry.write(output); output.writeFieldEnd(); } if (this.userDefinedTypeEntry !== null && this.userDefinedTypeEntry !== undefined) { output.writeFieldBegin('userDefinedTypeEntry', Thrift.Type.STRUCT, 6); this.userDefinedTypeEntry.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TTypeDesc = module.exports.TTypeDesc = function(args) { this.types = null; if (args) { if (args.types !== undefined && args.types !== null) { this.types = Thrift.copyList(args.types, [ttypes.TTypeEntry]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field types is unset!'); } } }; TTypeDesc.prototype = {}; TTypeDesc.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.LIST) { this.types = []; var _rtmp322 = input.readListBegin(); var _size21 = _rtmp322.size || 0; for (var _i23 = 0; _i23 < _size21; ++_i23) { var elem24 = null; elem24 = new ttypes.TTypeEntry(); elem24.read(input); this.types.push(elem24); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTypeDesc.prototype.write = function(output) { output.writeStructBegin('TTypeDesc'); if (this.types !== null && this.types !== undefined) { output.writeFieldBegin('types', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRUCT, this.types.length); for (var iter25 in this.types) { if (this.types.hasOwnProperty(iter25)) { iter25 = this.types[iter25]; iter25.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TColumnDesc = module.exports.TColumnDesc = function(args) { this.columnName = null; this.typeDesc = null; this.position = null; this.comment = null; if (args) { if (args.columnName !== undefined && args.columnName !== null) { this.columnName = args.columnName; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columnName is unset!'); } if (args.typeDesc !== undefined && args.typeDesc !== null) { this.typeDesc = new ttypes.TTypeDesc(args.typeDesc); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeDesc is unset!'); } if (args.position !== undefined && args.position !== null) { this.position = args.position; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field position is unset!'); } if (args.comment !== undefined && args.comment !== null) { this.comment = args.comment; } } }; TColumnDesc.prototype = {}; TColumnDesc.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.columnName = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.typeDesc = new ttypes.TTypeDesc(); this.typeDesc.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I32) { this.position = input.readI32(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.comment = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TColumnDesc.prototype.write = function(output) { output.writeStructBegin('TColumnDesc'); if (this.columnName !== null && this.columnName !== undefined) { output.writeFieldBegin('columnName', Thrift.Type.STRING, 1); output.writeString(this.columnName); output.writeFieldEnd(); } if (this.typeDesc !== null && this.typeDesc !== undefined) { output.writeFieldBegin('typeDesc', Thrift.Type.STRUCT, 2); this.typeDesc.write(output); output.writeFieldEnd(); } if (this.position !== null && this.position !== undefined) { output.writeFieldBegin('position', Thrift.Type.I32, 3); output.writeI32(this.position); output.writeFieldEnd(); } if (this.comment !== null && this.comment !== undefined) { output.writeFieldBegin('comment', Thrift.Type.STRING, 4); output.writeString(this.comment); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TTableSchema = module.exports.TTableSchema = function(args) { this.columns = null; if (args) { if (args.columns !== undefined && args.columns !== null) { this.columns = Thrift.copyList(args.columns, [ttypes.TColumnDesc]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field columns is unset!'); } } }; TTableSchema.prototype = {}; TTableSchema.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.LIST) { this.columns = []; var _rtmp327 = input.readListBegin(); var _size26 = _rtmp327.size || 0; for (var _i28 = 0; _i28 < _size26; ++_i28) { var elem29 = null; elem29 = new ttypes.TColumnDesc(); elem29.read(input); this.columns.push(elem29); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTableSchema.prototype.write = function(output) { output.writeStructBegin('TTableSchema'); if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter30 in this.columns) { if (this.columns.hasOwnProperty(iter30)) { iter30 = this.columns[iter30]; iter30.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TBoolValue = module.exports.TBoolValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TBoolValue.prototype = {}; TBoolValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.BOOL) { this.value = input.readBool(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TBoolValue.prototype.write = function(output) { output.writeStructBegin('TBoolValue'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.BOOL, 1); output.writeBool(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TByteValue = module.exports.TByteValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TByteValue.prototype = {}; TByteValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.BYTE) { this.value = input.readByte(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TByteValue.prototype.write = function(output) { output.writeStructBegin('TByteValue'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.BYTE, 1); output.writeByte(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TI16Value = module.exports.TI16Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TI16Value.prototype = {}; TI16Value.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I16) { this.value = input.readI16(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TI16Value.prototype.write = function(output) { output.writeStructBegin('TI16Value'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.I16, 1); output.writeI16(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TI32Value = module.exports.TI32Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TI32Value.prototype = {}; TI32Value.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.value = input.readI32(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TI32Value.prototype.write = function(output) { output.writeStructBegin('TI32Value'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.I32, 1); output.writeI32(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TI64Value = module.exports.TI64Value = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TI64Value.prototype = {}; TI64Value.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.I64) { this.value = input.readI64(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TI64Value.prototype.write = function(output) { output.writeStructBegin('TI64Value'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.I64, 1); output.writeI64(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TDoubleValue = module.exports.TDoubleValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TDoubleValue.prototype = {}; TDoubleValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.DOUBLE) { this.value = input.readDouble(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TDoubleValue.prototype.write = function(output) { output.writeStructBegin('TDoubleValue'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.DOUBLE, 1); output.writeDouble(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TStringValue = module.exports.TStringValue = function(args) { this.value = null; if (args) { if (args.value !== undefined && args.value !== null) { this.value = args.value; } } }; TStringValue.prototype = {}; TStringValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TStringValue.prototype.write = function(output) { output.writeStructBegin('TStringValue'); if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 1); output.writeString(this.value); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TColumnValue = module.exports.TColumnValue = function(args) { this.boolVal = null; this.byteVal = null; this.i16Val = null; this.i32Val = null; this.i64Val = null; this.doubleVal = null; this.stringVal = null; if (args) { if (args.boolVal !== undefined && args.boolVal !== null) { this.boolVal = new ttypes.TBoolValue(args.boolVal); } if (args.byteVal !== undefined && args.byteVal !== null) { this.byteVal = new ttypes.TByteValue(args.byteVal); } if (args.i16Val !== undefined && args.i16Val !== null) { this.i16Val = new ttypes.TI16Value(args.i16Val); } if (args.i32Val !== undefined && args.i32Val !== null) { this.i32Val = new ttypes.TI32Value(args.i32Val); } if (args.i64Val !== undefined && args.i64Val !== null) { this.i64Val = new ttypes.TI64Value(args.i64Val); } if (args.doubleVal !== undefined && args.doubleVal !== null) { this.doubleVal = new ttypes.TDoubleValue(args.doubleVal); } if (args.stringVal !== undefined && args.stringVal !== null) { this.stringVal = new ttypes.TStringValue(args.stringVal); } } }; TColumnValue.prototype = {}; TColumnValue.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.boolVal = new ttypes.TBoolValue(); this.boolVal.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.byteVal = new ttypes.TByteValue(); this.byteVal.read(input); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRUCT) { this.i16Val = new ttypes.TI16Value(); this.i16Val.read(input); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.i32Val = new ttypes.TI32Value(); this.i32Val.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { this.i64Val = new ttypes.TI64Value(); this.i64Val.read(input); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.doubleVal = new ttypes.TDoubleValue(); this.doubleVal.read(input); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRUCT) { this.stringVal = new ttypes.TStringValue(); this.stringVal.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TColumnValue.prototype.write = function(output) { output.writeStructBegin('TColumnValue'); if (this.boolVal !== null && this.boolVal !== undefined) { output.writeFieldBegin('boolVal', Thrift.Type.STRUCT, 1); this.boolVal.write(output); output.writeFieldEnd(); } if (this.byteVal !== null && this.byteVal !== undefined) { output.writeFieldBegin('byteVal', Thrift.Type.STRUCT, 2); this.byteVal.write(output); output.writeFieldEnd(); } if (this.i16Val !== null && this.i16Val !== undefined) { output.writeFieldBegin('i16Val', Thrift.Type.STRUCT, 3); this.i16Val.write(output); output.writeFieldEnd(); } if (this.i32Val !== null && this.i32Val !== undefined) { output.writeFieldBegin('i32Val', Thrift.Type.STRUCT, 4); this.i32Val.write(output); output.writeFieldEnd(); } if (this.i64Val !== null && this.i64Val !== undefined) { output.writeFieldBegin('i64Val', Thrift.Type.STRUCT, 5); this.i64Val.write(output); output.writeFieldEnd(); } if (this.doubleVal !== null && this.doubleVal !== undefined) { output.writeFieldBegin('doubleVal', Thrift.Type.STRUCT, 6); this.doubleVal.write(output); output.writeFieldEnd(); } if (this.stringVal !== null && this.stringVal !== undefined) { output.writeFieldBegin('stringVal', Thrift.Type.STRUCT, 7); this.stringVal.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TRow = module.exports.TRow = function(args) { this.colVals = null; if (args) { if (args.colVals !== undefined && args.colVals !== null) { this.colVals = Thrift.copyList(args.colVals, [ttypes.TColumnValue]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field colVals is unset!'); } } }; TRow.prototype = {}; TRow.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.LIST) { this.colVals = []; var _rtmp332 = input.readListBegin(); var _size31 = _rtmp332.size || 0; for (var _i33 = 0; _i33 < _size31; ++_i33) { var elem34 = null; elem34 = new ttypes.TColumnValue(); elem34.read(input); this.colVals.push(elem34); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TRow.prototype.write = function(output) { output.writeStructBegin('TRow'); if (this.colVals !== null && this.colVals !== undefined) { output.writeFieldBegin('colVals', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRUCT, this.colVals.length); for (var iter35 in this.colVals) { if (this.colVals.hasOwnProperty(iter35)) { iter35 = this.colVals[iter35]; iter35.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; var TBoolColumn = module.exports.TBoolColumn = function(args) { this.values = null; this.nulls = null; if (args) { if (args.values !== undefined && args.values !== null) { this.values = Thrift.copyList(args.values, [null]); } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field values is unset!'); } if (args.nulls !== undefined && args.nulls !== null) { this.nulls = args.nulls; } else { throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field nulls is unset!'); } } }; TBoolColumn.prototype = {}; TBoolColumn.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } switch (fid) { case 1: if (ftype == Thrift.Type.LIST) { this.values = []; var _rtmp337 = input.readListBegin(); var _size36 = _rtmp337.size || 0; for (var _i38 = 0; _i38 < _size36; ++_i38) { var elem39 = null; elem39 = input.readBool(); this.values.push(elem39); } input.readListEnd(); } else { input.skip(ftype); } break; case 2: if (ftype ==