You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/05/01 15:36:35 UTC

[GitHub] [arrow-datafusion] jackwener opened a new issue, #6180: Don't support Interval is in left.

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

   ### Describe the bug
   
    current df don't support interval in left.
   
   ```sql
   select interval '1 month' + '2023-05-01'::date;
   
   This feature is not implemented: Unsupported interval argument. Expected string literal, got: BinaryOp { left: Value(SingleQuotedString("1 month")), op: Plus, right: Cast { expr: Value(SingleQuotedString("2023-05-01")), data_type: Date } }
   
   ```
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### 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] alamb commented on issue #6180: `INTERVAL` + timestamp and `INTERVAL` + date not supported (but timestamp + `INTERVAL` and date + `INTERVAL` is)

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

   https://github.com/apache/arrow-datafusion/issues/6205


-- 
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] alamb commented on issue #6180: `INTERVAL` + timestamp and `INTERVAL` + date not supported (but timestamp + `INTERVAL` and date + `INTERVAL` is)

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

   I agree this is a parser problem.  INTERVAL + timestamp and INTERVAL+date do work if the `::interval` cast syntax is used rather than the `interval`. I will open another bug explaining this
   
   ```
   ❯ select '1 month'::interval + '2012-01-01'::date;
   +--------------------------------------+
   | Utf8("1 month") + Utf8("2012-01-01") |
   +--------------------------------------+
   | 2012-02-01                           |
   +--------------------------------------+
   ❯ select '1 month'::interval + '2012-01-01'::timestamp;
   +--------------------------------------+
   | Utf8("1 month") + Utf8("2012-01-01") |
   +--------------------------------------+
   | 2012-02-01T00:00:00                  |
   +--------------------------------------+
   
   ❯ select '2012-01-01'::date + interval '1 month';
   +----------------------------------------------------------------------------+
   | Utf8("2012-01-01") + IntervalMonthDayNano("79228162514264337593543950336") |
   +----------------------------------------------------------------------------+
   | 2012-02-01                                                                 |
   +----------------------------------------------------------------------------+
   
   ❯ select interval '1 month' + '2012-01-01'::date;
   This feature is not implemented: Unsupported interval argument. Expected string literal, got: BinaryOp { left: Value(SingleQuotedString("1 month")), op: Plus, right: Cast { expr: Value(SingleQuotedString("2012-01-01")), data_type: Date } }
   ```


-- 
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] alamb commented on issue #6180: Don't support Interval is in left.

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

   Added to https://github.com/apache/arrow-datafusion/issues/5753


-- 
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] jackwener commented on issue #6180: Don't support Interval is in left.

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

   It's wrong in `src/expr/mod.rs:140 sql_interval_to_expr()`.
   
   SQLExpr is 
   
   ```sql
   "Interval { value: BinaryOp { left: Value(SingleQuotedString("1 month")), op: Plus, right: Cast { expr: Value(SingleQuotedString("2023-05-01")), data_type: Date } }, leading_field: None, leading_precision: None, last_field: None, fractional_seconds_precision: None }"
   ```
   
   I think it is a bug in Parser. Interval shouldn't include BinaryOp.


-- 
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] alamb closed issue #6180: `INTERVAL` + timestamp and `INTERVAL` + date not supported (but timestamp + `INTERVAL` and date + `INTERVAL` is)

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #6180: `INTERVAL` + timestamp and `INTERVAL` + date not supported (but timestamp + `INTERVAL` and date + `INTERVAL` is)
URL: https://github.com/apache/arrow-datafusion/issues/6180


-- 
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