comphead commented on issue #4644:
URL: 
https://github.com/apache/arrow-datafusion/issues/4644#issuecomment-1376216036

   This test works, it adds extra cast to Equal condition
   ```
       #[test]
       fn binary_op_date32_eq_ts() -> Result<()> {
           let expr = cast(lit("1998-03-18"), DataType::Date32).eq(
               cast(lit("1998-03-18"), 
DataType::Timestamp(arrow::datatypes::TimeUnit::Nanosecond, None)));
           let empty = Arc::new(LogicalPlan::EmptyRelation(EmptyRelation {
               produce_one_row: false,
               schema: Arc::new(DFSchema::empty()),
           }));
           let plan = LogicalPlan::Projection(Projection::try_new(vec![expr], 
empty)?);
           let expected =
               "Projection: CAST(CAST(Utf8(\"1998-03-18\") AS Date32) AS 
Timestamp(Nanosecond, None)) = CAST(Utf8(\"1998-03-18\") AS 
Timestamp(Nanosecond, None))\n  EmptyRelation";
           assert_optimized_plan_eq(&plan, expected)?;
           Ok(())
       }
   ```
   But this still fails.
   
   ```
       let sql = "explain verbose select '1998-03-18'::timestamp = 
'1998-03-18'::date";
   ``` 
   Debugging
   


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