You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/03/03 22:07:50 UTC

[GitHub] [pinot] icefury71 commented on a change in pull request #8273: Add prefixesToDropFromFields config for renaming fields upon ingestion

icefury71 commented on a change in pull request #8273:
URL: https://github.com/apache/pinot/pull/8273#discussion_r819083193



##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ComplexTypeTransformer.java
##########
@@ -279,6 +294,23 @@ protected void flattenMap(GenericRow record, List<String> columns) {
     }
   }
 
+  /**
+   *
+   */
+  @VisibleForTesting
+  protected void dropPrefixes(GenericRow record) {
+    List<String> columns = new ArrayList<>(record.getFieldToValueMap().keySet());

Review comment:
       This is a bit risky right ? If the prefix happens to match a prefix for a regular column (not part of a nested structure) then this will cause issues. Shouldn't the drop prefixes only apply to columns generated by the ComplexTypeTransformer ?

##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/recordtransformer/ComplexTypeTransformer.java
##########
@@ -279,6 +294,23 @@ protected void flattenMap(GenericRow record, List<String> columns) {
     }
   }
 
+  /**
+   *
+   */
+  @VisibleForTesting
+  protected void dropPrefixes(GenericRow record) {
+    List<String> columns = new ArrayList<>(record.getFieldToValueMap().keySet());

Review comment:
       Any reason we're not doing this when we generate the `flattenName`?




-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org