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


##########
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:
   Does it work the same if we simply put:
   ```suggestion
     public void 
setSchemaConformingTransformerV2Config(SchemaConformingTransformerConfig 
schemaConformingTransformerConfig) {
       _schemaConformingTransformerConfig = schemaConformingTransformerConfig;
     }
   ```
   
   All we need to do is mapping both key to the same property right?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to