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

Method AppendScalar

cpp/src/arrow/json/parser.cc:809–819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807
808 template <Kind::type kind>
809 Status AppendScalar(BuilderPtr builder, std::string_view scalar) {
810 if (ARROW_PREDICT_FALSE(builder.kind != kind)) {
811 return IllegallyChangedTo(kind);
812 }
813 auto index = static_cast<int32_t>(scalar_values_builder_.length());
814 auto value_length = static_cast<int32_t>(scalar.size());
815 RETURN_NOT_OK(Cast<kind>(builder)->Append(index, value_length));
816 RETURN_NOT_OK(scalar_values_builder_.Reserve(1));
817 scalar_values_builder_.UnsafeAppend(scalar);
818 return Status::OK();
819 }
820
821 /// @}
822

Callers

nothing calls this directly

Calls 6

OKFunction · 0.70
lengthMethod · 0.45
sizeMethod · 0.45
AppendMethod · 0.45
ReserveMethod · 0.45
UnsafeAppendMethod · 0.45

Tested by

no test coverage detected