If we can combine the key and value, then we cna combine the map
| 1559 | |
| 1560 | // If we can combine the key and value, then we cna combine the map |
| 1561 | static bool tryCombineMapTypes(const LogicalType& left, const LogicalType& right, |
| 1562 | LogicalType& result) { |
| 1563 | const auto& leftKeyType = MapType::getKeyType(left); |
| 1564 | const auto& leftValueType = MapType::getValueType(left); |
| 1565 | const auto& rightKeyType = MapType::getKeyType(right); |
| 1566 | const auto& rightValueType = MapType::getValueType(right); |
| 1567 | LogicalType resultKeyType, resultValueType; |
| 1568 | if (!LogicalTypeUtils::tryGetMaxLogicalType(leftKeyType, rightKeyType, resultKeyType) || |
| 1569 | !LogicalTypeUtils::tryGetMaxLogicalType(leftValueType, rightValueType, resultValueType)) { |
| 1570 | return false; |
| 1571 | } |
| 1572 | result = LogicalType::MAP(std::move(resultKeyType), std::move(resultValueType)); |
| 1573 | return true; |
| 1574 | } |
| 1575 | |
| 1576 | /* |
| 1577 | // If one of the unions labels is a subset of the other labels, and we can |
no test coverage detected