MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / tryCombineArrayTypes

Function tryCombineArrayTypes

src/common/types/types.cpp:1509–1521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509static bool tryCombineArrayTypes(const LogicalType& left, const LogicalType& right,
1510 LogicalType& result) {
1511 if (ArrayType::getNumElements(left) != ArrayType::getNumElements(right)) {
1512 return tryCombineListTypes(left, right, result);
1513 }
1514 LogicalType childType;
1515 if (!LogicalTypeUtils::tryGetMaxLogicalType(ArrayType::getChildType(left),
1516 ArrayType::getChildType(right), childType)) {
1517 return false;
1518 }
1519 result = LogicalType::ARRAY(std::move(childType), ArrayType::getNumElements(left));
1520 return true;
1521}
1522
1523static bool tryCombineListArrayTypes(const LogicalType& left, const LogicalType& right,
1524 LogicalType& result) {

Callers 1

tryGetMaxLogicalTypeMethod · 0.85

Calls 3

getNumElementsFunction · 0.85
tryCombineListTypesFunction · 0.85
getChildTypeFunction · 0.85

Tested by

no test coverage detected