Jackie-Jiang commented on code in PR #14772:
URL: https://github.com/apache/pinot/pull/14772#discussion_r1908386837


##########
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:
   Based on my understanding, it should be able to directly construct the 
`SchemaConformingTransformerConfig` properly. You can probably add a test for 
backward compatibility



-- 
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

Reply via email to