You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/11/01 10:50:31 UTC

[GitHub] [hudi] TengHuo opened a new issue, #7106: [PROPOSE] Add column prune support for other payload class

TengHuo opened a new issue, #7106:
URL: https://github.com/apache/hudi/issues/7106

   I didn't find propose template, so just raised a ISSUE here. I can raise an RFC PR if needed, will raise a PR for code review later.
   
   ## Background
   
   In `HoodieMergeOnReadRDD`, Alexey added column prune support in PR https://github.com/apache/hudi/pull/4888, which is nice, it can speed up MOR _rt table query significantly. 
   
   However, this performance improvement is limited by a `whitelistedPayloadClasses `, so column prune is only supported in `OverwriteWithLatestAvroPayload `. If we implemented any other payload class, it can't utilise this feature.
   
   https://github.com/apache/hudi/blob/df69aa75dbd42c2a0e96e67746fb1c57fa27888c/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieMergeOnReadRDD.scala#L84
   
   ## Propose
   
   After studying about the column prune feature in `HoodieMergeOnReadRDD` implemented by Alexey, **we added 2 new method in the interface `HoodieRecordPayload` to tell `HoodieMergeOnReadRDD` if a payload class can be applied column prune, and if there is any extra columns for doing merge**.
   
   ```java
   public interface HoodieRecordPayload<T extends HoodieRecordPayload> extends Serializable {
     /*...*/
   
     // 2 new method we added
     /**
      * This method can tell HoodieBaseRelation if column prune can be applied for this payload implementation.
      * By default, column prune will be used in MOR table using OverwriteWithLatestAvroPayload
      *
      * @return if this payload can apply column prune when query MOR table
      */
     @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
     default boolean canApplyColumnPrune() {
       return false;
     }
   
     /**
      * Return a set of fields which are mandatory in pre-combine and combineAndGetUpdateValue
      *
      * @return the set of do pre-combine and combineAndGetUpdateValue need columns
      */
     @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
     default Set<String> getMergeNeedFields() {
       return Collections.emptySet();
     }
   }
   ```
   
   We have implemented this feature in Spark side, and also started the dev work for supporting it in Trino.
   
   Hi @alexeykudinkin , any suggestions about this feature? Do we need to raise an RFC PR for this feature?
   
   


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

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


[GitHub] [hudi] alexeykudinkin commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
alexeykudinkin commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1306097808

   @TengHuo you're on the right track with what i originally was planning in regards to how support all of the different MOR semantics (aka Record Payload implementations): 
   
   1. First of all, we need to move away from embedding Record Merging semantics as Record Payload wrappers (which is exactly what RFC-46 is aiming for)
   2. In RFC-46 we're introducing new component called `RecordMerger` that will embody _merging semantic_ and as such will have to be aware which columns will be required to merge 2 records. As such the API alike to ones you're proposing (returning list of required columns) will be introduced inside the `RecordMerger` interface


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

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


[GitHub] [hudi] TengHuo commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
TengHuo commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1302906771

   Sure, np. Thanks @nsivabalan 
   
   Let me start a dev email thread.


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

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


[GitHub] [hudi] alexeykudinkin commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
alexeykudinkin commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1309506033

   @TengHuo correct, it's slated for 0.13. We're currently in the final innings of merging Phase 1 to master and hoping to do this in the coming weeks.


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

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


[GitHub] [hudi] TengHuo commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
TengHuo commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1301612489

   @xiarixiaoyao 
   Right, we are doing dev in the package `org.apache.hudi.hadoop.realtime` of the module `hudi-hadoop-mr`. It should work in Hive.


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

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


[GitHub] [hudi] TengHuo commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
TengHuo commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1309697353

   @alexeykudinkin 
   
   Got it, thanks a lot. Saw the code in branch `release-feature-rfc46`, the interface `HoodieRecordMerger`. We will keep eyes on it, and migrate our code base on it. Looking forward to seeing RFC-46 in master.


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

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


[GitHub] [hudi] TengHuo commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
TengHuo commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1302908283

   Attach RFC-46 link here: https://github.com/apache/hudi/blob/master/rfc/rfc-46/rfc-46.md


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

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


[GitHub] [hudi] xiarixiaoyao commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
xiarixiaoyao commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1301579537

   i think, we also need support this feature in hive side,  since presto/hive share the same read logical for mor table.


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

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


[GitHub] [hudi] nsivabalan commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1302755348

   this sounds interesting. We have RFC-46 nearing landing. So, might have to replay this on top of RFC-46. 
   But can you start a dev email thread. and we can go from there. 
   Def we should try to leverage column pruning for any payload applicable. 
   
   


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

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


[GitHub] [hudi] TengHuo commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
TengHuo commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1306584539

   Thanks @alexeykudinkin for your reply.
   
   Got it, I saw there are 2 tickets in JIRA about this new API `RecordMerge`, [HUDI-4380](https://issues.apache.org/jira/browse/HUDI-4380), [HUDI-4988](https://issues.apache.org/jira/browse/HUDI-4988). And as mentioned in [RFC-46 doc](https://github.com/wulei0302/hudi/blob/1784fe48a0c573597b9c4aa8a9b352f4379a7554/rfc/rfc-46/rfc-46.md#record-merge-api), there will be also a `backward-compatibility bridge` introduced for the migration from `HoodieRecordPayload ` to `HoodieMerge`.
   
   May I ask if we can know a rough timeline of these new API? Will they be released in Hudi 0.13.0? If so, I think we can refactor our code based on your new design.
   
   
   
   


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

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


[GitHub] [hudi] nsivabalan closed issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
nsivabalan closed issue #7106: [PROPOSE] Add column prune support for other payload class
URL: https://github.com/apache/hudi/issues/7106


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

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


[GitHub] [hudi] nsivabalan commented on issue #7106: [PROPOSE] Add column prune support for other payload class

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #7106:
URL: https://github.com/apache/hudi/issues/7106#issuecomment-1302809739

   https://issues.apache.org/jira/browse/HUDI-5158


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

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