morrySnow commented on code in PR #44923: URL: https://github.com/apache/doris/pull/44923#discussion_r1868676626
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ArrayContains.java: ########## @@ -71,6 +71,15 @@ public <R, C> R accept(ExpressionVisitor<R, C> visitor, C context) { @Override public List<FunctionSignature> getSignatures() { + if (getArgument(0).getDataType().isArrayType() + && + ((ArrayType) getArgument(0).getDataType()).getItemType() + .isSameTypeForComplexTypeParam(getArgument(1).getDataType())) { + // return least common type + return ImmutableList.of( + FunctionSignature.ret(BooleanType.INSTANCE) + .args(ArrayType.of(new AnyDataType(0)), new AnyDataType(0))); Review Comment: could use another static field to avoid generate new object each time -- 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