You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stage_descriptions/geospatial-05-xg4.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ It returns an array with one entry for each location requested.
24
24
- If a location exists under the key, its entry is an array of two items:
25
25
- Longitude (Encoded as a [RESP Bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings))
26
26
- Latitude (Encoded as a [RESP Bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings))
27
-
- If either the location or key don’t exist, the corresponding entry is a [null bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-bulk-strings)`($-1\r\n)`.
27
+
- If either the location or key don’t exist, the corresponding entry is a [null array](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-arrays)`(*-1\r\n)`.
28
28
29
29
To return the latitude and longitude values, Redis decodes the "score" back to latitude and longitude values. We'll cover this process in later stages, for now you can hardcode the returned latitude and longitude values to be 0 (or any number).
30
30
@@ -52,7 +52,7 @@ The tester will then send multiple `GEOPOS` commands:
52
52
> GEOPOS location_key London Munich
53
53
# Expecting: [["0", "0"], ["0", "0"]], encoded as "*2\r\n$1\r\n0\r\n$1\r\n0\r\n$1\r\n0\r\n$1\r\n0\r\n"
54
54
> GEOPOS location_key missing_location
55
-
# Expecting: [nil], encoded as "*1\r\n$-1\r\n"
55
+
# Expecting: [nil], encoded as "*1\r\n*-1\r\n"
56
56
```
57
57
58
58
The tester will assert that:
@@ -63,19 +63,19 @@ The tester will assert that:
63
63
- The corresponding element is a RESP array with two elements (i.e. longitude and latitude)
64
64
- Both elements are "0" (or any other valid floating point number), encoded as a RESP bulk string
65
65
- If the location doesn't exist:
66
-
- The corresponding element is a [null bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-bulk-strings)`($-1\r\n)`.
66
+
- The corresponding element is a [null array](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-arrays)`(*-1\r\n)`.
67
67
68
68
The tester will also send a `GEOPOS` command using a key that doesn't exist:
69
69
70
70
```bash
71
71
> GEOPOS missing_key London Munich
72
-
# Expecting [nil, nil], encoded as "*2\r\n$-1\r\n$-1\r\n"
72
+
# Expecting [nil, nil], encoded as "*2\r\n*-1\r\n*-1\r\n"
73
73
```
74
74
75
75
The tester will assert that:
76
76
77
77
- The response is a RESP array that contains as many elements as the number of locations requested
78
-
- Each element of the array is a [null bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-bulk-strings)`($-1\r\n)`
78
+
- Each element of the array is a [null array](https://redis.io/docs/latest/develop/reference/protocol-spec/#null-arrays)`(*-1\r\n)`
0 commit comments