Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I've just set up the library and noticed this thing:
Here is the data example:
The tests:
And the sample of the results:
As you can see, the first constraint_message says that 60% of data didn't meet the requirement, although 60% of it did meet. In the second row, it says that 0% didn't meet which means that 100% is passed successfully, thought it's the opposite: none of the values among ga_visits column is unique.
Description of changes:
I propose to change the formula of calculating ratio in constraint_message, so it becomes the ratio of mismatched values.
If we use val ratio = mismatchCount.toDouble / primaryCount, then the results for my case would be 4/10=0.4 and 10/10=1 "didn't meet the constraint requirement".
Another approach is to omit not in the message, however, I'm not sure if it follows the logic.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.