ParquetFileQuery { @Override public int hashCode() { return new HashCodeBuilder(17, 37) .append(file) .append(filter) .append(fullyApplied) .toHashCode(); } ParquetFileQuery(final Path file, final FilterPredicate filter, final boolean fullyApplied); Path getFile(); FilterPredicate getFilter(); boolean isFullyApplied(); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void testEqualsAndHashCode() { final ParquetFileQuery q1 = new ParquetFileQuery(new Path("1"), eq(FilterApi.binaryColumn("A"), Binary.fromString("T")), true); final ParquetFileQuery q2 = new ParquetFileQuery(new Path("1"), eq(FilterApi.binaryColumn("A"), Binary.fromString("T")), true); final ParquetFileQuery q3 = new ParquetFileQuery(new Path("1"), eq(FilterApi.binaryColumn("A"), Binary.fromString("T")), false); final ParquetFileQuery q4 = new ParquetFileQuery(new Path("1"), eq(FilterApi.binaryColumn("A"), Binary.fromString("X")), true); final ParquetFileQuery q5 = new ParquetFileQuery(new Path("1"), eq(FilterApi.binaryColumn("B"), Binary.fromString("T")), true); final ParquetFileQuery q6 = new ParquetFileQuery(new Path("2"), eq(FilterApi.binaryColumn("A"), Binary.fromString("T")), true); assertEquals(q1, q2); assertEquals(q1.hashCode(), q2.hashCode()); assertNotEquals(q1, q3); assertNotEquals(q1.hashCode(), q3.hashCode()); assertNotEquals(q1, q4); assertNotEquals(q1.hashCode(), q4.hashCode()); assertNotEquals(q1, q5); assertNotEquals(q1.hashCode(), q5.hashCode()); assertNotEquals(q1, q6); assertNotEquals(q1.hashCode(), q6.hashCode()); }