chenjunjiedada commented on code in PR #975: URL: https://github.com/apache/parquet-mr/pull/975#discussion_r896285374
########## parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestParquetWriter.java: ########## @@ -282,6 +286,63 @@ public void testParquetFileWithBloomFilter() throws IOException { } } + @Test + public void testParquetFileWithBloomFilterWithFpp() throws IOException { + final int totalCount = 100000; + double[] testFpp = {0.005, 0.01, 0.05, 0.10, 0.15, 0.20, 0.25}; + + Set<String> distinctStrings = new HashSet<>(); + while (distinctStrings.size() < totalCount) { + String str = RandomStringUtils.randomAlphabetic(12); + distinctStrings.add(str); + } + + MessageType schema = Types.buildMessage(). + required(BINARY).as(stringType()).named("name").named("msg"); + + Configuration conf = new Configuration(); + GroupWriteSupport.setSchema(schema, conf); + + GroupFactory factory = new SimpleGroupFactory(schema); + for (int i = 0; i < testFpp.length; i++) { + File file = temp.newFile(); + file.delete(); + Path path = new Path(file.getAbsolutePath()); + try (ParquetWriter<Group> writer = ExampleParquetWriter.builder(path) + .withPageRowCountLimit(10) + .withConf(conf) + .withDictionaryEncoding(false) + .withBloomFilterEnabled("name", true) + .withBloomFilterNDV("name", 100000l) Review Comment: Nit: Can we use `TotalCount`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@parquet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org