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

Method VisitArrowScalar

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

Source from the content-addressed store, hash-verified

640 }
641
642 Status VisitArrowScalar(PyObject* obj, bool* keep_going /* unused */) {
643 ARROW_ASSIGN_OR_RAISE(auto scalar, arrow::py::unwrap_scalar(obj));
644 // Check that all the scalar types for the sequence are the same
645 if (arrow_scalar_count_ > 0 && *scalar->type != *scalar_type_) {
646 return internal::InvalidValue(obj, "cannot mix scalars with different types");
647 }
648 scalar_type_ = scalar->type;
649 ++arrow_scalar_count_;
650 return Status::OK();
651 }
652
653 Status VisitDType(PyArray_Descr* dtype, bool* keep_going) {
654 // Continue visiting dtypes for now.

Callers

nothing calls this directly

Calls 2

InvalidValueFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected