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

Function convert_toINT

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

Converts an integer(with 32 bits) variable to binary

Source from the content-addressed store, hash-verified

1661
1662// Converts an integer(with 32 bits) variable to binary
1663FORCE_INLINE
1664const char* convert_toINT(int64_t context, int32_t value, int32_t* out_len) {
1665 *out_len = sizeof(value);
1666 char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len));
1667
1668 if (ret == nullptr) {
1669 gdv_fn_context_set_error_msg(context,
1670 "Could not allocate memory for the output string");
1671
1672 *out_len = 0;
1673 return "";
1674 }
1675
1676 memcpy(ret, &value, *out_len);
1677
1678 return ret;
1679}
1680
1681FORCE_INLINE
1682const char* convert_toINT_be(int64_t context, int32_t value, int32_t* out_len) {

Callers 3

convert_toINT_beFunction · 0.85
convert_toTIME_EPOCHFunction · 0.85
TESTFunction · 0.85

Calls 2

Tested by 1

TESTFunction · 0.68