linrrzqqq commented on code in PR #68853:
URL: https://github.com/apache/doris/pull/68853#discussion_r4279929638
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/ElementAt.java:
##########
@@ -127,23 +133,58 @@ public List<FunctionSignature> getSignatures() {
if (arg0Type instanceof NullType) {
return ImmutableList.of(
FunctionSignature.ret(NullType.INSTANCE).args(NullType.INSTANCE,
child(1).getDataType()));
- }
- if (arg0Type instanceof StructType) {
+ } else if (arg0Type instanceof StructType) {
return
ImmutableList.of(FunctionSignature.ret(structFieldType((StructType) arg0Type))
.args(arg0Type, child(1).getDataType()));
- }
- if (arg0Type instanceof VariantType) {
+ } else if (arg0Type instanceof VariantType) {
DataType selectorType = child(1).getDataType();
if (selectorType.isIntegralType() || selectorType.isBooleanType())
{
return ImmutableList.of(VARIANT_INDEX_SIGNATURE);
}
if (selectorType.isStringLikeType()) {
return ImmutableList.of(VARIANT_KEY_SIGNATURE);
}
+ } else if (arg0Type.isFileType()) {
+ return
ImmutableList.of(FunctionSignature.ret(fileField().getDataType())
+ .args(arg0Type, child(1).getDataType()));
Review Comment:
不会,file 也应该走这个优化
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]