@malloydata/malloy 0.0.24-dev230224184907 → 0.0.24-dev230228224434
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/connection_utils.js +10 -10
- package/dist/dialect/dialect.d.ts +2 -2
- package/dist/dialect/dialect.js +13 -13
- package/dist/dialect/dialect_map.d.ts +1 -1
- package/dist/dialect/duckdb.d.ts +3 -3
- package/dist/dialect/duckdb.js +44 -44
- package/dist/dialect/index.d.ts +6 -6
- package/dist/dialect/postgres.d.ts +3 -3
- package/dist/dialect/postgres.js +46 -46
- package/dist/dialect/standardsql.d.ts +4 -4
- package/dist/dialect/standardsql.js +51 -51
- package/dist/index.d.ts +10 -10
- package/dist/lang/ast/ast-utils.d.ts +1 -1
- package/dist/lang/ast/ast-utils.js +3 -3
- package/dist/lang/ast/elements/define-query.d.ts +3 -3
- package/dist/lang/ast/elements/define-query.js +6 -6
- package/dist/lang/ast/elements/define-source.d.ts +4 -4
- package/dist/lang/ast/elements/define-source.js +8 -8
- package/dist/lang/ast/elements/import-statement.d.ts +2 -2
- package/dist/lang/ast/elements/import-statement.js +7 -7
- package/dist/lang/ast/elements/pipeline-desc.d.ts +5 -5
- package/dist/lang/ast/elements/pipeline-desc.js +11 -11
- package/dist/lang/ast/elements/refined-source.d.ts +4 -4
- package/dist/lang/ast/elements/refined-source.js +6 -6
- package/dist/lang/ast/elements/source.d.ts +3 -3
- package/dist/lang/ast/elements/source.js +1 -1
- package/dist/lang/ast/error-factory.d.ts +1 -1
- package/dist/lang/ast/error-factory.js +15 -15
- package/dist/lang/ast/executors/index-executor.d.ts +7 -7
- package/dist/lang/ast/executors/index-executor.js +4 -4
- package/dist/lang/ast/executors/project-executor.d.ts +5 -5
- package/dist/lang/ast/executors/project-executor.js +2 -2
- package/dist/lang/ast/executors/reduce-executor.d.ts +8 -8
- package/dist/lang/ast/executors/reduce-executor.js +5 -5
- package/dist/lang/ast/expressions/apply.d.ts +2 -2
- package/dist/lang/ast/expressions/apply.js +1 -1
- package/dist/lang/ast/expressions/binary-boolean.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-boolean.js +6 -6
- package/dist/lang/ast/expressions/binary-numeric.d.ts +3 -3
- package/dist/lang/ast/expressions/binary-numeric.js +2 -2
- package/dist/lang/ast/expressions/boolean.d.ts +4 -4
- package/dist/lang/ast/expressions/boolean.js +2 -2
- package/dist/lang/ast/expressions/constant-sub-expression.d.ts +4 -4
- package/dist/lang/ast/expressions/constant-sub-expression.js +12 -12
- package/dist/lang/ast/expressions/expr-add-sub.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-add-sub.js +1 -1
- package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-aggregate-function.js +15 -15
- package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-alternation-tree.js +6 -6
- package/dist/lang/ast/expressions/expr-asymmetric.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-asymmetric.js +3 -3
- package/dist/lang/ast/expressions/expr-avg.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-avg.js +2 -2
- package/dist/lang/ast/expressions/expr-cast.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-cast.js +6 -6
- package/dist/lang/ast/expressions/expr-compare.d.ts +5 -5
- package/dist/lang/ast/expressions/expr-compare.js +9 -9
- package/dist/lang/ast/expressions/expr-count-distinct.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-count-distinct.js +1 -1
- package/dist/lang/ast/expressions/expr-count.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-count.js +10 -10
- package/dist/lang/ast/expressions/expr-filter.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-filter.js +13 -13
- package/dist/lang/ast/expressions/expr-func.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-func.js +8 -8
- package/dist/lang/ast/expressions/expr-granular-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-granular-time.js +17 -17
- package/dist/lang/ast/expressions/expr-id-reference.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-id-reference.js +11 -11
- package/dist/lang/ast/expressions/expr-logical-op.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-logical-op.js +1 -1
- package/dist/lang/ast/expressions/expr-max.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-max.js +1 -1
- package/dist/lang/ast/expressions/expr-min.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-min.js +1 -1
- package/dist/lang/ast/expressions/expr-minus.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-minus.js +5 -5
- package/dist/lang/ast/expressions/expr-mul-div.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-mul-div.js +1 -1
- package/dist/lang/ast/expressions/expr-not.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-not.js +3 -3
- package/dist/lang/ast/expressions/expr-now.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-now.js +8 -8
- package/dist/lang/ast/expressions/expr-null.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-null.js +4 -4
- package/dist/lang/ast/expressions/expr-number.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-number.js +2 -2
- package/dist/lang/ast/expressions/expr-parens.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-parens.js +3 -3
- package/dist/lang/ast/expressions/expr-regex.d.ts +2 -2
- package/dist/lang/ast/expressions/expr-regex.js +4 -4
- package/dist/lang/ast/expressions/expr-string.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-string.js +8 -8
- package/dist/lang/ast/expressions/expr-sum.d.ts +3 -3
- package/dist/lang/ast/expressions/expr-sum.js +2 -2
- package/dist/lang/ast/expressions/expr-time-extract.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time-extract.js +30 -30
- package/dist/lang/ast/expressions/expr-time.d.ts +4 -4
- package/dist/lang/ast/expressions/expr-time.js +10 -10
- package/dist/lang/ast/expressions/expr-ungroup.d.ts +6 -6
- package/dist/lang/ast/expressions/expr-ungroup.js +13 -13
- package/dist/lang/ast/expressions/for-range.d.ts +4 -4
- package/dist/lang/ast/expressions/for-range.js +17 -17
- package/dist/lang/ast/expressions/granular-literal.d.ts +4 -4
- package/dist/lang/ast/expressions/granular-literal.js +34 -34
- package/dist/lang/ast/expressions/partial-compare.d.ts +4 -4
- package/dist/lang/ast/expressions/partial-compare.js +4 -4
- package/dist/lang/ast/expressions/pick-when.d.ts +4 -4
- package/dist/lang/ast/expressions/pick-when.js +32 -32
- package/dist/lang/ast/expressions/range.d.ts +3 -3
- package/dist/lang/ast/expressions/range.js +20 -20
- package/dist/lang/ast/expressions/time-frame.d.ts +2 -2
- package/dist/lang/ast/expressions/time-frame.js +3 -3
- package/dist/lang/ast/expressions/top-by.d.ts +4 -4
- package/dist/lang/ast/expressions/top-by.js +5 -5
- package/dist/lang/ast/expressions/unary.d.ts +1 -1
- package/dist/lang/ast/expressions/unary.js +1 -1
- package/dist/lang/ast/expressions/utils.d.ts +2 -2
- package/dist/lang/ast/expressions/utils.js +6 -6
- package/dist/lang/ast/field-space/column-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/dynamic-space.d.ts +7 -7
- package/dist/lang/ast/field-space/dynamic-space.js +2 -2
- package/dist/lang/ast/field-space/field-definition-value.d.ts +5 -5
- package/dist/lang/ast/field-space/index-field-space.d.ts +3 -3
- package/dist/lang/ast/field-space/index-field-space.js +4 -4
- package/dist/lang/ast/field-space/join-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/project-field-space.d.ts +2 -2
- package/dist/lang/ast/field-space/project-field-space.js +5 -5
- package/dist/lang/ast/field-space/query-field-struct.d.ts +3 -3
- package/dist/lang/ast/field-space/query-field-struct.js +1 -1
- package/dist/lang/ast/field-space/query-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/query-space-field.js +1 -1
- package/dist/lang/ast/field-space/query-spaces.d.ts +11 -11
- package/dist/lang/ast/field-space/query-spaces.js +8 -8
- package/dist/lang/ast/field-space/reference-field.d.ts +5 -5
- package/dist/lang/ast/field-space/reference-field.js +1 -1
- package/dist/lang/ast/field-space/refined-space.d.ts +4 -4
- package/dist/lang/ast/field-space/refined-space.js +2 -2
- package/dist/lang/ast/field-space/rename-space-field.d.ts +3 -3
- package/dist/lang/ast/field-space/rename-space-field.js +2 -2
- package/dist/lang/ast/field-space/static-space.d.ts +7 -7
- package/dist/lang/ast/field-space/static-space.js +12 -12
- package/dist/lang/ast/field-space/struct-space-field-base.d.ts +4 -4
- package/dist/lang/ast/field-space/struct-space-field-base.js +1 -1
- package/dist/lang/ast/field-space/wild-space-field.d.ts +4 -4
- package/dist/lang/ast/field-space/wild-space-field.js +1 -1
- package/dist/lang/ast/fragtype-utils.d.ts +1 -1
- package/dist/lang/ast/fragtype-utils.js +15 -15
- package/dist/lang/ast/index.d.ts +90 -90
- package/dist/lang/ast/parameters/constant-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/constant-parameter.js +10 -10
- package/dist/lang/ast/parameters/has-parameter.d.ts +3 -3
- package/dist/lang/ast/parameters/has-parameter.js +7 -7
- package/dist/lang/ast/query-elements/anonymous-query.d.ts +3 -3
- package/dist/lang/ast/query-elements/anonymous-query.js +2 -2
- package/dist/lang/ast/query-elements/existing-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/existing-query.js +10 -10
- package/dist/lang/ast/query-elements/full-query.d.ts +4 -4
- package/dist/lang/ast/query-elements/full-query.js +10 -10
- package/dist/lang/ast/query-elements/query-head-struct.d.ts +2 -2
- package/dist/lang/ast/query-elements/query-head-struct.js +2 -2
- package/dist/lang/ast/query-items/field-declaration.d.ts +6 -6
- package/dist/lang/ast/query-items/field-declaration.js +14 -14
- package/dist/lang/ast/query-items/field-references.d.ts +6 -6
- package/dist/lang/ast/query-items/field-references.js +9 -9
- package/dist/lang/ast/query-properties/aggregate.d.ts +2 -2
- package/dist/lang/ast/query-properties/aggregate.js +1 -1
- package/dist/lang/ast/query-properties/declare-fields.d.ts +2 -2
- package/dist/lang/ast/query-properties/declare-fields.js +1 -1
- package/dist/lang/ast/query-properties/dimmensions.d.ts +2 -2
- package/dist/lang/ast/query-properties/dimmensions.js +1 -1
- package/dist/lang/ast/query-properties/filters.d.ts +4 -4
- package/dist/lang/ast/query-properties/filters.js +16 -16
- package/dist/lang/ast/query-properties/group-by.d.ts +2 -2
- package/dist/lang/ast/query-properties/group-by.js +1 -1
- package/dist/lang/ast/query-properties/indexing.d.ts +3 -3
- package/dist/lang/ast/query-properties/indexing.js +3 -3
- package/dist/lang/ast/query-properties/joins.d.ts +6 -6
- package/dist/lang/ast/query-properties/joins.js +27 -27
- package/dist/lang/ast/query-properties/limit.d.ts +1 -1
- package/dist/lang/ast/query-properties/limit.js +1 -1
- package/dist/lang/ast/query-properties/measures.d.ts +2 -2
- package/dist/lang/ast/query-properties/measures.js +1 -1
- package/dist/lang/ast/query-properties/nest-reference.d.ts +2 -2
- package/dist/lang/ast/query-properties/nest-reference.js +1 -1
- package/dist/lang/ast/query-properties/nest.d.ts +7 -7
- package/dist/lang/ast/query-properties/nest.js +7 -7
- package/dist/lang/ast/query-properties/nests.d.ts +2 -2
- package/dist/lang/ast/query-properties/nests.js +1 -1
- package/dist/lang/ast/query-properties/ordering.d.ts +3 -3
- package/dist/lang/ast/query-properties/ordering.js +6 -6
- package/dist/lang/ast/query-properties/project-statement.d.ts +2 -2
- package/dist/lang/ast/query-properties/project-statement.js +1 -1
- package/dist/lang/ast/query-properties/qop-desc.d.ts +7 -7
- package/dist/lang/ast/query-properties/qop-desc.js +20 -20
- package/dist/lang/ast/query-properties/sampling.d.ts +2 -2
- package/dist/lang/ast/query-properties/sampling.js +1 -1
- package/dist/lang/ast/query-properties/top.d.ts +4 -4
- package/dist/lang/ast/query-properties/top.js +5 -5
- package/dist/lang/ast/source-properties/field-list-edit.d.ts +4 -4
- package/dist/lang/ast/source-properties/field-list-edit.js +2 -2
- package/dist/lang/ast/source-properties/primary-key.d.ts +2 -2
- package/dist/lang/ast/source-properties/primary-key.js +2 -2
- package/dist/lang/ast/source-properties/renames.d.ts +2 -2
- package/dist/lang/ast/source-properties/renames.js +3 -3
- package/dist/lang/ast/source-properties/turtles.d.ts +2 -2
- package/dist/lang/ast/source-properties/turtles.js +1 -1
- package/dist/lang/ast/sources/named-source.d.ts +4 -4
- package/dist/lang/ast/sources/named-source.js +5 -5
- package/dist/lang/ast/sources/query-source.d.ts +3 -3
- package/dist/lang/ast/sources/query-source.js +3 -3
- package/dist/lang/ast/sources/sql-source.d.ts +2 -2
- package/dist/lang/ast/sources/sql-source.js +2 -2
- package/dist/lang/ast/sources/table-source.d.ts +2 -2
- package/dist/lang/ast/sources/table-source.js +7 -7
- package/dist/lang/ast/space-seed.d.ts +2 -2
- package/dist/lang/ast/space-seed.js +1 -1
- package/dist/lang/ast/sql-elements/sql-statement.d.ts +4 -4
- package/dist/lang/ast/sql-elements/sql-statement.js +9 -9
- package/dist/lang/ast/sql-elements/sql-string.d.ts +3 -3
- package/dist/lang/ast/sql-elements/sql-string.js +6 -6
- package/dist/lang/ast/struct-utils.d.ts +2 -2
- package/dist/lang/ast/struct-utils.js +3 -3
- package/dist/lang/ast/time-utils.d.ts +6 -6
- package/dist/lang/ast/time-utils.js +46 -46
- package/dist/lang/ast/types/document-compile-result.d.ts +2 -2
- package/dist/lang/ast/types/executor.d.ts +3 -3
- package/dist/lang/ast/types/explore-desc.d.ts +2 -2
- package/dist/lang/ast/types/explore-desc.js +1 -1
- package/dist/lang/ast/types/explore-field.d.ts +3 -3
- package/dist/lang/ast/types/expr-result.d.ts +2 -2
- package/dist/lang/ast/types/expr-value.d.ts +2 -2
- package/dist/lang/ast/types/expression-def.d.ts +4 -4
- package/dist/lang/ast/types/expression-def.js +86 -86
- package/dist/lang/ast/types/field-collection-member.d.ts +3 -3
- package/dist/lang/ast/types/field-decl.d.ts +5 -5
- package/dist/lang/ast/types/field-space.d.ts +5 -5
- package/dist/lang/ast/types/field-space.js +1 -1
- package/dist/lang/ast/types/granular-result.d.ts +3 -3
- package/dist/lang/ast/types/granular-result.js +1 -1
- package/dist/lang/ast/types/lookup-result.d.ts +1 -1
- package/dist/lang/ast/types/malloy-element.d.ts +6 -6
- package/dist/lang/ast/types/malloy-element.js +49 -49
- package/dist/lang/ast/types/model-entry.d.ts +1 -1
- package/dist/lang/ast/types/name-space.d.ts +1 -1
- package/dist/lang/ast/types/nested-query.d.ts +2 -2
- package/dist/lang/ast/types/op-desc.d.ts +2 -2
- package/dist/lang/ast/types/query-comp.d.ts +1 -1
- package/dist/lang/ast/types/query-element.d.ts +3 -3
- package/dist/lang/ast/types/query-item.d.ts +4 -4
- package/dist/lang/ast/types/query-property.d.ts +15 -15
- package/dist/lang/ast/types/source-property.d.ts +8 -8
- package/dist/lang/ast/types/space-entry.d.ts +2 -2
- package/dist/lang/ast/types/space-field.d.ts +4 -4
- package/dist/lang/ast/types/space-field.js +4 -4
- package/dist/lang/ast/types/space-param.d.ts +4 -4
- package/dist/lang/ast/types/space-param.js +4 -4
- package/dist/lang/ast/types/time-result.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.d.ts +2 -2
- package/dist/lang/ast/types/turtle-headed-pipe.js +1 -1
- package/dist/lang/ast/types/type-desc.d.ts +3 -3
- package/dist/lang/field-utils.d.ts +1 -1
- package/dist/lang/field-utils.js +4 -4
- package/dist/lang/index.d.ts +10 -10
- package/dist/lang/malloy-to-ast.d.ts +8 -8
- package/dist/lang/malloy-to-ast.js +68 -68
- package/dist/lang/parse-error-handler.d.ts +3 -3
- package/dist/lang/parse-error-handler.js +4 -4
- package/dist/lang/parse-log.d.ts +2 -2
- package/dist/lang/parse-log.js +1 -1
- package/dist/lang/parse-malloy.d.ts +7 -7
- package/dist/lang/parse-malloy.js +81 -81
- package/dist/lang/parse-tree-walkers/document-completion-walker.d.ts +2 -2
- package/dist/lang/parse-tree-walkers/document-completion-walker.js +38 -38
- package/dist/lang/parse-tree-walkers/document-help-context-walker.d.ts +1 -1
- package/dist/lang/parse-tree-walkers/document-help-context-walker.js +14 -14
- package/dist/lang/parse-tree-walkers/document-highlight-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/document-highlight-walker.js +85 -85
- package/dist/lang/parse-tree-walkers/document-symbol-walker.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/document-symbol-walker.js +40 -40
- package/dist/lang/parse-tree-walkers/explore-query-walker.d.ts +3 -3
- package/dist/lang/parse-tree-walkers/explore-query-walker.js +3 -3
- package/dist/lang/parse-tree-walkers/find-external-references.d.ts +4 -4
- package/dist/lang/parse-tree-walkers/find-external-references.js +2 -2
- package/dist/lang/reference-list.d.ts +1 -1
- package/dist/lang/test/document-help-context-walker.spec.js +9 -9
- package/dist/lang/test/document-symbol-walker.spec.js +32 -32
- package/dist/lang/test/field-symbols.spec.js +87 -87
- package/dist/lang/test/parse.spec.d.ts +1 -1
- package/dist/lang/test/parse.spec.js +768 -768
- package/dist/lang/test/test-translator.d.ts +6 -6
- package/dist/lang/test/test-translator.js +159 -159
- package/dist/lang/translate-response.d.ts +7 -7
- package/dist/lang/translate-response.js +1 -1
- package/dist/lang/zone.d.ts +5 -5
- package/dist/lang/zone.js +8 -8
- package/dist/malloy.d.ts +7 -7
- package/dist/malloy.js +192 -192
- package/dist/model/index.d.ts +2 -2
- package/dist/model/malloy_query.d.ts +12 -12
- package/dist/model/malloy_query.js +497 -502
- package/dist/model/malloy_types.d.ts +68 -68
- package/dist/model/malloy_types.js +102 -102
- package/dist/model/sql_block.d.ts +1 -1
- package/dist/model/sql_block.js +4 -4
- package/dist/model/utils.d.ts +1 -1
- package/dist/model/utils.js +10 -10
- package/dist/runtime_types.d.ts +2 -2
- package/package.json +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { ExpressionDef } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
3
|
export declare class ExprNULL extends ExpressionDef {
|
|
4
4
|
elementType: string;
|
|
5
5
|
getExpression(): ExprValue;
|
|
@@ -27,13 +27,13 @@ const expression_def_1 = require("../types/expression-def");
|
|
|
27
27
|
class ExprNULL extends expression_def_1.ExpressionDef {
|
|
28
28
|
constructor() {
|
|
29
29
|
super(...arguments);
|
|
30
|
-
this.elementType =
|
|
30
|
+
this.elementType = 'NULL';
|
|
31
31
|
}
|
|
32
32
|
getExpression() {
|
|
33
33
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
dataType: 'null',
|
|
35
|
+
value: ['NULL'],
|
|
36
|
+
expressionType: 'scalar',
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { FieldSpace } from
|
|
3
|
-
import { ExpressionDef } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { FieldSpace } from '../types/field-space';
|
|
3
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
4
4
|
export declare class ExprNumber extends ExpressionDef {
|
|
5
5
|
readonly n: string;
|
|
6
6
|
elementType: string;
|
|
@@ -29,13 +29,13 @@ class ExprNumber extends expression_def_1.ExpressionDef {
|
|
|
29
29
|
constructor(n) {
|
|
30
30
|
super();
|
|
31
31
|
this.n = n;
|
|
32
|
-
this.elementType =
|
|
32
|
+
this.elementType = 'numeric literal';
|
|
33
33
|
}
|
|
34
34
|
getExpression(_fs) {
|
|
35
35
|
return this.constantExpression();
|
|
36
36
|
}
|
|
37
37
|
constantExpression() {
|
|
38
|
-
return { ...fragtype_utils_1.FT.numberT,
|
|
38
|
+
return { ...fragtype_utils_1.FT.numberT, value: [this.n] };
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.ExprNumber = ExprNumber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { ExpressionDef } from
|
|
3
|
-
import { FieldSpace } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
|
+
import { FieldSpace } from '../types/field-space';
|
|
4
4
|
export declare class ExprParens extends ExpressionDef {
|
|
5
5
|
readonly expr: ExpressionDef;
|
|
6
6
|
elementType: string;
|
|
@@ -26,16 +26,16 @@ exports.ExprParens = void 0;
|
|
|
26
26
|
const expression_def_1 = require("../types/expression-def");
|
|
27
27
|
class ExprParens extends expression_def_1.ExpressionDef {
|
|
28
28
|
constructor(expr) {
|
|
29
|
-
super({
|
|
29
|
+
super({ expr: expr });
|
|
30
30
|
this.expr = expr;
|
|
31
|
-
this.elementType =
|
|
31
|
+
this.elementType = '(expression)';
|
|
32
32
|
}
|
|
33
33
|
requestExpression(fs) {
|
|
34
34
|
return this.expr.requestExpression(fs);
|
|
35
35
|
}
|
|
36
36
|
getExpression(fs) {
|
|
37
37
|
const subExpr = this.expr.getExpression(fs);
|
|
38
|
-
return { ...subExpr,
|
|
38
|
+
return { ...subExpr, value: ['(', ...subExpr.value, ')'] };
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.ExprParens = ExprParens;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { ExpressionDef } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
3
|
export declare class ExprRegEx extends ExpressionDef {
|
|
4
4
|
readonly regex: string;
|
|
5
5
|
elementType: string;
|
|
@@ -28,13 +28,13 @@ class ExprRegEx extends expression_def_1.ExpressionDef {
|
|
|
28
28
|
constructor(regex) {
|
|
29
29
|
super();
|
|
30
30
|
this.regex = regex;
|
|
31
|
-
this.elementType =
|
|
31
|
+
this.elementType = 'regular expression literal';
|
|
32
32
|
}
|
|
33
33
|
getExpression() {
|
|
34
34
|
return {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
dataType: 'regular expression',
|
|
36
|
+
expressionType: 'scalar',
|
|
37
|
+
value: [`r'${this.regex}'`],
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExpressionDef } from
|
|
2
|
-
import { FieldSpace } from
|
|
3
|
-
import { ExprValue } from
|
|
1
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
2
|
+
import { FieldSpace } from '../types/field-space';
|
|
3
|
+
import { ExprValue } from '../types/expr-value';
|
|
4
4
|
export declare class ExprString extends ExpressionDef {
|
|
5
5
|
elementType: string;
|
|
6
6
|
value: string;
|
|
@@ -28,21 +28,21 @@ const fragtype_utils_1 = require("../fragtype-utils");
|
|
|
28
28
|
class ExprString extends expression_def_1.ExpressionDef {
|
|
29
29
|
constructor(src) {
|
|
30
30
|
super();
|
|
31
|
-
this.elementType =
|
|
31
|
+
this.elementType = 'string literal';
|
|
32
32
|
const bareStr = src.slice(1, -1);
|
|
33
|
-
const val = bareStr.replace(/\\(.)/g,
|
|
33
|
+
const val = bareStr.replace(/\\(.)/g, '$1');
|
|
34
34
|
this.value = val;
|
|
35
35
|
}
|
|
36
36
|
getExpression(_fs) {
|
|
37
37
|
return {
|
|
38
38
|
...fragtype_utils_1.FT.stringT,
|
|
39
|
-
|
|
39
|
+
value: [
|
|
40
40
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
]
|
|
41
|
+
type: 'dialect',
|
|
42
|
+
function: 'stringLiteral',
|
|
43
|
+
literal: this.value,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldReference } from
|
|
2
|
-
import { ExpressionDef } from
|
|
3
|
-
import { ExprAsymmetric } from
|
|
1
|
+
import { FieldReference } from '../query-items/field-references';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
|
+
import { ExprAsymmetric } from './expr-asymmetric';
|
|
4
4
|
export declare class ExprSum extends ExprAsymmetric {
|
|
5
5
|
constructor(expr: ExpressionDef | undefined, source?: FieldReference);
|
|
6
6
|
}
|
|
@@ -26,8 +26,8 @@ exports.ExprSum = void 0;
|
|
|
26
26
|
const expr_asymmetric_1 = require("./expr-asymmetric");
|
|
27
27
|
class ExprSum extends expr_asymmetric_1.ExprAsymmetric {
|
|
28
28
|
constructor(expr, source) {
|
|
29
|
-
super(
|
|
30
|
-
this.has({
|
|
29
|
+
super('sum', expr, source);
|
|
30
|
+
this.has({ source: source });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.ExprSum = ExprSum;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExtractUnit } from
|
|
2
|
-
import { ExprValue } from
|
|
3
|
-
import { ExpressionDef } from
|
|
4
|
-
import { FieldSpace } from
|
|
1
|
+
import { ExtractUnit } from '../../../model/malloy_types';
|
|
2
|
+
import { ExprValue } from '../types/expr-value';
|
|
3
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
4
|
+
import { FieldSpace } from '../types/field-space';
|
|
5
5
|
export declare class ExprTimeExtract extends ExpressionDef {
|
|
6
6
|
readonly extractText: string;
|
|
7
7
|
readonly args: ExpressionDef[];
|
|
@@ -29,10 +29,10 @@ const expression_def_1 = require("../types/expression-def");
|
|
|
29
29
|
const range_1 = require("./range");
|
|
30
30
|
class ExprTimeExtract extends expression_def_1.ExpressionDef {
|
|
31
31
|
constructor(extractText, args) {
|
|
32
|
-
super({
|
|
32
|
+
super({ args: args });
|
|
33
33
|
this.extractText = extractText;
|
|
34
34
|
this.args = args;
|
|
35
|
-
this.elementType =
|
|
35
|
+
this.elementType = 'timeExtract';
|
|
36
36
|
}
|
|
37
37
|
static extractor(funcName) {
|
|
38
38
|
const mappedName = ExprTimeExtract.pluralMap[funcName];
|
|
@@ -48,7 +48,7 @@ class ExprTimeExtract extends expression_def_1.ExpressionDef {
|
|
|
48
48
|
if (extractTo) {
|
|
49
49
|
if (this.args.length !== 1) {
|
|
50
50
|
this.log(`Extraction function ${extractTo} requires one argument`);
|
|
51
|
-
return (0, ast_utils_1.errorFor)(
|
|
51
|
+
return (0, ast_utils_1.errorFor)('{this.name} arg count');
|
|
52
52
|
}
|
|
53
53
|
const from = this.args[0];
|
|
54
54
|
if (from instanceof range_1.Range) {
|
|
@@ -67,33 +67,33 @@ class ExprTimeExtract extends expression_def_1.ExpressionDef {
|
|
|
67
67
|
return (0, ast_utils_1.errorFor)(`${extractTo} bad extraction`);
|
|
68
68
|
}
|
|
69
69
|
return {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
dataType: 'number',
|
|
71
|
+
expressionType: (0, malloy_types_1.maxExpressionType)(first.expressionType, last.expressionType),
|
|
72
|
+
value: [
|
|
73
73
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
]
|
|
74
|
+
type: 'dialect',
|
|
75
|
+
function: 'timeDiff',
|
|
76
|
+
units: extractTo,
|
|
77
|
+
left: { valueType: first.dataType, value: first.value },
|
|
78
|
+
right: { valueType: last.dataType, value: last.value },
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
84
|
const argV = from.getExpression(fs);
|
|
85
85
|
if ((0, malloy_types_1.isTimeFieldType)(argV.dataType)) {
|
|
86
86
|
return {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
dataType: 'number',
|
|
88
|
+
expressionType: argV.expressionType,
|
|
89
|
+
value: [
|
|
90
90
|
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
]
|
|
91
|
+
type: 'dialect',
|
|
92
|
+
function: 'extract',
|
|
93
|
+
expr: { value: argV.value, valueType: argV.dataType },
|
|
94
|
+
units: extractTo,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
this.log(`${this.extractText}() requires time type, not '${argV.dataType}'`);
|
|
@@ -105,13 +105,13 @@ class ExprTimeExtract extends expression_def_1.ExpressionDef {
|
|
|
105
105
|
}
|
|
106
106
|
exports.ExprTimeExtract = ExprTimeExtract;
|
|
107
107
|
ExprTimeExtract.pluralMap = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
years: 'year',
|
|
109
|
+
quarters: 'quarter',
|
|
110
|
+
months: 'month',
|
|
111
|
+
weeks: 'week',
|
|
112
|
+
days: 'day',
|
|
113
|
+
hours: 'hour',
|
|
114
|
+
minutes: 'minute',
|
|
115
|
+
seconds: 'second',
|
|
116
116
|
};
|
|
117
117
|
//# sourceMappingURL=expr-time-extract.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExpressionType, Fragment, TimeFieldType } from
|
|
2
|
-
import { FieldSpace } from
|
|
3
|
-
import { ExprValue } from
|
|
4
|
-
import { ExpressionDef } from
|
|
1
|
+
import { ExpressionType, Fragment, TimeFieldType } from '../../../model/malloy_types';
|
|
2
|
+
import { FieldSpace } from '../types/field-space';
|
|
3
|
+
import { ExprValue } from '../types/expr-value';
|
|
4
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
5
5
|
export declare class ExprTime extends ExpressionDef {
|
|
6
6
|
elementType: string;
|
|
7
7
|
readonly translationValue: ExprValue;
|
|
@@ -27,14 +27,14 @@ const malloy_types_1 = require("../../../model/malloy_types");
|
|
|
27
27
|
const utils_1 = require("./utils");
|
|
28
28
|
const expression_def_1 = require("../types/expression-def");
|
|
29
29
|
class ExprTime extends expression_def_1.ExpressionDef {
|
|
30
|
-
constructor(timeType, value, expressionType =
|
|
30
|
+
constructor(timeType, value, expressionType = 'scalar') {
|
|
31
31
|
super();
|
|
32
|
-
this.elementType =
|
|
32
|
+
this.elementType = 'timestampOrDate';
|
|
33
33
|
this.elementType = timeType;
|
|
34
34
|
this.translationValue = {
|
|
35
|
-
|
|
35
|
+
dataType: timeType,
|
|
36
36
|
expressionType,
|
|
37
|
-
|
|
37
|
+
value: typeof value === 'string' ? [value] : value,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
getExpression(_fs) {
|
|
@@ -42,13 +42,13 @@ class ExprTime extends expression_def_1.ExpressionDef {
|
|
|
42
42
|
}
|
|
43
43
|
static fromValue(timeType, expr) {
|
|
44
44
|
let value = expr.value;
|
|
45
|
-
if (timeType
|
|
45
|
+
if (timeType !== expr.dataType) {
|
|
46
46
|
const toTs = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
type: 'dialect',
|
|
48
|
+
function: 'cast',
|
|
49
|
+
safe: false,
|
|
50
|
+
dstType: timeType,
|
|
51
|
+
expr: expr.value,
|
|
52
52
|
};
|
|
53
53
|
if ((0, malloy_types_1.isTimeFieldType)(expr.dataType)) {
|
|
54
54
|
toTs.srcType = expr.dataType;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { ExpressionDef } from
|
|
3
|
-
import { FieldName, FieldSpace } from
|
|
4
|
-
import { FieldValueType } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
|
+
import { FieldName, FieldSpace } from '../types/field-space';
|
|
4
|
+
import { FieldValueType } from '../types/type-desc';
|
|
5
5
|
export declare class ExprUngroup extends ExpressionDef {
|
|
6
|
-
readonly control:
|
|
6
|
+
readonly control: 'all' | 'exclude';
|
|
7
7
|
readonly expr: ExpressionDef;
|
|
8
8
|
readonly fields: FieldName[];
|
|
9
9
|
legalChildTypes: import("../types/type-desc").TypeDesc[];
|
|
10
10
|
elementType: string;
|
|
11
|
-
constructor(control:
|
|
11
|
+
constructor(control: 'all' | 'exclude', expr: ExpressionDef, fields: FieldName[]);
|
|
12
12
|
returns(_forExpression: ExprValue): FieldValueType;
|
|
13
13
|
getExpression(fs: FieldSpace): ExprValue;
|
|
14
14
|
}
|
|
@@ -31,27 +31,27 @@ const field_declaration_1 = require("../query-items/field-declaration");
|
|
|
31
31
|
const expression_def_1 = require("../types/expression-def");
|
|
32
32
|
class ExprUngroup extends expression_def_1.ExpressionDef {
|
|
33
33
|
constructor(control, expr, fields) {
|
|
34
|
-
super({
|
|
34
|
+
super({ expr: expr, fields: fields });
|
|
35
35
|
this.control = control;
|
|
36
36
|
this.expr = expr;
|
|
37
37
|
this.fields = fields;
|
|
38
38
|
this.legalChildTypes = fragtype_utils_1.FT.anyAtomicT;
|
|
39
|
-
this.elementType =
|
|
39
|
+
this.elementType = 'ungroup';
|
|
40
40
|
}
|
|
41
41
|
returns(_forExpression) {
|
|
42
|
-
return
|
|
42
|
+
return 'number';
|
|
43
43
|
}
|
|
44
44
|
getExpression(fs) {
|
|
45
45
|
const exprVal = this.expr.getExpression(fs);
|
|
46
46
|
if (!(0, malloy_types_1.expressionIsAggregate)(exprVal.expressionType)) {
|
|
47
47
|
this.expr.log(`${this.control}() expression must be an aggregate`);
|
|
48
|
-
return (0, ast_utils_1.errorFor)(
|
|
48
|
+
return (0, ast_utils_1.errorFor)('ungrouped scalar');
|
|
49
49
|
}
|
|
50
50
|
const ungroup = {
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
type: this.control,
|
|
52
|
+
e: exprVal.value,
|
|
53
53
|
};
|
|
54
|
-
if (this.typeCheck(this.expr, { ...exprVal,
|
|
54
|
+
if (this.typeCheck(this.expr, { ...exprVal, expressionType: 'scalar' })) {
|
|
55
55
|
if (this.fields.length > 0) {
|
|
56
56
|
let qs = fs;
|
|
57
57
|
if (fs instanceof field_declaration_1.DefSpace) {
|
|
@@ -59,11 +59,11 @@ class ExprUngroup extends expression_def_1.ExpressionDef {
|
|
|
59
59
|
}
|
|
60
60
|
if (!(qs instanceof query_spaces_1.QueryInputSpace)) {
|
|
61
61
|
this.log(`${this.control}() must be in a query -- weird internal error`);
|
|
62
|
-
return (0, ast_utils_1.errorFor)(
|
|
62
|
+
return (0, ast_utils_1.errorFor)('ungroup query check');
|
|
63
63
|
}
|
|
64
64
|
const output = qs.result;
|
|
65
65
|
const dstFields = [];
|
|
66
|
-
const isExclude = this.control
|
|
66
|
+
const isExclude = this.control === 'exclude';
|
|
67
67
|
for (const mustBeInOutput of this.fields) {
|
|
68
68
|
output.whenComplete(() => {
|
|
69
69
|
output.checkUngroup(mustBeInOutput, isExclude);
|
|
@@ -73,13 +73,13 @@ class ExprUngroup extends expression_def_1.ExpressionDef {
|
|
|
73
73
|
ungroup.fields = dstFields;
|
|
74
74
|
}
|
|
75
75
|
return {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
dataType: this.returns(exprVal),
|
|
77
|
+
expressionType: 'analytic',
|
|
78
|
+
value: [ungroup],
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
this.log(`${this.control}() incompatible type`);
|
|
82
|
-
return (0, ast_utils_1.errorFor)(
|
|
82
|
+
return (0, ast_utils_1.errorFor)('ungrouped type check');
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
exports.ExprUngroup = ExprUngroup;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExprValue } from
|
|
2
|
-
import { ExpressionDef } from
|
|
3
|
-
import { FieldSpace } from
|
|
4
|
-
import { Timeframe } from
|
|
1
|
+
import { ExprValue } from '../types/expr-value';
|
|
2
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
3
|
+
import { FieldSpace } from '../types/field-space';
|
|
4
|
+
import { Timeframe } from './time-frame';
|
|
5
5
|
/**
|
|
6
6
|
* TODO: This is sort of a hand clone of the "Range" class, they should
|
|
7
7
|
* be siblings of a common abstract classs.
|
|
@@ -36,23 +36,23 @@ const range_1 = require("./range");
|
|
|
36
36
|
*/
|
|
37
37
|
class ForRange extends expression_def_1.ExpressionDef {
|
|
38
38
|
constructor(from, duration, timeframe) {
|
|
39
|
-
super({
|
|
39
|
+
super({ from: from, duration: duration, timeframe: timeframe });
|
|
40
40
|
this.from = from;
|
|
41
41
|
this.duration = duration;
|
|
42
42
|
this.timeframe = timeframe;
|
|
43
|
-
this.elementType =
|
|
43
|
+
this.elementType = 'forRange';
|
|
44
44
|
this.legalChildTypes = [fragtype_utils_1.FT.timestampT, fragtype_utils_1.FT.dateT];
|
|
45
45
|
}
|
|
46
46
|
apply(fs, op, expr) {
|
|
47
47
|
const startV = this.from.getExpression(fs);
|
|
48
48
|
const checkV = expr.getExpression(fs);
|
|
49
49
|
if (!this.typeCheck(expr, checkV)) {
|
|
50
|
-
return (0, ast_utils_1.errorFor)(
|
|
50
|
+
return (0, ast_utils_1.errorFor)('no time for range');
|
|
51
51
|
}
|
|
52
52
|
const nV = this.duration.getExpression(fs);
|
|
53
|
-
if (nV.dataType !==
|
|
53
|
+
if (nV.dataType !== 'number') {
|
|
54
54
|
this.log(`FOR duration count must be a number, not '${nV.dataType}'`);
|
|
55
|
-
return (0, ast_utils_1.errorFor)(
|
|
55
|
+
return (0, ast_utils_1.errorFor)('FOR not number');
|
|
56
56
|
}
|
|
57
57
|
const units = this.timeframe.text;
|
|
58
58
|
// If the duration resolution is smaller than date, we have
|
|
@@ -61,40 +61,40 @@ class ForRange extends expression_def_1.ExpressionDef {
|
|
|
61
61
|
let rangeType = durationRes;
|
|
62
62
|
// Next, if the beginning of the range is a timestamp, then we
|
|
63
63
|
// also have to do the computation as a timestamp
|
|
64
|
-
if (startV.dataType ===
|
|
65
|
-
rangeType =
|
|
64
|
+
if (startV.dataType === 'timestamp') {
|
|
65
|
+
rangeType = 'timestamp';
|
|
66
66
|
}
|
|
67
67
|
// everything is dates, do date math
|
|
68
|
-
if (checkV.dataType ===
|
|
68
|
+
if (checkV.dataType === 'date' && rangeType === 'date') {
|
|
69
69
|
const rangeStart = this.from;
|
|
70
|
-
const rangeEndV = (0, time_utils_1.timeOffset)(
|
|
71
|
-
const rangeEnd = new expr_time_1.ExprTime(
|
|
70
|
+
const rangeEndV = (0, time_utils_1.timeOffset)('date', startV.value, '+', nV.value, units);
|
|
71
|
+
const rangeEnd = new expr_time_1.ExprTime('date', rangeEndV);
|
|
72
72
|
return new range_1.Range(rangeStart, rangeEnd).apply(fs, op, expr);
|
|
73
73
|
}
|
|
74
74
|
// Now it doesn't matter if the range is a date or a timestamp,
|
|
75
75
|
// the comparison will be in timestamp space,
|
|
76
|
-
const applyTo = expr_time_1.ExprTime.fromValue(
|
|
76
|
+
const applyTo = expr_time_1.ExprTime.fromValue('timestamp', checkV);
|
|
77
77
|
let rangeStart = this.from;
|
|
78
78
|
let from = startV.value;
|
|
79
|
-
if (startV.dataType ===
|
|
79
|
+
if (startV.dataType === 'date') {
|
|
80
80
|
// Time literals with timestamp units can also be used as timestamps;
|
|
81
81
|
const alreadyTs = (0, granular_result_1.isGranularResult)(startV) && startV.alsoTimestamp;
|
|
82
82
|
if (!alreadyTs) {
|
|
83
83
|
// ... not a literal, need a cast
|
|
84
84
|
from = (0, time_utils_1.castDateToTimestamp)(from);
|
|
85
85
|
}
|
|
86
|
-
rangeStart = new expr_time_1.ExprTime(
|
|
86
|
+
rangeStart = new expr_time_1.ExprTime('timestamp', from, startV.expressionType);
|
|
87
87
|
}
|
|
88
|
-
const to = (0, time_utils_1.timeOffset)(
|
|
89
|
-
const rangeEnd = new expr_time_1.ExprTime(
|
|
88
|
+
const to = (0, time_utils_1.timeOffset)('timestamp', from, '+', nV.value, units);
|
|
89
|
+
const rangeEnd = new expr_time_1.ExprTime('timestamp', to, startV.expressionType);
|
|
90
90
|
return new range_1.Range(rangeStart, rangeEnd).apply(fs, op, applyTo);
|
|
91
91
|
}
|
|
92
92
|
requestExpression(_fs) {
|
|
93
93
|
return undefined;
|
|
94
94
|
}
|
|
95
95
|
getExpression(_fs) {
|
|
96
|
-
this.log(
|
|
97
|
-
return (0, ast_utils_1.errorFor)(
|
|
96
|
+
this.log('A Range is not a value');
|
|
97
|
+
return (0, ast_utils_1.errorFor)('range has no value');
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
exports.ForRange = ForRange;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TimeFieldType, TimestampUnit } from
|
|
2
|
-
import { ExprValue } from
|
|
3
|
-
import { FieldSpace } from
|
|
4
|
-
import { ExpressionDef } from
|
|
1
|
+
import { TimeFieldType, TimestampUnit } from '../../../model/malloy_types';
|
|
2
|
+
import { ExprValue } from '../types/expr-value';
|
|
3
|
+
import { FieldSpace } from '../types/field-space';
|
|
4
|
+
import { ExpressionDef } from '../types/expression-def';
|
|
5
5
|
/**
|
|
6
6
|
* GranularTime made from a literal. Funky because it doesn't know if it
|
|
7
7
|
* is a date or a timestamp in many cases until it is applied.
|