Skip to content
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

fix native is boolean filter cache key tests to test the right thing #15216

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ public void testSerde() throws JsonProcessingException
@Test
public void testGetCacheKey()
{
EqualityFilter f1 = new EqualityFilter("x", ColumnType.STRING, "hello", null);
EqualityFilter f1_2 = new EqualityFilter("x", ColumnType.STRING, "hello", null);
EqualityFilter f2 = new EqualityFilter("x", ColumnType.STRING, "world", null);
EqualityFilter f3 = new EqualityFilter("x", ColumnType.STRING, "hello", new FilterTuning(true, null, null));
IsTrueDimFilter f1 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
IsTrueDimFilter f1_2 = IsTrueDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", null));
IsFalseDimFilter f1_3 = IsFalseDimFilter.of(new EqualityFilter("x", ColumnType.STRING, "hello", 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.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.assertArrayEquals(f1.getCacheKey(), f3.getCacheKey());

Expand Down