@gscdump/engine 0.19.2 → 0.19.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.
@@ -17,13 +17,23 @@ function assertSatisfies(analyzer, source) {
17
17
  if (missing.length > 0) throw new AnalyzerCapabilityError(analyzer.id, missing);
18
18
  }
19
19
  async function runAnalyzerFromSource(source, params, registry) {
20
- const analyzer = registry.resolveAnalyzer(params.type, sourceHas(source, "executeSql"));
20
+ let analyzer = registry.resolveAnalyzer(params.type, sourceHas(source, "executeSql"));
21
21
  if (!analyzer) throw new AnalyzerCapabilityError(params.type, ["executeSql"]);
22
22
  assertSatisfies(analyzer, source);
23
- const plan = analyzer.build(params, {
23
+ const buildCtx = {
24
24
  adapter: source.adapter,
25
25
  siteId: source.siteId
26
- });
26
+ };
27
+ let plan;
28
+ try {
29
+ plan = analyzer.build(params, buildCtx);
30
+ } catch (err) {
31
+ const rowsVariant = err?.name === "UnresolvableDatasetError" ? registry.getAnalyzerVariants(params.type)?.rows : void 0;
32
+ if (!rowsVariant) throw err;
33
+ assertSatisfies(rowsVariant, source);
34
+ analyzer = rowsVariant;
35
+ plan = rowsVariant.build(params, buildCtx);
36
+ }
27
37
  if (plan.kind === "rows") return runRowsPlanAgainstSource(source, analyzer, plan, params);
28
38
  return runSqlPlanAgainstSource(source, analyzer, plan, params);
29
39
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/engine",
3
3
  "type": "module",
4
- "version": "0.19.2",
4
+ "version": "0.19.4",
5
5
  "description": "Append-only Parquet/DuckDB storage engine + planner + adapters for the gscdump pipeline. Node + edge runtimes; opt-in heavy peers.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -169,8 +169,8 @@
169
169
  "dependencies": {
170
170
  "drizzle-orm": "^0.45.2",
171
171
  "proper-lockfile": "^4.1.2",
172
- "gscdump": "0.19.2",
173
- "@gscdump/contracts": "0.19.2"
172
+ "@gscdump/contracts": "0.19.4",
173
+ "gscdump": "0.19.4"
174
174
  },
175
175
  "devDependencies": {
176
176
  "@duckdb/duckdb-wasm": "^1.32.0",