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

chore: fix last_value coercion #10783

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

appletreeisyellow
Copy link
Contributor

@appletreeisyellow appletreeisyellow commented Jun 3, 2024

Which issue does this PR close?

Closes #10781

Rationale for this change

Fix coercion bug in last_value()

What changes are included in this PR?

Support type signature for numeric string

Are these changes tested?

Yes, tests are added

Are there any user-facing changes?

Yes, users will no longer get an error when query with last_value()

@alamb
Copy link
Contributor

alamb commented Jun 3, 2024

The code looks good to me -- I am writing a test for this now.

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Jun 3, 2024
@alamb alamb marked this pull request as ready for review June 3, 2024 20:25
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I pushed a regression test to this PR too . Looks good to go for me 🚀

@appletreeisyellow
Copy link
Contributor Author

@alamb Thank you for adding the tests! 💯

Copy link
Contributor

@jayzhan211 jayzhan211 left a comment

Choose a reason for hiding this comment

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

👍

@alamb
Copy link
Contributor

alamb commented Jun 4, 2024

Thanks for the review @jayzhan211

@alamb alamb merged commit 729b356 into apache:main Jun 4, 2024
24 checks passed
@appletreeisyellow appletreeisyellow deleted the chunchun/fix-last-value branch June 4, 2024 12:19
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* chore: fix regression in `last_value` coercion

* Add regression test for first_value / last_value for timestamps

* Update for fixed issue

* cleanup

---------

Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in first_value and last_value coercion
3 participants