You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/25 11:11:59 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #7084: Interval - Timestamp should error, but succeeds

alamb opened a new issue, #7084:
URL: https://github.com/apache/arrow-datafusion/issues/7084

   ### Describe the bug
   
   Trying to compute Interval - Timestamp should raise an error, as it does not make any semantic sense
   
   ### To Reproduce
   
   This is from timestamp.slt
   
   ```sql
   create table foo (val int, ts1 timestamp, ts2 timestamp, i interval) as values
   (1, '2023-03-15T15:00:20.000000123'::timestamp, '2023-01-20T23:00:00.000000099'::timestamp, '1 day'::interval),
   (2, '2023-02-28T12:01:55.000123456'::timestamp, '2000-02-23T11:00:00.123000001'::timestamp, '2 months'::interval),
   (3, '2033-11-02T23:22:13.000123456'::timestamp, '1990-03-01T00:00:00.333000001'::timestamp, '1 day 3 hours'::interval),
   (4, '2003-07-11T01:31:15.000123456'::timestamp, '2045-04-11T15:00:00.000000001'::timestamp, '1 day 7 nanoseconds'::interval);
   
   SELECT i - ts1 from FOO;
   ----
   2023-03-14T15:00:20.000000123
   2022-12-28T12:01:55.000123456
   2033-11-01T20:22:13.000123456
   2003-07-10T01:31:15.000123449
   
   ```
   
   
   ### Expected behavior
   
   ```
   SELECT i - ts1 from FOO;
   ```
   
   Should raise an error about unsupported operation
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] jackwener commented on issue #7084: Interval - Timestamp should error, but succeeds

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on issue #7084:
URL: https://github.com/apache/arrow-datafusion/issues/7084#issuecomment-1649653044

   I prepare to fix it


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] Dandandan closed issue #7084: Interval - Timestamp should error, but succeeds

Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan closed issue #7084: Interval - Timestamp should error, but succeeds
URL: https://github.com/apache/arrow-datafusion/issues/7084


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] berkaysynnada commented on issue #7084: Interval - Timestamp should error, but succeeds

Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on issue #7084:
URL: https://github.com/apache/arrow-datafusion/issues/7084#issuecomment-1649662477

   I think this [PR](https://github.com/apache/arrow-datafusion/pull/6250) changed the behavior. Besides interval - timestamp, interval - date should give an error. There are 2 wrong resulting tests here: https://github.com/apache/arrow-datafusion/blob/710ccf81084adcd46f551615a6bb6a76e71ce55a/datafusion/core/tests/sqllogictests/test_files/type_coercion.slt#L45


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org