feiniaofeiafei commented on code in PR #45159: URL: https://github.com/apache/doris/pull/45159#discussion_r1881505719
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ToDate.java: ########## @@ -70,4 +72,19 @@ public List<FunctionSignature> getSignatures() { public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) { return visitor.visitToDate(this, context); } + + @Override + public boolean isPositive() { + return true; + } + + @Override + public int getMonotonicFunctionChildIndex() { + return 0; + } + + @Override + public Expression withConstantArgs(Expression literal) { + return new Date(literal); Review Comment: why don't return new ToDate(literal)? maybe adding Monotonic of Datev2, ToDate, ToDateV2 need some tests in partition prune. Can we choose to not add Monotonic for Datev2, ToDate, ToDateV2 in this pr? -- 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