diff --git a/test/integration.spec.js b/test/integration.spec.js index 69aa1e96..6df2b0f7 100644 --- a/test/integration.spec.js +++ b/test/integration.spec.js @@ -1,9 +1,9 @@ "use strict" -const hostname = process.env.HOSTNAME || "metis.mapd.com" -const protocol = process.env.PROTOCOL || "https" -const port = process.env.PORT || "443" -const database = process.env.DATABASE || "heavyai" -const username = process.env.USERNAME || "admin" +const hostname = process.env.HOSTNAME || "forge.mapd.com" +const protocol = process.env.PROTOCOL || "http" +const port = process.env.PORT || "9092" +const database = process.env.DATABASE || "mapd" +const username = process.env.USERNAME || "mapd" const password = process.env.PASSWORD || "HyperInteractive" const isNodeRuntime = typeof window === "undefined" @@ -549,7 +549,7 @@ describe(isNodeRuntime ? "node" : "browser", () => { (pixelError, data) => { expect(pixelError).to.not.be.an("error") const lon = data[0].row_set[0].dest_lon - expect(lon).to.be.eq(-117.82951354980469) + expect(lon).to.be.eq(-119.05677032470703) done() } ) diff --git a/thrift/heavy_types.js b/thrift/heavy_types.js index 672809cd..b62a2344 100644 --- a/thrift/heavy_types.js +++ b/thrift/heavy_types.js @@ -111,7 +111,8 @@ ttypes.TDBObjectType = { 'TableDBObjectType' : 2, 'DashboardDBObjectType' : 3, 'ViewDBObjectType' : 4, - 'ServerDBObjectType' : 5 + 'ServerDBObjectType' : 5, + 'ColumnDBObjectType' : 6 }; ttypes.TDataSourceType = { 'TABLE' : 0 @@ -370,6 +371,7 @@ const TColumnType = module.exports.TColumnType = class { 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; @@ -395,6 +397,9 @@ const TColumnType = module.exports.TColumnType = class { 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; + } } } @@ -465,6 +470,13 @@ const TColumnType = module.exports.TColumnType = class { input.skip(ftype); } break; + case 9: + if (ftype == Thrift.Type.STRING) { + this.comment = input.readString(); + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -516,6 +528,11 @@ const TColumnType = module.exports.TColumnType = class { 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; @@ -1707,6 +1724,7 @@ const TCopyParams = module.exports.TCopyParams = class { this.add_metadata_columns = null; this.trim_spaces = true; this.geo_validate_geometry = false; + this.raster_drop_if_all_null = false; if (args) { if (args.delimiter !== undefined && args.delimiter !== null) { this.delimiter = args.delimiter; @@ -1834,6 +1852,9 @@ const TCopyParams = module.exports.TCopyParams = class { if (args.geo_validate_geometry !== undefined && args.geo_validate_geometry !== null) { this.geo_validate_geometry = args.geo_validate_geometry; } + if (args.raster_drop_if_all_null !== undefined && args.raster_drop_if_all_null !== null) { + this.raster_drop_if_all_null = args.raster_drop_if_all_null; + } } } @@ -2141,6 +2162,13 @@ const TCopyParams = module.exports.TCopyParams = class { input.skip(ftype); } break; + case 43: + if (ftype == Thrift.Type.BOOL) { + this.raster_drop_if_all_null = input.readBool(); + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -2362,6 +2390,11 @@ const TCopyParams = module.exports.TCopyParams = class { output.writeBool(this.geo_validate_geometry); output.writeFieldEnd(); } + if (this.raster_drop_if_all_null !== null && this.raster_drop_if_all_null !== undefined) { + output.writeFieldBegin('raster_drop_if_all_null', Thrift.Type.BOOL, 43); + output.writeBool(this.raster_drop_if_all_null); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return; @@ -4259,6 +4292,7 @@ const TTableDetails = module.exports.TTableDetails = class { 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, [ttypes.TColumnType]); @@ -4296,6 +4330,9 @@ const TTableDetails = module.exports.TTableDetails = class { 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; + } } } @@ -4403,6 +4440,13 @@ const TTableDetails = module.exports.TTableDetails = class { input.skip(ftype); } break; + case 13: + if (ftype == Thrift.Type.STRING) { + this.comment = input.readString(); + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -4481,6 +4525,11 @@ const TTableDetails = module.exports.TTableDetails = class { 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; @@ -6951,6 +7000,58 @@ const TServerPermissions = module.exports.TServerPermissions = class { return; } +}; +const TColumnPermissions = module.exports.TColumnPermissions = class { + constructor(args) { + this.select_ = null; + if (args) { + if (args.select_ !== undefined && args.select_ !== null) { + this.select_ = args.select_; + } + } + } + + read (input) { + input.readStructBegin(); + while (true) { + const ret = input.readFieldBegin(); + const ftype = ret.ftype; + const fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) { + case 1: + if (ftype == Thrift.Type.BOOL) { + this.select_ = input.readBool(); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; + } + + write (output) { + output.writeStructBegin('TColumnPermissions'); + if (this.select_ !== null && this.select_ !== undefined) { + output.writeFieldBegin('select_', Thrift.Type.BOOL, 1); + output.writeBool(this.select_); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; + } + }; const TDBObjectPermissions = module.exports.TDBObjectPermissions = class { constructor(args) { @@ -6959,6 +7060,7 @@ const TDBObjectPermissions = module.exports.TDBObjectPermissions = class { this.dashboard_permissions_ = null; this.view_permissions_ = null; this.server_permissions_ = null; + this.column_permissions_ = null; if (args) { if (args.database_permissions_ !== undefined && args.database_permissions_ !== null) { this.database_permissions_ = new ttypes.TDatabasePermissions(args.database_permissions_); @@ -6975,6 +7077,9 @@ const TDBObjectPermissions = module.exports.TDBObjectPermissions = class { if (args.server_permissions_ !== undefined && args.server_permissions_ !== null) { this.server_permissions_ = new ttypes.TServerPermissions(args.server_permissions_); } + if (args.column_permissions_ !== undefined && args.column_permissions_ !== null) { + this.column_permissions_ = new ttypes.TColumnPermissions(args.column_permissions_); + } } } @@ -7028,6 +7133,14 @@ const TDBObjectPermissions = module.exports.TDBObjectPermissions = class { input.skip(ftype); } break; + case 6: + if (ftype == Thrift.Type.STRUCT) { + this.column_permissions_ = new ttypes.TColumnPermissions(); + this.column_permissions_.read(input); + } else { + input.skip(ftype); + } + break; default: input.skip(ftype); } @@ -7064,6 +7177,11 @@ const TDBObjectPermissions = module.exports.TDBObjectPermissions = class { this.server_permissions_.write(output); output.writeFieldEnd(); } + if (this.column_permissions_ !== null && this.column_permissions_ !== undefined) { + output.writeFieldBegin('column_permissions_', Thrift.Type.STRUCT, 6); + this.column_permissions_.write(output); + output.writeFieldEnd(); + } output.writeFieldStop(); output.writeStructEnd(); return;