mirror of https://github.com/apache/druid.git
Fix native is boolean filter cache key tests to test the right thing (#15216)
This commit is contained in:
parent
33fdd770f7
commit
c8e458452d
|
@ -52,11 +52,15 @@ public class IsBooleanDimFilterTest extends InitializedNullHandlingTest
|
||||||
@Test
|
@Test
|
||||||
public void testGetCacheKey()
|
public void testGetCacheKey()
|
||||||
{
|
{
|
||||||
EqualityFilter f1 = new EqualityFilter("x", ColumnType.STRING, "hello", null);
|
IsTrueDimFilter f1 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
|
||||||
EqualityFilter f1_2 = new EqualityFilter("x", ColumnType.STRING, "hello", null);
|
IsTrueDimFilter f1_2 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
|
||||||
EqualityFilter f2 = new EqualityFilter("x", ColumnType.STRING, "world", null);
|
IsFalseDimFilter f1_3 = IsFalseDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
|
||||||
EqualityFilter f3 = new EqualityFilter("x", ColumnType.STRING, "hello", new FilterTuning(true, null, null));
|
IsFalseDimFilter f1_4 = IsFalseDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
|
||||||
|
IsTrueDimFilter f2 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "world", null));
|
||||||
|
IsTrueDimFilter f3 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", new FilterTuning(true, null, null)));
|
||||||
Assert.assertArrayEquals(f1.getCacheKey(), f1_2.getCacheKey());
|
Assert.assertArrayEquals(f1.getCacheKey(), f1_2.getCacheKey());
|
||||||
|
Assert.assertFalse(Arrays.equals(f1.getCacheKey(), f1_3.getCacheKey()));
|
||||||
|
Assert.assertArrayEquals(f1_3.getCacheKey(), f1_4.getCacheKey());
|
||||||
Assert.assertFalse(Arrays.equals(f1.getCacheKey(), f2.getCacheKey()));
|
Assert.assertFalse(Arrays.equals(f1.getCacheKey(), f2.getCacheKey()));
|
||||||
Assert.assertArrayEquals(f1.getCacheKey(), f3.getCacheKey());
|
Assert.assertArrayEquals(f1.getCacheKey(), f3.getCacheKey());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue