@Test public void testValidateIndexingConfig() { Schema schema = new Schema.SchemaBuilder().setSchemaName(TABLE_NAME).addSingleValueDimension("myCol", FieldSpec.DataType.STRING) .build(); TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setBloomFilterColumns(Arrays.asList("myCol2")).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Bloom filter column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setInvertedIndexColumns(Arrays.asList("myCol2")).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Inverted Index column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setNoDictionaryColumns(Arrays.asList("myCol2")).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid No Dictionary column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setOnHeapDictionaryColumns(Arrays.asList("myCol2")).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid On Heap Dictionary column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME).setRangeIndexColumns(Arrays.asList("myCol2")) .build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Range Index column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME).setSortedColumn("myCol2").build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Sorted column name"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setVarLengthDictionaryColumns(Arrays.asList("myCol2")).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Var Length Dictionary column name"); } catch (Exception e) { } ColumnPartitionConfig columnPartitionConfig = new ColumnPartitionConfig("Murmur", 4); Map<String, ColumnPartitionConfig> partitionConfigMap = new HashMap<>(); partitionConfigMap.put("myCol2", columnPartitionConfig); SegmentPartitionConfig partitionConfig = new SegmentPartitionConfig(partitionConfigMap); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME).setSegmentPartitionConfig(partitionConfig) .build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid Segment Partition column name"); } catch (Exception e) { } StarTreeIndexConfig starTreeIndexConfig = new StarTreeIndexConfig(Arrays.asList("myCol"), Arrays.asList("myCol"), Arrays.asList("SUM__myCol"), 1); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setStarTreeIndexConfigs(Arrays.asList(starTreeIndexConfig)).build(); try { TableConfigUtils.validate(tableConfig, schema); } catch (Exception e) { Assert.fail("Should not fail for valid StarTreeIndex config column name"); } starTreeIndexConfig = new StarTreeIndexConfig(Arrays.asList("myCol2"), Arrays.asList("myCol"), Arrays.asList("SUM__myCol"), 1); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setStarTreeIndexConfigs(Arrays.asList(starTreeIndexConfig)).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid StarTreeIndex config column name in dimension split order"); } catch (Exception e) { } starTreeIndexConfig = new StarTreeIndexConfig(Arrays.asList("myCol"), Arrays.asList("myCol2"), Arrays.asList("SUM__myCol"), 1); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setStarTreeIndexConfigs(Arrays.asList(starTreeIndexConfig)).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid StarTreeIndex config column name in skip star node for dimension"); } catch (Exception e) { } starTreeIndexConfig = new StarTreeIndexConfig(Arrays.asList("myCol"), Arrays.asList("myCol"), Arrays.asList("SUM__myCol2"), 1); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setStarTreeIndexConfigs(Arrays.asList(starTreeIndexConfig)).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid StarTreeIndex config column name in function column pair"); } catch (Exception e) { } FieldConfig fieldConfig = new FieldConfig("myCol2", null, null, null); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME) .setFieldConfigList(Arrays.asList(fieldConfig)).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for invalid column name in Field Config List"); } catch (Exception e) { } List<String> columnList = Arrays.asList("myCol"); tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME).setNoDictionaryColumns(columnList) .setInvertedIndexColumns(columnList).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for valid column name in both no dictionary and inverted index column config"); } catch (Exception e) { } tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName(TABLE_NAME).setNoDictionaryColumns(columnList) .setBloomFilterColumns(columnList).build(); try { TableConfigUtils.validate(tableConfig, schema); Assert.fail("Should fail for valid column name in both no dictionary and bloom filter column config"); } catch (Exception e) { } }
private static void validateIndexingConfig(@Nullable IndexingConfig indexingConfig, @Nullable Schema schema) { if (indexingConfig == null || schema == null) { return; } Map<String, String> columnNameToConfigMap = new HashMap<>(); Set<String> noDictionaryColumnsSet = new HashSet<>(); if (indexingConfig.getNoDictionaryColumns() != null) { for (String columnName : indexingConfig.getNoDictionaryColumns()) { columnNameToConfigMap.put(columnName, "No Dictionary Column Config"); noDictionaryColumnsSet.add(columnName); } } if (indexingConfig.getBloomFilterColumns() != null) { for (String columnName : indexingConfig.getBloomFilterColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException( "Cannot create a Bloom Filter on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Bloom Filter Config"); } } if (indexingConfig.getInvertedIndexColumns() != null) { for (String columnName : indexingConfig.getInvertedIndexColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException("Cannot create an Inverted index on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Inverted Index Config"); } } if (indexingConfig.getOnHeapDictionaryColumns() != null) { for (String columnName : indexingConfig.getOnHeapDictionaryColumns()) { columnNameToConfigMap.put(columnName, "On Heap Dictionary Column Config"); } } if (indexingConfig.getRangeIndexColumns() != null) { for (String columnName : indexingConfig.getRangeIndexColumns()) { columnNameToConfigMap.put(columnName, "Range Column Config"); } } if (indexingConfig.getSortedColumn() != null) { for (String columnName : indexingConfig.getSortedColumn()) { columnNameToConfigMap.put(columnName, "Sorted Column Config"); } } if (indexingConfig.getVarLengthDictionaryColumns() != null) { for (String columnName : indexingConfig.getVarLengthDictionaryColumns()) { columnNameToConfigMap.put(columnName, "Var Length Column Config"); } } if (indexingConfig.getSegmentPartitionConfig() != null && indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap() != null) { for (String columnName : indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap().keySet()) { columnNameToConfigMap.put(columnName, "Segment Partition Config"); } } List<StarTreeIndexConfig> starTreeIndexConfigList = indexingConfig.getStarTreeIndexConfigs(); if (starTreeIndexConfigList != null) { for (StarTreeIndexConfig starTreeIndexConfig : starTreeIndexConfigList) { for (String columnName : starTreeIndexConfig.getDimensionsSplitOrder()) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } for (String functionColumnPair : starTreeIndexConfig.getFunctionColumnPairs()) { AggregationFunctionColumnPair columnPair; try { columnPair = AggregationFunctionColumnPair.fromColumnName(functionColumnPair); } catch (Exception e) { throw new IllegalStateException("Invalid StarTreeIndex config: " + functionColumnPair + ". Must be" + "in the form <Aggregation function>__<Column name>"); } String columnName = columnPair.getColumn(); if (!columnName.equals(AggregationFunctionColumnPair.STAR)) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } List<String> skipDimensionList = starTreeIndexConfig.getSkipStarNodeCreationForDimensions(); if (skipDimensionList != null) { for (String columnName : skipDimensionList) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } } } for (Map.Entry<String, String> entry : columnNameToConfigMap.entrySet()) { String columnName = entry.getKey(); String configName = entry.getValue(); Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, "Column Name " + columnName + " defined in " + configName + " must be a valid column defined in the schema"); } }
TableConfigUtils { private static void validateIndexingConfig(@Nullable IndexingConfig indexingConfig, @Nullable Schema schema) { if (indexingConfig == null || schema == null) { return; } Map<String, String> columnNameToConfigMap = new HashMap<>(); Set<String> noDictionaryColumnsSet = new HashSet<>(); if (indexingConfig.getNoDictionaryColumns() != null) { for (String columnName : indexingConfig.getNoDictionaryColumns()) { columnNameToConfigMap.put(columnName, "No Dictionary Column Config"); noDictionaryColumnsSet.add(columnName); } } if (indexingConfig.getBloomFilterColumns() != null) { for (String columnName : indexingConfig.getBloomFilterColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException( "Cannot create a Bloom Filter on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Bloom Filter Config"); } } if (indexingConfig.getInvertedIndexColumns() != null) { for (String columnName : indexingConfig.getInvertedIndexColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException("Cannot create an Inverted index on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Inverted Index Config"); } } if (indexingConfig.getOnHeapDictionaryColumns() != null) { for (String columnName : indexingConfig.getOnHeapDictionaryColumns()) { columnNameToConfigMap.put(columnName, "On Heap Dictionary Column Config"); } } if (indexingConfig.getRangeIndexColumns() != null) { for (String columnName : indexingConfig.getRangeIndexColumns()) { columnNameToConfigMap.put(columnName, "Range Column Config"); } } if (indexingConfig.getSortedColumn() != null) { for (String columnName : indexingConfig.getSortedColumn()) { columnNameToConfigMap.put(columnName, "Sorted Column Config"); } } if (indexingConfig.getVarLengthDictionaryColumns() != null) { for (String columnName : indexingConfig.getVarLengthDictionaryColumns()) { columnNameToConfigMap.put(columnName, "Var Length Column Config"); } } if (indexingConfig.getSegmentPartitionConfig() != null && indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap() != null) { for (String columnName : indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap().keySet()) { columnNameToConfigMap.put(columnName, "Segment Partition Config"); } } List<StarTreeIndexConfig> starTreeIndexConfigList = indexingConfig.getStarTreeIndexConfigs(); if (starTreeIndexConfigList != null) { for (StarTreeIndexConfig starTreeIndexConfig : starTreeIndexConfigList) { for (String columnName : starTreeIndexConfig.getDimensionsSplitOrder()) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } for (String functionColumnPair : starTreeIndexConfig.getFunctionColumnPairs()) { AggregationFunctionColumnPair columnPair; try { columnPair = AggregationFunctionColumnPair.fromColumnName(functionColumnPair); } catch (Exception e) { throw new IllegalStateException("Invalid StarTreeIndex config: " + functionColumnPair + ". Must be" + "in the form <Aggregation function>__<Column name>"); } String columnName = columnPair.getColumn(); if (!columnName.equals(AggregationFunctionColumnPair.STAR)) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } List<String> skipDimensionList = starTreeIndexConfig.getSkipStarNodeCreationForDimensions(); if (skipDimensionList != null) { for (String columnName : skipDimensionList) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } } } for (Map.Entry<String, String> entry : columnNameToConfigMap.entrySet()) { String columnName = entry.getKey(); String configName = entry.getValue(); Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, "Column Name " + columnName + " defined in " + configName + " must be a valid column defined in the schema"); } } }
TableConfigUtils { private static void validateIndexingConfig(@Nullable IndexingConfig indexingConfig, @Nullable Schema schema) { if (indexingConfig == null || schema == null) { return; } Map<String, String> columnNameToConfigMap = new HashMap<>(); Set<String> noDictionaryColumnsSet = new HashSet<>(); if (indexingConfig.getNoDictionaryColumns() != null) { for (String columnName : indexingConfig.getNoDictionaryColumns()) { columnNameToConfigMap.put(columnName, "No Dictionary Column Config"); noDictionaryColumnsSet.add(columnName); } } if (indexingConfig.getBloomFilterColumns() != null) { for (String columnName : indexingConfig.getBloomFilterColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException( "Cannot create a Bloom Filter on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Bloom Filter Config"); } } if (indexingConfig.getInvertedIndexColumns() != null) { for (String columnName : indexingConfig.getInvertedIndexColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException("Cannot create an Inverted index on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Inverted Index Config"); } } if (indexingConfig.getOnHeapDictionaryColumns() != null) { for (String columnName : indexingConfig.getOnHeapDictionaryColumns()) { columnNameToConfigMap.put(columnName, "On Heap Dictionary Column Config"); } } if (indexingConfig.getRangeIndexColumns() != null) { for (String columnName : indexingConfig.getRangeIndexColumns()) { columnNameToConfigMap.put(columnName, "Range Column Config"); } } if (indexingConfig.getSortedColumn() != null) { for (String columnName : indexingConfig.getSortedColumn()) { columnNameToConfigMap.put(columnName, "Sorted Column Config"); } } if (indexingConfig.getVarLengthDictionaryColumns() != null) { for (String columnName : indexingConfig.getVarLengthDictionaryColumns()) { columnNameToConfigMap.put(columnName, "Var Length Column Config"); } } if (indexingConfig.getSegmentPartitionConfig() != null && indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap() != null) { for (String columnName : indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap().keySet()) { columnNameToConfigMap.put(columnName, "Segment Partition Config"); } } List<StarTreeIndexConfig> starTreeIndexConfigList = indexingConfig.getStarTreeIndexConfigs(); if (starTreeIndexConfigList != null) { for (StarTreeIndexConfig starTreeIndexConfig : starTreeIndexConfigList) { for (String columnName : starTreeIndexConfig.getDimensionsSplitOrder()) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } for (String functionColumnPair : starTreeIndexConfig.getFunctionColumnPairs()) { AggregationFunctionColumnPair columnPair; try { columnPair = AggregationFunctionColumnPair.fromColumnName(functionColumnPair); } catch (Exception e) { throw new IllegalStateException("Invalid StarTreeIndex config: " + functionColumnPair + ". Must be" + "in the form <Aggregation function>__<Column name>"); } String columnName = columnPair.getColumn(); if (!columnName.equals(AggregationFunctionColumnPair.STAR)) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } List<String> skipDimensionList = starTreeIndexConfig.getSkipStarNodeCreationForDimensions(); if (skipDimensionList != null) { for (String columnName : skipDimensionList) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } } } for (Map.Entry<String, String> entry : columnNameToConfigMap.entrySet()) { String columnName = entry.getKey(); String configName = entry.getValue(); Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, "Column Name " + columnName + " defined in " + configName + " must be a valid column defined in the schema"); } } private  TableConfigUtils(); }
TableConfigUtils { private static void validateIndexingConfig(@Nullable IndexingConfig indexingConfig, @Nullable Schema schema) { if (indexingConfig == null || schema == null) { return; } Map<String, String> columnNameToConfigMap = new HashMap<>(); Set<String> noDictionaryColumnsSet = new HashSet<>(); if (indexingConfig.getNoDictionaryColumns() != null) { for (String columnName : indexingConfig.getNoDictionaryColumns()) { columnNameToConfigMap.put(columnName, "No Dictionary Column Config"); noDictionaryColumnsSet.add(columnName); } } if (indexingConfig.getBloomFilterColumns() != null) { for (String columnName : indexingConfig.getBloomFilterColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException( "Cannot create a Bloom Filter on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Bloom Filter Config"); } } if (indexingConfig.getInvertedIndexColumns() != null) { for (String columnName : indexingConfig.getInvertedIndexColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException("Cannot create an Inverted index on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Inverted Index Config"); } } if (indexingConfig.getOnHeapDictionaryColumns() != null) { for (String columnName : indexingConfig.getOnHeapDictionaryColumns()) { columnNameToConfigMap.put(columnName, "On Heap Dictionary Column Config"); } } if (indexingConfig.getRangeIndexColumns() != null) { for (String columnName : indexingConfig.getRangeIndexColumns()) { columnNameToConfigMap.put(columnName, "Range Column Config"); } } if (indexingConfig.getSortedColumn() != null) { for (String columnName : indexingConfig.getSortedColumn()) { columnNameToConfigMap.put(columnName, "Sorted Column Config"); } } if (indexingConfig.getVarLengthDictionaryColumns() != null) { for (String columnName : indexingConfig.getVarLengthDictionaryColumns()) { columnNameToConfigMap.put(columnName, "Var Length Column Config"); } } if (indexingConfig.getSegmentPartitionConfig() != null && indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap() != null) { for (String columnName : indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap().keySet()) { columnNameToConfigMap.put(columnName, "Segment Partition Config"); } } List<StarTreeIndexConfig> starTreeIndexConfigList = indexingConfig.getStarTreeIndexConfigs(); if (starTreeIndexConfigList != null) { for (StarTreeIndexConfig starTreeIndexConfig : starTreeIndexConfigList) { for (String columnName : starTreeIndexConfig.getDimensionsSplitOrder()) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } for (String functionColumnPair : starTreeIndexConfig.getFunctionColumnPairs()) { AggregationFunctionColumnPair columnPair; try { columnPair = AggregationFunctionColumnPair.fromColumnName(functionColumnPair); } catch (Exception e) { throw new IllegalStateException("Invalid StarTreeIndex config: " + functionColumnPair + ". Must be" + "in the form <Aggregation function>__<Column name>"); } String columnName = columnPair.getColumn(); if (!columnName.equals(AggregationFunctionColumnPair.STAR)) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } List<String> skipDimensionList = starTreeIndexConfig.getSkipStarNodeCreationForDimensions(); if (skipDimensionList != null) { for (String columnName : skipDimensionList) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } } } for (Map.Entry<String, String> entry : columnNameToConfigMap.entrySet()) { String columnName = entry.getKey(); String configName = entry.getValue(); Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, "Column Name " + columnName + " defined in " + configName + " must be a valid column defined in the schema"); } } private  TableConfigUtils(); static void validate(TableConfig tableConfig, @Nullable Schema schema); static void validateTableName(TableConfig tableConfig); static void validateRetentionConfig(TableConfig tableConfig); }
TableConfigUtils { private static void validateIndexingConfig(@Nullable IndexingConfig indexingConfig, @Nullable Schema schema) { if (indexingConfig == null || schema == null) { return; } Map<String, String> columnNameToConfigMap = new HashMap<>(); Set<String> noDictionaryColumnsSet = new HashSet<>(); if (indexingConfig.getNoDictionaryColumns() != null) { for (String columnName : indexingConfig.getNoDictionaryColumns()) { columnNameToConfigMap.put(columnName, "No Dictionary Column Config"); noDictionaryColumnsSet.add(columnName); } } if (indexingConfig.getBloomFilterColumns() != null) { for (String columnName : indexingConfig.getBloomFilterColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException( "Cannot create a Bloom Filter on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Bloom Filter Config"); } } if (indexingConfig.getInvertedIndexColumns() != null) { for (String columnName : indexingConfig.getInvertedIndexColumns()) { if (noDictionaryColumnsSet.contains(columnName)) { throw new IllegalStateException("Cannot create an Inverted index on column " + columnName + " specified in the noDictionaryColumns config"); } columnNameToConfigMap.put(columnName, "Inverted Index Config"); } } if (indexingConfig.getOnHeapDictionaryColumns() != null) { for (String columnName : indexingConfig.getOnHeapDictionaryColumns()) { columnNameToConfigMap.put(columnName, "On Heap Dictionary Column Config"); } } if (indexingConfig.getRangeIndexColumns() != null) { for (String columnName : indexingConfig.getRangeIndexColumns()) { columnNameToConfigMap.put(columnName, "Range Column Config"); } } if (indexingConfig.getSortedColumn() != null) { for (String columnName : indexingConfig.getSortedColumn()) { columnNameToConfigMap.put(columnName, "Sorted Column Config"); } } if (indexingConfig.getVarLengthDictionaryColumns() != null) { for (String columnName : indexingConfig.getVarLengthDictionaryColumns()) { columnNameToConfigMap.put(columnName, "Var Length Column Config"); } } if (indexingConfig.getSegmentPartitionConfig() != null && indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap() != null) { for (String columnName : indexingConfig.getSegmentPartitionConfig().getColumnPartitionMap().keySet()) { columnNameToConfigMap.put(columnName, "Segment Partition Config"); } } List<StarTreeIndexConfig> starTreeIndexConfigList = indexingConfig.getStarTreeIndexConfigs(); if (starTreeIndexConfigList != null) { for (StarTreeIndexConfig starTreeIndexConfig : starTreeIndexConfigList) { for (String columnName : starTreeIndexConfig.getDimensionsSplitOrder()) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } for (String functionColumnPair : starTreeIndexConfig.getFunctionColumnPairs()) { AggregationFunctionColumnPair columnPair; try { columnPair = AggregationFunctionColumnPair.fromColumnName(functionColumnPair); } catch (Exception e) { throw new IllegalStateException("Invalid StarTreeIndex config: " + functionColumnPair + ". Must be" + "in the form <Aggregation function>__<Column name>"); } String columnName = columnPair.getColumn(); if (!columnName.equals(AggregationFunctionColumnPair.STAR)) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } List<String> skipDimensionList = starTreeIndexConfig.getSkipStarNodeCreationForDimensions(); if (skipDimensionList != null) { for (String columnName : skipDimensionList) { columnNameToConfigMap.put(columnName, "StarTreeIndex Config"); } } } } for (Map.Entry<String, String> entry : columnNameToConfigMap.entrySet()) { String columnName = entry.getKey(); String configName = entry.getValue(); Preconditions.checkState(schema.getFieldSpecFor(columnName) != null, "Column Name " + columnName + " defined in " + configName + " must be a valid column defined in the schema"); } } private  TableConfigUtils(); static void validate(TableConfig tableConfig, @Nullable Schema schema); static void validateTableName(TableConfig tableConfig); static void validateRetentionConfig(TableConfig tableConfig);  }