-
Notifications
You must be signed in to change notification settings - Fork 15
Speed up TPCH. #856
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
Merged
Merged
Speed up TPCH. #856
Changes from 11 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
226f52d
Add caching to loading functions.
e6f2e24
Add ability for jit tpch to not run all queries.
7e743da
Merge branch 'main' into todd/tpch_testing
f695748
Fix CTE for cross product.
8430325
Dataframe lib to_datetime will run as cfunc over a map if only suppor…
f442b14
Add comments.
0769c1a
[run CI]
dede844
Adjust cte counts.
7f252e5
[run CI]
89dfbad
Try adding explicit jit_dependency marker for tests with to_datetime.
5055393
[run CI]
81e2b06
Use captured format instead of dynamically generated func.
391b212
[run CI]
e59c01f
mark test as needing jit.
06c55aa
[run CI]
c911c35
Debugging for Scott.
3769cda
Remove debugging code.
4d80dd0
Copy nullable when converting datetime64.
6cee4c7
[run CI]
fc0b98c
Reset_index and sort in test.
03ad320
[run CI]
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -490,14 +490,35 @@ def to_datetime( | |
| ) | ||
|
|
||
| # 2. Series Case | ||
| return _get_series_func_plan( | ||
| arg._plan, | ||
| new_metadata, | ||
| "pandas.to_datetime", | ||
| (), | ||
| in_kwargs, | ||
| is_method=False, | ||
| ) | ||
| if ( | ||
| errors == "raise" | ||
| and dayfirst == False | ||
| and yearfirst == False | ||
| and utc == False | ||
| and unit == None | ||
| and origin == "unix" | ||
| and cache == True | ||
| ): | ||
| # If only options supported by Bodo JIT then run as cfunc over map. | ||
| import bodo.decorators # isort:skip # noqa | ||
| from bodo.utils.utils import bodo_spawn_exec | ||
|
|
||
| # Declare function to be compiled to run to_datetime over series. | ||
| func = "def bodo_to_datetime(x):\n" | ||
| # Embed format string as constant in function. | ||
| func += f" return pd.to_datetime(x, format='{in_kwargs['format']}')\n" | ||
| # Create the function from string. | ||
| to_datetime_func = bodo_spawn_exec(func, {"pd": pd}, {}, __name__) | ||
| return arg.map(to_datetime_func) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible to use a c++ kernel for this maybe using Arrow instead of the compiler? Not saying it needs done now but maybe a comment for a followup |
||
| else: | ||
| return _get_series_func_plan( | ||
| arg._plan, | ||
| new_metadata, | ||
| "pandas.to_datetime", | ||
| (), | ||
| in_kwargs, | ||
| is_method=False, | ||
| ) | ||
|
|
||
|
|
||
| @check_args_fallback(unsupported="all") | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe this needs
bodo.jit(func, cache=True)here?