MCPcopy Create free account
hub / github.com/apache/impala / CheckStringValCopyFromSucceeds

Function CheckStringValCopyFromSucceeds

be/src/udf/udf-test.cc:363–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void CheckStringValCopyFromSucceeds(const std::string& str) {
364 FunctionCtxGuard ctx_guard;
365
366 const StringVal string_val = StringVal::CopyFrom(ctx_guard.getCtx(),
367 reinterpret_cast<const uint8_t*>(str.c_str()), str.length());
368 EXPECT_TRUE(StringValEqualsStr(string_val, str));
369 EXPECT_FALSE(string_val.is_null);
370 EXPECT_FALSE(ctx_guard.getCtx()->has_error());
371}
372
373void CheckStringValCopyFromFailsWithLength(uint64_t len) {
374 FunctionCtxGuard ctx_guard;

Callers 1

TESTFunction · 0.85

Calls 4

StringValEqualsStrFunction · 0.85
getCtxMethod · 0.80
has_errorMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected