@uwdata/mosaic-core 0.3.3 → 0.3.5
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.
- package/dist/mosaic-core.js +962 -12250
- package/dist/mosaic-core.min.js +4 -13
- package/package.json +5 -5
- package/src/DataCubeIndexer.js +8 -3
- package/src/util/js-type.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uwdata/mosaic-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Scalable and extensible linked data views.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mosaic",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"prepublishOnly": "npm run test && npm run lint && npm run build"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@duckdb/duckdb-wasm": "^1.
|
|
32
|
-
"@uwdata/mosaic-sql": "^0.3.
|
|
33
|
-
"apache-arrow": "^
|
|
31
|
+
"@duckdb/duckdb-wasm": "^1.28.0",
|
|
32
|
+
"@uwdata/mosaic-sql": "^0.3.5",
|
|
33
|
+
"apache-arrow": "^13.0.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7cc66d26c687a28036b3c7102045f2196572847b"
|
|
36
36
|
}
|
package/src/DataCubeIndexer.js
CHANGED
|
@@ -87,11 +87,15 @@ export class DataCubeIndexer {
|
|
|
87
87
|
subqueryPushdown(subq, cols);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
// push orderby criteria to later cube queries
|
|
91
|
+
const order = query.orderby();
|
|
92
|
+
query.query.orderby = [];
|
|
93
|
+
|
|
90
94
|
const sql = query.toString();
|
|
91
95
|
const id = (fnv_hash(sql) >>> 0).toString(16);
|
|
92
96
|
const table = `cube_index_${id}`;
|
|
93
97
|
const result = mc.exec(create(table, sql, { temp }));
|
|
94
|
-
indices.set(client, { table, result, ...index });
|
|
98
|
+
indices.set(client, { table, result, order, ...index });
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
|
|
@@ -111,12 +115,13 @@ export class DataCubeIndexer {
|
|
|
111
115
|
filter = this.activeView.predicate(this.selection.active.predicate);
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
const { table, dims, aggr } = index;
|
|
118
|
+
const { table, dims, aggr, order = [] } = index;
|
|
115
119
|
const query = Query
|
|
116
120
|
.select(dims, aggr)
|
|
117
121
|
.from(table)
|
|
118
122
|
.groupby(dims)
|
|
119
|
-
.where(filter)
|
|
123
|
+
.where(filter)
|
|
124
|
+
.orderby(order);
|
|
120
125
|
return this.mc.updateClient(client, query);
|
|
121
126
|
}
|
|
122
127
|
}
|