@hypequery/protocol-conformance 0.16.1 → 0.17.0

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.
@@ -35,6 +35,26 @@
35
35
  "sameContentHash": false
36
36
  }
37
37
  },
38
+ {
39
+ "id": "annotations-do-not-change-schema",
40
+ "left": "build",
41
+ "right": "annotated",
42
+ "sameEndpointSchemas": [
43
+ "countries",
44
+ "orders",
45
+ "ordersRevenue"
46
+ ],
47
+ "sameContentHash": false,
48
+ "mode": "relation",
49
+ "expected": {
50
+ "sameEndpointSchemas": [
51
+ "countries",
52
+ "orders",
53
+ "ordersRevenue"
54
+ ],
55
+ "sameContentHash": false
56
+ }
57
+ },
38
58
  {
39
59
  "id": "empty-view-has-no-tools",
40
60
  "contract": "empty",
@@ -692,5 +692,399 @@
692
692
  ],
693
693
  "contentHash": "c350b9b6e0351acbbac7509bf5d889afa343b9fb5048d826265d8e9f5ef895d8"
694
694
  }
695
+ },
696
+ {
697
+ "id": "annotated",
698
+ "value": {
699
+ "kind": "hypequery-client-contract",
700
+ "version": 1,
701
+ "view": "build",
702
+ "endpoints": [
703
+ {
704
+ "id": "countries",
705
+ "kind": "dataset",
706
+ "dataset": "countries",
707
+ "path": "/api/v1/datasets/countries/query",
708
+ "dimensions": {
709
+ "country": {
710
+ "type": "string",
711
+ "wireType": "string",
712
+ "nullable": false,
713
+ "groupable": true,
714
+ "orderable": true
715
+ }
716
+ },
717
+ "measures": {},
718
+ "filters": {},
719
+ "time": null,
720
+ "defaultMeasures": [],
721
+ "metadata": false,
722
+ "limits": {
723
+ "defaultLimit": 100,
724
+ "maxLimit": 1000,
725
+ "maxOffset": 10000,
726
+ "maxDimensions": 50,
727
+ "maxMeasures": 0,
728
+ "maxPredicates": 0,
729
+ "maxOrderBy": 50,
730
+ "maxFilterValues": 1000
731
+ },
732
+ "annotations": {
733
+ "label": "Countries",
734
+ "description": "Reference list of supported countries."
735
+ },
736
+ "schemaHash": "9a5f50cd7564f283d2f0ee8f3f1cdc27731683c939e176bd25919a83d28d94ca"
737
+ },
738
+ {
739
+ "id": "orders",
740
+ "kind": "dataset",
741
+ "dataset": "orders",
742
+ "path": "/api/v1/datasets/orders/query",
743
+ "dimensions": {
744
+ "country": {
745
+ "type": "string",
746
+ "wireType": "string",
747
+ "nullable": false,
748
+ "groupable": true,
749
+ "orderable": true
750
+ },
751
+ "amount": {
752
+ "type": "number",
753
+ "wireType": "number-or-string",
754
+ "nullable": "unknown",
755
+ "groupable": true,
756
+ "orderable": true
757
+ },
758
+ "customer.tier": {
759
+ "type": "string",
760
+ "wireType": "string",
761
+ "nullable": true,
762
+ "groupable": true,
763
+ "orderable": true
764
+ },
765
+ "customer.active": {
766
+ "type": "boolean",
767
+ "wireType": "boolean",
768
+ "nullable": true,
769
+ "groupable": false,
770
+ "orderable": false
771
+ }
772
+ },
773
+ "measures": {
774
+ "revenue": {
775
+ "wireType": "string",
776
+ "nullable": true,
777
+ "having": true
778
+ },
779
+ "orderCount": {
780
+ "wireType": "string",
781
+ "nullable": true,
782
+ "having": true
783
+ },
784
+ "averageRevenue": {
785
+ "wireType": "string",
786
+ "nullable": true,
787
+ "having": true
788
+ },
789
+ "customer.unique": {
790
+ "wireType": "string",
791
+ "nullable": true,
792
+ "having": true
793
+ },
794
+ "latestLabel": {
795
+ "wireType": "string",
796
+ "nullable": true,
797
+ "having": false
798
+ }
799
+ },
800
+ "filters": {
801
+ "country": {
802
+ "type": "string",
803
+ "operators": [
804
+ "eq",
805
+ "in",
806
+ "like",
807
+ "neq",
808
+ "notIn"
809
+ ]
810
+ },
811
+ "amount": {
812
+ "type": "number",
813
+ "operators": [
814
+ "between",
815
+ "eq",
816
+ "gt",
817
+ "gte",
818
+ "in",
819
+ "lt",
820
+ "lte",
821
+ "neq",
822
+ "notIn"
823
+ ]
824
+ },
825
+ "customer.tier": {
826
+ "type": "string",
827
+ "operators": [
828
+ "eq",
829
+ "in"
830
+ ]
831
+ },
832
+ "customer.active": {
833
+ "type": "boolean",
834
+ "operators": [
835
+ "eq",
836
+ "neq"
837
+ ]
838
+ },
839
+ "paidStatus": {
840
+ "type": "string",
841
+ "operators": [
842
+ "eq"
843
+ ]
844
+ }
845
+ },
846
+ "time": {
847
+ "grains": [
848
+ "day",
849
+ "hour",
850
+ "month",
851
+ "week"
852
+ ],
853
+ "defaultTimezone": "UTC",
854
+ "timezone": true,
855
+ "periodFormat": "calendar-date-or-local-datetime-v1"
856
+ },
857
+ "defaultMeasures": [
858
+ "revenue",
859
+ "orderCount",
860
+ "latestLabel"
861
+ ],
862
+ "metadata": true,
863
+ "limits": {
864
+ "defaultLimit": 100,
865
+ "maxLimit": 1000,
866
+ "maxOffset": 10000,
867
+ "maxDimensions": 50,
868
+ "maxMeasures": 50,
869
+ "maxPredicates": 100,
870
+ "maxOrderBy": 50,
871
+ "maxFilterValues": 1000
872
+ },
873
+ "annotations": {
874
+ "label": "Orders",
875
+ "description": "One row per customer order.",
876
+ "fields": {
877
+ "country": {
878
+ "label": "Country"
879
+ },
880
+ "customer.tier": {
881
+ "description": "Tier of the ordering customer."
882
+ },
883
+ "revenue": {
884
+ "label": "Revenue",
885
+ "description": "Gross order value in €, before refunds."
886
+ }
887
+ }
888
+ },
889
+ "schemaHash": "88802c0d4798fd0758b7e7697f582b034afada967bfe0fdcb1cafd957144b1f3"
890
+ },
891
+ {
892
+ "id": "ordersRevenue",
893
+ "kind": "metric",
894
+ "dataset": "orders",
895
+ "path": "/api/v1/metrics/revenue",
896
+ "dimensions": {
897
+ "country": {
898
+ "type": "string",
899
+ "wireType": "string",
900
+ "nullable": false,
901
+ "groupable": true,
902
+ "orderable": true
903
+ },
904
+ "customer.tier": {
905
+ "type": "string",
906
+ "wireType": "string",
907
+ "nullable": true,
908
+ "groupable": true,
909
+ "orderable": true
910
+ },
911
+ "customer.active": {
912
+ "type": "boolean",
913
+ "wireType": "boolean",
914
+ "nullable": true,
915
+ "groupable": false,
916
+ "orderable": false
917
+ }
918
+ },
919
+ "measures": {
920
+ "revenue": {
921
+ "wireType": "string",
922
+ "nullable": true,
923
+ "having": false
924
+ }
925
+ },
926
+ "filters": {
927
+ "country": {
928
+ "type": "string",
929
+ "operators": [
930
+ "eq",
931
+ "in",
932
+ "like",
933
+ "neq",
934
+ "notIn"
935
+ ]
936
+ },
937
+ "amount": {
938
+ "type": "number",
939
+ "operators": [
940
+ "between",
941
+ "eq",
942
+ "gt",
943
+ "gte",
944
+ "in",
945
+ "lt",
946
+ "lte",
947
+ "neq",
948
+ "notIn"
949
+ ]
950
+ },
951
+ "customer.tier": {
952
+ "type": "string",
953
+ "operators": [
954
+ "eq",
955
+ "in"
956
+ ]
957
+ },
958
+ "customer.active": {
959
+ "type": "boolean",
960
+ "operators": [
961
+ "eq",
962
+ "neq"
963
+ ]
964
+ },
965
+ "paidStatus": {
966
+ "type": "string",
967
+ "operators": [
968
+ "eq"
969
+ ]
970
+ }
971
+ },
972
+ "time": {
973
+ "grains": [
974
+ "day",
975
+ "hour",
976
+ "month",
977
+ "week"
978
+ ],
979
+ "defaultTimezone": "UTC",
980
+ "timezone": true,
981
+ "periodFormat": "calendar-date-or-local-datetime-v1"
982
+ },
983
+ "metadata": true,
984
+ "limits": {
985
+ "defaultLimit": 20,
986
+ "maxLimit": 20,
987
+ "maxOffset": 10000,
988
+ "maxDimensions": 50,
989
+ "maxMeasures": 1,
990
+ "maxPredicates": 100,
991
+ "maxOrderBy": 50,
992
+ "maxFilterValues": 1000
993
+ },
994
+ "annotations": {
995
+ "label": "Orders",
996
+ "description": "One row per customer order.",
997
+ "fields": {
998
+ "revenue": {
999
+ "label": "Revenue",
1000
+ "description": "Gross order value in €, before refunds."
1001
+ }
1002
+ }
1003
+ },
1004
+ "schemaHash": "e282fb74777e65328d87cfe5caa0349104630cd88137b1842289e0c83676a98d"
1005
+ }
1006
+ ],
1007
+ "contentHash": "1cc64833994d5da761e9dae3b62992f66b6a270f01228ab97d91ebb74e54ae85"
1008
+ }
1009
+ },
1010
+ {
1011
+ "id": "null-checks",
1012
+ "value": {
1013
+ "kind": "hypequery-client-contract",
1014
+ "version": 1,
1015
+ "view": "build",
1016
+ "endpoints": [
1017
+ {
1018
+ "id": "customers",
1019
+ "kind": "dataset",
1020
+ "dataset": "customers",
1021
+ "path": "/api/v1/datasets/customers/query",
1022
+ "dimensions": {
1023
+ "plan": {
1024
+ "type": "string",
1025
+ "wireType": "string",
1026
+ "nullable": true,
1027
+ "groupable": true,
1028
+ "orderable": true
1029
+ }
1030
+ },
1031
+ "measures": {
1032
+ "customerCount": {
1033
+ "wireType": "string",
1034
+ "nullable": true,
1035
+ "having": true
1036
+ }
1037
+ },
1038
+ "filters": {
1039
+ "churnedAt": {
1040
+ "type": "timestamp",
1041
+ "operators": [
1042
+ "gte",
1043
+ "isNotNull",
1044
+ "isNull"
1045
+ ]
1046
+ },
1047
+ "plan": {
1048
+ "type": "string",
1049
+ "operators": [
1050
+ "eq",
1051
+ "isNull"
1052
+ ]
1053
+ },
1054
+ "seats": {
1055
+ "type": "number",
1056
+ "operators": [
1057
+ "isNotNull"
1058
+ ]
1059
+ },
1060
+ "trial": {
1061
+ "type": "boolean",
1062
+ "operators": [
1063
+ "eq",
1064
+ "isNotNull",
1065
+ "isNull"
1066
+ ]
1067
+ }
1068
+ },
1069
+ "time": null,
1070
+ "metadata": false,
1071
+ "limits": {
1072
+ "defaultLimit": 100,
1073
+ "maxLimit": 1000,
1074
+ "maxOffset": 10000,
1075
+ "maxDimensions": 50,
1076
+ "maxMeasures": 50,
1077
+ "maxPredicates": 100,
1078
+ "maxOrderBy": 50,
1079
+ "maxFilterValues": 1000
1080
+ },
1081
+ "defaultMeasures": [
1082
+ "customerCount"
1083
+ ],
1084
+ "schemaHash": "67821b626e7688afa43c6598893a736854b658924e4564361b1db8bcd1f3192d"
1085
+ }
1086
+ ],
1087
+ "contentHash": "08e3b75129b0f8c528d7dc25ba19ecf7472b5ef2a152655d3181c21e41f2e5c1"
1088
+ }
695
1089
  }
696
1090
  ]
@@ -16,3 +16,7 @@ before being recorded; none of them changed either implementation's behaviour.
16
16
 
17
17
  RFC 0016 added composite relationship keys: the `composite-relationship-keys`
18
18
  success and identity cases, and the `relationship-keys-*` rejections.
19
+
20
+ RFC 0023 added null checks: the `null-checks` success and identity cases (measure
21
+ filters and filter operator lists), and rejections for a null check with a
22
+ `right` operand, a value comparison without one, and an unknown operator.
@@ -28,5 +28,15 @@
28
28
  "id": "resolved-rows-versioned-collapsing",
29
29
  "canonical": "{\"datasets\":[{\"dimensions\":[],\"filters\":[],\"measures\":[],\"name\":\"users\",\"relationships\":[],\"rowResolution\":{\"engine\":\"versioned-collapsing\",\"kind\":\"final\",\"signColumn\":\"sign\"},\"source\":\"users\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":2}",
30
30
  "sha256": "d1391f36746a216d6fac7e4350c94bd7dec8dc6298e90033d2f476df1625ac6f"
31
+ },
32
+ {
33
+ "id": "merge-measures",
34
+ "canonical": "{\"datasets\":[{\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"day\",\"source\":{\"column\":\"day\",\"kind\":\"column\"},\"type\":\"timestamp\"}],\"filters\":[],\"measures\":[{\"aggregation\":\"merge\",\"field\":\"users\",\"filters\":[],\"name\":\"active_users\",\"stateFunction\":\"uniq\"},{\"aggregation\":\"merge\",\"field\":\"events\",\"filters\":[],\"name\":\"events\",\"stateFunction\":\"sum\"}],\"name\":\"daily_active_users\",\"relationships\":[],\"source\":\"daily_active_users\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":2}",
35
+ "sha256": "525e0df757d4056b1f370ae3666b56fc7ac9e18346506ade77a63b8968ba16da"
36
+ },
37
+ {
38
+ "id": "null-checks",
39
+ "canonical": "{\"datasets\":[{\"dimensions\":[{\"filterable\":true,\"groupable\":true,\"name\":\"plan\",\"source\":{\"column\":\"plan\",\"kind\":\"column\"},\"type\":\"string\"},{\"filterable\":true,\"groupable\":true,\"name\":\"churnedAt\",\"source\":{\"column\":\"churned_at\",\"kind\":\"column\"},\"type\":\"timestamp\"},{\"filterable\":true,\"groupable\":true,\"name\":\"trial\",\"source\":{\"column\":\"trial\",\"kind\":\"column\"},\"type\":\"boolean\"}],\"filters\":[{\"field\":\"churnedAt\",\"name\":\"churnedAt\",\"operators\":[\"gte\",\"isNotNull\",\"isNull\"]},{\"field\":\"trial\",\"name\":\"trial\",\"operators\":[\"eq\",\"isNull\"]}],\"measures\":[{\"aggregation\":\"count\",\"field\":\"id\",\"filters\":[{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"churned_at\"},\"operator\":\"isNotNull\"}],\"name\":\"churnedCustomers\"},{\"aggregation\":\"count\",\"field\":\"id\",\"filters\":[{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"churned_at\"},\"operator\":\"isNull\"},{\"kind\":\"comparison\",\"left\":{\"kind\":\"reference\",\"name\":\"trial\"},\"operator\":\"eq\",\"right\":{\"kind\":\"literal\",\"value\":false}}],\"name\":\"activeCustomers\"}],\"name\":\"customers\",\"relationships\":[],\"source\":\"customers\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":2}",
40
+ "sha256": "92690d7dfdb8a948ea705b24464b420e097c2a8b711ac9d26d0e3e99c24913a7"
31
41
  }
32
42
  ]