Search in sources :

Example 1 with PhoneNumber

use of org.apache.parquet.filter2.recordlevel.PhoneBookWriter.PhoneNumber in project parquet-mr by apache.

the class TestRecordLevelFilters method makeUsers.

public static List<User> makeUsers() {
    List<User> users = new ArrayList<User>();
    users.add(new User(17, null, null, null));
    users.add(new User(18, "bob", null, null));
    users.add(new User(19, "alice", new ArrayList<PhoneNumber>(), null));
    users.add(new User(20, "thing1", Arrays.asList(new PhoneNumber(5555555555L, null)), null));
    users.add(new User(27, "thing2", Arrays.asList(new PhoneNumber(1111111111L, "home")), null));
    users.add(new User(28, "popular", Arrays.asList(new PhoneNumber(1111111111L, "home"), new PhoneNumber(2222222222L, null), new PhoneNumber(3333333333L, "mobile")), null));
    users.add(new User(30, null, Arrays.asList(new PhoneNumber(1111111111L, "home")), null));
    for (int i = 100; i < 200; i++) {
        Location location = null;
        if (i % 3 == 1) {
            location = new Location((double) i, (double) i * 2);
        }
        if (i % 3 == 2) {
            location = new Location((double) i, null);
        }
        users.add(new User(i, "p" + i, Arrays.asList(new PhoneNumber(i, "cell")), location));
    }
    return users;
}
Also used : User(org.apache.parquet.filter2.recordlevel.PhoneBookWriter.User) ArrayList(java.util.ArrayList) PhoneNumber(org.apache.parquet.filter2.recordlevel.PhoneBookWriter.PhoneNumber) Location(org.apache.parquet.filter2.recordlevel.PhoneBookWriter.Location)

Aggregations

ArrayList (java.util.ArrayList)1 Location (org.apache.parquet.filter2.recordlevel.PhoneBookWriter.Location)1 PhoneNumber (org.apache.parquet.filter2.recordlevel.PhoneBookWriter.PhoneNumber)1 User (org.apache.parquet.filter2.recordlevel.PhoneBookWriter.User)1