@malloydata/malloy 0.0.88 → 0.0.89-dev231003010614

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.
@@ -93,6 +93,7 @@ function getDialectFunction(name) {
93
93
  dialect: { [dialect.name]: overload.e },
94
94
  needsWindowOrderBy: overload.needsWindowOrderBy,
95
95
  between: overload.between,
96
+ isSymmetric: overload.isSymmetric,
96
97
  });
97
98
  }
98
99
  }
@@ -4,6 +4,7 @@ export interface DialectFunctionOverloadDef {
4
4
  params: FunctionParameterDef[];
5
5
  e: Expr;
6
6
  needsWindowOrderBy?: boolean;
7
+ isSymmetric?: boolean;
7
8
  between: {
8
9
  preceding: number | string;
9
10
  following: number | string;
@@ -282,9 +282,12 @@ class QueryField extends QueryNode {
282
282
  });
283
283
  }
284
284
  generateFunctionCallExpression(resultSet, context, frag, state) {
285
+ var _a;
285
286
  const overload = frag.overload;
286
287
  const args = frag.args;
288
+ const isSymmetric = (_a = frag.overload.isSymmetric) !== null && _a !== void 0 ? _a : false;
287
289
  const distinctKey = (0, malloy_types_1.expressionIsAggregate)(overload.returnType.expressionType) &&
290
+ !isSymmetric &&
288
291
  this.generateDistinctKeyIfNecessary(resultSet, context, frag.structPath);
289
292
  if (distinctKey) {
290
293
  if (!context.dialect.supportsAggDistinct) {
@@ -560,6 +560,7 @@ export interface FunctionOverloadDef {
560
560
  preceding: number | string;
561
561
  following: number | string;
562
562
  };
563
+ isSymmetric?: boolean;
563
564
  params: FunctionParameterDef[];
564
565
  dialect: {
565
566
  [dialect: string]: Expr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.88",
3
+ "version": "0.0.89-dev231003010614",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",