-
Notifications
You must be signed in to change notification settings - Fork 73
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
Masking Strategies: Handle Null Values and Non-Strings #2377
Conversation
…an array or non string values are passed in. If an array of values are passed in, if the original value is None, do nothing. Also try to coerce the original value to a string.
@adamsachs wanted to get your thoughts on the strategy here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me @pattisdr! nice quick fix.
the None
handling is exactly what i'd expect, and that's the most important piece.
the non-string-type coercion is a tricky one, and i agree with the approach of trying -- essentially, why not? my only question is whether there's anything we can do to make a somewhat-expected type coercion error from the DB clearly communicated to the end user. maybe it's already going to be clear in how it's set up now, i'm not sure -- just wanted to raise point up to ensure it's considered.
Closes: #2391
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
Several of our masking strategies are set up to expect values to be strings. There are some early exits if the input value is None, but since most inputs are now a list of values, even a list of one value, so that's not likely to be True.
If an array of values are passed in, if the original index is None, do nothing to that index. Also try to coerce the original value to a string.