@malloydata/malloy 0.0.34-dev230523182411 → 0.0.34

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.
Files changed (49) hide show
  1. package/dist/dialect/dialect.d.ts +20 -5
  2. package/dist/dialect/dialect.js +40 -7
  3. package/dist/dialect/duckdb.d.ts +5 -5
  4. package/dist/dialect/duckdb.js +54 -120
  5. package/dist/dialect/postgres.d.ts +5 -5
  6. package/dist/dialect/postgres.js +50 -38
  7. package/dist/dialect/standardsql.d.ts +5 -5
  8. package/dist/dialect/standardsql.js +78 -42
  9. package/dist/lang/ast/elements/refined-source.js +8 -0
  10. package/dist/lang/ast/executors/reduce-executor.js +4 -0
  11. package/dist/lang/ast/expressions/expr-cast.js +1 -1
  12. package/dist/lang/ast/expressions/expr-granular-time.d.ts +2 -2
  13. package/dist/lang/ast/expressions/expr-granular-time.js +10 -19
  14. package/dist/lang/ast/expressions/expr-time-extract.js +31 -4
  15. package/dist/lang/ast/expressions/time-literal.d.ts +12 -6
  16. package/dist/lang/ast/expressions/time-literal.js +74 -67
  17. package/dist/lang/ast/field-space/dynamic-space.d.ts +2 -0
  18. package/dist/lang/ast/field-space/dynamic-space.js +6 -0
  19. package/dist/lang/ast/field-space/query-spaces.js +3 -0
  20. package/dist/lang/ast/index.d.ts +1 -0
  21. package/dist/lang/ast/index.js +1 -0
  22. package/dist/lang/ast/source-properties/timezone-statement.d.ts +6 -0
  23. package/dist/lang/ast/source-properties/timezone-statement.js +35 -0
  24. package/dist/lang/ast/sources/named-source.js +1 -1
  25. package/dist/lang/ast/sources/sql-source.js +4 -0
  26. package/dist/lang/ast/time-utils.d.ts +2 -1
  27. package/dist/lang/ast/time-utils.js +5 -1
  28. package/dist/lang/ast/types/expression-def.d.ts +2 -0
  29. package/dist/lang/ast/types/expression-def.js +48 -18
  30. package/dist/lang/ast/types/query-property.d.ts +2 -1
  31. package/dist/lang/ast/types/query-property.js +3 -1
  32. package/dist/lang/ast/types/source-property.d.ts +2 -1
  33. package/dist/lang/ast/types/source-property.js +3 -1
  34. package/dist/lang/lib/Malloy/MalloyLexer.d.ts +3 -3
  35. package/dist/lang/lib/Malloy/MalloyLexer.js +958 -972
  36. package/dist/lang/lib/Malloy/MalloyParser.d.ts +52 -33
  37. package/dist/lang/lib/Malloy/MalloyParser.js +1243 -1128
  38. package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +24 -0
  39. package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +15 -0
  40. package/dist/lang/malloy-to-ast.d.ts +2 -0
  41. package/dist/lang/malloy-to-ast.js +6 -0
  42. package/dist/lang/test/parse-expects.d.ts +1 -0
  43. package/dist/lang/test/parse-expects.js +11 -1
  44. package/dist/lang/test/parse.spec.js +29 -37
  45. package/dist/malloy.js +31 -23
  46. package/dist/model/malloy_query.d.ts +2 -0
  47. package/dist/model/malloy_query.js +42 -41
  48. package/dist/model/malloy_types.d.ts +3 -2
  49. package/package.json +1 -1
@@ -35,9 +35,9 @@ export declare class MalloyParser extends Parser {
35
35
  static readonly SELECT = 24;
36
36
  static readonly SOURCE = 25;
37
37
  static readonly SQL = 26;
38
- static readonly FANCYSQL = 27;
39
- static readonly TOP = 28;
40
- static readonly WHERE = 29;
38
+ static readonly TOP = 27;
39
+ static readonly WHERE = 28;
40
+ static readonly TIMEZONE = 29;
41
41
  static readonly ALL = 30;
42
42
  static readonly AND = 31;
43
43
  static readonly AS = 32;
@@ -221,36 +221,37 @@ export declare class MalloyParser extends Parser {
221
221
  static readonly RULE_indexFields = 71;
222
222
  static readonly RULE_indexStatement = 72;
223
223
  static readonly RULE_sampleStatement = 73;
224
- static readonly RULE_sampleSpec = 74;
225
- static readonly RULE_aggregate = 75;
226
- static readonly RULE_malloyType = 76;
227
- static readonly RULE_compareOp = 77;
228
- static readonly RULE_literal = 78;
229
- static readonly RULE_dateLiteral = 79;
230
- static readonly RULE_tableName = 80;
231
- static readonly RULE_id = 81;
232
- static readonly RULE_timeframe = 82;
233
- static readonly RULE_ungroup = 83;
234
- static readonly RULE_fieldExpr = 84;
235
- static readonly RULE_partialAllowedFieldExpr = 85;
236
- static readonly RULE_pickStatement = 86;
237
- static readonly RULE_pick = 87;
238
- static readonly RULE_argumentList = 88;
239
- static readonly RULE_fieldNameList = 89;
240
- static readonly RULE_fieldCollection = 90;
241
- static readonly RULE_collectionMember = 91;
242
- static readonly RULE_fieldPath = 92;
243
- static readonly RULE_joinName = 93;
244
- static readonly RULE_fieldName = 94;
245
- static readonly RULE_justExpr = 95;
246
- static readonly RULE_json = 96;
247
- static readonly RULE_jsonValue = 97;
248
- static readonly RULE_jsonObject = 98;
249
- static readonly RULE_jsonProperty = 99;
250
- static readonly RULE_jsonArray = 100;
251
- static readonly RULE_sqlExploreNameRef = 101;
252
- static readonly RULE_nameSQLBlock = 102;
253
- static readonly RULE_connectionName = 103;
224
+ static readonly RULE_timezoneStatement = 74;
225
+ static readonly RULE_sampleSpec = 75;
226
+ static readonly RULE_aggregate = 76;
227
+ static readonly RULE_malloyType = 77;
228
+ static readonly RULE_compareOp = 78;
229
+ static readonly RULE_literal = 79;
230
+ static readonly RULE_dateLiteral = 80;
231
+ static readonly RULE_tableName = 81;
232
+ static readonly RULE_id = 82;
233
+ static readonly RULE_timeframe = 83;
234
+ static readonly RULE_ungroup = 84;
235
+ static readonly RULE_fieldExpr = 85;
236
+ static readonly RULE_partialAllowedFieldExpr = 86;
237
+ static readonly RULE_pickStatement = 87;
238
+ static readonly RULE_pick = 88;
239
+ static readonly RULE_argumentList = 89;
240
+ static readonly RULE_fieldNameList = 90;
241
+ static readonly RULE_fieldCollection = 91;
242
+ static readonly RULE_collectionMember = 92;
243
+ static readonly RULE_fieldPath = 93;
244
+ static readonly RULE_joinName = 94;
245
+ static readonly RULE_fieldName = 95;
246
+ static readonly RULE_justExpr = 96;
247
+ static readonly RULE_json = 97;
248
+ static readonly RULE_jsonValue = 98;
249
+ static readonly RULE_jsonObject = 99;
250
+ static readonly RULE_jsonProperty = 100;
251
+ static readonly RULE_jsonArray = 101;
252
+ static readonly RULE_sqlExploreNameRef = 102;
253
+ static readonly RULE_nameSQLBlock = 103;
254
+ static readonly RULE_connectionName = 104;
254
255
  static readonly ruleNames: string[];
255
256
  private static readonly _LITERAL_NAMES;
256
257
  private static readonly _SYMBOLIC_NAMES;
@@ -335,6 +336,7 @@ export declare class MalloyParser extends Parser {
335
336
  indexFields(): IndexFieldsContext;
336
337
  indexStatement(): IndexStatementContext;
337
338
  sampleStatement(): SampleStatementContext;
339
+ timezoneStatement(): TimezoneStatementContext;
338
340
  sampleSpec(): SampleSpecContext;
339
341
  aggregate(): AggregateContext;
340
342
  malloyType(): MalloyTypeContext;
@@ -827,6 +829,13 @@ export declare class DefExploreQueryContext extends ExploreStatementContext {
827
829
  exitRule(listener: MalloyParserListener): void;
828
830
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
829
831
  }
832
+ export declare class DefExploreTimezoneContext extends ExploreStatementContext {
833
+ timezoneStatement(): TimezoneStatementContext;
834
+ constructor(ctx: ExploreStatementContext);
835
+ enterRule(listener: MalloyParserListener): void;
836
+ exitRule(listener: MalloyParserListener): void;
837
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
838
+ }
830
839
  export declare class RenameListContext extends ParserRuleContext {
831
840
  exploreRenameDef(): ExploreRenameDefContext[];
832
841
  exploreRenameDef(i: number): ExploreRenameDefContext;
@@ -1092,6 +1101,7 @@ export declare class QueryStatementContext extends ParserRuleContext {
1092
1101
  havingStatement(): HavingStatementContext | undefined;
1093
1102
  nestStatement(): NestStatementContext | undefined;
1094
1103
  sampleStatement(): SampleStatementContext | undefined;
1104
+ timezoneStatement(): TimezoneStatementContext | undefined;
1095
1105
  constructor(parent: ParserRuleContext | undefined, invokingState: number);
1096
1106
  get ruleIndex(): number;
1097
1107
  enterRule(listener: MalloyParserListener): void;
@@ -1308,6 +1318,15 @@ export declare class SampleStatementContext extends ParserRuleContext {
1308
1318
  exitRule(listener: MalloyParserListener): void;
1309
1319
  accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
1310
1320
  }
1321
+ export declare class TimezoneStatementContext extends ParserRuleContext {
1322
+ TIMEZONE(): TerminalNode;
1323
+ STRING_LITERAL(): TerminalNode;
1324
+ constructor(parent: ParserRuleContext | undefined, invokingState: number);
1325
+ get ruleIndex(): number;
1326
+ enterRule(listener: MalloyParserListener): void;
1327
+ exitRule(listener: MalloyParserListener): void;
1328
+ accept<Result>(visitor: MalloyParserVisitor<Result>): Result;
1329
+ }
1311
1330
  export declare class SampleSpecContext extends ParserRuleContext {
1312
1331
  PERCENT_LITERAL(): TerminalNode | undefined;
1313
1332
  INTEGER_LITERAL(): TerminalNode | undefined;