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

Function concat_word

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

Source from the content-addressed store, hash-verified

2599}
2600
2601FORCE_INLINE
2602void concat_word(char* out_buf, int* out_idx, const char* in_buf, int in_len,
2603 bool in_validity, const char* separator, int separator_len,
2604 bool* seenAnyValidInput) {
2605 if (!in_validity) {
2606 return;
2607 }
2608
2609 // input is valid
2610 if (*seenAnyValidInput) {
2611 // copy the separator and update *out_idx
2612 memcpy(out_buf + *out_idx, separator, separator_len);
2613 *out_idx += separator_len;
2614 }
2615 // copy the input and update *out_idx
2616 memcpy(out_buf + *out_idx, in_buf, in_len);
2617 *seenAnyValidInput = true;
2618 *out_idx += in_len;
2619}
2620
2621// Helper structure to maintain state during safe length accumulation
2622struct SafeLengthState {

Callers 1

concat_ws_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected