Skip to content

Bug: Vec<u64> column is displayed ambiguously in spacetime sql #3993

@CorrM

Description

@CorrM

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

  1. Create a table with a Vec<u64> column (e.g., entities)
  2. Insert data with multiple values in the vector (e.g., [1, 2])
  3. 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] or 1, 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions