@malloydata/malloy 0.0.157 → 0.0.158-dev240805161224
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/lang/ast/expressions/constant-expression.d.ts +28 -0
- package/dist/lang/ast/expressions/{constant-sub-expression.js → constant-expression.js} +6 -5
- package/dist/lang/ast/expressions/expr-func.js +29 -11
- package/dist/lang/ast/expressions/expr-id-reference.d.ts +0 -1
- package/dist/lang/ast/expressions/expr-id-reference.js +0 -24
- package/dist/lang/ast/field-space/dynamic-space.d.ts +4 -1
- package/dist/lang/ast/field-space/dynamic-space.js +22 -11
- package/dist/lang/ast/field-space/index-field-space.js +3 -0
- package/dist/lang/ast/field-space/join-space-field.d.ts +3 -1
- package/dist/lang/ast/field-space/join-space-field.js +3 -2
- package/dist/lang/ast/field-space/parameter-space.d.ts +18 -0
- package/dist/lang/ast/field-space/parameter-space.js +67 -0
- package/dist/lang/ast/field-space/query-spaces.js +3 -0
- package/dist/lang/ast/field-space/reference-field.js +13 -4
- package/dist/lang/ast/field-space/refined-space.d.ts +2 -1
- package/dist/lang/ast/field-space/refined-space.js +12 -1
- package/dist/lang/ast/field-space/static-space.js +3 -5
- package/dist/lang/ast/index.d.ts +1 -0
- package/dist/lang/ast/index.js +1 -0
- package/dist/lang/ast/parameters/argument.d.ts +14 -0
- package/dist/lang/ast/parameters/argument.js +20 -0
- package/dist/lang/ast/parameters/has-parameter.d.ts +3 -5
- package/dist/lang/ast/parameters/has-parameter.js +24 -13
- package/dist/lang/ast/query-elements/query-arrow.js +7 -7
- package/dist/lang/ast/query-elements/query-head-struct.d.ts +6 -4
- package/dist/lang/ast/query-elements/query-head-struct.js +6 -5
- package/dist/lang/ast/query-elements/query-raw.js +7 -7
- package/dist/lang/ast/query-elements/query-reference.js +2 -2
- package/dist/lang/ast/query-items/field-references.d.ts +4 -0
- package/dist/lang/ast/query-items/field-references.js +12 -1
- package/dist/lang/ast/source-elements/named-source.d.ts +15 -12
- package/dist/lang/ast/source-elements/named-source.js +91 -60
- package/dist/lang/ast/source-elements/query-source.d.ts +4 -1
- package/dist/lang/ast/source-elements/query-source.js +9 -3
- package/dist/lang/ast/source-elements/refined-source.d.ts +3 -2
- package/dist/lang/ast/source-elements/refined-source.js +12 -7
- package/dist/lang/ast/source-elements/source.d.ts +6 -4
- package/dist/lang/ast/source-elements/source.js +19 -16
- package/dist/lang/ast/source-elements/sql-source.d.ts +2 -2
- package/dist/lang/ast/source-elements/sql-source.js +4 -3
- package/dist/lang/ast/source-properties/joins.d.ts +5 -4
- package/dist/lang/ast/source-properties/joins.js +7 -7
- package/dist/lang/ast/source-query-elements/sq-reference.d.ts +3 -1
- package/dist/lang/ast/source-query-elements/sq-reference.js +9 -2
- package/dist/lang/ast/statements/define-source.d.ts +4 -2
- package/dist/lang/ast/statements/define-source.js +28 -14
- package/dist/lang/ast/struct-utils.js +3 -2
- package/dist/lang/ast/types/expression-def.js +2 -0
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +169 -101
- package/dist/lang/lib/Malloy/MalloyParser.js +2105 -1600
- package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +64 -9
- package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +40 -5
- package/dist/lang/malloy-to-ast.d.ts +5 -1
- package/dist/lang/malloy-to-ast.js +51 -10
- package/dist/lang/test/expressions.spec.js +21 -1
- package/dist/lang/test/field-symbols.spec.js +0 -2
- package/dist/lang/test/locations.spec.js +3 -0
- package/dist/lang/test/parameters.spec.d.ts +1 -0
- package/dist/lang/test/parameters.spec.js +578 -0
- package/dist/model/malloy_query.d.ts +8 -5
- package/dist/model/malloy_query.js +68 -37
- package/dist/model/malloy_types.d.ts +12 -14
- package/dist/model/malloy_types.js +22 -10
- package/package.json +1 -1
- package/dist/lang/ast/expressions/constant-sub-expression.d.ts +0 -16
- package/dist/lang/ast/parameters/constant-parameter.d.ts +0 -8
- package/dist/lang/ast/parameters/constant-parameter.js +0 -54
|
@@ -38,15 +38,15 @@ class Join extends malloy_element_1.MalloyElement {
|
|
|
38
38
|
this.extendNote = noteable_1.extendNoteMethod;
|
|
39
39
|
}
|
|
40
40
|
makeEntry(fs) {
|
|
41
|
-
fs.newEntry(this.name.refString, this, new join_space_field_1.JoinSpaceField(this));
|
|
41
|
+
fs.newEntry(this.name.refString, this, new join_space_field_1.JoinSpaceField(fs.parameterSpace(), this));
|
|
42
42
|
}
|
|
43
|
-
getStructDefFromExpr() {
|
|
43
|
+
getStructDefFromExpr(parameterSpace) {
|
|
44
44
|
const source = this.sourceExpr.getSource();
|
|
45
45
|
if (!source) {
|
|
46
46
|
this.sourceExpr.sqLog('Cannot great a source to join from');
|
|
47
47
|
return error_factory_1.ErrorFactory.structDef;
|
|
48
48
|
}
|
|
49
|
-
return source.structDef();
|
|
49
|
+
return source.structDef(parameterSpace);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
exports.Join = Join;
|
|
@@ -58,9 +58,9 @@ class KeyJoin extends Join {
|
|
|
58
58
|
this.keyExpr = keyExpr;
|
|
59
59
|
this.elementType = 'joinOnKey';
|
|
60
60
|
}
|
|
61
|
-
structDef() {
|
|
61
|
+
structDef(parameterSpace) {
|
|
62
62
|
var _a;
|
|
63
|
-
const sourceDef = this.getStructDefFromExpr();
|
|
63
|
+
const sourceDef = this.getStructDefFromExpr(parameterSpace);
|
|
64
64
|
const joinStruct = {
|
|
65
65
|
...sourceDef,
|
|
66
66
|
structRelationship: {
|
|
@@ -147,14 +147,14 @@ class ExpressionJoin extends Join {
|
|
|
147
147
|
joinRel.onExpression = (0, utils_1.compressExpr)(exprX.value);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
structDef() {
|
|
150
|
+
structDef(parameterSpace) {
|
|
151
151
|
var _a;
|
|
152
152
|
const source = this.sourceExpr.getSource();
|
|
153
153
|
if (!source) {
|
|
154
154
|
this.sourceExpr.sqLog('Cannot create a source to join from');
|
|
155
155
|
return error_factory_1.ErrorFactory.structDef;
|
|
156
156
|
}
|
|
157
|
-
const sourceDef = source.structDef();
|
|
157
|
+
const sourceDef = source.structDef(parameterSpace);
|
|
158
158
|
let matrixOperation = 'left';
|
|
159
159
|
if (this.inExperiment('join_types', true)) {
|
|
160
160
|
matrixOperation = this.matrixOperation;
|
|
@@ -2,6 +2,7 @@ import { ModelEntryReference } from '../types/malloy-element';
|
|
|
2
2
|
import { Source } from '../source-elements/source';
|
|
3
3
|
import { SourceQueryElement } from './source-query-element';
|
|
4
4
|
import { QueryElement } from '../types/query-element';
|
|
5
|
+
import { Argument } from '../parameters/argument';
|
|
5
6
|
/**
|
|
6
7
|
* A reference to either a source or a query.
|
|
7
8
|
*
|
|
@@ -9,9 +10,10 @@ import { QueryElement } from '../types/query-element';
|
|
|
9
10
|
*/
|
|
10
11
|
export declare class SQReference extends SourceQueryElement {
|
|
11
12
|
readonly ref: ModelEntryReference;
|
|
13
|
+
readonly args?: Argument[] | undefined;
|
|
12
14
|
elementType: string;
|
|
13
15
|
asSource?: Source;
|
|
14
|
-
constructor(ref: ModelEntryReference);
|
|
16
|
+
constructor(ref: ModelEntryReference, args?: Argument[] | undefined);
|
|
15
17
|
getQuery(): QueryElement | undefined;
|
|
16
18
|
isSource(): boolean;
|
|
17
19
|
getSource(): Source | undefined;
|
|
@@ -33,10 +33,14 @@ const query_reference_1 = require("../query-elements/query-reference");
|
|
|
33
33
|
* e.g. `flights`
|
|
34
34
|
*/
|
|
35
35
|
class SQReference extends source_query_element_1.SourceQueryElement {
|
|
36
|
-
constructor(ref) {
|
|
36
|
+
constructor(ref, args) {
|
|
37
37
|
super({ ref });
|
|
38
38
|
this.ref = ref;
|
|
39
|
+
this.args = args;
|
|
39
40
|
this.elementType = 'sq-reference';
|
|
41
|
+
if (args !== undefined) {
|
|
42
|
+
this.has({ args });
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
getQuery() {
|
|
42
46
|
const entry = this.ref.getNamed();
|
|
@@ -71,11 +75,14 @@ class SQReference extends source_query_element_1.SourceQueryElement {
|
|
|
71
75
|
return;
|
|
72
76
|
}
|
|
73
77
|
if (entry.type === 'query') {
|
|
78
|
+
if (this.args !== undefined) {
|
|
79
|
+
this.ref.log('Arguments cannot be passed to queries');
|
|
80
|
+
}
|
|
74
81
|
const existingQuery = new query_reference_1.QueryReference(this.ref);
|
|
75
82
|
this.asSource = new query_source_1.QuerySource(existingQuery);
|
|
76
83
|
}
|
|
77
84
|
else if (entry.type === 'struct') {
|
|
78
|
-
this.asSource = new named_source_1.NamedSource(this.ref);
|
|
85
|
+
this.asSource = new named_source_1.NamedSource(this.ref, undefined, this.args);
|
|
79
86
|
}
|
|
80
87
|
else {
|
|
81
88
|
this.sqLog(`Expected '${this.ref.refString}' to be of type query or source, not '${entry.type}'`);
|
|
@@ -7,13 +7,15 @@ export declare class DefineSource extends MalloyElement implements DocStatement,
|
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly sourceExpr: SourceQueryElement | undefined;
|
|
9
9
|
readonly exported: boolean;
|
|
10
|
+
readonly parameters?: HasParameter[] | undefined;
|
|
10
11
|
elementType: string;
|
|
11
|
-
|
|
12
|
-
constructor(name: string, sourceExpr: SourceQueryElement | undefined, exported: boolean, params?: MalloyElement[]);
|
|
12
|
+
constructor(name: string, sourceExpr: SourceQueryElement | undefined, exported: boolean, parameters?: HasParameter[] | undefined);
|
|
13
13
|
readonly isNoteableObj = true;
|
|
14
14
|
extendNote: typeof extendNoteMethod;
|
|
15
15
|
note?: Annotation;
|
|
16
16
|
execute(doc: Document): void;
|
|
17
|
+
private deduplicatedParameters;
|
|
18
|
+
private validateParameterShadowing;
|
|
17
19
|
}
|
|
18
20
|
export declare class DefineSourceList extends DocStatementList {
|
|
19
21
|
elementType: string;
|
|
@@ -24,32 +24,23 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.DefineSourceList = exports.DefineSource = void 0;
|
|
26
26
|
const error_factory_1 = require("../error-factory");
|
|
27
|
-
const has_parameter_1 = require("../parameters/has-parameter");
|
|
28
27
|
const malloy_element_1 = require("../types/malloy-element");
|
|
29
28
|
const noteable_1 = require("../types/noteable");
|
|
30
29
|
class DefineSource extends malloy_element_1.MalloyElement {
|
|
31
|
-
constructor(name, sourceExpr, exported,
|
|
30
|
+
constructor(name, sourceExpr, exported, parameters) {
|
|
32
31
|
super();
|
|
33
32
|
this.name = name;
|
|
34
33
|
this.sourceExpr = sourceExpr;
|
|
35
34
|
this.exported = exported;
|
|
35
|
+
this.parameters = parameters;
|
|
36
36
|
this.elementType = 'defineSource';
|
|
37
37
|
this.isNoteableObj = true;
|
|
38
38
|
this.extendNote = noteable_1.extendNoteMethod;
|
|
39
39
|
if (sourceExpr) {
|
|
40
40
|
this.has({ sourceExpr });
|
|
41
41
|
}
|
|
42
|
-
if (
|
|
43
|
-
this.parameters
|
|
44
|
-
for (const el of params) {
|
|
45
|
-
if (el instanceof has_parameter_1.HasParameter) {
|
|
46
|
-
this.parameters.push(el);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this.log(`Unexpected element type in define statement: ${el.elementType}`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
this.has({ parameters: this.parameters });
|
|
42
|
+
if (parameters) {
|
|
43
|
+
this.has({ parameters });
|
|
53
44
|
}
|
|
54
45
|
}
|
|
55
46
|
execute(doc) {
|
|
@@ -62,7 +53,9 @@ class DefineSource extends malloy_element_1.MalloyElement {
|
|
|
62
53
|
if (theSource === undefined) {
|
|
63
54
|
return;
|
|
64
55
|
}
|
|
65
|
-
const
|
|
56
|
+
const parameters = this.deduplicatedParameters();
|
|
57
|
+
const structDef = theSource.withParameters(undefined, this.parameters);
|
|
58
|
+
this.validateParameterShadowing(parameters, structDef);
|
|
66
59
|
if (error_factory_1.ErrorFactory.isErrorStructDef(structDef)) {
|
|
67
60
|
return;
|
|
68
61
|
}
|
|
@@ -79,6 +72,27 @@ class DefineSource extends malloy_element_1.MalloyElement {
|
|
|
79
72
|
doc.setEntry(this.name, { entry, exported: this.exported });
|
|
80
73
|
}
|
|
81
74
|
}
|
|
75
|
+
deduplicatedParameters() {
|
|
76
|
+
if (this.parameters === undefined)
|
|
77
|
+
return [];
|
|
78
|
+
const exists = {};
|
|
79
|
+
const out = [];
|
|
80
|
+
for (const parameter of this.parameters) {
|
|
81
|
+
if (parameter.name in exists) {
|
|
82
|
+
parameter.log(`Cannot redefine parameter \`${parameter.name}\``);
|
|
83
|
+
}
|
|
84
|
+
exists[parameter.name] = true;
|
|
85
|
+
out.push(parameter);
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
validateParameterShadowing(parameters, structDef) {
|
|
90
|
+
for (const parameter of parameters) {
|
|
91
|
+
if (structDef.fields.find(field => { var _a; return ((_a = field.as) !== null && _a !== void 0 ? _a : field.name) === parameter.name; })) {
|
|
92
|
+
parameter.log(`Illegal shadowing of field \`${parameter.name}\` by parameter with the same name`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
82
96
|
}
|
|
83
97
|
exports.DefineSource = DefineSource;
|
|
84
98
|
class DefineSourceList extends malloy_element_1.DocStatementList {
|
|
@@ -28,13 +28,14 @@ const malloy_query_1 = require("../../model/malloy_query");
|
|
|
28
28
|
const malloy_types_1 = require("../../model/malloy_types");
|
|
29
29
|
const error_factory_1 = require("./error-factory");
|
|
30
30
|
function opOutputStruct(logTo, inputStruct, opDesc) {
|
|
31
|
-
const badModel = error_factory_1.ErrorFactory.isErrorStructDef(inputStruct);
|
|
31
|
+
const badModel = error_factory_1.ErrorFactory.isErrorStructDef(inputStruct) || (0, malloy_types_1.structHasErrors)(inputStruct);
|
|
32
32
|
// We don't want to expose partial segments to the compiler
|
|
33
33
|
if ((0, malloy_types_1.isPartialSegment)(opDesc)) {
|
|
34
34
|
opDesc = { ...opDesc, type: 'reduce' };
|
|
35
35
|
}
|
|
36
|
+
const badOpDesc = (0, malloy_types_1.segmentHasErrors)(opDesc);
|
|
36
37
|
// Don't call into the model code with a broken model
|
|
37
|
-
if (!badModel) {
|
|
38
|
+
if (!badModel && !badOpDesc) {
|
|
38
39
|
try {
|
|
39
40
|
return malloy_query_1.Segment.nextStructDef(inputStruct, opDesc);
|
|
40
41
|
}
|
|
@@ -348,6 +348,8 @@ function numeric(fs, left, op, right) {
|
|
|
348
348
|
evalSpace: (0, malloy_types_1.mergeEvalSpaces)(lhs.evalSpace, rhs.evalSpace),
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
+
// TODO make the error location be the operand that is not a number, rather than
|
|
352
|
+
// always the first operand
|
|
351
353
|
left.log(`Non numeric('${lhs.dataType},${rhs.dataType}') value with '${op}'`);
|
|
352
354
|
return (0, ast_utils_1.errorFor)('numbers required');
|
|
353
355
|
}
|
|
@@ -192,104 +192,109 @@ export declare class MalloyParser extends Parser {
|
|
|
192
192
|
static readonly RULE_sourcePropertyList = 27;
|
|
193
193
|
static readonly RULE_sourceDefinition = 28;
|
|
194
194
|
static readonly RULE_sqExplore = 29;
|
|
195
|
-
static readonly
|
|
196
|
-
static readonly
|
|
197
|
-
static readonly
|
|
198
|
-
static readonly
|
|
199
|
-
static readonly
|
|
200
|
-
static readonly
|
|
201
|
-
static readonly
|
|
202
|
-
static readonly
|
|
203
|
-
static readonly
|
|
204
|
-
static readonly
|
|
205
|
-
static readonly
|
|
206
|
-
static readonly
|
|
207
|
-
static readonly
|
|
208
|
-
static readonly
|
|
209
|
-
static readonly
|
|
210
|
-
static readonly
|
|
211
|
-
static readonly
|
|
212
|
-
static readonly
|
|
213
|
-
static readonly
|
|
214
|
-
static readonly
|
|
215
|
-
static readonly
|
|
216
|
-
static readonly
|
|
217
|
-
static readonly
|
|
218
|
-
static readonly
|
|
219
|
-
static readonly
|
|
220
|
-
static readonly
|
|
221
|
-
static readonly
|
|
222
|
-
static readonly
|
|
223
|
-
static readonly
|
|
224
|
-
static readonly
|
|
225
|
-
static readonly
|
|
226
|
-
static readonly
|
|
227
|
-
static readonly
|
|
228
|
-
static readonly
|
|
229
|
-
static readonly
|
|
230
|
-
static readonly
|
|
231
|
-
static readonly
|
|
232
|
-
static readonly
|
|
233
|
-
static readonly
|
|
234
|
-
static readonly
|
|
235
|
-
static readonly
|
|
236
|
-
static readonly
|
|
237
|
-
static readonly
|
|
238
|
-
static readonly
|
|
239
|
-
static readonly
|
|
240
|
-
static readonly
|
|
241
|
-
static readonly
|
|
242
|
-
static readonly
|
|
243
|
-
static readonly
|
|
244
|
-
static readonly
|
|
245
|
-
static readonly
|
|
246
|
-
static readonly
|
|
247
|
-
static readonly
|
|
248
|
-
static readonly
|
|
249
|
-
static readonly
|
|
250
|
-
static readonly
|
|
251
|
-
static readonly
|
|
252
|
-
static readonly
|
|
253
|
-
static readonly
|
|
254
|
-
static readonly
|
|
255
|
-
static readonly
|
|
256
|
-
static readonly
|
|
257
|
-
static readonly
|
|
258
|
-
static readonly
|
|
259
|
-
static readonly
|
|
260
|
-
static readonly
|
|
261
|
-
static readonly
|
|
262
|
-
static readonly
|
|
263
|
-
static readonly
|
|
264
|
-
static readonly
|
|
265
|
-
static readonly
|
|
266
|
-
static readonly
|
|
267
|
-
static readonly
|
|
268
|
-
static readonly
|
|
269
|
-
static readonly
|
|
270
|
-
static readonly
|
|
271
|
-
static readonly
|
|
272
|
-
static readonly
|
|
273
|
-
static readonly
|
|
274
|
-
static readonly
|
|
275
|
-
static readonly
|
|
276
|
-
static readonly
|
|
277
|
-
static readonly
|
|
278
|
-
static readonly
|
|
279
|
-
static readonly
|
|
280
|
-
static readonly
|
|
281
|
-
static readonly
|
|
282
|
-
static readonly
|
|
283
|
-
static readonly
|
|
284
|
-
static readonly
|
|
285
|
-
static readonly
|
|
286
|
-
static readonly
|
|
287
|
-
static readonly
|
|
288
|
-
static readonly
|
|
289
|
-
static readonly
|
|
290
|
-
static readonly
|
|
291
|
-
static readonly
|
|
292
|
-
static readonly
|
|
195
|
+
static readonly RULE_sourceParameters = 30;
|
|
196
|
+
static readonly RULE_sourceParameter = 31;
|
|
197
|
+
static readonly RULE_parameterNameDef = 32;
|
|
198
|
+
static readonly RULE_sourceNameDef = 33;
|
|
199
|
+
static readonly RULE_exploreProperties = 34;
|
|
200
|
+
static readonly RULE_exploreStatement = 35;
|
|
201
|
+
static readonly RULE_defMeasures = 36;
|
|
202
|
+
static readonly RULE_defDimensions = 37;
|
|
203
|
+
static readonly RULE_renameList = 38;
|
|
204
|
+
static readonly RULE_exploreRenameDef = 39;
|
|
205
|
+
static readonly RULE_defList = 40;
|
|
206
|
+
static readonly RULE_fieldDef = 41;
|
|
207
|
+
static readonly RULE_fieldNameDef = 42;
|
|
208
|
+
static readonly RULE_joinNameDef = 43;
|
|
209
|
+
static readonly RULE_declareStatement = 44;
|
|
210
|
+
static readonly RULE_joinStatement = 45;
|
|
211
|
+
static readonly RULE_queryExtend = 46;
|
|
212
|
+
static readonly RULE_modEither = 47;
|
|
213
|
+
static readonly RULE_sourceArguments = 48;
|
|
214
|
+
static readonly RULE_argumentId = 49;
|
|
215
|
+
static readonly RULE_sourceArgument = 50;
|
|
216
|
+
static readonly RULE_sqExpr = 51;
|
|
217
|
+
static readonly RULE_segExpr = 52;
|
|
218
|
+
static readonly RULE_vExpr = 53;
|
|
219
|
+
static readonly RULE_queryExtendStatement = 54;
|
|
220
|
+
static readonly RULE_queryExtendStatementList = 55;
|
|
221
|
+
static readonly RULE_joinList = 56;
|
|
222
|
+
static readonly RULE_isExplore = 57;
|
|
223
|
+
static readonly RULE_matrixOperation = 58;
|
|
224
|
+
static readonly RULE_joinDef = 59;
|
|
225
|
+
static readonly RULE_joinExpression = 60;
|
|
226
|
+
static readonly RULE_filterStatement = 61;
|
|
227
|
+
static readonly RULE_fieldProperties = 62;
|
|
228
|
+
static readonly RULE_aggregateOrdering = 63;
|
|
229
|
+
static readonly RULE_aggregateOrderBySpec = 64;
|
|
230
|
+
static readonly RULE_aggregateOrderByStatement = 65;
|
|
231
|
+
static readonly RULE_fieldPropertyLimitStatement = 66;
|
|
232
|
+
static readonly RULE_fieldPropertyStatement = 67;
|
|
233
|
+
static readonly RULE_filterClauseList = 68;
|
|
234
|
+
static readonly RULE_whereStatement = 69;
|
|
235
|
+
static readonly RULE_havingStatement = 70;
|
|
236
|
+
static readonly RULE_subQueryDefList = 71;
|
|
237
|
+
static readonly RULE_exploreQueryNameDef = 72;
|
|
238
|
+
static readonly RULE_exploreQueryDef = 73;
|
|
239
|
+
static readonly RULE_queryStatement = 74;
|
|
240
|
+
static readonly RULE_queryJoinStatement = 75;
|
|
241
|
+
static readonly RULE_groupByStatement = 76;
|
|
242
|
+
static readonly RULE_queryFieldList = 77;
|
|
243
|
+
static readonly RULE_queryFieldEntry = 78;
|
|
244
|
+
static readonly RULE_nestStatement = 79;
|
|
245
|
+
static readonly RULE_nestedQueryList = 80;
|
|
246
|
+
static readonly RULE_nestEntry = 81;
|
|
247
|
+
static readonly RULE_aggregateStatement = 82;
|
|
248
|
+
static readonly RULE_calculateStatement = 83;
|
|
249
|
+
static readonly RULE_projectStatement = 84;
|
|
250
|
+
static readonly RULE_partitionByStatement = 85;
|
|
251
|
+
static readonly RULE_orderByStatement = 86;
|
|
252
|
+
static readonly RULE_ordering = 87;
|
|
253
|
+
static readonly RULE_orderBySpec = 88;
|
|
254
|
+
static readonly RULE_limitStatement = 89;
|
|
255
|
+
static readonly RULE_bySpec = 90;
|
|
256
|
+
static readonly RULE_topStatement = 91;
|
|
257
|
+
static readonly RULE_indexElement = 92;
|
|
258
|
+
static readonly RULE_indexFields = 93;
|
|
259
|
+
static readonly RULE_indexStatement = 94;
|
|
260
|
+
static readonly RULE_sampleStatement = 95;
|
|
261
|
+
static readonly RULE_timezoneStatement = 96;
|
|
262
|
+
static readonly RULE_queryAnnotation = 97;
|
|
263
|
+
static readonly RULE_sampleSpec = 98;
|
|
264
|
+
static readonly RULE_aggregate = 99;
|
|
265
|
+
static readonly RULE_malloyType = 100;
|
|
266
|
+
static readonly RULE_compareOp = 101;
|
|
267
|
+
static readonly RULE_string = 102;
|
|
268
|
+
static readonly RULE_shortString = 103;
|
|
269
|
+
static readonly RULE_numericLiteral = 104;
|
|
270
|
+
static readonly RULE_literal = 105;
|
|
271
|
+
static readonly RULE_dateLiteral = 106;
|
|
272
|
+
static readonly RULE_tablePath = 107;
|
|
273
|
+
static readonly RULE_tableURI = 108;
|
|
274
|
+
static readonly RULE_id = 109;
|
|
275
|
+
static readonly RULE_timeframe = 110;
|
|
276
|
+
static readonly RULE_ungroup = 111;
|
|
277
|
+
static readonly RULE_malloyOrSQLType = 112;
|
|
278
|
+
static readonly RULE_fieldExpr = 113;
|
|
279
|
+
static readonly RULE_partialAllowedFieldExpr = 114;
|
|
280
|
+
static readonly RULE_pickStatement = 115;
|
|
281
|
+
static readonly RULE_pick = 116;
|
|
282
|
+
static readonly RULE_argumentList = 117;
|
|
283
|
+
static readonly RULE_fieldNameList = 118;
|
|
284
|
+
static readonly RULE_fieldCollection = 119;
|
|
285
|
+
static readonly RULE_collectionWildCard = 120;
|
|
286
|
+
static readonly RULE_starQualified = 121;
|
|
287
|
+
static readonly RULE_taggedRef = 122;
|
|
288
|
+
static readonly RULE_refExpr = 123;
|
|
289
|
+
static readonly RULE_collectionMember = 124;
|
|
290
|
+
static readonly RULE_fieldPath = 125;
|
|
291
|
+
static readonly RULE_joinName = 126;
|
|
292
|
+
static readonly RULE_fieldName = 127;
|
|
293
|
+
static readonly RULE_justExpr = 128;
|
|
294
|
+
static readonly RULE_sqlExploreNameRef = 129;
|
|
295
|
+
static readonly RULE_nameSQLBlock = 130;
|
|
296
|
+
static readonly RULE_connectionName = 131;
|
|
297
|
+
static readonly RULE_experimentalStatementForTesting = 132;
|
|
293
298
|
static readonly ruleNames: string[];
|
|
294
299
|
private static readonly _LITERAL_NAMES;
|
|
295
300
|
private static readonly _SYMBOLIC_NAMES;
|
|
@@ -330,8 +335,10 @@ export declare class MalloyParser extends Parser {
|
|
|
330
335
|
sourcePropertyList(): SourcePropertyListContext;
|
|
331
336
|
sourceDefinition(): SourceDefinitionContext;
|
|
332
337
|
sqExplore(): SqExploreContext;
|
|
338
|
+
sourceParameters(): SourceParametersContext;
|
|
339
|
+
sourceParameter(): SourceParameterContext;
|
|
340
|
+
parameterNameDef(): ParameterNameDefContext;
|
|
333
341
|
sourceNameDef(): SourceNameDefContext;
|
|
334
|
-
sourceID(): SourceIDContext;
|
|
335
342
|
exploreProperties(): ExplorePropertiesContext;
|
|
336
343
|
exploreStatement(): ExploreStatementContext;
|
|
337
344
|
defMeasures(): DefMeasuresContext;
|
|
@@ -346,6 +353,9 @@ export declare class MalloyParser extends Parser {
|
|
|
346
353
|
joinStatement(): JoinStatementContext;
|
|
347
354
|
queryExtend(): QueryExtendContext;
|
|
348
355
|
modEither(): ModEitherContext;
|
|
356
|
+
sourceArguments(): SourceArgumentsContext;
|
|
357
|
+
argumentId(): ArgumentIdContext;
|
|
358
|
+
sourceArgument(): SourceArgumentContext;
|
|
349
359
|
sqExpr(): SqExprContext;
|
|
350
360
|
sqExpr(_p: number): SqExprContext;
|
|
351
361
|
segExpr(): SegExprContext;
|
|
@@ -769,6 +779,7 @@ export declare class SourceDefinitionContext extends ParserRuleContext {
|
|
|
769
779
|
sourceNameDef(): SourceNameDefContext;
|
|
770
780
|
isDefine(): IsDefineContext;
|
|
771
781
|
sqExplore(): SqExploreContext;
|
|
782
|
+
sourceParameters(): SourceParametersContext | undefined;
|
|
772
783
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
773
784
|
get ruleIndex(): number;
|
|
774
785
|
enterRule(listener: MalloyParserListener): void;
|
|
@@ -783,7 +794,32 @@ export declare class SqExploreContext extends ParserRuleContext {
|
|
|
783
794
|
exitRule(listener: MalloyParserListener): void;
|
|
784
795
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
785
796
|
}
|
|
786
|
-
export declare class
|
|
797
|
+
export declare class SourceParametersContext extends ParserRuleContext {
|
|
798
|
+
OPAREN(): TerminalNode;
|
|
799
|
+
CPAREN(): TerminalNode;
|
|
800
|
+
sourceParameter(): SourceParameterContext[];
|
|
801
|
+
sourceParameter(i: number): SourceParameterContext;
|
|
802
|
+
COMMA(): TerminalNode[];
|
|
803
|
+
COMMA(i: number): TerminalNode;
|
|
804
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
805
|
+
get ruleIndex(): number;
|
|
806
|
+
enterRule(listener: MalloyParserListener): void;
|
|
807
|
+
exitRule(listener: MalloyParserListener): void;
|
|
808
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
809
|
+
}
|
|
810
|
+
export declare class SourceParameterContext extends ParserRuleContext {
|
|
811
|
+
parameterNameDef(): ParameterNameDefContext;
|
|
812
|
+
DOUBLECOLON(): TerminalNode | undefined;
|
|
813
|
+
malloyType(): MalloyTypeContext | undefined;
|
|
814
|
+
IS(): TerminalNode | undefined;
|
|
815
|
+
fieldExpr(): FieldExprContext | undefined;
|
|
816
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
817
|
+
get ruleIndex(): number;
|
|
818
|
+
enterRule(listener: MalloyParserListener): void;
|
|
819
|
+
exitRule(listener: MalloyParserListener): void;
|
|
820
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
821
|
+
}
|
|
822
|
+
export declare class ParameterNameDefContext extends ParserRuleContext {
|
|
787
823
|
id(): IdContext;
|
|
788
824
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
789
825
|
get ruleIndex(): number;
|
|
@@ -791,7 +827,7 @@ export declare class SourceNameDefContext extends ParserRuleContext {
|
|
|
791
827
|
exitRule(listener: MalloyParserListener): void;
|
|
792
828
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
793
829
|
}
|
|
794
|
-
export declare class
|
|
830
|
+
export declare class SourceNameDefContext extends ParserRuleContext {
|
|
795
831
|
id(): IdContext;
|
|
796
832
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
797
833
|
get ruleIndex(): number;
|
|
@@ -1049,6 +1085,37 @@ export declare class ModEitherContext extends ParserRuleContext {
|
|
|
1049
1085
|
exitRule(listener: MalloyParserListener): void;
|
|
1050
1086
|
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
1051
1087
|
}
|
|
1088
|
+
export declare class SourceArgumentsContext extends ParserRuleContext {
|
|
1089
|
+
OPAREN(): TerminalNode;
|
|
1090
|
+
CPAREN(): TerminalNode;
|
|
1091
|
+
sourceArgument(): SourceArgumentContext[];
|
|
1092
|
+
sourceArgument(i: number): SourceArgumentContext;
|
|
1093
|
+
COMMA(): TerminalNode[];
|
|
1094
|
+
COMMA(i: number): TerminalNode;
|
|
1095
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1096
|
+
get ruleIndex(): number;
|
|
1097
|
+
enterRule(listener: MalloyParserListener): void;
|
|
1098
|
+
exitRule(listener: MalloyParserListener): void;
|
|
1099
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
1100
|
+
}
|
|
1101
|
+
export declare class ArgumentIdContext extends ParserRuleContext {
|
|
1102
|
+
id(): IdContext;
|
|
1103
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1104
|
+
get ruleIndex(): number;
|
|
1105
|
+
enterRule(listener: MalloyParserListener): void;
|
|
1106
|
+
exitRule(listener: MalloyParserListener): void;
|
|
1107
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
1108
|
+
}
|
|
1109
|
+
export declare class SourceArgumentContext extends ParserRuleContext {
|
|
1110
|
+
fieldExpr(): FieldExprContext;
|
|
1111
|
+
argumentId(): ArgumentIdContext | undefined;
|
|
1112
|
+
IS(): TerminalNode | undefined;
|
|
1113
|
+
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1114
|
+
get ruleIndex(): number;
|
|
1115
|
+
enterRule(listener: MalloyParserListener): void;
|
|
1116
|
+
exitRule(listener: MalloyParserListener): void;
|
|
1117
|
+
accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
|
|
1118
|
+
}
|
|
1052
1119
|
export declare class SqExprContext extends ParserRuleContext {
|
|
1053
1120
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1054
1121
|
get ruleIndex(): number;
|
|
@@ -1056,6 +1123,7 @@ export declare class SqExprContext extends ParserRuleContext {
|
|
|
1056
1123
|
}
|
|
1057
1124
|
export declare class SQIDContext extends SqExprContext {
|
|
1058
1125
|
id(): IdContext;
|
|
1126
|
+
sourceArguments(): SourceArgumentsContext | undefined;
|
|
1059
1127
|
constructor(ctx: SqExprContext);
|
|
1060
1128
|
enterRule(listener: MalloyParserListener): void;
|
|
1061
1129
|
exitRule(listener: MalloyParserListener): void;
|