FRosner / drunken-data-quality

Spark package for checking data quality
Apache License 2.0
222 stars 69 forks source link

Incorrect message for single column unique key #23

Closed ghost closed 8 years ago

ghost commented 9 years ago

hasUniqueKey(col1,col2,..colN) shows:

Columns col1,col2,...,colN are (not) a key

But if only one column is unique, we get a grammatically incorrect sentence:

Columns col1 are (not) a key

To support both one and multiple columns, it would make sense to use a text like:

Column(s) col1 is/are (not) a UNIQUE key
Column(s) col1, col2, ..., colN is/are (not) a UNIQUE key

or even have two separate messages

FRosner commented 9 years ago

@mfsny thanks for reporting this. I am fully aware of this "problem", however I deprioritized it so far. I think it also applies to other messages where we have counts etc.

If we deal with it, I would prefer to have an if that selects the right word rather than always showing both. This does not read better in my opinion. Just my 2 cents.

Do you want to deal with it or shall I put it to the Backlog for now?

ghost commented 9 years ago

moving this into backlog is fine with me

ghost commented 8 years ago

@FRosner I fixed this issue. If you grant me access to the repository I will push my proposal.

FRosner commented 8 years ago

@bkomboz can you please make a pull request?

ghost commented 8 years ago

@FRosner Yes, should I fork DDQ? Or do you give me access to create a branch?

FRosner commented 8 years ago

First option. You can get assistance from @Gerrrr as well, in case you have any troubles.

This way we have better control over what is happening and also coveralls works quite nice with pr, but not with only branches.

FRosner commented 8 years ago

Thanks @bkomboz!