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: Table stat values should always be represented with a string #411

Merged
merged 1 commit into from Nov 11, 2020

Conversation

AndrewCiambrone
Copy link
Contributor

Signed-off-by: Andrew andrjc4@vt.edu

Summary of Changes

This change makes it so all stat values are casted with a string. In the past there was some inconsistencies on if this should be a integer value or a string value. This change here makes it so its consistently treated as a string.

Tests

Modified the table stats test so it expects a string.

Documentation

What documentation did you add or modify and why? Add any relevant links then remove this line

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
  • PR passes make test

Signed-off-by: Andrew <andrjc4@vt.edu>
@feng-tao
Copy link
Member

cc @allisonsuarez WDYT?

except ValueError:
stat_val = stat_val
self.stat_val = stat_val
self.stat_val = str(stat_val)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have list of values for a column stat,e.g distinct values or most common values in a column, how do we want handle that? Concat all values to create a single str?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would think a list would be concatenate to a single string. I think that is how it would be displayed on the front end?

Copy link
Member

@feng-tao feng-tao Nov 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dikshathakur3119 I think a concatenation of list of string should work for you.

@feng-tao feng-tao merged commit 57859b9 into amundsen-io:master Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants