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

Method PreExec

cpp/src/arrow/compute/kernels/scalar_string_utf8.cc:919–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917 explicit Utf8PadTransform(const PadOptions& options) : options_(options) {}
918
919 Status PreExec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) override {
920 auto str = reinterpret_cast<const uint8_t*>(options_.padding.data());
921 auto strlen = options_.padding.size();
922 if (util::UTF8Length(str, str + strlen) != 1) {
923 return Status::Invalid("Padding must be one codepoint, got '", options_.padding,
924 "'");
925 }
926 return Status::OK();
927 }
928
929 int64_t MaxCodeunits(int64_t ninputs, int64_t input_ncodeunits) override {
930 // This is likely very overallocated but hard to do better without

Callers

nothing calls this directly

Calls 5

UTF8LengthFunction · 0.85
InvalidFunction · 0.50
OKFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected