mirror of https://github.com/apache/druid.git
Fix NullPointerException in PartialDimExtractionFn by explicity checking for dimValue == null
This commit is contained in:
parent
703470eea5
commit
bd9bbf396c
|
@ -58,6 +58,7 @@ public class PartialDimExtractionFn implements DimExtractionFn
|
|||
@Override
|
||||
public String apply(String dimValue)
|
||||
{
|
||||
if (dimValue == null) return null;
|
||||
Matcher matcher = pattern.matcher(dimValue);
|
||||
return matcher.find() ? dimValue : null;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ public class PartialDimExtractionFnTest
|
|||
"Vancouver",
|
||||
"Pretoria",
|
||||
"Wellington",
|
||||
null,
|
||||
"Ontario"
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue