@hypequery/protocol-conformance 0.15.0 → 0.15.1

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.
@@ -13,3 +13,6 @@ policy, and derived-measure rules.
13
13
 
14
14
  Every case was checked against both the TypeScript and Python implementations
15
15
  before being recorded; none of them changed either implementation's behaviour.
16
+
17
+ RFC 0016 added composite relationship keys: the `composite-relationship-keys`
18
+ success and identity cases, and the `relationship-keys-*` rejections.
@@ -3,5 +3,10 @@
3
3
  "id": "derived-measures",
4
4
  "canonical": "{\"datasets\":[{\"dimensions\":[],\"filters\":[],\"measures\":[{\"aggregation\":\"sum\",\"field\":\"amount\",\"filters\":[],\"name\":\"revenue\"},{\"aggregation\":\"count\",\"field\":\"id\",\"filters\":[],\"name\":\"orders\"},{\"expression\":{\"kind\":\"binary\",\"left\":{\"kind\":\"reference\",\"name\":\"revenue\"},\"operator\":\"divide\",\"right\":{\"args\":[{\"kind\":\"reference\",\"name\":\"orders\"}],\"function\":\"nullIfZero\",\"kind\":\"call\"}},\"kind\":\"derived\",\"name\":\"averageOrderValue\",\"uses\":[{\"alias\":\"revenue\",\"measure\":\"revenue\"},{\"alias\":\"orders\",\"measure\":\"orders\"}]}],\"name\":\"orders\",\"relationships\":[],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":2}",
5
5
  "sha256": "bd7b6818e8028e609923324455c3842425dcaa447dfd7d792b50de288769f379"
6
+ },
7
+ {
8
+ "id": "composite-relationship-keys",
9
+ "canonical": "{\"datasets\":[{\"dimensions\":[],\"filters\":[],\"measures\":[],\"name\":\"customers\",\"relationships\":[],\"source\":\"customers\",\"tenant\":{\"kind\":\"not-required\"}},{\"dimensions\":[],\"filters\":[],\"measures\":[],\"name\":\"orders\",\"relationships\":[{\"from\":\"customer_id\",\"keys\":[{\"from\":\"customer_id\",\"to\":\"id\"},{\"from\":\"region_code\",\"to\":\"region\"}],\"kind\":\"belongsTo\",\"name\":\"customer\",\"queryable\":true,\"target\":\"customers\",\"to\":\"id\"}],\"source\":\"orders\",\"tenant\":{\"kind\":\"not-required\"}}],\"kind\":\"hypequery-deployment\",\"version\":2}",
10
+ "sha256": "3c0b6f845c890832ff88170b473c659892339f0ae74de6271f3232be4b50f841"
6
11
  }
7
12
  ]
@@ -870,5 +870,446 @@
870
870
  ]
871
871
  },
872
872
  "error": "HQ_DEPLOYMENT_INVALID_REFERENCE"
873
+ },
874
+ {
875
+ "id": "relationship-keys-empty",
876
+ "value": {
877
+ "kind": "hypequery-deployment",
878
+ "version": 2,
879
+ "datasets": [
880
+ {
881
+ "name": "customers",
882
+ "source": "customers",
883
+ "tenant": {
884
+ "kind": "not-required"
885
+ },
886
+ "dimensions": [],
887
+ "measures": [],
888
+ "filters": [],
889
+ "relationships": []
890
+ },
891
+ {
892
+ "name": "orders",
893
+ "source": "orders",
894
+ "tenant": {
895
+ "kind": "not-required"
896
+ },
897
+ "dimensions": [],
898
+ "measures": [],
899
+ "filters": [],
900
+ "relationships": [
901
+ {
902
+ "name": "customer",
903
+ "kind": "belongsTo",
904
+ "target": "customers",
905
+ "from": "customer_id",
906
+ "to": "id",
907
+ "queryable": true,
908
+ "keys": []
909
+ }
910
+ ]
911
+ }
912
+ ]
913
+ },
914
+ "error": "HQ_DEPLOYMENT_INVALID_VALUE"
915
+ },
916
+ {
917
+ "id": "relationship-keys-single-pair",
918
+ "value": {
919
+ "kind": "hypequery-deployment",
920
+ "version": 2,
921
+ "datasets": [
922
+ {
923
+ "name": "customers",
924
+ "source": "customers",
925
+ "tenant": {
926
+ "kind": "not-required"
927
+ },
928
+ "dimensions": [],
929
+ "measures": [],
930
+ "filters": [],
931
+ "relationships": []
932
+ },
933
+ {
934
+ "name": "orders",
935
+ "source": "orders",
936
+ "tenant": {
937
+ "kind": "not-required"
938
+ },
939
+ "dimensions": [],
940
+ "measures": [],
941
+ "filters": [],
942
+ "relationships": [
943
+ {
944
+ "name": "customer",
945
+ "kind": "belongsTo",
946
+ "target": "customers",
947
+ "from": "customer_id",
948
+ "to": "id",
949
+ "queryable": true,
950
+ "keys": [
951
+ {
952
+ "from": "customer_id",
953
+ "to": "id"
954
+ }
955
+ ]
956
+ }
957
+ ]
958
+ }
959
+ ]
960
+ },
961
+ "error": "HQ_DEPLOYMENT_INVALID_VALUE"
962
+ },
963
+ {
964
+ "id": "relationship-keys-first-pair-disagrees",
965
+ "value": {
966
+ "kind": "hypequery-deployment",
967
+ "version": 2,
968
+ "datasets": [
969
+ {
970
+ "name": "customers",
971
+ "source": "customers",
972
+ "tenant": {
973
+ "kind": "not-required"
974
+ },
975
+ "dimensions": [],
976
+ "measures": [],
977
+ "filters": [],
978
+ "relationships": []
979
+ },
980
+ {
981
+ "name": "orders",
982
+ "source": "orders",
983
+ "tenant": {
984
+ "kind": "not-required"
985
+ },
986
+ "dimensions": [],
987
+ "measures": [],
988
+ "filters": [],
989
+ "relationships": [
990
+ {
991
+ "name": "customer",
992
+ "kind": "belongsTo",
993
+ "target": "customers",
994
+ "from": "customer_id",
995
+ "to": "id",
996
+ "queryable": true,
997
+ "keys": [
998
+ {
999
+ "from": "other_id",
1000
+ "to": "id"
1001
+ },
1002
+ {
1003
+ "from": "region_code",
1004
+ "to": "region"
1005
+ }
1006
+ ]
1007
+ }
1008
+ ]
1009
+ }
1010
+ ]
1011
+ },
1012
+ "error": "HQ_DEPLOYMENT_INVALID_VALUE"
1013
+ },
1014
+ {
1015
+ "id": "relationship-keys-repeated-source-column",
1016
+ "value": {
1017
+ "kind": "hypequery-deployment",
1018
+ "version": 2,
1019
+ "datasets": [
1020
+ {
1021
+ "name": "customers",
1022
+ "source": "customers",
1023
+ "tenant": {
1024
+ "kind": "not-required"
1025
+ },
1026
+ "dimensions": [],
1027
+ "measures": [],
1028
+ "filters": [],
1029
+ "relationships": []
1030
+ },
1031
+ {
1032
+ "name": "orders",
1033
+ "source": "orders",
1034
+ "tenant": {
1035
+ "kind": "not-required"
1036
+ },
1037
+ "dimensions": [],
1038
+ "measures": [],
1039
+ "filters": [],
1040
+ "relationships": [
1041
+ {
1042
+ "name": "customer",
1043
+ "kind": "belongsTo",
1044
+ "target": "customers",
1045
+ "from": "customer_id",
1046
+ "to": "id",
1047
+ "queryable": true,
1048
+ "keys": [
1049
+ {
1050
+ "from": "customer_id",
1051
+ "to": "id"
1052
+ },
1053
+ {
1054
+ "from": "customer_id",
1055
+ "to": "region"
1056
+ }
1057
+ ]
1058
+ }
1059
+ ]
1060
+ }
1061
+ ]
1062
+ },
1063
+ "error": "HQ_DEPLOYMENT_INVALID_VALUE"
1064
+ },
1065
+ {
1066
+ "id": "relationship-keys-repeated-target-column",
1067
+ "value": {
1068
+ "kind": "hypequery-deployment",
1069
+ "version": 2,
1070
+ "datasets": [
1071
+ {
1072
+ "name": "customers",
1073
+ "source": "customers",
1074
+ "tenant": {
1075
+ "kind": "not-required"
1076
+ },
1077
+ "dimensions": [],
1078
+ "measures": [],
1079
+ "filters": [],
1080
+ "relationships": []
1081
+ },
1082
+ {
1083
+ "name": "orders",
1084
+ "source": "orders",
1085
+ "tenant": {
1086
+ "kind": "not-required"
1087
+ },
1088
+ "dimensions": [],
1089
+ "measures": [],
1090
+ "filters": [],
1091
+ "relationships": [
1092
+ {
1093
+ "name": "customer",
1094
+ "kind": "belongsTo",
1095
+ "target": "customers",
1096
+ "from": "customer_id",
1097
+ "to": "id",
1098
+ "queryable": true,
1099
+ "keys": [
1100
+ {
1101
+ "from": "customer_id",
1102
+ "to": "id"
1103
+ },
1104
+ {
1105
+ "from": "region_code",
1106
+ "to": "id"
1107
+ }
1108
+ ]
1109
+ }
1110
+ ]
1111
+ }
1112
+ ]
1113
+ },
1114
+ "error": "HQ_DEPLOYMENT_INVALID_VALUE"
1115
+ },
1116
+ {
1117
+ "id": "relationship-keys-qualified-pair-column",
1118
+ "value": {
1119
+ "kind": "hypequery-deployment",
1120
+ "version": 2,
1121
+ "datasets": [
1122
+ {
1123
+ "name": "customers",
1124
+ "source": "customers",
1125
+ "tenant": {
1126
+ "kind": "not-required"
1127
+ },
1128
+ "dimensions": [],
1129
+ "measures": [],
1130
+ "filters": [],
1131
+ "relationships": []
1132
+ },
1133
+ {
1134
+ "name": "orders",
1135
+ "source": "orders",
1136
+ "tenant": {
1137
+ "kind": "not-required"
1138
+ },
1139
+ "dimensions": [],
1140
+ "measures": [],
1141
+ "filters": [],
1142
+ "relationships": [
1143
+ {
1144
+ "name": "customer",
1145
+ "kind": "belongsTo",
1146
+ "target": "customers",
1147
+ "from": "customer_id",
1148
+ "to": "id",
1149
+ "queryable": true,
1150
+ "keys": [
1151
+ {
1152
+ "from": "customer_id",
1153
+ "to": "id"
1154
+ },
1155
+ {
1156
+ "from": "orders.region_code",
1157
+ "to": "region"
1158
+ }
1159
+ ]
1160
+ }
1161
+ ]
1162
+ }
1163
+ ]
1164
+ },
1165
+ "error": "HQ_DEPLOYMENT_INVALID_IDENTIFIER"
1166
+ },
1167
+ {
1168
+ "id": "relationship-keys-qualified-top-level-column",
1169
+ "value": {
1170
+ "kind": "hypequery-deployment",
1171
+ "version": 2,
1172
+ "datasets": [
1173
+ {
1174
+ "name": "customers",
1175
+ "source": "customers",
1176
+ "tenant": {
1177
+ "kind": "not-required"
1178
+ },
1179
+ "dimensions": [],
1180
+ "measures": [],
1181
+ "filters": [],
1182
+ "relationships": []
1183
+ },
1184
+ {
1185
+ "name": "orders",
1186
+ "source": "orders",
1187
+ "tenant": {
1188
+ "kind": "not-required"
1189
+ },
1190
+ "dimensions": [],
1191
+ "measures": [],
1192
+ "filters": [],
1193
+ "relationships": [
1194
+ {
1195
+ "name": "customer",
1196
+ "kind": "belongsTo",
1197
+ "target": "customers",
1198
+ "from": "orders.customer_id",
1199
+ "to": "id",
1200
+ "queryable": true,
1201
+ "keys": [
1202
+ {
1203
+ "from": "orders.customer_id",
1204
+ "to": "id"
1205
+ },
1206
+ {
1207
+ "from": "region_code",
1208
+ "to": "region"
1209
+ }
1210
+ ]
1211
+ }
1212
+ ]
1213
+ }
1214
+ ]
1215
+ },
1216
+ "error": "HQ_DEPLOYMENT_INVALID_IDENTIFIER"
1217
+ },
1218
+ {
1219
+ "id": "relationship-keys-unknown-pair-field",
1220
+ "value": {
1221
+ "kind": "hypequery-deployment",
1222
+ "version": 2,
1223
+ "datasets": [
1224
+ {
1225
+ "name": "customers",
1226
+ "source": "customers",
1227
+ "tenant": {
1228
+ "kind": "not-required"
1229
+ },
1230
+ "dimensions": [],
1231
+ "measures": [],
1232
+ "filters": [],
1233
+ "relationships": []
1234
+ },
1235
+ {
1236
+ "name": "orders",
1237
+ "source": "orders",
1238
+ "tenant": {
1239
+ "kind": "not-required"
1240
+ },
1241
+ "dimensions": [],
1242
+ "measures": [],
1243
+ "filters": [],
1244
+ "relationships": [
1245
+ {
1246
+ "name": "customer",
1247
+ "kind": "belongsTo",
1248
+ "target": "customers",
1249
+ "from": "customer_id",
1250
+ "to": "id",
1251
+ "queryable": true,
1252
+ "keys": [
1253
+ {
1254
+ "from": "customer_id",
1255
+ "to": "id"
1256
+ },
1257
+ {
1258
+ "from": "region_code",
1259
+ "to": "region",
1260
+ "op": "eq"
1261
+ }
1262
+ ]
1263
+ }
1264
+ ]
1265
+ }
1266
+ ]
1267
+ },
1268
+ "error": "HQ_DEPLOYMENT_UNKNOWN_FIELD"
1269
+ },
1270
+ {
1271
+ "id": "relationship-keys-not-array",
1272
+ "value": {
1273
+ "kind": "hypequery-deployment",
1274
+ "version": 2,
1275
+ "datasets": [
1276
+ {
1277
+ "name": "customers",
1278
+ "source": "customers",
1279
+ "tenant": {
1280
+ "kind": "not-required"
1281
+ },
1282
+ "dimensions": [],
1283
+ "measures": [],
1284
+ "filters": [],
1285
+ "relationships": []
1286
+ },
1287
+ {
1288
+ "name": "orders",
1289
+ "source": "orders",
1290
+ "tenant": {
1291
+ "kind": "not-required"
1292
+ },
1293
+ "dimensions": [],
1294
+ "measures": [],
1295
+ "filters": [],
1296
+ "relationships": [
1297
+ {
1298
+ "name": "customer",
1299
+ "kind": "belongsTo",
1300
+ "target": "customers",
1301
+ "from": "customer_id",
1302
+ "to": "id",
1303
+ "queryable": true,
1304
+ "keys": {
1305
+ "from": "customer_id",
1306
+ "to": "id"
1307
+ }
1308
+ }
1309
+ ]
1310
+ }
1311
+ ]
1312
+ },
1313
+ "error": "HQ_DEPLOYMENT_TYPE"
873
1314
  }
874
1315
  ]
@@ -63,5 +63,55 @@
63
63
  }
64
64
  ]
65
65
  }
66
+ },
67
+ {
68
+ "id": "composite-relationship-keys",
69
+ "value": {
70
+ "kind": "hypequery-deployment",
71
+ "version": 2,
72
+ "datasets": [
73
+ {
74
+ "name": "customers",
75
+ "source": "customers",
76
+ "tenant": {
77
+ "kind": "not-required"
78
+ },
79
+ "dimensions": [],
80
+ "measures": [],
81
+ "filters": [],
82
+ "relationships": []
83
+ },
84
+ {
85
+ "name": "orders",
86
+ "source": "orders",
87
+ "tenant": {
88
+ "kind": "not-required"
89
+ },
90
+ "dimensions": [],
91
+ "measures": [],
92
+ "filters": [],
93
+ "relationships": [
94
+ {
95
+ "name": "customer",
96
+ "kind": "belongsTo",
97
+ "target": "customers",
98
+ "from": "customer_id",
99
+ "to": "id",
100
+ "queryable": true,
101
+ "keys": [
102
+ {
103
+ "from": "customer_id",
104
+ "to": "id"
105
+ },
106
+ {
107
+ "from": "region_code",
108
+ "to": "region"
109
+ }
110
+ ]
111
+ }
112
+ ]
113
+ }
114
+ ]
115
+ }
66
116
  }
67
117
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/protocol-conformance",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Cross-language conformance runner for the Hypequery analytics security protocol",
5
5
  "keywords": [
6
6
  "hypequery",
@@ -31,11 +31,11 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@hypequery/protocol": "^0.18.0"
34
+ "@hypequery/protocol": "^0.19.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^22.5.0",
38
- "typescript": "^5.7.3",
38
+ "typescript": "^6.0.3",
39
39
  "vitest": "^5.0.2"
40
40
  },
41
41
  "repository": {