-
Notifications
You must be signed in to change notification settings - Fork 671
Open
Description
When querying a table with a Vec<u64> column type using the spacetime sql command, the vector values are displayed without any delimiters, making them ambiguous and potentially misleading.
Steps to Reproduce
- Create a table with a
Vec<u64>column (e.g.,entities) - Insert data with multiple values in the vector (e.g.,
[1, 2]) - Run query:
spacetime sql --server local my-db "SELECT * FROM grid_sector"Current Behavior
WARNING: This command is UNSTABLE and subject to breaking changes.
id | map_id | x | y | entities
-----+--------+---+---+----------
405 | 1 | 0 | 0 | 21
The entities column shows 21, which appears to be a concatenation of the vector values [1, 2].
Expected Behavior
The output should clearly indicate that this is a vector with multiple values, for example:
id | map_id | x | y | entities
-----+--------+---+---+----------
405 | 1 | 0 | 0 | [1, 2]
or with comma separation:
id | map_id | x | y | entities
-----+--------+---+---+----------
405 | 1 | 0 | 0 | 1, 2
Impact
This creates significant confusion for users, as 21 looks like a single entity ID rather than two separate IDs (1 and 2). This could lead to incorrect data interpretation and bugs.
Proposed Solution
Add delimiters (commas, brackets, or other separators) when displaying vector column values to clearly distinguish between:
- A single value:
21 - Multiple values:
[1, 2]or1, 2
Metadata
Metadata
Assignees
Labels
No labels