lnbest0707-uber commented on code in PR #14772: URL: https://github.com/apache/pinot/pull/14772#discussion_r1909160430
########## pinot-spi/src/main/java/org/apache/pinot/spi/config/table/ingestion/IngestionConfig.java: ########## @@ -49,10 +52,19 @@ public class IngestionConfig extends BaseJsonConfig { private ComplexTypeConfig _complexTypeConfig; @JsonPropertyDescription("Config related to the SchemaConformingTransformer") + @JsonProperty("schemaConformingTransformerConfig") private SchemaConformingTransformerConfig _schemaConformingTransformerConfig; - @JsonPropertyDescription("Config related to the SchemaConformingTransformerV2") - private SchemaConformingTransformerV2Config _schemaConformingTransformerV2Config; + @JsonPropertyDescription("Config related to the SchemaConformingTransformerV2 (backward compatibility)") + @JsonProperty("schemaConformingTransformerV2Config") + private void setSchemaConformingTransformerV2Config(JsonNode schemaConformingTransformerV2Config) { + // Map _schemaConformingTransformerV2Config JSON into SchemaConformingTransformerConfig + if (schemaConformingTransformerV2Config != null && _schemaConformingTransformerConfig == null) { + ObjectMapper objectMapper = new ObjectMapper(); + _schemaConformingTransformerConfig = + objectMapper.convertValue(schemaConformingTransformerV2Config, SchemaConformingTransformerConfig.class); + } + } Review Comment: Good idea! Added the UT. Verified that this works. Thanks for the proposal. -- 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