use of io.questdb.std.ObjIntHashMap in project questdb by bluestreak01.
the class TableReaderMetadataTest method testColumnIndex.
@Test
public void testColumnIndex() {
ObjIntHashMap<String> expected = new ObjIntHashMap<>();
expected.put("int", 0);
expected.put("byte", 2);
expected.put("bin", 9);
expected.put("short", 1);
expected.put("float", 4);
expected.put("long", 5);
expected.put("xyz", -1);
expected.put("str", 6);
expected.put("double", 3);
expected.put("sym", 7);
expected.put("bool", 8);
expected.put("zall.sym", -1);
try (Path path = new Path().of(root).concat("all").concat(TableUtils.META_FILE_NAME).$();
TableReaderMetadata metadata = new TableReaderMetadata(FilesFacadeImpl.INSTANCE, path)) {
for (ObjIntHashMap.Entry<String> e : expected) {
Assert.assertEquals(e.value, metadata.getColumnIndexQuiet(e.key));
}
}
}
Aggregations