qidaye commented on code in PR #39845: URL: https://github.com/apache/doris/pull/39845#discussion_r1730786973
########## fe/fe-core/src/main/java/org/apache/doris/datasource/es/QueryBuilders.java: ########## @@ -223,6 +239,20 @@ private static QueryBuilder parseFunctionCallExpr(Expr expr) { return new QueryBuilders.EsQueryBuilder(stringValue); } + private static String getColumnFromExpr(Expr expr) { + // Type transformed cast can not pushdown + if (expr instanceof CastExpr) { + Expr withoutCastExpr = exprWithoutCast(expr); + if (withoutCastExpr.getType().equals(expr.getType()) + || (withoutCastExpr.getType().isFloatingPointType() && expr.getType().isFloatingPointType())) { + return ((SlotRef) withoutCastExpr).getColumnName(); + } + } else if (expr instanceof SlotRef) { + return ((SlotRef) expr).getColumnName(); + } + return null; Review Comment: `column` will be checked in line 285. And if `column` is `null`, `toESDsl` will return `null` and it will be handled by the caller. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org