[fix](Nereids) struct type coercion call wrong api (#30018)

This commit is contained in:
morrySnow
2024-01-16 17:10:54 +08:00
committed by yiguolei
parent d3bf23d70d
commit 6ce9c67383

View File

@ -1120,7 +1120,7 @@ public class TypeCoercionUtils {
}
List<StructField> newFields = Lists.newArrayList();
for (int i = 0; i < leftFields.size(); i++) {
Optional<DataType> newDataType = findCommonComplexTypeForComparison(leftFields.get(i).getDataType(),
Optional<DataType> newDataType = findWiderTypeForTwoForComparison(leftFields.get(i).getDataType(),
rightFields.get(i).getDataType(), intStringToString);
if (newDataType.isPresent()) {
newFields.add(leftFields.get(i).withDataType(newDataType.get()));
@ -1348,7 +1348,7 @@ public class TypeCoercionUtils {
}
List<StructField> newFields = Lists.newArrayList();
for (int i = 0; i < leftFields.size(); i++) {
Optional<DataType> newDataType = findCommonComplexTypeForCaseWhen(leftFields.get(i).getDataType(),
Optional<DataType> newDataType = findWiderTypeForTwoForCaseWhen(leftFields.get(i).getDataType(),
rightFields.get(i).getDataType());
if (newDataType.isPresent()) {
newFields.add(leftFields.get(i).withDataType(newDataType.get()));