mirror of https://github.com/apache/druid.git
Makes kafka lookup extraction factory's replace() behavior consistent with other lookup extraction factories (#3326)
This commit is contained in:
parent
9437a7a313
commit
33dbe0800c
|
@ -321,11 +321,7 @@ public class KafkaLookupExtractorFactory implements LookupExtractorFactory
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other == null) {
|
if (other == null || getClass() != other.getClass()) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (getClass() != other.getClass()) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,9 @@ public class KafkaLookupExtractorFactoryTest
|
||||||
TOPIC,
|
TOPIC,
|
||||||
DEFAULT_PROPERTIES
|
DEFAULT_PROPERTIES
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Assert.assertTrue(factory.replaces(null));
|
||||||
|
|
||||||
Assert.assertTrue(factory.replaces(new MapLookupExtractorFactory(ImmutableMap.<String, String>of(), false)));
|
Assert.assertTrue(factory.replaces(new MapLookupExtractorFactory(ImmutableMap.<String, String>of(), false)));
|
||||||
Assert.assertFalse(factory.replaces(factory));
|
Assert.assertFalse(factory.replaces(factory));
|
||||||
Assert.assertFalse(factory.replaces(new KafkaLookupExtractorFactory(
|
Assert.assertFalse(factory.replaces(new KafkaLookupExtractorFactory(
|
||||||
|
|
Loading…
Reference in New Issue