| 203 | } |
| 204 | |
| 205 | static bool hasImplicitCastStruct(const LogicalType& srcType, const LogicalType& dstType) { |
| 206 | const auto& srcFields = StructType::getFields(srcType); |
| 207 | const auto& dstFields = StructType::getFields(dstType); |
| 208 | if (srcFields.size() != dstFields.size()) { |
| 209 | return false; |
| 210 | } |
| 211 | for (auto i = 0u; i < srcFields.size(); i++) { |
| 212 | if (srcFields[i].getName() != dstFields[i].getName()) { |
| 213 | return false; |
| 214 | } |
| 215 | if (!CastFunction::hasImplicitCast(srcFields[i].getType(), dstFields[i].getType())) { |
| 216 | return false; |
| 217 | } |
| 218 | } |
| 219 | return true; |
| 220 | } |
| 221 | |
| 222 | static bool hasImplicitCastUnion(const LogicalType& srcType, const LogicalType& dstType) { |
| 223 | if (srcType.getLogicalTypeID() == LogicalTypeID::UNION) { |
no test coverage detected