Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[upsert] integrate partial upsert with groovy evaluator #11174

Open
deemoliu opened this issue Jul 25, 2023 · 4 comments
Open

[upsert] integrate partial upsert with groovy evaluator #11174

deemoliu opened this issue Jul 25, 2023 · 4 comments
Assignees

Comments

@deemoliu
Copy link
Contributor

deemoliu commented Jul 25, 2023

Partial upsert let users choose to update only specific columns and ignore the rest, and apply complex merging logic based on the existing row and the new row that shares the same primary key.

Pinot allows you to run any function using Apache Groovy scripts. To support complex use cases (e.g merge previous and new values based on conditions), we proposed to enhance partial upsert with groovy transformation function.

a few challenges to consider

    1. limitation of Groovy function regex, currently the groovy evaluator doesn't support multi-line groovy script.
    1. FunctionEvaluator interface currently only take one GenericRow as input.
  • 2.1 For partial upsert we need to access both old row and the new row.
  • 2.2 How to represent the argument and how to bind the arguments with values for both previous row and the new row.
    1. Integrate Groovy function in the partial upsert handler
@deemoliu
Copy link
Contributor Author

hello @Jackie-Jiang, this is one of the feature we have discussed with you.
can you assign this task to rohityadav1993 and me?

@Jackie-Jiang
Copy link
Contributor

@deemoliu In order to assign an issue to a non-committer, he/she needs to reply to the issue

@rohityadav1993
Copy link
Contributor

@Jackie-Jiang, you can assign it to me now. I will share a doc on the approach in the next few days.

@rohityadav1993
Copy link
Contributor

@deemoliu @Jackie-Jiang , prepared a small doc with initial thought on how to support this: https://docs.google.com/document/d/1bBTCYZFP2stvzc6xZUOEh-XweVgC9WfD7uiSPbKtaZY/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants