-
Notifications
You must be signed in to change notification settings - Fork 89
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
[duckdb] Cleanup and refactor DVRT interface to be more configurable #1445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Koorous! This PR is a very good improvement! I left a few minor comments, but I think this is very close to merging! Looking forward to it!
clients/da-vinci-client/src/main/java/com/linkedin/davinci/client/DaVinciRecordTransformer.java
Outdated
Show resolved
Hide resolved
...ts/da-vinci-client/src/main/java/com/linkedin/davinci/kafka/consumer/StoreIngestionTask.java
Outdated
Show resolved
Hide resolved
...-vinci-client/src/main/java/com/linkedin/davinci/client/DaVinciRecordTransformerUtility.java
Outdated
Show resolved
Hide resolved
...-vinci-client/src/main/java/com/linkedin/davinci/client/DaVinciRecordTransformerUtility.java
Show resolved
Hide resolved
...-vinci-client/src/main/java/com/linkedin/davinci/client/DaVinciRecordTransformerUtility.java
Show resolved
Hide resolved
clients/da-vinci-client/src/test/java/com/linkedin/davinci/config/DaVinciConfigTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot Koorous! LGTM! 🚀 🚢
Summary, imperative, start upper case, don't end with a period
Previously, the user would have to define the key and output schema inside their DVRT implementation, which wasn't clean. Now, they're moved into the constructor. The user now only needs to provide the output schema, as the key schema will be automatically passed in by DVC.
I also added a constructor parameter for original output schema to support reader/writer schemas, but added a ToDo on how to implement the logic to pass in the correct schema.
Lastly, I make the DuckDB DVRT implementation more configurable, as it was previously more hardcoded.
How was this PR tested?
Does this PR introduce any user-facing changes?
This changes modifies the constructor of DVRT with the intention of making the implementation cleaner.