-
Notifications
You must be signed in to change notification settings - Fork 262
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
feat: support key-value cache for function expressions #550
Conversation
[WIP] UDF Reuse
…ed to rewrite_rules
from eva.utils.logging_manager import logger | ||
|
||
|
||
class UdfHistoryColumnService(BaseService): |
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.
Can you elaborate when is this needed?
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.
This is from the older code. Will remove it
|
||
reuse_batch = execute_query_fetch_all(select_query) | ||
self._verify_reuse_correctness(select_query, reuse_batch) | ||
|
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.
Do we want to also check the time speedup with reuse?
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.
Might lead to a flaky test.
results[cache_miss] = cache_miss_results.to_numpy() | ||
|
||
# 5. return the correct batch | ||
cols = [obj.name for obj in self.output_objs] |
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.
Duplicate code at line 193.
|
||
results = np.full([len(batch), len(cols)], None) | ||
keys = batch | ||
if self._cache.key: |
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.
When I first read code, I was thinking this is the key of the cache store. Maybe add a comment. This is to optimize the key for the function expression (data -> id).
Support added for caching when the UDF is in the
lateral join