public Map<Integer, Slice> toKeyMap(List<OrcType> types, List<HiveColumnHandle> physicalColumnHandles)
    {
        Map<String, Integer> columnIndexMap = physicalColumnHandles.stream()
                .collect(toImmutableMap(HiveColumnHandle::getName, HiveColumnHandle::getHiveColumnIndex));
        return toKeyMap(types, columnIndexMap);
    }
@Test
    public void testWholeTable()
    {
        DwrfEncryptionMetadata dwrfEncryptionMetadata = new DwrfEncryptionMetadata(
                ImmutableMap.of(TABLE_IDENTIFIER, "abcd".getBytes()),
                ImmutableMap.of(),
                "test_algo",
                "test_provider");

        List<HiveColumnHandle> columnHandleList = ImmutableList.of(
                new HiveColumnHandle("c1", HIVE_INT, TypeSignature.parseTypeSignature(BIGINT), 0, HiveColumnHandle.ColumnType.REGULAR, Optional.empty(), Optional.empty()),
                new HiveColumnHandle("c2", HIVE_INT, TypeSignature.parseTypeSignature(BIGINT), 2, HiveColumnHandle.ColumnType.REGULAR, Optional.empty(), Optional.empty()));

        List<OrcType> orcTypes = ImmutableList.of(
                new OrcType(OrcType.OrcTypeKind.INT, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), Optional.empty()),
                new OrcType(OrcType.OrcTypeKind.INT, ImmutableList.of(), ImmutableList.of(), Optional.empty(), Optional.empty(), Optional.empty()));
        Map<Integer, Slice> actualKeyMap = dwrfEncryptionMetadata.toKeyMap(orcTypes, columnHandleList);
        Map<Integer, Slice> expectedKeyMap = ImmutableMap.of(0, Slices.wrappedBuffer("abcd".getBytes()));
        assertEquals(actualKeyMap, expectedKeyMap);
    }