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

Method PreExec

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

Source from the content-addressed store, hash-verified

907 explicit Utf8PadTransform(const PadOptions& options) : options_(options) {}
908
909 Status PreExec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) override {
910 auto str = reinterpret_cast<const uint8_t*>(options_.padding.data());
911 auto strlen = options_.padding.size();
912 if (util::UTF8Length(str, str + strlen) != 1) {
913 return Status::Invalid("Padding must be one codepoint, got '", options_.padding,
914 "'");
915 }
916 return Status::OK();
917 }
918
919 int64_t MaxCodeunits(int64_t ninputs, int64_t input_ncodeunits) override {
920 // 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