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

datetime_coercion rule #1194

Merged
merged 24 commits into from
Nov 27, 2023
Merged

Conversation

sarahyurick
Copy link
Collaborator

Closes #1189

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f068f9) 85.55% compared to head (55ba5ce) 85.55%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1194   +/-   ##
=======================================
  Coverage   85.55%   85.55%           
=======================================
  Files          77       77           
  Lines        4257     4258    +1     
  Branches      758      758           
=======================================
+ Hits         3642     3643    +1     
  Misses        446      446           
  Partials      169      169           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sarahyurick sarahyurick marked this pull request as ready for review July 7, 2023 00:26
@sarahyurick
Copy link
Collaborator Author

This PR is intended to help query 72, which was erroring with an OptimizationException. This PR fixes that bug, and the query now raises memory errors which will need to be explored further in future work.

| Operator::Minus
| Operator::Multiply
| Operator::Divide
| Operator::Modulo = &b.op
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really make sense to multiply/divide/modulo a datetime, so should maybe remove these.

"""
SELECT * FROM d_table d1, d_table d2
WHERE d2.x < d1.x + (1 + 2)
AND d2.d_date > d1.d_date + (2 + 3)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parentheses don't matter here. This is just to demonstrate that this PR can handle something like d1.d_date + 1, d1.d_date + 2 + 3, d1.d_date + 4 + 5 + 6, etc. for as many mathematical operands as the user provides.

Copy link
Collaborator

@jdye64 jdye64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this approach of introducing a "pre-processing" phase instead of trying to recover from errors from Datafusion and potentially attempt to re-run them. This is much more clean for our purposes. Thanks for adding this @sarahyurick

@sarahyurick
Copy link
Collaborator Author

Thanks @jdye64 ! With #1181 merged, this should be good to go.

@charlesbluca
Copy link
Collaborator

GPU CI failures seem to be unrelated, and should be resolved with #1220

@sarahyurick
Copy link
Collaborator Author

Hi @charlesbluca I wanted to ask about this getting merged in?

@charlesbluca
Copy link
Collaborator

Sorry this has sat on the backburner for a while - might make sense to merge in the ongoing work in #1249, as I imagine we'll want to prioritize that for release and it includes a bump from ADP 28 -> 32 that could affect things here

@sarahyurick
Copy link
Collaborator Author

Thanks @charlesbluca !

Tested locally with the latest main and can confirm that this PR still adds functionality that did not pass before. Should be ready to go.

@sarahyurick
Copy link
Collaborator Author

@charlesbluca looks like #1265 is related to the failures here? They're all giving a:

error: package `dask-sql v2023.11.0-rc1 (/Users/runner/work/dask-sql/dask-sql)` cannot be built because it requires rustc 1.73 or newer, while the currently active rustc version is 1.72.1

@charlesbluca
Copy link
Collaborator

Yeah think the issue here is that the GHA runners for macOS have an older installation of Rust than the Linux/Windows runners? Out of simplcity think it might be easiest to drop the minimum dependency to 1.72 since IIUC we only need rust>=1.70 (cc @jdye64), trying this out now in #1266

@charlesbluca
Copy link
Collaborator

rerun tests

@charlesbluca charlesbluca merged commit e93327e into dask-contrib:main Nov 27, 2023
19 checks passed
@charlesbluca
Copy link
Collaborator

Thanks for the work here @sarahyurick!

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

Successfully merging this pull request may close these issues.

[BUG] Int64-to-Timestamp coercion
4 participants