Skip to content

Commit 4f1f5d5

Browse files
null bulk string -> null array in xg4
1 parent 97237c3 commit 4f1f5d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stage_descriptions/geospatial-05-xg4.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ It returns an array with one entry for each location requested.
2424
- If a location exists under the key, its entry is an array of two items:
2525
- Longitude (Encoded as a [RESP Bulk string](https://redis.io/docs/latest/develop/reference/protocol-spec/#bulk-strings))
2626
- 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)`.
2828

2929
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).
3030

@@ -52,7 +52,7 @@ The tester will then send multiple `GEOPOS` commands:
5252
> GEOPOS location_key London Munich
5353
# 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"
5454
> 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"
5656
```
5757

5858
The tester will assert that:
@@ -63,19 +63,19 @@ The tester will assert that:
6363
- The corresponding element is a RESP array with two elements (i.e. longitude and latitude)
6464
- Both elements are "0" (or any other valid floating point number), encoded as a RESP bulk string
6565
- 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)`.
6767

6868
The tester will also send a `GEOPOS` command using a key that doesn't exist:
6969

7070
```bash
7171
> 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"
7373
```
7474

7575
The tester will assert that:
7676

7777
- 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)`
7979

8080
### Notes
8181

0 commit comments

Comments
 (0)