You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "XiangpengHao (via GitHub)" <gi...@apache.org> on 2024/06/24 05:41:19 UTC
Re: [PR] Improve filter predicates with `Utf8View` literals [datafusion]
XiangpengHao commented on code in PR #11043:
URL: https://github.com/apache/datafusion/pull/11043#discussion_r1650374927
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -160,11 +160,47 @@ impl<'a> TypeCoercionRewriter<'a> {
op: Operator,
right: Expr,
) -> Result<(Expr, Expr)> {
+ // try to coerce the scalar to the column type
+ fn coerce_scalar_to_col(
Review Comment:
I think @Weijun-H is right that we need to consider not only coercion by data type but also their column types.
Normally:
`(Utf8View, Utf8) => (Utf8View, Utf8View)`
But:
`(Scalar(Utf8View), Column(Utf8)) => (Scalar(Utf8), Column(Utf8)) `
I'll take a closer look and think about what is the best way to approach this..
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org