@uwdata/mosaic-core 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12494,11 +12494,13 @@ var DataCubeIndexer = class {
12494
12494
  const cols = Object.values(activeView.columns).map((c) => c.columns[0]);
12495
12495
  subqueryPushdown(subq, cols);
12496
12496
  }
12497
+ const order = query.orderby();
12498
+ query.query.orderby = [];
12497
12499
  const sql2 = query.toString();
12498
12500
  const id = (fnv_hash(sql2) >>> 0).toString(16);
12499
12501
  const table = `cube_index_${id}`;
12500
12502
  const result = mc.exec(create(table, sql2, { temp }));
12501
- indices.set(client, { table, result, ...index });
12503
+ indices.set(client, { table, result, order, ...index });
12502
12504
  }
12503
12505
  }
12504
12506
  async update() {
@@ -12515,8 +12517,8 @@ var DataCubeIndexer = class {
12515
12517
  if (!filter) {
12516
12518
  filter = this.activeView.predicate(this.selection.active.predicate);
12517
12519
  }
12518
- const { table, dims, aggr } = index;
12519
- const query = Query.select(dims, aggr).from(table).groupby(dims).where(filter);
12520
+ const { table, dims, aggr, order = [] } = index;
12521
+ const query = Query.select(dims, aggr).from(table).groupby(dims).where(filter).orderby(order);
12520
12522
  return this.mc.updateClient(client, query);
12521
12523
  }
12522
12524
  };
@@ -13702,7 +13704,7 @@ var Selection = class _Selection extends Param {
13702
13704
  }
13703
13705
  /**
13704
13706
  * Create a clone of this Selection with clauses corresponding
13705
- * to provided source removed.
13707
+ * to the provided source removed.
13706
13708
  * @param {*} source The clause source to remove.
13707
13709
  * @returns {this} A cloned and updated Selection.
13708
13710
  */
@@ -13793,12 +13795,16 @@ var Selection = class _Selection extends Param {
13793
13795
  /**
13794
13796
  * Return a selection query predicate for the given client.
13795
13797
  * @param {*} client The client whose data may be filtered.
13798
+ * @param {boolean} [noSkip=false] Disable skipping of active
13799
+ * cross-filtered sources. If set true, the source of the active
13800
+ * clause in a cross-filtered selection will not be skipped.
13796
13801
  * @returns {*} The query predicate for filtering client data,
13797
13802
  * based on the current state of this selection.
13798
13803
  */
13799
- predicate(client) {
13804
+ predicate(client, noSkip = false) {
13800
13805
  const { clauses } = this;
13801
- return this._resolver.predicate(clauses, clauses.active, client);
13806
+ const active = noSkip ? null : clauses.active;
13807
+ return this._resolver.predicate(clauses, active, client);
13802
13808
  }
13803
13809
  };
13804
13810
  var SelectionResolver = class {