You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/14 00:02:46 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #2229: 'Date32 + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to

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

   **Describe the bug**
   I am trying to run a query that adds an interval to a date as part of the where clause and it fails with a type coercion error.
   
   **To Reproduce**
   
   ``` rust
   #[tokio::test]
   async fn repro_date32_add_interval() -> Result<()> {
       let ctx = SessionContext::new();
       ctx.register_csv("t1", "tests/t1.csv", CsvReadOptions::default()).await?;
       let df = ctx.sql("SELECT * FROM t1 WHERE d_date between cast('2002-05-30' as date) and cast('2002-05-30' as date) + INTERVAL '60 days'").await?;
       let plan = df.to_logical_plan();
       println!("{:?}", plan);
       Ok(())
   }
   ```
   
   **Expected behavior**
   I expect this query to run without error. Here is a similar query running in Postgres.
   
   ```
   postgres=# select * from test where a between cast('2022-04-12' as date) and cast('2022-04-12' as date) + INTERVAL '60 days';
                a              
   ----------------------------
    2022-04-13 20:29:35.879229
   (1 row)
   ```
   
   **Additional context**
   None
   


-- 
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] andygrove closed issue #2229: 'Date32 + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to

Posted by GitBox <gi...@apache.org>.
andygrove closed issue #2229: 'Date32 + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to
URL: https://github.com/apache/arrow-datafusion/issues/2229


-- 
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 #2229: 'Date32 + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to

Posted by GitBox <gi...@apache.org>.
alamb commented on issue #2229:
URL: https://github.com/apache/arrow-datafusion/issues/2229#issuecomment-1100139808

   Also related https://github.com/apache/arrow-datafusion/issues/194


-- 
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] andygrove commented on issue #2229: 'Date32 + Interval(DayTime)' can't be evaluated because there isn't a common type to coerce the types to

Posted by GitBox <gi...@apache.org>.
andygrove commented on issue #2229:
URL: https://github.com/apache/arrow-datafusion/issues/2229#issuecomment-1100125667

   Fixed in https://github.com/apache/arrow-datafusion/pull/2235


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