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


##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/ingestion/EnrichmentConfig.java:
##########
@@ -32,13 +32,21 @@ public class EnrichmentConfig extends BaseJsonConfig {
   @JsonPropertyDescription("Enricher properties")
   private final JsonNode _properties;
 
+  @JsonPropertyDescription("Apply in pre enrichers")
+  private final boolean _preEnricher;

Review Comment:
   Suggest making it more specific, such as `_preComplexTypeHandling`



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/CompositeTransformer.java:
##########
@@ -41,6 +41,32 @@
 public class CompositeTransformer implements RecordTransformer {
   private final List<RecordTransformer> _transformers;
 
+  /**
+   * Returns a list of record transformers that perform enrichment of the 
record before the record is passed onto the
+   * ComplexType transformer. The transform pipeline order is as follows: 
pre-enrichers, complex type transformers,
+   * other record transformers.
+   */
+  public static List<RecordTransformer> getDefaultPreEnrichers(TableConfig 
tableConfig, Schema schema) {

Review Comment:
   Do you also need to modify `getDefaultTransformers()` to exclude the pre 
enrichers?
   Suggest pulling out the common part 



##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/table/ingestion/EnrichmentConfig.java:
##########
@@ -32,13 +32,21 @@ public class EnrichmentConfig extends BaseJsonConfig {
   @JsonPropertyDescription("Enricher properties")
   private final JsonNode _properties;
 
+  @JsonPropertyDescription("Apply in pre enrichers")
+  private final boolean _preEnricher;
+
   @JsonCreator
   public EnrichmentConfig(@JsonProperty("enricherType") String enricherType,
-      @JsonProperty("properties") JsonNode properties) {
+      @JsonProperty("properties") JsonNode properties, 
@JsonProperty("preEnricher") boolean preEnricher) {
     _enricherType = enricherType;
+    _preEnricher = preEnricher;

Review Comment:
   (minor) Keep the order consistent, same for getters



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