presto-main/src/main/java/io/prestosql/operator/scalar/MapCardinalityFunction.java/MapCardinalityFunction/mapCardinality
class MapCardinalityFunction:    @TypeParameter("K")
    @TypeParameter("V")
    @SqlType(StandardTypes.BIGINT)
    public static long mapCardinality(@SqlType("map(K,V)") Block block)
    {
        return block.getPositionCount() / 2;
    }