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

Method validateDataType

src/binder/expression/expression_util.cpp:226–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void ExpressionUtil::validateDataType(const Expression& expr, const LogicalType& expectedType) {
227 if (expr.getDataType() == expectedType) {
228 return;
229 }
230 throw BinderException(std::format("{} has data type {} but {} was expected.", expr.toString(),
231 expr.getDataType().toString(), expectedType.toString()));
232}
233
234void ExpressionUtil::validateDataType(const Expression& expr, LogicalTypeID expectedTypeID) {
235 if (expr.getDataType().getLogicalTypeID() == expectedTypeID) {

Callers

nothing calls this directly

Calls 7

getDataTypeMethod · 0.80
getLogicalTypeIDMethod · 0.80
toStringFunction · 0.50
toStringMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected