MCPcopy Create free account
hub / github.com/apache/arrow / convert_toBOOLEAN

Function convert_toBOOLEAN

cpp/src/gandiva/precompiled/string_ops.cc:1695–1711  ·  view source on GitHub ↗

Converts a boolean variable to binary

Source from the content-addressed store, hash-verified

1693
1694// Converts a boolean variable to binary
1695FORCE_INLINE
1696const char* convert_toBOOLEAN(int64_t context, bool value, int32_t* out_len) {
1697 *out_len = sizeof(value);
1698 char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len));
1699
1700 if (ret == nullptr) {
1701 gdv_fn_context_set_error_msg(context,
1702 "Could not allocate memory for the output string");
1703
1704 *out_len = 0;
1705 return "";
1706 }
1707
1708 memcpy(ret, &value, *out_len);
1709
1710 return ret;
1711}
1712
1713// Converts a time variable to binary
1714FORCE_INLINE

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected