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

fix: expression with dates to string conversation #3019

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

JonasDev1
Copy link
Contributor

@JonasDev1 JonasDev1 commented Nov 22, 2024

Description

In the expr to str conversation was an issue for dates.

Before this expr lit(ScalarValue::Date32(Some(18262))) was converted to _date = 2020-01-01. If you want to parse this string again as an expr it will result into ...BinaryExpr(**BinaryExpr { left: BinaryExpr(BinaryExpr { left: Literal(Int64(2020)), op: Minus, right: Literal(Int64(1)) })... which is not correct.

Now lit(ScalarValue::Date32(Some(18262))) will be converted to _date = '2020-01-01'::date, which will be parsed a as date again.

Related Issue(s)

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label Nov 22, 2024
Copy link

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@JonasDev1 JonasDev1 changed the title Fix: Expression with dates to string conversation fix: expression with dates to string conversation Nov 22, 2024
@JonasDev1 JonasDev1 force-pushed the fix-date-expr-to-string branch from f776584 to bd549cf Compare November 22, 2024 12:56
Signed-off-by: Jonas Schmitz <[email protected]>
@ion-elgreco ion-elgreco force-pushed the fix-date-expr-to-string branch from bd549cf to ec9be94 Compare November 22, 2024 13:16
@ion-elgreco
Copy link
Collaborator

ion-elgreco commented Nov 22, 2024

supersedes this: #2463

Thanks for finishing this!

@JonasDev1 can you update the python tests asserts, then we are good to go

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.47%. Comparing base (0c4344f) to head (6653332).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3019      +/-   ##
==========================================
+ Coverage   72.44%   72.47%   +0.03%     
==========================================
  Files         128      128              
  Lines       40841    40853      +12     
  Branches    40841    40853      +12     
==========================================
+ Hits        29587    29610      +23     
+ Misses       9363     9359       -4     
+ Partials     1891     1884       -7     

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


🚨 Try these New Features:

Signed-off-by: Jonas Schmitz <[email protected]>
@JonasDev1 JonasDev1 requested a review from fvaleye as a code owner November 22, 2024 13:27
@github-actions github-actions bot added the binding/python Issues for the Python package label Nov 22, 2024
Signed-off-by: Jonas Schmitz <[email protected]>
auto-merge was automatically disabled November 22, 2024 13:31

Head branch was pushed to by a user without write access

@ion-elgreco ion-elgreco added this pull request to the merge queue Nov 22, 2024
Merged via the queue into delta-io:main with commit bda46e3 Nov 22, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent merges not working >=0.19.0 Valid concurrent merge returns Invalid comparison operation
2 participants