@malloydata/malloy 0.0.34 → 0.0.35

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.
@@ -177,7 +177,9 @@ function timeCompare(left, lhs, op, rhs) {
177
177
  return (0, utils_1.compose)(lhs.value, op, rhs.value);
178
178
  }
179
179
  }
180
- if (leftIsTime || rightIsTime) {
180
+ if ((leftIsTime || rightIsTime) &&
181
+ lhs.dataType !== 'null' &&
182
+ rhs.dataType !== 'null') {
181
183
  left.log(`Cannot compare a ${lhs.dataType} to a ${rhs.dataType}`);
182
184
  return ['false'];
183
185
  }
@@ -804,6 +804,15 @@ describe('expressions', () => {
804
804
  }
805
805
  }
806
806
  });
807
+ test.each([
808
+ ['ats', 'timestamp'],
809
+ ['ad', 'date'],
810
+ ['ai', 'number'],
811
+ ['astr', 'string'],
812
+ ['abool', 'boolean'],
813
+ ])('Can compare field %s (type %s) to NULL', (name, _datatype) => {
814
+ expect(`${name} = NULL`).expressionCompiled();
815
+ });
807
816
  });
808
817
  describe('unspported fields in schema', () => {
809
818
  test('unsupported reference in result allowed', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",