Skip to content

Instantly share code, notes, and snippets.

@TengHuo
Last active November 4, 2022 03:36
Show Gist options
  • Save TengHuo/48068bf1810ed771b388862271e53266 to your computer and use it in GitHub Desktop.
Save TengHuo/48068bf1810ed771b388862271e53266 to your computer and use it in GitHub Desktop.
Hudi HoodieRecordPayload
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();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment