Configurable value replacement on match failure for RegexExtractionFn#2075
Configurable value replacement on match failure for RegexExtractionFn#2075fjy merged 1 commit intoapache:masterfrom
Conversation
|
@b-slim Reopened PR, referring to your earlier comment, what property did you think was unneeded? |
|
@jon-wei |
There was a problem hiding this comment.
@b-slim added byte array value check for cache key
|
@b-slim I think "injective" is fine here, a regex->match extraction can be thought of as a a function. JavascriptExtractionFn also supports the injective property and it doesn't extend FunctionalExtraction. A hypothetical "injective" use case might be a dimension value with various formats that all contain some unique ID, where the regex is used to strip out parts of the dim val that don't provide any unique information beyond the ID substring. |
bb71a89 to
4e2a3ca
Compare
|
@jon-wei ok i got it now, thanks ! |
|
Very excited about this PR! |
4e2a3ca to
8e67524
Compare
8e67524 to
464aa32
Compare
There was a problem hiding this comment.
"Injective" doesn't seem to be used for anything right now- is it necessary? What should it be used for?
464aa32 to
cdbeca0
Compare
cdbeca0 to
d86953c
Compare
|
👍 after travis |
d86953c to
c88f75d
Compare
|
👍 |
Configurable value replacement on match failure for RegexExtractionFn
Addresses issue #2064
This adds 3 new parameters to the RegexExtractionFn:
replaceMissingValues: Boolean, if a regex match fails, replace the dimval with a user specified value instead of returning the orignal dimval, default is false
replaceMissingValuesWith: String, replace dimval with this value when regex match fails if replaceMissingValues == true
injective: Boolean, currently unused, but same usage as "injective" property in the JavaScriptExtractionFn and LookupExtractionFn