Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TableDisplay column order for Spark Datasets #7464

Closed
jpallas opened this issue May 31, 2018 · 1 comment
Closed

Fix TableDisplay column order for Spark Datasets #7464

jpallas opened this issue May 31, 2018 · 1 comment

Comments

@jpallas
Copy link
Contributor

jpallas commented May 31, 2018

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.

@scottdraves
Copy link
Contributor

great point, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants