morrySnow commented on code in PR #35884: URL: https://github.com/apache/doris/pull/35884#discussion_r1626863535
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/MaskLastN.java: ########## @@ -47,6 +48,9 @@ public class MaskLastN extends ScalarFunction implements ExplicitlyCastableSigna */ public MaskLastN(Expression arg, Expression arg1) { super("mask_last_n", arg, arg1); + if (!arg1.isLiteral()) { + throw new AnalysisException("mask_last_n must accept literal for 2nd argument"); + } Review Comment: add check in `checkLegalityAfterRewrite` interface -- 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