liukun4515 commented on code in PR #3662: URL: https://github.com/apache/arrow-datafusion/pull/3662#discussion_r984516613
########## datafusion/optimizer/src/unwrap_cast_in_comparison.rs: ########## @@ -540,10 +602,10 @@ mod tests { ); assert_eq!(optimize_test(expr_lt, &schema), expected); - // INT32(12) IN (.....) - let expr_lt = lit(ScalarValue::Int32(Some(12))).in_list( + // cast(INT32(12), INT64) IN (.....) + let expr_lt = cast(lit(ScalarValue::Int32(Some(12))), DataType::Int64).in_list( vec![ - lit(ScalarValue::Int32(Some(12))), + lit(ScalarValue::Int64(Some(12))), Review Comment: Yes. In this rule, we need to assume that the type coercion has been done for the expr or the plan. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org