Skip to content

Fix TableDisplay column order for Spark Datasets #7464

@jpallas

Description

@jpallas

Hidden in the example of #7393 is a problem I noticed a while ago but forgot about. The column ordering gets scrambled because the default Map doesn't preserving order for more than four columns (it does up to four, presumably an optimization for small maps).

Two approaches:

  • Use ListMap. Minimizes changes to existing code.
  • Use the TableDisplay (values, columns, classes) interface instead of building all those maps. Classes can be derived from the Dataset schema.

I'm leaning toward the second. I don't think the table display guesses some of the types correctly currently.

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