-
Notifications
You must be signed in to change notification settings - Fork 4
refactor(datasets-common): introduce Dataset trait #1587
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
Conversation
LNSD
left a comment
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.
Please, check my comments 🙂
LNSD
left a comment
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.
Please, check my comments 🙂
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.
Why is this necessary for the PR?
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.
js_runtime::IsolatePool is needed in datasets-common for DatasetWithFunctions trait here and datasets-derived. common imports js_runtime & datasets-common, hence best option was to move js_udf to js_runtime which is now imported by datasets-common.
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.
That's very incovenient :/
Then, we need to find a better way to handle the special case of derived datasets.
| }; | ||
| use datasets_common::udf::IsolatePool; | ||
| use futures::{TryStreamExt, stream}; | ||
| use js_runtime::isolate_pool::IsolatePool; |
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.
Keep the IsolatePool in js-runtime
LNSD
left a comment
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.
LGTM ✅
|
Note that there are some merge conflicts |
345d540 to
ea74bd7
Compare
Add a
Datasettrait indatasets-commonto provide a unified interface for accessing dataset properties across all dataset types (raw extractors and derived).DatasetWithFunctionssub-trait for datasets supporting JavaScript UDFsTablestruct fromcommon::catalog::logicaltodatasets-common::datasetjs_udf.rsfromcommontojs-runtimecrateudfre-export module indatasets-commonfor UDF-related typesDatasettrait in each extractor crate (evm-rpc, eth-beacon,firehose, solana) and datasets-derived