Jefffrey opened a new issue, #3092:
URL: https://github.com/apache/arrow-rs/issues/3092

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   Fractional part of seconds for `IntervalDayTime` and `IntervalMonthDayNano` 
is printed incorrectly.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   When doing select with datafusion-cli, can see seconds fraction is incorrect:
   
   ```
   DataFusion CLI v14.0.0
   ❯ select interval '1 millisecond';
   +------------------------------------------------+
   | IntervalDayTime("1")                           |
   +------------------------------------------------+
   | 0 years 0 mons 0 days 0 hours 0 mins 0.01 secs |
   +------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   ❯ select interval '10 millisecond';
   +------------------------------------------------+
   | IntervalDayTime("10")                          |
   +------------------------------------------------+
   | 0 years 0 mons 0 days 0 hours 0 mins 0.10 secs |
   +------------------------------------------------+
   1 row in set. Query took 0.001 seconds.
   ❯ select interval '100 millisecond';
   +-------------------------------------------------+
   | IntervalDayTime("100")                          |
   +-------------------------------------------------+
   | 0 years 0 mons 0 days 0 hours 0 mins 0.100 secs |
   +-------------------------------------------------+
   1 row in set. Query took 0.001 seconds.
   ❯ select interval '1 month 1 millisecond';
   +-------------------------------------------------------+
   | IntervalMonthDayNano("79228162514264337593544950336") |
   +-------------------------------------------------------+
   | 0 years 1 mons 0 days 0 hours 0 mins 0.1000000 secs   |
   +-------------------------------------------------------+
   1 row in set. Query took 0.001 seconds.
   ❯ select interval '1 month 10 millisecond';
   +-------------------------------------------------------+
   | IntervalMonthDayNano("79228162514264337593553950336") |
   +-------------------------------------------------------+
   | 0 years 1 mons 0 days 0 hours 0 mins 0.10000000 secs  |
   +-------------------------------------------------------+
   1 row in set. Query took 0.002 seconds.
   ❯ select interval '1 month 100 millisecond';
   +-------------------------------------------------------+
   | IntervalMonthDayNano("79228162514264337593643950336") |
   +-------------------------------------------------------+
   | 0 years 1 mons 0 days 0 hours 0 mins 0.100000000 secs |
   +-------------------------------------------------------+
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   Expect 1 millisecond to print as 0.001 secs, 10 ms as 0.01 secs, 100 ms as 
0.1 secs, and so on.
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to