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

Bug displaying fractional seconds in IntervalMonthDayNano #4220

Closed
alamb opened this issue Nov 15, 2022 · 5 comments
Closed

Bug displaying fractional seconds in IntervalMonthDayNano #4220

alamb opened this issue Nov 15, 2022 · 5 comments
Labels
waiting-on-upstream PR is waiting on an upstream dependency to be updated

Comments

@alamb
Copy link
Contributor

alamb commented Nov 15, 2022

    thank you @Jefffrey 

there's a bug while displaying IntervalMonthDayNano

select interval '0.0001 second';
+----------------------------------------------------+
| IntervalMonthDayNano("100000")                     |
+----------------------------------------------------+
| 0 years 0 mons 0 days 0 hours 0 mins 0.100000 secs |
+----------------------------------------------------+
1 row in set. Query took 0.002 seconds.

i checked the underline value it's correct (month: 0, day: 0, nanos: 100000)
i think this is the display issue

Originally posted by @waitingkuo in #4186 (review)

@alamb
Copy link
Contributor Author

alamb commented Nov 15, 2022

I think this will be fixed by apache/arrow-rs#3093 (in the next release after arrow 27.0.0)

@HaoYang670 HaoYang670 added the waiting-on-upstream PR is waiting on an upstream dependency to be updated label Nov 16, 2022
@waitingkuo
Copy link
Contributor

waitingkuo commented Nov 16, 2022

@alamb just found another bug while displaying fraction seconds

select interval '-0.0001 second';
+-------------------------------------------------------+
| IntervalMonthDayNano("-100000")                       |
+-------------------------------------------------------+
| 0 years -1 mons -1 days 0 hours 0 mins 0.-100000 secs |
+-------------------------------------------------------+
1 row in set. Query took 0.002 seconds.

do you prefer submit another issue? I think it's arrow-rs's prettyprint issue as well

@waitingkuo
Copy link
Contributor

waitingkuo commented Nov 16, 2022

@alamb i submit another issue #4237 since negative value isn't pure display issue
the 0.-10000 secs is the display issue
and the -1 mons and -1 days is the parsing issue

@Jefffrey
Copy link
Contributor

Resolved by apache/arrow-rs#3491 via arrow-rs v31 update #4927

DataFusion CLI v16.0.0select interval '-0.0001 second';
+--------------------------------------------------------+
| IntervalMonthDayNano("18446744073709451616")           |
+--------------------------------------------------------+
| 0 years 0 mons 0 days 0 hours 0 mins -0.000100000 secs |
+--------------------------------------------------------+
1 row in set. Query took 0.002 seconds.
❯

@alamb
Copy link
Contributor Author

alamb commented Jan 23, 2023

❤️

@alamb alamb closed this as completed Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-upstream PR is waiting on an upstream dependency to be updated
Projects
None yet
Development

No branches or pull requests

4 participants