| 87 | } |
| 88 | |
| 89 | static LogicalType getChildType(const LogicalType& type) { |
| 90 | switch (type.getLogicalTypeID()) { |
| 91 | case LogicalTypeID::ARRAY: |
| 92 | return ArrayType::getChildType(type).copy(); |
| 93 | case LogicalTypeID::LIST: |
| 94 | return ListType::getChildType(type).copy(); |
| 95 | // LCOV_EXCL_START |
| 96 | default: |
| 97 | throw BinderException(std::format( |
| 98 | "Cannot retrieve child type of type {}. LIST or ARRAY is expected.", type.toString())); |
| 99 | // LCOV_EXCL_STOP |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | static void validateChildType(const LogicalType& type, const std::string& functionName) { |
| 104 | switch (type.getLogicalTypeID()) { |