Skip to content

MapScan does not preserve top-level UDT values (returns empty map) #1938

@ribaraka

Description

@ribaraka

When reading rows that contain a top-level UDT column, MapScan(map[string]interface{}) does not preserve the decoded UDT field values, while Scan(&map[string]interface{}) works as expected.

For a top-level frozen<udt> column:

  • Scan(...) can decode the UDT correctly
  • MapScan(...) returns the row, but the UDT value is an empty map[string]interface{}

Expected behavior

MapScan should preserve top-level UDT contents consistently with Scan
A non-null UDT column should decode into a populated map[string]interface{} containing its field values

This is particularly problematic because:

  • The column itself is present
  • No error is raised
  • The data is silently lost rather than missing or failing loudly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions