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

Function interpretLogicalType

src/function/array/array_functions.cpp:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace function {
16
17static LogicalType interpretLogicalType(const binder::Expression* expr) {
18 if (expr->expressionType == ExpressionType::LITERAL &&
19 expr->dataType.getLogicalTypeID() == LogicalTypeID::LIST) {
20 auto numChildren =
21 expr->constPtrCast<binder::LiteralExpression>()->getValue().getChildrenSize();
22 return LogicalType::ARRAY(ListType::getChildType(expr->dataType).copy(), numChildren);
23 }
24 return expr->dataType.copy();
25}
26
27std::unique_ptr<FunctionBindData> ArrayCrossProductBindFunc(const ScalarBindFuncInput& input) {
28 auto leftType = interpretLogicalType(input.arguments[0].get());

Callers 2

arrayTemplateBindFuncFunction · 0.85

Calls 5

getChildTypeFunction · 0.85
getLogicalTypeIDMethod · 0.80
getChildrenSizeMethod · 0.45
getValueMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected