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

Function convert_toBIGINT

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

Converts a bigint(int with 64 bits) variable to binary

Source from the content-addressed store, hash-verified

1629
1630// Converts a bigint(int with 64 bits) variable to binary
1631FORCE_INLINE
1632const char* convert_toBIGINT(int64_t context, int64_t value, int32_t* out_len) {
1633 *out_len = sizeof(value);
1634 char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len));
1635
1636 if (ret == nullptr) {
1637 gdv_fn_context_set_error_msg(context,
1638 "Could not allocate memory for the output string");
1639
1640 *out_len = 0;
1641 return "";
1642 }
1643
1644 memcpy(ret, &value, *out_len);
1645
1646 return ret;
1647}
1648
1649FORCE_INLINE
1650const char* convert_toBIGINT_be(int64_t context, int64_t value, int32_t* out_len) {

Callers 4

convert_toBIGINT_beFunction · 0.85
convert_toDATE_EPOCHFunction · 0.85
TESTFunction · 0.85

Calls 2

Tested by 1

TESTFunction · 0.68