Skip to content

Precision loss when coercing date_part utf8 argument #7847

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Dandandan opened this issue Oct 17, 2023 · 0 comments · Fixed by #7846
Closed

Precision loss when coercing date_part utf8 argument #7847

Dandandan opened this issue Oct 17, 2023 · 0 comments · Fixed by #7846
Labels
bug Something isn't working

Comments

@Dandandan
Copy link
Contributor

Describe the bug

In a recent version of DataFusion

select date_part('second', '2020-09-08T12:00:12.12345678+00:00');
+----------------------------------------------------------------------+
| date_part(Utf8("second"),Utf8("2020-09-08T12:00:12.12345678+00:00")) |
+----------------------------------------------------------------------+
| 12.0                                                                 |
+----------------------------------------------------------------------+

Expected (I get this answer in DataFusion 28).

❯ select date_part('second', '2020-09-08T12:00:12.12345678+00:00');
+----------------------------------------------------------------------+
| date_part(Utf8("second"),Utf8("2020-09-08T12:00:12.12345678+00:00")) |
+----------------------------------------------------------------------+
| 12.12345678                                                          |
+----------------------------------------------------------------------+
1 row in set. Query took 0.015 seconds.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant