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: [email protected]

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

Reply via email to