| 7 | namespace function { |
| 8 | |
| 9 | static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) { |
| 10 | DASSERT(input.arguments.size() == 1); |
| 11 | std::vector<StructField> fields; |
| 12 | if (input.arguments[0]->getDataType().getLogicalTypeID() == common::LogicalTypeID::ANY) { |
| 13 | input.arguments[0]->cast(LogicalType::STRING()); |
| 14 | } |
| 15 | fields.emplace_back(input.arguments[0]->getAlias(), input.arguments[0]->getDataType().copy()); |
| 16 | auto resultType = LogicalType::UNION(std::move(fields)); |
| 17 | return FunctionBindData::getSimpleBindData(input.arguments, resultType); |
| 18 | } |
| 19 | |
| 20 | static void execFunc(const std::vector<std::shared_ptr<common::ValueVector>>&, |
| 21 | const std::vector<common::SelectionVector*>&, common::ValueVector& result, |
nothing calls this directly
no test coverage detected