You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/09/06 10:50:41 UTC
[GitHub] [arrow] kszucs commented on a change in pull request #11076: ARROW-6626: [Python] Support converting nested sets when converting to arrow
kszucs commented on a change in pull request #11076:
URL: https://github.com/apache/arrow/pull/11076#discussion_r702805847
##########
File path: cpp/src/arrow/python/inference.cc
##########
@@ -354,12 +354,17 @@ class TypeInferrer {
*keep_going = make_unions_;
} else if (PyArray_CheckAnyScalarExact(obj)) {
RETURN_NOT_OK(VisitDType(PyArray_DescrFromScalar(obj), keep_going));
- } else if (PyList_Check(obj)) {
- RETURN_NOT_OK(VisitList(obj, keep_going));
+ } else if (PySet_Check(obj) || (Py_TYPE(obj) == &PyDictValues_Type)) {
Review comment:
Just wondering about a follow-up: could we optimize these checks somehow?
Last time I ran the asv benchmarks the inference step had a significant overhead during the python to arrow conversions.
@pitrou could we use a mapping or a different python API to eliminate these checks?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org