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

Method VisitSequence

python/pyarrow/src/arrow/python/inference.cc:497–513  ·  view source on GitHub ↗

Infer value type from a sequence of values

Source from the content-addressed store, hash-verified

495
496 // Infer value type from a sequence of values
497 Status VisitSequence(PyObject* obj, PyObject* mask = nullptr) {
498 if (mask == nullptr || mask == Py_None) {
499 return internal::VisitSequence(
500 obj, /*offset=*/0,
501 [this](PyObject* value, bool* keep_going) { return Visit(value, keep_going); });
502 } else {
503 return internal::VisitSequenceMasked(
504 obj, mask, /*offset=*/0,
505 [this](PyObject* value, uint8_t masked, bool* keep_going) {
506 if (!masked) {
507 return Visit(value, keep_going);
508 } else {
509 return Status::OK();
510 }
511 });
512 }
513 }
514
515 // Infer value type from a sequence of values
516 Status VisitIterable(PyObject* obj) {

Callers 2

VisitListMethod · 0.80
InferArrowTypeFunction · 0.80

Calls 4

VisitSequenceFunction · 0.85
VisitSequenceMaskedFunction · 0.85
VisitFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected