yashmayya commented on code in PR #15283: URL: https://github.com/apache/pinot/pull/15283#discussion_r2000213383
########## pinot-segment-local/src/test/java/org/apache/pinot/segment/local/utils/TableConfigUtilsTest.java: ########## @@ -1307,6 +1311,40 @@ public void testValidateFieldConfig() { } } + @Test + public void testValidateBFOnBoolean() { + Schema schema = new Schema.SchemaBuilder().setSchemaName(TABLE_NAME).addSingleValueDimension("myCol", FieldSpec.DataType.BOOLEAN).addSingleValueDimension("mycol2", FieldSpec.DataType.STRING).build(); + TableConfig tableconfig = new TableConfigBuilder(TableType.REALTIME).setTableName(TABLE_NAME).setBloomFilterColumns(Arrays.asList("mycol")).build(); + try { + TableConfigUtils.validate(tableconfig, schema); + Assert.fail("Should fail for invalid Bloom filter column name"); + } catch (Exception e) { + // expected + } + + tableconfig = new TableConfigBuilder(TableType.REALTIME).setTableName(TABLE_NAME).build(); + tableconfig.getIndexingConfig().setBloomFilterConfigs(Collections.singletonMap("myCol", new BloomFilterConfig(0.01, 1000, true))); + try { + TableConfigUtils.validate(tableconfig, schema); + Assert.fail("Should fail for invalid Bloom filter column name"); + } catch (Exception e) { + // expected + } Review Comment: I'd recommend using `Assert.assertThrows` instead which is a cleaner way of doing this. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org