-
Notifications
You must be signed in to change notification settings - Fork 545
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
Feature: Add Row Level Result Treatment Options for Miminum and Maximum #535
Feature: Add Row Level Result Treatment Options for Miminum and Maximum #535
Conversation
ad7a8cc
to
6a3665e
Compare
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.
Great work, @eycho-am !
case _ => | ||
criterion |
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.
Can we add a comment here that we don't need special treatment for Null
because that is the default behavior anyway when using where
} | ||
} | ||
|
||
private def transformColForNullBehavior(col: Column, nullBehavior: NullBehavior): Column = { |
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.
Can we use column
here directly instead of passing it in ascol
? In rowLevelResults
, we use analyzerOptions
directly instead of passing it in as a parameter.
private[deequ] def rowLevelResults: Column = { | ||
val filteredRowOutcome = getRowLevelFilterTreatment(analyzerOptions) | ||
val whereNotCondition = where.map { expression => not(expr(expression)) } | ||
val expression = when(regexp_extract(col(column), pattern.toString(), 0) =!= lit(""), 1) |
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.
Can we put when(regexp_extract(col(column), pattern.toString(), 0) =!= lit(""), 1)
in a common place and reuse it in criterion
and 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.
LGTM
…um (awslabs#535) * Address comments on PR awslabs#532 * Add filtered row-level result support for Minimum, Maximum, Compliance, PatternMatch, MinLength, MaxLength analyzers * Refactored criterion for MinLength and MaxLength analyzers to separate rowLevelResults logic
Issue #, if available: N/A
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.