Search in sources :

Example 1 with FilePlanObjectKey

use of com.hazelcast.jet.sql.impl.connector.file.FileTable.FilePlanObjectKey in project hazelcast by hazelcast.

the class FileTableTest method test_objectKeyEquality.

@Test
@Parameters(method = "keys")
@SuppressWarnings("checkstyle:ParameterNumber")
public void test_objectKeyEquality(String schema1, String name1, String field1, FileFormat<?> format1, String schema2, String name2, String field2, FileFormat<?> format2, boolean expected) {
    FilePlanObjectKey k1 = new FilePlanObjectKey(schema1, name1, ImmutableList.of(new TableField(field1, QueryDataType.INT, false)), new ProcessorMetaSupplierProvider(ImmutableMap.of("key", "value"), format1));
    FilePlanObjectKey k2 = new FilePlanObjectKey(schema2, name2, singletonList(new TableField(field2, QueryDataType.INT, false)), new ProcessorMetaSupplierProvider(singletonMap("key", "value"), format2));
    assertThat(k1.equals(k2)).isEqualTo(expected);
    assertThat(k1.hashCode() == k2.hashCode()).isEqualTo(expected);
}
Also used : FilePlanObjectKey(com.hazelcast.jet.sql.impl.connector.file.FileTable.FilePlanObjectKey) TableField(com.hazelcast.sql.impl.schema.TableField) Parameters(junitparams.Parameters) Test(org.junit.Test)

Aggregations

FilePlanObjectKey (com.hazelcast.jet.sql.impl.connector.file.FileTable.FilePlanObjectKey)1 TableField (com.hazelcast.sql.impl.schema.TableField)1 Parameters (junitparams.Parameters)1 Test (org.junit.Test)1