Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build & performance fixes #353

Merged
merged 14 commits into from
Jan 2, 2019
Prev Previous commit
Next Next commit
Fix for remove() test failure
  • Loading branch information
texodus committed Jan 2, 2019
commit ad11fd7b9f785a780877d71710fd95d1c911d669
5 changes: 3 additions & 2 deletions packages/perspective/src/js/perspective.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,7 @@ export default function(Module) {
*/
table.prototype.remove = function(data) {
let pdata;
let cols = this._columns();
let schema = this.gnode.get_tblschema();
let types = schema.types();
let is_arrow = false;
Expand All @@ -1163,15 +1164,15 @@ export default function(Module) {
} else {
accessor.init(__MODULE__, data);
accessor.names = [this.index];
accessor.types = accessor.extract_typevec(types);
accessor.types = [accessor.extract_typevec(types)[cols.indexOf(this.index)]];
pdata = accessor;
}

try {
[, this.limit_index] = make_table(pdata, this.pool, this.gnode, undefined, this.index || "", this.limit, this.limit_index, false, true, is_arrow);
this.initialized = true;
} catch (e) {
console.error(`Remove failed: ${e}`);
console.error(`Remove failed`, e);
} finally {
schema.delete();
types.delete();
Expand Down