@uwdata/mosaic-core 0.3.3 → 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
  };