@malloydata/malloy 0.0.270-dev250424204317 → 0.0.270-dev250428164815

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.
@@ -316,7 +316,7 @@ function suggestNewVersion(joinError, joinUsage, expr, func) {
316
316
  // Get longest shared prefix
317
317
  let longestOverlap = joinUsage[0];
318
318
  for (const usage of joinUsage.slice(1)) {
319
- for (let i = 0; i < longestOverlap.length; i++) {
319
+ for (let i = 0; i < longestOverlap.length && i < usage.length; i++) {
320
320
  const a = longestOverlap[i];
321
321
  const b = usage[i];
322
322
  if (a.name !== b.name) {
@@ -3351,7 +3351,10 @@ class QueryStruct {
3351
3351
  sqlChildReference(name, expand) {
3352
3352
  let parentRef = this.getSQLIdentifier();
3353
3353
  if (expand && (0, malloy_types_1.isAtomic)(this.structDef) && (0, malloy_types_1.hasExpression)(this.structDef)) {
3354
- parentRef = expand.field.exprToSQL(expand.result, this, this.structDef.e);
3354
+ if (!this.parent) {
3355
+ throw new Error(`Cannot expand reference to ${name} without parent`);
3356
+ }
3357
+ parentRef = expand.field.exprToSQL(expand.result, this.parent, this.structDef.e);
3355
3358
  }
3356
3359
  let refType = 'table';
3357
3360
  if (this.structDef.type === 'record') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.270-dev250424204317",
3
+ "version": "0.0.270-dev250428164815",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -41,9 +41,9 @@
41
41
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@malloydata/malloy-filter": "^0.0.270-dev250424204317",
45
- "@malloydata/malloy-interfaces": "^0.0.270-dev250424204317",
46
- "@malloydata/malloy-tag": "^0.0.270-dev250424204317",
44
+ "@malloydata/malloy-filter": "^0.0.270-dev250428164815",
45
+ "@malloydata/malloy-interfaces": "^0.0.270-dev250428164815",
46
+ "@malloydata/malloy-tag": "^0.0.270-dev250428164815",
47
47
  "antlr4ts": "^0.5.0-alpha.4",
48
48
  "assert": "^2.0.0",
49
49
  "jaro-winkler": "^0.2.8",