@malloydata/malloy 0.0.15 → 0.0.16-dev221214152428
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/dialect/dialect.d.ts +1 -0
- package/dist/dialect/duckdb.d.ts +1 -0
- package/dist/dialect/duckdb.js +3 -0
- package/dist/dialect/postgres.d.ts +1 -0
- package/dist/dialect/postgres.js +1 -0
- package/dist/dialect/standardsql.d.ts +1 -0
- package/dist/dialect/standardsql.js +1 -0
- package/dist/lang/lib/Malloy/MalloyParser.d.ts +1 -0
- package/dist/lang/lib/Malloy/MalloyParser.js +405 -398
- package/dist/model/malloy_query.js +113 -22
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ export declare abstract class Dialect {
|
|
|
27
27
|
abstract defaultSampling: Sampling;
|
|
28
28
|
abstract supportUnnestArrayAgg: boolean;
|
|
29
29
|
abstract supportsCTEinCoorelatedSubQueries: boolean;
|
|
30
|
+
abstract dontUnionIndex: boolean;
|
|
30
31
|
abstract quoteTablePath(tablePath: string): string;
|
|
31
32
|
abstract sqlGroupSetTable(groupSetCount: number): string;
|
|
32
33
|
abstract sqlAnyValue(groupSet: number, fieldName: string): string;
|
package/dist/dialect/duckdb.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class DuckDBDialect extends Dialect {
|
|
|
13
13
|
};
|
|
14
14
|
supportUnnestArrayAgg: boolean;
|
|
15
15
|
supportsCTEinCoorelatedSubQueries: boolean;
|
|
16
|
+
dontUnionIndex: boolean;
|
|
16
17
|
functionInfo: Record<string, FunctionInfo>;
|
|
17
18
|
get udfPrefix(): string;
|
|
18
19
|
quoteTablePath(tableName: string): string;
|
package/dist/dialect/duckdb.js
CHANGED
|
@@ -123,6 +123,7 @@ class DuckDBDialect extends dialect_1.Dialect {
|
|
|
123
123
|
this.defaultSampling = { rows: 50000 };
|
|
124
124
|
this.supportUnnestArrayAgg = true;
|
|
125
125
|
this.supportsCTEinCoorelatedSubQueries = true;
|
|
126
|
+
this.dontUnionIndex = true; // false;
|
|
126
127
|
this.functionInfo = {
|
|
127
128
|
concat: { returnType: "string" },
|
|
128
129
|
};
|
|
@@ -176,6 +177,8 @@ class DuckDBDialect extends dialect_1.Dialect {
|
|
|
176
177
|
100000, --
|
|
177
178
|
-- (SELECT genres_length FROM movies limit 1),
|
|
178
179
|
1)) as __row_id) as ${alias} ON ${alias}.__row_id <= array_length(${source})`;
|
|
180
|
+
// When DuckDB supports lateral joins...
|
|
181
|
+
//return `,(select UNNEST(generate_series(1, length(${source}),1))) as ${alias}(__row_id)`;
|
|
179
182
|
}
|
|
180
183
|
sqlSumDistinctHashedKey(_sqlDistinctKey) {
|
|
181
184
|
return "uses sumDistinctFunction, should not be called";
|
|
@@ -14,6 +14,7 @@ export declare class PostgresDialect extends Dialect {
|
|
|
14
14
|
};
|
|
15
15
|
supportUnnestArrayAgg: boolean;
|
|
16
16
|
supportsCTEinCoorelatedSubQueries: boolean;
|
|
17
|
+
dontUnionIndex: boolean;
|
|
17
18
|
functionInfo: Record<string, FunctionInfo>;
|
|
18
19
|
quoteTablePath(tablePath: string): string;
|
|
19
20
|
sqlGroupSetTable(groupSetCount: number): string;
|
package/dist/dialect/postgres.js
CHANGED
|
@@ -52,6 +52,7 @@ class PostgresDialect extends dialect_1.Dialect {
|
|
|
52
52
|
this.defaultSampling = { rows: 50000 };
|
|
53
53
|
this.supportUnnestArrayAgg = true;
|
|
54
54
|
this.supportsCTEinCoorelatedSubQueries = true;
|
|
55
|
+
this.dontUnionIndex = false;
|
|
55
56
|
this.functionInfo = {
|
|
56
57
|
concat: { returnType: "string" },
|
|
57
58
|
};
|
|
@@ -14,6 +14,7 @@ export declare class StandardSQLDialect extends Dialect {
|
|
|
14
14
|
};
|
|
15
15
|
supportUnnestArrayAgg: boolean;
|
|
16
16
|
supportsCTEinCoorelatedSubQueries: boolean;
|
|
17
|
+
dontUnionIndex: boolean;
|
|
17
18
|
functionInfo: Record<string, FunctionInfo>;
|
|
18
19
|
quoteTablePath(tablePath: string): string;
|
|
19
20
|
sqlGroupSetTable(groupSetCount: number): string;
|
|
@@ -46,6 +46,7 @@ class StandardSQLDialect extends dialect_1.Dialect {
|
|
|
46
46
|
this.defaultSampling = { enable: false };
|
|
47
47
|
this.supportUnnestArrayAgg = false;
|
|
48
48
|
this.supportsCTEinCoorelatedSubQueries = false;
|
|
49
|
+
this.dontUnionIndex = true; // bigquery can't use a sample table more than once in a query.
|
|
49
50
|
this.functionInfo = {
|
|
50
51
|
timestamp_seconds: { returnType: "timestamp" },
|
|
51
52
|
concat: { returnType: "string" },
|
|
@@ -1269,6 +1269,7 @@ export declare class IndexElementContext extends ParserRuleContext {
|
|
|
1269
1269
|
fieldPath(): FieldPathContext | undefined;
|
|
1270
1270
|
DOT(): TerminalNode | undefined;
|
|
1271
1271
|
STAR(): TerminalNode | undefined;
|
|
1272
|
+
STARSTAR(): TerminalNode | undefined;
|
|
1272
1273
|
constructor(parent: ParserRuleContext | undefined, invokingState: number);
|
|
1273
1274
|
get ruleIndex(): number;
|
|
1274
1275
|
enterRule(listener: MalloyParserListener): void;
|