Upload folder using huggingface_hub (part 12)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+14
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/INSTALLERAdded+1
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/METADATAAdded+78
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/RECORDAdded+755
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/REQUESTEDAdded
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/WHEELAdded+5
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/licenses/LICENSE.txtAdded
- .venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/licenses/NOTICE.txtAdded+81
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/json/test_common.hAdded+330
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/json/type_fwd.hAdded+26
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/memory_pool.hAdded+348
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/memory_pool_test.hAdded+119
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/pretty_print.hAdded+161
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/api.hAdded+29
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/arrow_to_pandas.hAdded+165
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/async.hAdded+60
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/benchmark.hAdded+36
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/common.hAdded+471
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/config.hAdded+47
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/csv.hAdded+42
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/datetime.hAdded+231
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/decimal.hAdded+162
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/extension_type.hAdded+85
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/filesystem.hAdded+130
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/flight.hAdded+352
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/gdb.hAdded+29
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/helpers.hAdded+161
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/inference.hAdded+64
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/io.hAdded+121
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/ipc.hAdded+72
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/iterators.hAdded+200
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/lib.hAdded+79
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/lib_api.hAdded+220
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_convert.hAdded+122
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_init.hAdded+27
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_interop.hAdded+103
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_to_arrow.hAdded+72
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/parquet_encryption.hAdded+146
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/platform.hAdded+35
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow.hAdded+89
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow_api.hAdded+19
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow_lib.hAdded+19
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/python_test.hAdded+42
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/python_to_arrow.hAdded+80
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/type_traits.hAdded+353
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/udf.hAdded+81
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/util.hAdded+40
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/vendored/pythoncapi_compat.hAdded+1519
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/visibility.hAdded+39
- .venv/lib/python3.12/site-packages/pyarrow/include/arrow/record_batch.hAdded+486
148 unmodified lines149150151152153154155156157158159160161162163164165148 unmodified lines.venv/lib/python3.12/site-packages/pyarrow/_parquet_encryption.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/_s3fs.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/_substrait.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/lib.cpython-312-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_acero.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_compute.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_dataset.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_flight.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python.so.2500.1.0 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.so filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_python_flight.so.2500.1.0 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libarrow_substrait.so.2500 filter=lfs diff=lfs merge=lfs -text.venv/lib/python3.12/site-packages/pyarrow/libparquet.so.2500 filter=lfs diff=lfs merge=lfs -text1uv123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778Metadata-Version: 2.4Name: pyarrowVersion: 25.0.1Summary: Python library for Apache ArrowMaintainer-Email: Apache Arrow Developers <dev@arrow.apache.org>License-Expression: Apache-2.0License-File: LICENSE.txtLicense-File: NOTICE.txtClassifier: Programming Language :: Python :: 3.10Classifier: Programming Language :: Python :: 3.11Classifier: Programming Language :: Python :: 3.12Classifier: Programming Language :: Python :: 3.13Classifier: Programming Language :: Python :: 3.14Classifier: Programming Language :: Python :: Free Threading :: 2 - BetaProject-URL: Homepage, https://arrow.apache.org/Project-URL: Documentation, https://arrow.apache.org/docs/pythonProject-URL: Repository, https://github.com/apache/arrowProject-URL: Issues, https://github.com/apache/arrow/issuesRequires-Python: >=3.10Description-Content-Type: text/markdown
<!--- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.-->
## Python library for Apache Arrow
[](https://pypi.org/project/pyarrow/) [](https://anaconda.org/conda-forge/pyarrow)
This library provides a Python API for functionality provided by the Arrow C++libraries, along with tools for Arrow integration and interoperability withpandas, NumPy, and other software in the Python ecosystem.
## Installing
Across platforms, you can install a recent version of pyarrow with the condapackage manager:
```shellconda install pyarrow -c conda-forge```
On Linux, macOS, and Windows, you can also install binary wheels from PyPI withpip:
```shellpip install pyarrow```
If you encounter any issues importing the pip wheels on Windows, you may needto install the latest [Visual C++ Redistributable for Visual Studio][3].
## Development
See [Python Development][2] in the documentation subproject.
### Building the documentation
See [documentation build instructions][1] in the documentation subproject.
[1]: https://github.com/apache/arrow/blob/main/docs/source/developers/documentation.rst[2]: https://arrow.apache.org/docs/developers/python/index.html[3]: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755pyarrow-25.0.1.dist-info/INSTALLER,sha256=5hhM4Q4mYTT9z6QB6PGpUAW81PGNFrYrdXMj4oM_6ak,2pyarrow-25.0.1.dist-info/METADATA,sha256=Eu2NCYim9xU_7JI-5Ht_wdYTRGOoaxuJ-jbyTCUBY_8,3031pyarrow-25.0.1.dist-info/RECORD,,pyarrow-25.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0pyarrow-25.0.1.dist-info/WHEEL,sha256=1WzRSgOsss9wFiZXQF3W2MIH5agmCQYpgJjGjVexvwU,117pyarrow-25.0.1.dist-info/licenses/LICENSE.txt,sha256=0cmBNw8f_U7c3S-zVlyJOcxAx14k4fktWB0E5U8N_4E,112295pyarrow-25.0.1.dist-info/licenses/NOTICE.txt,sha256=r9iV1hoAEB9tWkHPUYyDhl2BXoEJ6Vb1EqDOTqlzjAY,2916pyarrow/__init__.pxd,sha256=Wnar1phFqM_ZHnZmtbuqm6wJHsXlBoYKhV7Qmo2jUHA,2195pyarrow/__init__.py,sha256=BO-F4zDrPNoFe19PjpwGiRU2vwbXsmNB05IVPsqoYeI,19173pyarrow/_acero.cpython-312-x86_64-linux-gnu.so,sha256=dpHeIcwQI_UoCH_ZNKfGJLJSnlGv8M6yh5n4wMMssXg,296528pyarrow/_acero.pxd,sha256=5ish_GgGWvit4ebhzoZil7b-m0r2RuG5JwYoxsH34FI,1440pyarrow/_acero.pyx,sha256=jvU7elEq--vBGRT8F9hgoBVywCfverYbuqdI0f1lbN8,22210pyarrow/_azurefs.cpython-312-x86_64-linux-gnu.so,sha256=MCYOaDQkQJ6NV_BQP1fveutuuO1Wnk-dGwMKkZ3pDG0,136016pyarrow/_azurefs.pyx,sha256=xriY2OxSESfym3K_dHqybC6AZovrsua6yxdjEXz2Ek8,8688pyarrow/_compute.cpython-312-x86_64-linux-gnu.so,sha256=X1HhR_moMyt58_BDJpAGZO5g5y8w72CLIuPO4sU7cfk,1302680pyarrow/_compute.pxd,sha256=fhi87jkN6x4qG8JbAtRksx-4YTn3sFIw2zZxuK1flpM,2022pyarrow/_compute.pyx,sha256=BE1i7-kcmOfAUvSODT2Is7BIhmUy9EZKN5E8ndMbk40,116237pyarrow/_compute_docstrings.py,sha256=vfc6YlsHjqItBMIvhgsvKjmL18Uk6DpqTvHAw2dE-gA,7989pyarrow/_csv.cpython-312-x86_64-linux-gnu.so,sha256=0qu9EAUdAQMkMvbY_bE-duijK6SPE_W0Apr5IHyQLmk,406968pyarrow/_csv.pxd,sha256=1Zk3Zpvvhy-Tb7c79Aqd4e7bBM21kc1JxWJkl02Y4DE,1638pyarrow/_csv.pyx,sha256=WAlUJ5osjXOosUSIuC1cShC5gJbuswp5u8MK6pMKyv4,60333pyarrow/_cuda.pxd,sha256=VzhM6j9dpNgrABlvFJKoMpRC0As55im-M3tgPTOuwEk,1922pyarrow/_cuda.pyx,sha256=XPM0q9Cy-I0bcB5j9dpSkLfkxYvdfLv2UTJym9YAM8Q,35328pyarrow/_dataset.cpython-312-x86_64-linux-gnu.so,sha256=GyNb4fWtuiPlk0Ju5d5fq07HOyK0fOBYez7tO9ja6ho,993928pyarrow/_dataset.pxd,sha256=Ag9rUhoBySU6ba3wFLeuZyWMJnz9VkAf9TQEzWG4hUU,4944pyarrow/_dataset.pyx,sha256=eLlj2H8E6V5cDCBVdRuJrMI2-4Gzt_ANPGECupHkTAo,164389pyarrow/_dataset_orc.cpython-312-x86_64-linux-gnu.so,sha256=Ze6kEQZ6ERcvf9G8ee0spJ5Tt4aIJQe0HkBfWA-ikuU,84568pyarrow/_dataset_orc.pyx,sha256=JSFoRI0pfHtL2jeIuPg5TJHodcfuCNYmj_iEZ4xY87w,1499pyarrow/_dataset_parquet.cpython-312-x86_64-linux-gnu.so,sha256=jABSXSrbCcO_79a-Wl4zsaGyRpymI38F4gL_u7EegXM,361152pyarrow/_dataset_parquet.pxd,sha256=y-3iKehyB_eB_oeqjtt4aQRbUpVGVN1oUMFGIY13brE,1572pyarrow/_dataset_parquet.pyx,sha256=wdcEST6sLbbfKTrqjJpZEXpSZK0RA0h9sxkgsscNuHo,41608pyarrow/_dataset_parquet_encryption.cpython-312-x86_64-linux-gnu.so,sha256=o4JMH9fJ4IgKK-lZOslRTXq5vQzD7th9b3YSmEULN2A,121224pyarrow/_dataset_parquet_encryption.pyx,sha256=p7LDNUsp3jMVcWDcbOFp8a3CYJjASVPI_tfATpY-ePg,7229pyarrow/_dlpack.pxi,sha256=clw0FkGoyZMEtUU8zPpO_DMtl2X-27kb2UtyhQuIc1s,1832pyarrow/_feather.cpython-312-x86_64-linux-gnu.so,sha256=JE8ERy0_zVNPMRxIzEziCLvRlWrduWH7hivvDs9mnR0,113200pyarrow/_feather.pyx,sha256=DWQI4U0uAWE1ZYUwPreBPJg1TGLEGmF3wPEIRL-PhPw,3773pyarrow/_flight.cpython-312-x86_64-linux-gnu.so,sha256=OQez8u6TRzMGJDwp7GVJsHOHHV9_moaVIWcYhQ_8S1Q,1198160pyarrow/_flight.pyx,sha256=DjaT1iEGJyX543tYv5MpgZ4rEGUhkAhQ9-exrgbjcnQ,114770pyarrow/_fs.cpython-312-x86_64-linux-gnu.so,sha256=y8yhyEDiNvEoHIlHVxHAjxhJkMwI2Tp_UkHR850gPyM,433984pyarrow/_fs.pxd,sha256=SmHS31eyYU7VUZlVuP613HKgpd7bENnQGApvX_g2Lfw,2439pyarrow/_fs.pyx,sha256=kLqIoSXeovlPrWe8EShzzPC3z3EgSCaeq8cSNH_ZWm4,53271pyarrow/_gcsfs.cpython-312-x86_64-linux-gnu.so,sha256=QV763LlQgkPmXHoSBP4mTyOuS3TuHaZcxi1kQJlOWI4,138608pyarrow/_gcsfs.pyx,sha256=sooI3ztzEQXVVKcahgin0UGm_6Sgy-uwfcMrACP690w,9046pyarrow/_generated_version.py,sha256=c7AhTXHGDPXeWDsx4BDOXbaIsnNMtrqTR-7orMvVOt4,522pyarrow/_hdfs.cpython-312-x86_64-linux-gnu.so,sha256=JLbpOC2062mhOBxT9C0Kb7UQU9XEf9ELNMJ7P1ntPTY,139000pyarrow/_hdfs.pyx,sha256=QVkMqzz2iGoipaNufk0GPZRzjy1JKJzuuqqk88MdYA4,5802pyarrow/_json.cpython-312-x86_64-linux-gnu.so,sha256=XWqkUq2gUj9qlpyZ7kOwEF5B2AW9hztWTi4GrHM60oc,143336pyarrow/_json.pxd,sha256=tECTP14M12-b_ja5QI3snQbd0uWPWmmC9FwkWq23Vg0,1206pyarrow/_json.pyx,sha256=SjzdCrfUK_KfpvWbO_oqbQm980IWoWcQpxyQVYSWYIY,13193pyarrow/_orc.cpython-312-x86_64-linux-gnu.so,sha256=fWfpY1wb4XqqhZaZykpqWLWMTecHa11QoX7eM8U_Qk0,216472pyarrow/_orc.pxd,sha256=6hL0cq1RufqQD-B_bV3ne1rhu2g-h4rDOFNQsSb6qps,5689pyarrow/_orc.pyx,sha256=Pn7r4dzagWaqMf8rymbXBIWisxonBaStZgXCi7pfrZI,15556pyarrow/_parquet.cpython-312-x86_64-linux-gnu.so,sha256=-ApLEM2EqEELV_Mam1aG40DlDDzukhvSUF1VeaMD4tw,655776pyarrow/_parquet.pxd,sha256=zJckCTTshauBzBLmR-5PmFOZDXSvAoMnNg_pdryLJfc,4975pyarrow/_parquet.pyx,sha256=kWiqmVrI4qum0-fOaPdMkEg8IuoJfQutHUTT0gHk-CY,83331pyarrow/_parquet_encryption.cpython-312-x86_64-linux-gnu.so,sha256=eM-f-PSQIV_s8J9ce1U9SOwy30RMLdzguzLVYtV_zT8,372960pyarrow/_parquet_encryption.pxd,sha256=mITiGVRQjYvMhUtcL98NuucDPYaGJs5OXOR6ggAzPD8,3011pyarrow/_parquet_encryption.pyx,sha256=pG3wQtfwcCrO7SH-DcJDzjz_Dm6bIxhk5mulcJ6yZ2w,34755pyarrow/_pyarrow_cpp_tests.cpython-312-x86_64-linux-gnu.so,sha256=1VsHRN8i2A6oaQAa6tjqv-y6S3X1fvQBXMLjb2SrUXQ,92728pyarrow/_pyarrow_cpp_tests.pxd,sha256=nPyRmNtFbOUvSXCwegAApQFfh8UI_K9Hq5dN4oPAxdo,1199pyarrow/_pyarrow_cpp_tests.pyx,sha256=gLeMzB9RWodZgXEpipX65_0aqWu12SjMld0JZmZVRP0,1753pyarrow/_s3fs.cpython-312-x86_64-linux-gnu.so,sha256=Cf2pLdDziJRaSGsFHT6aMaqisd46u37BBz6lZ6nuYkQ,214048pyarrow/_s3fs.pyx,sha256=I5MF6knp3tYnS0VlWK0enMavJ9r54RcjgHJMoi2t6EQ,20584pyarrow/_substrait.cpython-312-x86_64-linux-gnu.so,sha256=2wcWLC1owSTH_gcU89MX1DADFrgw0HkwxTFV9Gr4W2Y,205136pyarrow/_substrait.pyx,sha256=fZT496mzp1ssSKIzqtmPeGBKeYq5f0vm8cWlWqaC408,15666pyarrow/acero.py,sha256=yus6kVAtfYVoSenfPZPHgmeEmnaySb5UCM1lVMkzF1M,15743pyarrow/array.pxi,sha256=3qZiN5eTDpIUvtFNJ382cmS13r3HH5DOuiRgIyjNGcU,171023pyarrow/benchmark.pxi,sha256=DYXdu-jMSH7XcTohbc8x8NiKRLtpX9IULfY20ohkffA,869pyarrow/benchmark.py,sha256=k9Z3yQyoojpYz4lTA6DkCfqT6fPG3N2fJtsHKjpbYFo,856pyarrow/builder.pxi,sha256=9QE4KAiA4JpA7-2JLgX3xo32jRtuWZ3YqC-T9GzUVDc,4634pyarrow/cffi.py,sha256=hEcrPH9KeG6NES3ZCpSbOVYhOgDOuBB_2LgMMucgw-8,2396pyarrow/compat.pxi,sha256=Sq5c3CKq0uj5aDyOoHHkPEO_VsSpZ90JRaL2rAKHk5I,1920pyarrow/compute.py,sha256=pq6ekpQ9eb5Wcl8Jf8i1wWv0eWXTYvjNBlMCmwfeffY,24952pyarrow/config.pxi,sha256=aOEBK-fPOyRAi2m2_6MmdC7O1UFwWb-Ea8LOxq0t_f8,4504pyarrow/conftest.py,sha256=9WNQKPOKZm4NOyvnQTHTcZmPKokqYxgJRErxUwcHENo,10025pyarrow/csv.py,sha256=S6tm31Bra9HPf9IsYwBLltZBLMvNzypWfeCLySsjmds,974pyarrow/cuda.py,sha256=j--8HcBAm5Ib-kbhK4d2M6SVQmDWkr7Mt5fnwU2LzdQ,1087pyarrow/dataset.py,sha256=S3g4O9G9IhjWByr7tZ5q8HwMC35InoBmgKsiX2aGCYc,40507pyarrow/device.pxi,sha256=kx9WnmI2bAKgt9txyGVQWackkRj9NPZLsE5q5H1RFgU,5563pyarrow/error.pxi,sha256=Wj7-NGUfdvlEwAwd8Ta_JqRC8IUOUpm_PmpvizCFvfY,8909pyarrow/feather.py,sha256=hfWN5roECeG6Ft2WoOTk8S5zs8hK7DORUeGnwgW5ybU,11231pyarrow/flight.py,sha256=HLB04A0SZ35MZJumPIuBu5I2dpetjEc-CGMEdjQeQRQ,2177pyarrow/fs.py,sha256=qL7lXu2QSbD3JbOwJEQwf642Y5Nne56tpW5nQ8O9t5A,14972pyarrow/gandiva.pyx,sha256=579wuHiaFSj7Q6X9YYwoX9NSjEou-mnkvvq0MeiGUoY,24443pyarrow/include/arrow/acero/accumulation_queue.h,sha256=fz0okH6sZqcSpBl2w3vOU9wSa9QlOIAXzikmb3mINPE,5985pyarrow/include/arrow/acero/aggregate_node.h,sha256=9fhmBQGUphsqLd7bNmiOJaEg5NJxVyWA5RGs9UaTxR0,2201pyarrow/include/arrow/acero/api.h,sha256=fRuKEHbKDYWRCwSHLc7vSD-6mQavyOsztluCR7evFCk,1151pyarrow/include/arrow/acero/asof_join_node.h,sha256=Ko6r1wDjxg01FE9-xKkttx7WzCAzf43GxbpvGHgKZp8,1490pyarrow/include/arrow/acero/backpressure_handler.h,sha256=mbJYVYeFMQlg40j_k7f0jFXZ8kRjo5lrE2dndC54Z7s,2395pyarrow/include/arrow/acero/benchmark_util.h,sha256=T5bNabF1TDAp28S7V_vt_VIDn6l5Be0zOVCHhcTcFf8,1943pyarrow/include/arrow/acero/bloom_filter.h,sha256=bFzzAzQrs9ePp2tCPQIuk1Oa9gG_Nyp72M_HM0dhakM,11978pyarrow/include/arrow/acero/exec_plan.h,sha256=U0KA3tnNvVb75G0XQFLVbGzXCGdddGyRhW3zMa8oWJc,35909pyarrow/include/arrow/acero/hash_join.h,sha256=zjljUjH2AQlI54Vz2_7hvJIAjTgaT0BPC_LVD7xNd2k,3022pyarrow/include/arrow/acero/hash_join_dict.h,sha256=_BKJmK3Z_KdJuYHh4KQCuT_1rXlUohrtEgGLtEJ4fgQ,15360pyarrow/include/arrow/acero/hash_join_node.h,sha256=FXT-aeXL7nNTuV75f9oXgdGyqMK_72GnqGUm9cmBnko,4378pyarrow/include/arrow/acero/map_node.h,sha256=Bd1HcW0N5azoIVth2ATeHxgTKd9XmmEkz42YBNw5eK0,2628pyarrow/include/arrow/acero/options.h,sha256=sLrKayGLs0MVJKcopQrO3pAOrqmvd1j3EfloUCMKECI,37654pyarrow/include/arrow/acero/order_by_impl.h,sha256=dQqplP-AZWPZRKio8LmTjYWlCYz9VmW-usUrtaLpd_w,1691pyarrow/include/arrow/acero/partition_util.h,sha256=xS8hayuTRimyrOHzf1xRm1IVjkyIeVCGXY78B2rJaJc,7437pyarrow/include/arrow/acero/query_context.h,sha256=D364aGRS3uWe8lgYqCNRjVvs5sKetLOOXzACdp5GZeg,6212pyarrow/include/arrow/acero/schema_util.h,sha256=KA_hV2xy2TRccMyksSzQrdH9_rdGo3tQyHOIvrWWYBQ,7961pyarrow/include/arrow/acero/task_util.h,sha256=6pqILuYfcVwt9HqVhRfXFVJoOC-Q_dtk8mQ5SxjgwbY,3706pyarrow/include/arrow/acero/test_nodes.h,sha256=xKeLWZZC8iokveVXPjseO1MOvWMcby-0xiMISy0qw8E,2877pyarrow/include/arrow/acero/time_series_util.h,sha256=W9yzoaTGkB2jtYm8w2CYknSw1EjMbsdTfmEuuL2zMtk,1210pyarrow/include/arrow/acero/tpch_node.h,sha256=l3zocxHTfGmXTjywJxwoXCIk9tjzURgWdYKSgSk8DAQ,2671pyarrow/include/arrow/acero/type_fwd.h,sha256=4zLhtLJf_7MSXgrhQIZVGeLxjT7JrEDAn9yW75DTFlc,1103pyarrow/include/arrow/acero/util.h,sha256=byhMEj5XoAUy-93AjLrx_p9_iUZdYn5uJ_cDkCJQt5Q,6121pyarrow/include/arrow/acero/visibility.h,sha256=E-4G2O4F2YabXnFNJYnsI2VbVoKBtO7AXqh_SPuJi6k,1616pyarrow/include/arrow/adapters/orc/adapter.h,sha256=G5SSGGYMSREILC43kqL5fqo94c4tKgukitO15m217tY,11031pyarrow/include/arrow/adapters/orc/options.h,sha256=FMxda5YSskRrB6h9FvcAuMxl5qdavWrNYHPlanjtk48,3696pyarrow/include/arrow/adapters/tensorflow/convert.h,sha256=ZGFAodnwTJK0ZoXfgYJdjgi_F4vfEhI9E87zejxVb6E,3465pyarrow/include/arrow/api.h,sha256=Gs6HiRBYU5N7-a79hjTl9WMSda551XdUKpWthFY2v1s,2491pyarrow/include/arrow/array.h,sha256=P5oW6hvD2j97bLaSTE4_UHuV6Y38DTwJVww3Eb3xdTQ,1981pyarrow/include/arrow/array/array_base.h,sha256=kq08hubpDlrIVgDRhL4MEqPyaEftgmoznQ91ZVrLnAQ,12371pyarrow/include/arrow/array/array_binary.h,sha256=JvtB8DoR0_tqfSFS_9nMRrJ39lt1cTm5yXh-DLkhqjU,11247pyarrow/include/arrow/array/array_decimal.h,sha256=xRfrZ1IFO09EmkHEolCwrJ4lsXjLo5DXdfH5_v2gSyw,3105pyarrow/include/arrow/array/array_dict.h,sha256=dnXDlT-MhuSHoTyKMyUAq5heUBFwI7s0BXlg_xyeTxY,7746pyarrow/include/arrow/array/array_nested.h,sha256=MRFllX_LO6AQXNkyAujEdax2gEYrnQALySwB9tuP85U,37717pyarrow/include/arrow/array/array_primitive.h,sha256=_U8_pTHg-aHY5jaSFjHZ4hqRPXdYiyKTpr2y3OcJcdg,8184pyarrow/include/arrow/array/array_run_end.h,sha256=4zs3tcUrIgDOhSEOywJ1vGY2lsH-5QuEBn87mxnDbi8,5101pyarrow/include/arrow/array/builder_adaptive.h,sha256=92DpiIZDXSI_yOrMftj7P60zlCLjNmwfGM5ubdbXWM4,6861pyarrow/include/arrow/array/builder_base.h,sha256=CP9kS8pDFd4XyJQdgIlBp3pTIX9mND1Lvh85re4IC8w,13723pyarrow/include/arrow/array/builder_binary.h,sha256=cfrm-LnXOZ73pQpn_kXSXw0Bh252DpsfP4KGHlPNy3g,33744pyarrow/include/arrow/array/builder_decimal.h,sha256=DFxyFlpzWRZS9zdBhsjII5fFUOMY9bXHn3EIrIvmOMo,5051pyarrow/include/arrow/array/builder_dict.h,sha256=iHGdWJfkTYBo2lu95-Q39-wPcDBMreWz0GTXEYLQSRA,29375pyarrow/include/arrow/array/builder_nested.h,sha256=_VB9EUamHQcxQtJM0FiSy8Rs4vhzpOuqFMRfKa4qE5U,31231pyarrow/include/arrow/array/builder_primitive.h,sha256=WX_3Y-FeCvTtoE2kHJ9L2cew_IN5W4uyQFfjsJ2lMLk,26031pyarrow/include/arrow/array/builder_run_end.h,sha256=SZIdsUKK1qAc9pdonPGf0A_aikZHcxxzicezRGR5hLs,11416pyarrow/include/arrow/array/builder_time.h,sha256=eLhc7UP9ttNJDbTeDdsf-ihMFORksmh7A0ScA5hLROI,2503pyarrow/include/arrow/array/builder_union.h,sha256=8BF532sAMc7JxWIbSN-yX6Z9fqY9jmmsIa054DPvbWE,10144pyarrow/include/arrow/array/concatenate.h,sha256=wBy-CBTz9MeRCmcnfXGvkXnvSRApvPOcfCf64A42ys8,2059pyarrow/include/arrow/array/data.h,sha256=T6U-5zS8NTCAz0HTh8SnM_4G8LtNg21SvvtroXoeb2E,28974pyarrow/include/arrow/array/diff.h,sha256=bYNKy2oLAxtt6VYDWvCfq2bnJTVNjG5KMTsGl-gT_kM,3344pyarrow/include/arrow/array/statistics.h,sha256=f0_4nJyk9Su-7u4B-HR6lfyKLe7e5E9J1HNqhgnRU28,6914pyarrow/include/arrow/array/util.h,sha256=qVHvCaVlALz8WJwAjyMwsBm5J2iN89CSgj7NpmmqlkI,3652pyarrow/include/arrow/array/validate.h,sha256=JdDb3XJg4TmAfpv_zgu2ITfL2H9no10TQit-HPj9Myw,1710pyarrow/include/arrow/buffer.h,sha256=nR-ioOn0OxvUIwpo0rHxDc0h4osso0Z68Rh9__50Qyk,23215pyarrow/include/arrow/buffer_builder.h,sha256=qaMgLKbycOSsn5e5_nlOj3tdPHu0i45if78ZrFN2Lmc,17468pyarrow/include/arrow/builder.h,sha256=mBxMko271lJ7Xbku0hCixj943Yx-d2i4Q5Hm2WfwiGM,1546pyarrow/include/arrow/c/abi.h,sha256=GCjxzmA2jNWQ0ZWVkQ-hnbCbMHKPikO1-JkzYj96cnY,20318pyarrow/include/arrow/c/bridge.h,sha256=6e6ZoIsG-pE8FQ5aU4nRJ71vVL3U9k697g7PYKDsVz4,21789pyarrow/include/arrow/c/dlpack.h,sha256=IXIuMdfqbHJ_AdT_25tzp0z48mWC65w4xZMjTP3yl7Q,1983pyarrow/include/arrow/c/dlpack_abi.h,sha256=mjp9WWq8qv6gkGirT4y0o3BL_ZI9VyHQpJ5aEpPFetI,9920pyarrow/include/arrow/c/helpers.h,sha256=f0Q519PwoliFHpxsHp-QvbP6fpVMN2Ha35Tk-RBK6Ws,6279pyarrow/include/arrow/chunk_resolver.h,sha256=atGWubPnp8tCyMwpaNiz6tB7qOn21GGZHLB6w2FV4kw,12827pyarrow/include/arrow/chunked_array.h,sha256=X-sGVcdQDdumNpYvKOikueXX5IoD49oq8CLIhH8bVKQ,11245pyarrow/include/arrow/compare.h,sha256=UNyVmqYru241wqKW6oDaAthALV9AhuUwUa8-g5SeXSw,9662pyarrow/include/arrow/compute/api.h,sha256=6z6HdNH6S0Amop2GUfrsifxOvgupfTqFDZf76YREt-4,2139pyarrow/include/arrow/compute/api_aggregate.h,sha256=GCPpIA6qz6XL2UI4SyxXjyjPeC68OoT1tttpiue8eMY,21945pyarrow/include/arrow/compute/api_scalar.h,sha256=9zZIkbs_IwctDCGXO8Kl7OWOdSdgyCbN2WUhxugEyvg,70587pyarrow/include/arrow/compute/api_vector.h,sha256=wsEb9PhhHzi34r4kzFcp5HaRh0mnR8gp54b2efhjG2I,37652pyarrow/include/arrow/compute/cast.h,sha256=y8v-EYs-1zJ5NhulMGNzagKc9CkU14ld36VIbYdV94g,4245pyarrow/include/arrow/compute/exec.h,sha256=2baXvq1FWwyfQfTV4r6qhF818LEYOxyn_DiTqE5AMCk,17975pyarrow/include/arrow/compute/expression.h,sha256=LBwjf1LTtfCfTT3RGUq_3PI_V0LRf2HxtZ-Ovqslw-c,11164pyarrow/include/arrow/compute/function.h,sha256=rtEKbrMURIqOWo3JgdOxHsDMk1F-Kk5_Jz_xcpXavxg,16419pyarrow/include/arrow/compute/function_options.h,sha256=Q9rjkXPrU9-Xi64_fMLPbBbW_byhjJFsvHppP1CumdA,3088pyarrow/include/arrow/compute/initialize.h,sha256=ms8mtCSHTaStTrWdapbNyNSpM0PO4ox32O9colbBR7k,1193pyarrow/include/arrow/compute/kernel.h,sha256=d3BIi5NtSBqPsh2gyCsfT03LvRmO2vM_XgoXip_HuKA,32283pyarrow/include/arrow/compute/ordering.h,sha256=ER_I93qTAMbVY0hjGl5SSmR39HC5trEi8nXYMbFwy9g,4758pyarrow/include/arrow/compute/registry.h,sha256=x7LHiaNEVvZ0VUssZFsasB52Z1AxRflkdI5tR1hhzqc,4837pyarrow/include/arrow/compute/row/grouper.h,sha256=ID9sFjFawulQC5T_f-TQttvohhsSAmNkHIj1iXzDY-0,7520pyarrow/include/arrow/compute/type_fwd.h,sha256=tiG7MrLEfXAPF53JKlnFdJ7kzjhNP9a_xCb2Ept3ozc,1555pyarrow/include/arrow/compute/util.h,sha256=l1y6P1hHsI-mQ7lB6KNn_8AzYCxCxuhaSBOOG_wqjcs,9376pyarrow/include/arrow/compute/visibility.h,sha256=_h6gB6GG5YSF3aak6oAerylqtJvjhTN9Tq8MZccpO0M,1597pyarrow/include/arrow/config.h,sha256=z3VlReS2Y2B9lD2fPy13y0rltGZt_dyPdWSaOAu13CM,3964pyarrow/include/arrow/csv/api.h,sha256=LbwWhPyIsi_73hvsSr77RNR9uUxrVyXM__hp7QcSom0,907pyarrow/include/arrow/csv/chunker.h,sha256=nTs8hdy4D3Nz3oZWm2JMuA02noY_0pWRYWq_RptqzHY,1171pyarrow/include/arrow/csv/column_builder.h,sha256=5t3842eXFsAHtrLGJ4LQkH2epUAr06PbnF7POwlgQQw,2889pyarrow/include/arrow/csv/column_decoder.h,sha256=10idcPJE2V_TbvgjzPqmFy1dd_qSGWvu9eDkenTuCz0,2358pyarrow/include/arrow/csv/converter.h,sha256=RWMxsrsMogphABkyW9gU2Hk2-x1p83EMasrZTvt-Mr8,2964pyarrow/include/arrow/csv/invalid_row.h,sha256=gTHjEbjkpee6syLGA8hFY7spx1ROMJmtMcwhXv21x5Q,1889pyarrow/include/arrow/csv/options.h,sha256=hrptOOWfp1mH1TqQ-R-QxIxwGAxUY0HjPZ8c0T3Py_Q,8376pyarrow/include/arrow/csv/parser.h,sha256=8PplRh3Qxckk8VPyM70P_f1MBb4WMGnNVpoeJ9kOdHU,8616pyarrow/include/arrow/csv/reader.h,sha256=416pt3yNQsgn4RhIyRMsmSJmvv1sw3ouQotubXG91gQ,4606pyarrow/include/arrow/csv/test_common.h,sha256=uEYzw8EROvd1QMBQ98d4MaZ7BqMlw2e0flAyz-du0Z4,1972pyarrow/include/arrow/csv/type_fwd.h,sha256=ptVbengmY_a7Yz1w0SKmKL16yyw9yEeym0Q0cnRCSV4,984pyarrow/include/arrow/csv/writer.h,sha256=Y1zErZ5H1r2QzjAta3TXpFrdl2btoardCF8USCAGtGg,3549pyarrow/include/arrow/dataset/api.h,sha256=p7i-bncJLhmfBkfjJWS7684vD9Lke1m6tb7HQq7Tpn4,1322pyarrow/include/arrow/dataset/dataset.h,sha256=NsXdSFYrO4BpJSEV2e4yJRrN-hdLxMJepwAyyqFWt-0,20327pyarrow/include/arrow/dataset/dataset_writer.h,sha256=TQV75b_UigfGjIpBnPk8teOncM5WroKfKV15oicBRRY,4589pyarrow/include/arrow/dataset/discovery.h,sha256=x7-5NBAyEeQWGlWanJDLZAoWksKiMwM96tlDx_M6n5c,11236pyarrow/include/arrow/dataset/file_base.h,sha256=nUMWLbhh7lt5c3iOw5edAtcy4jrCzpBUX5JZ29FW0Tk,20385pyarrow/include/arrow/dataset/file_csv.h,sha256=7PlvQW_2FJ5RRN-VH4-OBw5cZ6nkd0KE0sj1TQvCZeo,5016pyarrow/include/arrow/dataset/file_ipc.h,sha256=6-btvXhflZsAH90T3wMkwzZkte6T4ixzeCEUn_5uYW8,4083pyarrow/include/arrow/dataset/file_json.h,sha256=sPjOeMOtbZZbvOivnOdb4MvYKHltpTnY8fONkhB9PZs,3523pyarrow/include/arrow/dataset/file_orc.h,sha256=P7nAD9nacVngDEjH8ChQRt0AQmDg4Z1wBx360LDOoSg,2452pyarrow/include/arrow/dataset/file_parquet.h,sha256=_mhpCrrLGn9XPKSt9lsdbG4wosPOkMiqkjXDz-2D_So,16935pyarrow/include/arrow/dataset/parquet_encryption_config.h,sha256=Upo0k5MijZaMaRZjPp5Xg8TRt1p8Zwh2c2tdimjVe1A,3425pyarrow/include/arrow/dataset/partition.h,sha256=3wrNekD_-fPO1YW91Za-T4muCfQeAX7SZRIcsCN_czI,16815pyarrow/include/arrow/dataset/plan.h,sha256=IjuR9K2sWD85_2HpVVoJ-3YUCq--UPblHU46exX5qRg,1181pyarrow/include/arrow/dataset/projector.h,sha256=KfZijq09Ht0Z2cJHsrjg-sE3SiZ4TKainflReK-39cg,1135pyarrow/include/arrow/dataset/scanner.h,sha256=fWeW3NZF5zQYAjSIDU6wJsitzaVrSRbOmrMUnNQE1RA,26176pyarrow/include/arrow/dataset/type_fwd.h,sha256=YOUSRwdNAlXJ7meFLolpAFQ_mSlObs2F81zcOy0DoI4,3170pyarrow/include/arrow/dataset/visibility.h,sha256=ckmf_sEI0WBo4W7DIgH1QrOq82skOHtoksl9B3yYvzU,1586pyarrow/include/arrow/datum.h,sha256=XYaZ_URrAtVqHMq-_2YtXk_ETeQ4yZWLVAnsi-k2Mac,11511pyarrow/include/arrow/device.h,sha256=mLz99tb74VdjxXtKt6RZCYKJQ8TYz93uaCFJ1ZiItMw,15344pyarrow/include/arrow/device_allocation_type_set.h,sha256=ynoZ-XyFlOAjh01PU-R11mE_EOxuw3xzc94v5OXa0u4,3306pyarrow/include/arrow/engine/api.h,sha256=ORM0M5KQeurjEG8Eoa5IeV_ZgKBRPlWyicyv3ORWkAY,886pyarrow/include/arrow/engine/substrait/api.h,sha256=W9NB1RAm0ZVxztRXYA-GD7H8XLQNXFoYT7TdGFHoNTE,1079pyarrow/include/arrow/engine/substrait/extension_set.h,sha256=z1IIQVd4bat5kRngg91IyoE5UYTv7bar1JQ5ck63YbY,21552pyarrow/include/arrow/engine/substrait/extension_types.h,sha256=x5ZIuynNh6WFt3wRjW--zUsuC3SeDLk1qRg9_xhswWM,3075pyarrow/include/arrow/engine/substrait/options.h,sha256=dtvUty_zoDmcFwVflppiDzelYkeOhCO74uRF6izQSzk,5820pyarrow/include/arrow/engine/substrait/relation.h,sha256=V3VKFlDdE61e1OS8LbJiwvm5w0uq5bzBLhKqmgmKaws,2385pyarrow/include/arrow/engine/substrait/serde.h,sha256=mjxfuFo4aPhCiwefpKAJMIlknF4UOHSr6gWU__1SwCc,16528pyarrow/include/arrow/engine/substrait/test_plan_builder.h,sha256=REFa79D1AOIIjp2Iez73iw5gEnzG9Rac9t8WwiGLsuI,3003pyarrow/include/arrow/engine/substrait/test_util.h,sha256=IHZeYrk50Sx9anJfC25DWP6XesItKEywDWUqvUJcjEQ,1517pyarrow/include/arrow/engine/substrait/type_fwd.h,sha256=P9YRjAQpSgoIjDC0siYyxoQzcPVo3r9y85qjiMtudBs,1028pyarrow/include/arrow/engine/substrait/util.h,sha256=_dRiQBaIMWNbsYG7kuXhs3dMk4dI63-pM0uSxYPOvgE,3570pyarrow/include/arrow/engine/substrait/visibility.h,sha256=GRzH6U-UCPT8d60cywOkFfcanPSgiZKCDP6X2rIpbMs,1740pyarrow/include/arrow/extension/bool8.h,sha256=VsHTtVyrqk6UKgvifad7LouuieoAZuZs_uVvegdGq4Q,2145pyarrow/include/arrow/extension/fixed_shape_tensor.h,sha256=26c16q0JdTe-bLc1l1sqe0a4AxD5RZR-T_Iblewq_0U,5541pyarrow/include/arrow/extension/json.h,sha256=bNh6R9aP3MK-rbTON8IzVn7FIt9RGMmUHGpQkFGfOMw,2026pyarrow/include/arrow/extension/opaque.h,sha256=uMVqSScey_13Ho6V86vfkuoByZni9ufh5BGKgX4bTZk,2920pyarrow/include/arrow/extension/parquet_variant.h,sha256=7JIr38ncau8XWkqX5XAyfN3ya1eIeVW8vqTPIuLqm04,2889pyarrow/include/arrow/extension/uuid.h,sha256=DBzTD83Mh3oacfZzfU6fQuGC87gvtnGGaDue8s9M0Ws,2364pyarrow/include/arrow/extension/variable_shape_tensor.h,sha256=vqT2TpNxsgjJUL70-y3EjLjvZvAcI2tId1mzBNuKWGk,4494pyarrow/include/arrow/extension_type.h,sha256=YUvUzPz-0QiG-jOjs__TfyPEpsHWGkGO5PMVG1vMjkY,6639pyarrow/include/arrow/filesystem/api.h,sha256=Xgy2GOZtBVwDjTaXPDyPPlS9Bwt9gjWXm5I_QbyRbFo,1383pyarrow/include/arrow/filesystem/azurefs.h,sha256=JyJ11eH3PBltohpq44zBPODcan3CmHwihHoNhkbdqLg,15588pyarrow/include/arrow/filesystem/filesystem.h,sha256=U5SCyV61htV3AS8sCBJ83O8cblciqbpxTxSjee75sjc,33534pyarrow/include/arrow/filesystem/filesystem_library.h,sha256=f2_p4Odzvq7zrMePwNcWFFet8oolnDI8SF0t55Z6T_Y,1765pyarrow/include/arrow/filesystem/gcsfs.h,sha256=5HSHqA9a1T2zVnZO1rNZKnXjLVyq1aAm6DRmQmg_v5w,10372pyarrow/include/arrow/filesystem/hdfs.h,sha256=Jn91pjfk6RMx-MuAWsEAKLTyKQ7bDPNA5jMEVzafSgc,4133pyarrow/include/arrow/filesystem/localfs.h,sha256=eIhPrpABheQz21WE845ULleTk83e4EtJnES4jALW6mM,4972pyarrow/include/arrow/filesystem/mockfs.h,sha256=kohu7s9s9xtd75sGTE2K_rsHW89swDOtSSSFxBixMcc,4768pyarrow/include/arrow/filesystem/path_util.h,sha256=hrDVHk4F9M7oGABB4x2wKfQMjSlSAIS0IaLVv2jHrl4,5698pyarrow/include/arrow/filesystem/s3_test_util.h,sha256=p2tDiNvDDGswFiaFomKaYGq3lDFKZo7xdtSHXqUQTp0,3050pyarrow/include/arrow/filesystem/s3fs.h,sha256=hEaf3GL_ioVz8Dkfh2z9LZ_f9lkU_B0PkhcQ1RIUsS0,19313pyarrow/include/arrow/filesystem/test_util.h,sha256=IcdXbz8kXaZDvUPN6Oc77UpWI2Psv1f_CKZxB3UGg-I,11738pyarrow/include/arrow/filesystem/type_fwd.h,sha256=zztDER55Wbt4rVnkd-ReeDO-YnrpemftFeFtZ7ZGidY,1462pyarrow/include/arrow/flight/api.h,sha256=YotLTQn-KCl6y5BIg8coEFZ9n7PMtJ02ly7Pc5gmX7U,1257pyarrow/include/arrow/flight/client.h,sha256=MdHgubO7ExcWgp8S-CP9B4UfJ_aRLgLat0yz0pXQEdg,17936pyarrow/include/arrow/flight/client_auth.h,sha256=a3Dkm_jPOuqzNsDA4eejuMUwCEBMavM8uS7w81ihbRY,2216pyarrow/include/arrow/flight/client_cookie_middleware.h,sha256=5zkCP2SxMFQuTX8N9NHxOve5J_ef2rFO6-xY4Tfnygk,1204pyarrow/include/arrow/flight/client_middleware.h,sha256=aAZwCahuiBhP85iMPe7xNWvidBR9KeHGto2YAqJioI4,2948pyarrow/include/arrow/flight/client_tracing_middleware.h,sha256=d0sTmUOfq5M9FMliIKK-flJkR6-7r69NjU2TpxhfqWo,1217pyarrow/include/arrow/flight/middleware.h,sha256=JPQd8JnIVcwjTH6yOBck4BWR-WV95fpnAdhHyEYvfKE,2254pyarrow/include/arrow/flight/otel_logging.h,sha256=riS9sZM2C3mH6VMbESizJ6lGmudqdJhfdCY9_cJJqMA,1139pyarrow/include/arrow/flight/platform.h,sha256=1ZfzVaollAZosGyH_1JvzEA8iNR0hi9cUGz5eyLT1zc,1209pyarrow/include/arrow/flight/server.h,sha256=GAcV0-THuBuj-bXfwqYrZ1P2bwZgKQSJLbu8ToltRvU,13185pyarrow/include/arrow/flight/server_auth.h,sha256=xXkot_fmnEZ0yXHEBmiezAQCxM7vQem1Vo1V0vEwcW4,4457pyarrow/include/arrow/flight/server_middleware.h,sha256=kRXm15c1mjPduoS7N61m0TG8nGIhN_ielsjK9yFlsgs,3155pyarrow/include/arrow/flight/server_tracing_middleware.h,sha256=NzyufqTwzcTZ32FNuY-rwse4KmH8zoyoc1RhZxUMwFs,2186pyarrow/include/arrow/flight/test_auth_handlers.h,sha256=XkvMWucv9GQjlt2ttvYxshym4kUubUdMh-timlQIt1I,3315pyarrow/include/arrow/flight/test_definitions.h,sha256=U_HhBnNdNZmojraYzICBmBvuef0bTT5eYzFXp8iGFzc,13110pyarrow/include/arrow/flight/test_flight_server.h,sha256=SbRhZP0U4ILnbg7lYQvGeXmvPM_B6bai12FTM_HD4RQ,3930pyarrow/include/arrow/flight/test_util.h,sha256=1Tv0Yl5lth2j3fIZT7iI8n_kexzGgJHGxplV4xeu7TE,6668pyarrow/include/arrow/flight/transport.h,sha256=0FUVFM5zch_NKfBZEJLwyksg63TKyjjLXNQrUqlo9F8,12201pyarrow/include/arrow/flight/transport_server.h,sha256=iVdXmrb2pemh4o6BxwvB7OZAV4UeoWrbhe4ePZ5Pi4s,5268pyarrow/include/arrow/flight/type_fwd.h,sha256=tQFAM3QNKPdzB4VqUGdEUFjNPYXVZLApwGnSus2GQx8,1797pyarrow/include/arrow/flight/types.h,sha256=lZdSGm_DZIevV_vyMD1GW51lgVUJNhrBrCOPrXOBBdA,47502pyarrow/include/arrow/flight/types_async.h,sha256=3nIQqwCYO4Ir3Mt2bG7BNntXxuNHYQNNpz-Yl3EaFTQ,2599pyarrow/include/arrow/flight/visibility.h,sha256=N1k74cwyRvOaYFa_tCjdgUjiSdPBhmy20UuVGu0wTg0,1596pyarrow/include/arrow/io/api.h,sha256=Pn4jZSTsLW8MAlMyXUokmJdupX54u154GYI5AvD5ByA,996pyarrow/include/arrow/io/buffered.h,sha256=PHaMwCMaXu3vAjhDpZMC2xt5hKooJXVeMffhoDzTxNc,5912pyarrow/include/arrow/io/caching.h,sha256=AAjoyKwQ06m2XiglFS6Ch_cdg2p4-wkA7GakGI_eX1E,6708pyarrow/include/arrow/io/compressed.h,sha256=3JxIOo1q8VhjIErfwVM5ZLVkwwQKXd-FT5517j58etA,3774pyarrow/include/arrow/io/concurrency.h,sha256=rseZByfap0Nn6AOznzocUXMBqm37g4cApdTACPgKi9Y,8386pyarrow/include/arrow/io/file.h,sha256=CfNonsGIw7Cn5JYkEhV4Hy0BTnyQyvuoFEunJhVRvew,7741pyarrow/include/arrow/io/hdfs.h,sha256=2s3f49ggAYgSCsX5SoqnomwsXd24_IZhW-VSBJclqTg,8559pyarrow/include/arrow/io/interfaces.h,sha256=I2IgQOEtBKnrWLCm3Oq_ZnPcb8Tu9FZ9AubI0ED0DNg,15149pyarrow/include/arrow/io/memory.h,sha256=mM1d0rHz6OGBa_xucDXqHyAf0RjKKpCimw4yTvx-1vI,6654pyarrow/include/arrow/io/mman.h,sha256=qoLBAGFcvpYTy96Ga7FNWDJKT3uhxpFAF3hbXIaDSiY,4111pyarrow/include/arrow/io/slow.h,sha256=gRBlA5f68Cqu49iuO8gMsDveHw7gjwGyurCIxqtv1Hc,4219pyarrow/include/arrow/io/stdio.h,sha256=dqMTHoJbmiXcyNa2fN60tSWQsx0GPphZVCLdGiZNt8I,2095pyarrow/include/arrow/io/test_common.h,sha256=SF59odb0E3rtGju5jABsQzZcUi9gl5TwHuKg4f0EQ5Y,2146pyarrow/include/arrow/io/transform.h,sha256=W9XWonw69VymQAaQptfW7jD-6ry7VCpfPXlkB7aZzOE,1890pyarrow/include/arrow/io/type_fwd.h,sha256=LEk36JLeG5jP5z2DRiWamZ75WonvyzK1Ug6HBiqxtAM,2333pyarrow/include/arrow/ipc/api.h,sha256=sbbb-uYHZtqE59AUlwNnAzUkP41h3Et9Rnu20gNKm9w,972pyarrow/include/arrow/ipc/dictionary.h,sha256=UTjZPIG8mLZOk9IW2QnR9RZGr1npexZOp103fv-O70E,6104pyarrow/include/arrow/ipc/feather.h,sha256=uCnxwO7eUH18kJ-lWz9IWwSj6AjfejqqLdoifJ-UBDo,4918pyarrow/include/arrow/ipc/message.h,sha256=OQsl7idEQtvdvzriIO5BCSDPaeWZM-ISGROOpPDax0I,21243pyarrow/include/arrow/ipc/options.h,sha256=ElaKzyOsR8giJeIc2NYGxlBQ7ZooCvmeKWKcHzrD5vY,7910pyarrow/include/arrow/ipc/reader.h,sha256=HF70pDfbjaYEtRwZ5C-eqaOjqsp3AqdNWIwud0gU7Xk,24375pyarrow/include/arrow/ipc/test_common.h,sha256=kd6-NmmaT__0cDYIwes8lnOqbQDSqFZn8eg2N-SHfE4,6559pyarrow/include/arrow/ipc/type_fwd.h,sha256=Ty8ET7nLI4JJeTqDMyP0pEH9QVj9xs7BpJkZrnrpaPY,1440pyarrow/include/arrow/ipc/util.h,sha256=wTkfC9YFKZlAAjyzlmQVZcW90oOj_JatjDN4qz0IxHg,1414pyarrow/include/arrow/ipc/writer.h,sha256=hum8E_orkG_X38vgyfyKhGbyvcLJ3AkXEykyBjAXIYg,18870pyarrow/include/arrow/json/api.h,sha256=XRW1fP43zVqwy1yabaKctNK9MDZqnxkoHDH1fx5B3Y4,879pyarrow/include/arrow/json/chunked_builder.h,sha256=DDuMwrImMECw6Mhfncn2xMOjkFcKUV1O1597_fSFSAs,2365pyarrow/include/arrow/json/chunker.h,sha256=dkZOcxsF1Q3ek58P7IoA8f3lQyBQpFvGSFeynNV2Olc,1119pyarrow/include/arrow/json/converter.h,sha256=3lXsP3BSdpLPIkFAJnYW9vP8BbX3neVYR_W0zFKClQ0,3134pyarrow/include/arrow/json/from_string.h,sha256=y--AK08e-EivbrilSGU6xtPH1VpqBNZIYvCMUT2_V_E,4106pyarrow/include/arrow/json/object_parser.h,sha256=Y_6Oceya06aUyeo-1k047dm2-JUMJa2_w9iyZ-goIRQ,1627pyarrow/include/arrow/json/object_writer.h,sha256=UrIrjCkIz7Q5n_FpV5NNPD96gHHdTkvTJaekuGBHwTo,1428pyarrow/include/arrow/json/options.h,sha256=EypQgDwLZQbrPnAh45nSPfpGGYrxvLgfp1eAG_l0p3Q,2227pyarrow/include/arrow/json/parser.h,sha256=3oIzO5kUs2Takc7t_d5mH7bp1uIcc1M-qbuHmPoSI34,3383pyarrow/include/arrow/json/rapidjson_defs.h,sha256=lBJlfuYWIeQQ8awPd3bk4jJc81efr_KzKwG8Klw7t1s,1474pyarrow/include/arrow/json/reader.h,sha256=KNO9dCyc2RZs7WxUSEW7bpCYBh_h1C3U52YHYxBnP0M,5212pyarrow/include/arrow/json/test_common.h,sha256=tEU1c8UN7iSL9nYnlB-QPw1iHgi65L9Eqv8e4iyXc2U,10853pyarrow/include/arrow/json/type_fwd.h,sha256=o9aigB5losknJFFei1k25pDVYZgkC2elmRMX1C6aTjo,942pyarrow/include/arrow/memory_pool.h,sha256=sKBdu-Aidm_X3qbPnfpur5LX7nuwlsnCraPsGR2Up70,12911pyarrow/include/arrow/memory_pool_test.h,sha256=y9uetklEZbxI23P8MYlpHpC_wF1tWRc4u2osAddjXOg,3604pyarrow/include/arrow/pretty_print.h,sha256=Z36O7Rp3wp8gCG51YHh-x8ytrrENDpFZSPmSSXs9TAo,5716pyarrow/include/arrow/python/api.h,sha256=2XyYOFAmorPGXrTVYZkiKL67nuH8w1ha6D1reU7K-Vs,1179pyarrow/include/arrow/python/arrow_to_pandas.h,sha256=jQiSTN8IL95onwaclaWqCR5Nb2RHrBtubRyEOJR9eRE,6215pyarrow/include/arrow/python/async.h,sha256=C0f8YYmgwBGgDau4xEFsdjukiZB4YvpylETHEZryHOo,2352pyarrow/include/arrow/python/benchmark.h,sha256=f-kzyMOlPKDse2bcLWhyMrDEMZrG_JHAPpDJgGW0bXU,1192pyarrow/include/arrow/python/common.h,sha256=P0VTk_VUwki39_Qa_0CRlUAFKA6meOIXRV78BYuU6mc,14914pyarrow/include/arrow/python/config.h,sha256=wAu5-RRtzqKaBwYm7h1iBsItuYN60b3IQMZFzGn0GQU,1298pyarrow/include/arrow/python/csv.h,sha256=QxU3B-Hv_RsoEcMGS9-1434ugouL2ygC64Lq6FgviNM,1397pyarrow/include/arrow/python/datetime.h,sha256=hK7BHBuqAS8wddgO4psIz_hwZoGlLvkfWS__9Q19aAc,7960pyarrow/include/arrow/python/decimal.h,sha256=K9ScmzSa7XCuuwpXKnq0GPbRDTuRU5yXfWr9zGtOchc,6362pyarrow/include/arrow/python/extension_type.h,sha256=0gzb42y_mbw4fsYs3u8cwPFLBRlG-kkHQLgbvGtrY0U,3181pyarrow/include/arrow/python/filesystem.h,sha256=FG0AcLekqaDf9IQPqKixAfIcY_ZLgIKP5NvvXdtBVUM,5126pyarrow/include/arrow/python/flight.h,sha256=t4ZD8gWaubbO_mBDv0XZ58TCo1VQl0hzHn1_7w4U64I,14450pyarrow/include/arrow/python/gdb.h,sha256=H-qvM-nU8a_3Z5tk8PvppTwQtBMSZhQKQIVgRAsRfFg,972pyarrow/include/arrow/python/helpers.h,sha256=0VW-r2f52cJHjf2v4FLuTSXkHDq9TF79xyU15DZznI0,5534pyarrow/include/arrow/python/inference.h,sha256=FUFvB4Zy7V-tueXdmbDcqTeLK4xj5GZEeRW5yhiJlsU,2038pyarrow/include/arrow/python/io.h,sha256=4jGnodpSUlnVqAVh9fWId7H4WldlLPkXyroABpdaW6w,3858pyarrow/include/arrow/python/ipc.h,sha256=SZbw6jCCqLiLNCY3k632GmwHeD_r_xrDS0dhqV49VhY,2259pyarrow/include/arrow/python/iterators.h,sha256=Ugfm3JvetAH0l-oAjjpZfhrUBqRimVMaw4-xusvqLSg,7327pyarrow/include/arrow/python/lib.h,sha256=cc892AJoPm-m59u7jvoxEtscQnJM19Ge8f2I-HBJyMM,4562pyarrow/include/arrow/python/lib_api.h,sha256=gMzJr6pccalPxSdhU9wWdR14pYnb10kzmualO8chda4,20132pyarrow/include/arrow/python/numpy_convert.h,sha256=y13eHwfe1lJKzadoTr2-GyX6xPsE6Z7FN31s7PN-2Rk,4870pyarrow/include/arrow/python/numpy_init.h,sha256=FniVHP7W2YBlenoMYhQrODvoqqvDMSls2JANGtNPQts,999pyarrow/include/arrow/python/numpy_interop.h,sha256=rI6ek8JTOYtjo7gEADSDBS6QuAOHa2A0YQPZ2GeypFw,3418pyarrow/include/arrow/python/numpy_to_arrow.h,sha256=z9KapsuoOSpWILPt9bea7GR4BL6AQ28T6DUO0mSkh3k,2760pyarrow/include/arrow/python/parquet_encryption.h,sha256=7KjqRuxbO0UxxHikTDvrLH733UVe0uvTf_bQMiI_xCA,5596pyarrow/include/arrow/python/platform.h,sha256=AtkGgpUVqPHs9Z8Tm07yb2zN_wOtb2cvlf-5xFBkc4k,1268pyarrow/include/arrow/python/pyarrow.h,sha256=TK3BtD9n3QKOQ9dX3LXbQc0hu9alWcufV0O93iQW7B0,2761pyarrow/include/arrow/python/pyarrow_api.h,sha256=7l0G4-_m9yALYoifsY8Z6qh3HHD0PgkpVSgCn_JaGU4,867pyarrow/include/arrow/python/pyarrow_lib.h,sha256=-70_Ckj3_0ImlzaXSJOE_d3w9pGM66lXiGPyln9c96Y,863pyarrow/include/arrow/python/python_test.h,sha256=ea32mM20uHySlygi9MtVxr26O-ydTZHCUQIlxaIMjT4,1195pyarrow/include/arrow/python/python_to_arrow.h,sha256=BoVytf6P7PBYXyznchElKZSFvEsFyimB-tLFdw0AUNo,2521pyarrow/include/arrow/python/type_traits.h,sha256=U7dW4sajVVmjXALsP-B8ZZwI4GgIUG3t-rbp2fwrHWI,10236pyarrow/include/arrow/python/udf.h,sha256=de3R8PhNJO5lT9oCqRxe8e2_SE3jBpHOkwbNqCrlgjQ,3104pyarrow/include/arrow/python/util.h,sha256=sP2CEGG7NNqwjrEeNKB-VFqkKxn5P2Tsc0jPUMXQuLg,1732pyarrow/include/arrow/python/vendored/pythoncapi_compat.h,sha256=bzMnlHTCfjk5DQRIxwytunYh5aQxU3iSElaaDyNnAY8,40900pyarrow/include/arrow/python/visibility.h,sha256=hwJw5sGrWJckQkNaAuLe4Tf-VDjQbXknyzNOVgZI3FI,1381pyarrow/include/arrow/record_batch.h,sha256=izRkj_fymhTMRZU6be1pYZideL-OMmxZJSIm0oOL71w,19039pyarrow/include/arrow/result.h,sha256=J4FgymBSzUGv-rt3_u42H7mkEbG6INj43m7yz-rzV7A,18425pyarrow/include/arrow/scalar.h,sha256=rsZGG1akIQJRRTw-_dlXLjkPT6NTONiwv70L_1zPxho,37320pyarrow/include/arrow/sparse_tensor.h,sha256=idHzdhkIi-On4hsAmfS1E-nrC81m9pvgJzqmp_yLFCs,25517pyarrow/include/arrow/status.h,sha256=r9B963ikSEuSQpbnuGBV-pl1Dtfi5Co0gFd7hI0AMUE,17392pyarrow/include/arrow/stl.h,sha256=2PEb_N_ZOWrwBJnFWah96GuLmEBc5Vl4_IFws9NCF2k,19343pyarrow/include/arrow/stl_allocator.h,sha256=nHRO3y4e2XzKmTK-ydgI9oezwMfdwtBTm8OZ3Eji5rU,5207pyarrow/include/arrow/stl_iterator.h,sha256=RelNQrADHupKWTuFBCCkqVlyuGHXU3yB6gcsDpQpra8,9953pyarrow/include/arrow/table.h,sha256=WC4Rdn_85Ja0TWDi2_dmWAJwrLbLfH7EH6jYaFpE3ME,15781pyarrow/include/arrow/table_builder.h,sha256=LRcLCL2iUrj6vF4f9AjPswVjqtqlMw7z_8VBAfUJeCo,3763pyarrow/include/arrow/telemetry/logging.h,sha256=T4n5CpX1cJBOzdvmIKfsNVpuaycMdL_31ZlQMV8hdKw,3401pyarrow/include/arrow/tensor.h,sha256=cmR5lJmIlCbESjwYJcqxjl2vZLOR4fHADrADF8BN6BU,9251pyarrow/include/arrow/tensor/converter.h,sha256=RZq0Try_kiZ085_d_CvhewMsd57InGb2TCeiveaf-Oo,2891pyarrow/include/arrow/testing/async_test_util.h,sha256=IrHWfPeIyhrgeTGHUPLt92LdsofmFX6khjngWsZv3dY,2262pyarrow/include/arrow/testing/builder.h,sha256=4x0bWOedaVomWU0m7dF99irOv3flR-_p-IMofTDZtwo,8556pyarrow/include/arrow/testing/examplefs.h,sha256=XcsAgKA5yT84mqH9QbS6jMIBc1SAK3XfBMayNV4_yVo,981pyarrow/include/arrow/testing/executor_util.h,sha256=38_rF-V_9zF1ttJMspkPiI-34VU1RDjg1ADBS8lUFHk,1885pyarrow/include/arrow/testing/extension_type.h,sha256=2xHmtD1bnK-u8Or38keTBvDuXhgKvsVyiiO-exlWHXg,8113pyarrow/include/arrow/testing/fixed_width_test_util.h,sha256=g6yB7RkziU7HEhNJnxOhkn2nE5HeXaFX3tbBX3q9_sE,3091pyarrow/include/arrow/testing/future_util.h,sha256=qIhi417OGMWSMUSDHjkGTYd-ihZbqw8ZSIRwJ01vbKg,6246pyarrow/include/arrow/testing/generator.h,sha256=zwEI_ZS-nxOIoYZUW_X9VE0wg5ILk8PzBpeo6kqXUDM,13525pyarrow/include/arrow/testing/gtest_compat.h,sha256=0NqH39my7m1FMpsrQYnxQx4bdEE10SCXZaysN6yjQFA,1311pyarrow/include/arrow/testing/gtest_util.h,sha256=wQmNPv3M5emk5jlwK8iMzkSnyis_bqC6hN1J47gW6Jo,24786pyarrow/include/arrow/testing/matchers.h,sha256=Z6jJW4fGlvtpc7oWpPlx5ynLk2tnLwF-dhv5fQIcvqc,16832pyarrow/include/arrow/testing/math.h,sha256=tV75NfvZEkSG63QmDik7LwXMewfiNPLO30g7tLtKC2w,1195pyarrow/include/arrow/testing/process.h,sha256=AzPW3Lh2R4sTm-RUUi4Od3aSba9zoLcS_zHBxztv4zI,1372pyarrow/include/arrow/testing/random.h,sha256=d6YdrWY6g-2-bNMK13HUO34Un8xuw9IjU6VeyPQA7hs,39071pyarrow/include/arrow/testing/uniform_real.h,sha256=mVaKsFtDPuQbawXatB3wvJtdoaerkRtSjKjqXQr_Aw0,2938pyarrow/include/arrow/testing/util.h,sha256=thd8s5lmp05ggMOz-5RKxsT8ndtSeDjQkjmyaNfZ6kA,6224pyarrow/include/arrow/testing/visibility.h,sha256=-wjc00QIhygXJa7tknbIL685AQ1wnyCPr-EtVzkzmq0,1606pyarrow/include/arrow/type.h,sha256=q0xWgRD6rdRiBYjwtk-tP7zQHLigL4WUC8q1kdHOtOE,97566pyarrow/include/arrow/type_fwd.h,sha256=uMAHSa-fnssQivd_shqzKC69YWbwrF6bdhqON6JQlYU,23281pyarrow/include/arrow/type_traits.h,sha256=nKDVrC4_4EBfyEbHQdVr4mgmAaSvdp6cJE2XPZfUwaA,56056pyarrow/include/arrow/util/algorithm.h,sha256=045EVzsC9rThlRVFaCoBmmtWZmFy5y28PR9yapn9sXY,1229pyarrow/include/arrow/util/align_util.h,sha256=nLJRf4rKiBo7phCBz52iwq99teLgx5N81LljnBQaqW4,11077pyarrow/include/arrow/util/aligned_storage.h,sha256=kzgHI1vt50KxTTjplj-tEgqfM7bHYDp_g5en11fzW9E,4355pyarrow/include/arrow/util/async_generator.h,sha256=0nHf1fKd6baTYt7OvGZanDeUuHrpGw7PUiYZ7NpZNGM,78185pyarrow/include/arrow/util/async_generator_fwd.h,sha256=Q8sueYZWwdxkaVDabuglHM3XuP--NerYgq8UxsVHgFY,1728pyarrow/include/arrow/util/async_util.h,sha256=1nnAJZ22iK7wSzmvZDo3PMhuWqJIt2qKdlXzTyhoCK4,19759pyarrow/include/arrow/util/base64.h,sha256=ejW_DZoTwU8Ue9EbcMHrYSO2eyb4Jx5ASpOQYeOw_rM,1136pyarrow/include/arrow/util/basic_decimal.h,sha256=Q2zfksUdYc92TL8po81I_aQOmwHTwZGPjqXvJM7cgek,33569pyarrow/include/arrow/util/benchmark_util.h,sha256=SG3gfwE-wGNZAwpL3TvffnSiZGM2cztV5xRBnbqy2Mw,7641pyarrow/include/arrow/util/binary_view_util.h,sha256=de4QaIJkyqzmbFmvfjTRnwbUSeCt0lE9dk8saJX9frk,4596pyarrow/include/arrow/util/bit_block_counter.h,sha256=88YY9S8rFAZBprmgyhUMMWwec1msILmy5i4mRn98ok8,20106pyarrow/include/arrow/util/bit_run_reader.h,sha256=vE98gml0xAW53LeqwhcvA506LlpUiOX2X6j1fysdMTI,17248pyarrow/include/arrow/util/bit_util.h,sha256=c8ZkGllV3w7QNIU3fD3VjSwjo0YO6PZTqO0dV-rlRiA,13605pyarrow/include/arrow/util/bitmap.h,sha256=Q2XNjZWQTq5RXDNQDIDmlUccMh-lE4J76DTFZyK9DPk,17443pyarrow/include/arrow/util/bitmap_builders.h,sha256=1POuk6MD2xSNz_Me26-nE12y2Dm2t0KAuzG9cbnpvwE,1582pyarrow/include/arrow/util/bitmap_generate.h,sha256=m6ZsNwx1GhsEktQr63NxXHQkX2B7Nti011XYsPg2xfo,3661pyarrow/include/arrow/util/bitmap_ops.h,sha256=s_nNrTNX8rzjPT_fwZS_sY5KUbHZL4ylggPBDnEWlSQ,12151pyarrow/include/arrow/util/bitmap_reader.h,sha256=-EePBZDJyoF1GDQLHi5a9GK6rPQ-NRZS8iZZUSw6WmE,8392pyarrow/include/arrow/util/bitmap_visit.h,sha256=myn8k66VrvZnL6R6VW6IDPTfO68VxjbJ8Up5IuSjFL4,3470pyarrow/include/arrow/util/bitmap_writer.h,sha256=JmPa3oUsmKnPJ5WzXzTyX8Qkxw3iN3m-hCaMAeKmISU,9386pyarrow/include/arrow/util/byte_size.h,sha256=Pd2c_3a0IeSOUevhPIlXNkDmgoB06g4c9YCsuRwwSKM,3997pyarrow/include/arrow/util/cancel.h,sha256=SgAy5S0TBISnCypp4R_OI-jPUQ997qtsLOSdXo8l5bM,3659pyarrow/include/arrow/util/checked_cast.h,sha256=SR9Qg8NuLSBJw2w1UfgeGvCfT8k7wrbN7BzADQOZfAU,2076pyarrow/include/arrow/util/compare.h,sha256=hNfInJTqu-lF1lHGh00PjBgNGCelWL2bCFSBDTQiHaA,1982pyarrow/include/arrow/util/compression.h,sha256=prMIcHQlbjwVP9wBtscNwtxDP6NSCqBJOWyVjefY9Jw,8859pyarrow/include/arrow/util/concurrent_map.h,sha256=wMi9WDHfRuJ_aSFgcJPpsVwGJ9vIJ5agaZ3rVUlwGe4,1775pyarrow/include/arrow/util/config.h,sha256=bbjfStr3lEITe5QJogqzdFzpk2AXJZ43eOaEjlGRbtk,2085pyarrow/include/arrow/util/converter.h,sha256=5usZLnQCdbVb8CTW9Fju5eWJ7d073CFjFw3xWLMBZQk,14717pyarrow/include/arrow/util/cpu_info.h,sha256=NRy2aAOFSiBQXI9KLUv88f7v9lDLjpmfmtulDdvG1OU,4506pyarrow/include/arrow/util/crc32.h,sha256=4gN0M-SRnxaGKci2ATPbMWZG2TG3YULXjaTpadV0Udk,1337pyarrow/include/arrow/util/debug.h,sha256=CPB_oDOuZ_u89e9wM8bGn88mGvClgfa7UDxDph6v9sY,971pyarrow/include/arrow/util/decimal.h,sha256=cEQRH5x5kN_MAsWNOPCLjz57QjW4ErfppMHG4b-0EOA,20291pyarrow/include/arrow/util/delimiting.h,sha256=JYe9YcWMeFT_ISuojx_VgVqOYLvZ2TiiR2sNn-WdeBQ,7317pyarrow/include/arrow/util/endian.h,sha256=PPai9ig8DtGVouKksjTq7H_anm0BjgoTMaVTkWlMKWY,8236pyarrow/include/arrow/util/float16.h,sha256=3RfWoQ0sIPCk2yXniIYw-g7X-EEmaos_IG9z8cnXCmQ,7454pyarrow/include/arrow/util/formatting.h,sha256=3D0xE7sTcJR6XEUb12LKSqL-A3bX_Pyp1oVkPScjCwQ,22516pyarrow/include/arrow/util/functional.h,sha256=4ljKXSWX3G_lBT2BfLXuG44pzZwVKeaojpLWCniqKyc,5612pyarrow/include/arrow/util/future.h,sha256=tsSVDEH2dhXKyvIKl6R9BVBolpPdZXoRRf2-YRbtdxg,32296pyarrow/include/arrow/util/hash_util.h,sha256=2oGOxsXConsLB27xX8-81MJxj9_Cv7fAYGs8J1JMvsQ,1918pyarrow/include/arrow/util/hashing.h,sha256=QU8qDKGxTguDcHB5r3Lt5hEC9ErU88SSG7kx7V-yX3s,34574pyarrow/include/arrow/util/int_util.h,sha256=zTOAq57M4pUe469WpnW6I5hNtxe3vGRHlZWhngA1DzM,4859pyarrow/include/arrow/util/int_util_overflow.h,sha256=7eLu26N5xY2VYM8aSJOZyfmwqIc3IdMXsshsjmuge74,8218pyarrow/include/arrow/util/io_util.h,sha256=C8o-gwiYAEMHsFa5LTbC70kaHYZQxa8Zpy3lw-4okCQ,14098pyarrow/include/arrow/util/iterator.h,sha256=FymwfXvx9akIj1hAvLgrFQ01BWJbvAv4xx06TNDc9dc,18345pyarrow/include/arrow/util/key_value_metadata.h,sha256=wjU6uQGcSmy-YFqMs6rwLP7E4X-0IFBjPrWZstistzQ,3590pyarrow/include/arrow/util/launder.h,sha256=C3rNBRh4reuUp8YuRdGQU95WPc8vl4bAY-z5LXgDiuA,1046pyarrow/include/arrow/util/list_util.h,sha256=_OmtsDqe-mnZ_7tVWxB2yHdgCJhpiME_RP3nXHzKbdI,2028pyarrow/include/arrow/util/logger.h,sha256=p9i4dNgne36LWpFmNSYBYgTQ4kFSao20dJ40LgRRZKQ,6693pyarrow/include/arrow/util/logging.h,sha256=63wlnOug1zSd1ur7caDp0F0z2IG7QjHbUFGChE8f-nA,9139pyarrow/include/arrow/util/macros.h,sha256=Lw7nF138ryOXn0MLYMfE8nSHQF6bCYyuyrDZESthYdY,9289pyarrow/include/arrow/util/math_constants.h,sha256=2sfWoVc8syHz8X26XgBmejzXStl7hmvKiOh9622oUZA,1112pyarrow/include/arrow/util/mutex.h,sha256=9LL7o62MKzFo820dVYWKQB38aBZrQAmw8280HpdghkQ,1833pyarrow/include/arrow/util/parallel.h,sha256=_43wTVSrtJwOkRt3KJcJF1DyYHwhoWbWPsrAswftP-Q,3817pyarrow/include/arrow/util/pcg_random.h,sha256=nbXowfCJFiy4GjVfF9I8VvB6fxkyR5zNB1FKdnFsYTQ,1252pyarrow/include/arrow/util/prefetch.h,sha256=vaE4FPdscbtO0cPbzl8F1PzB1NDO18ytYlEmZCHDjHs,1251pyarrow/include/arrow/util/queue.h,sha256=X9vRZQX3YL_a2Lzwe-zcNNHguR7FoGYmD-Q0THqsCBM,1017pyarrow/include/arrow/util/range.h,sha256=WJ1v4BaQ4iMLuh-fgdGyWqY88rzR6Z9rqDQj5RC84XE,8725pyarrow/include/arrow/util/ree_util.h,sha256=NO71naM7twCfCrX52vPmWoNhL90XP4PFEdc6AI9-OCs,22397pyarrow/include/arrow/util/regex.h,sha256=Tj92CttOh2HxS0EKQ_9-sxMBAsQrDOUKNP0ngIJFdP8,1742pyarrow/include/arrow/util/rows_to_batches.h,sha256=PZNoLeMCfJJdeHVvUny0UHc5AtS0hctUCi7zUztJpeE,7120pyarrow/include/arrow/util/secure_string.h,sha256=OHFYcIsjjnbrBXJk_uHSZrGu7V9P7M9ArRtjclMNViM,2473pyarrow/include/arrow/util/simd.h,sha256=PpKm-aWpZYIYP0NnyGrQceOO9m3_7JbN4uro0IhIT9w,1679pyarrow/include/arrow/util/small_vector.h,sha256=hXkuEMONoYd7vFS_6lLPwP49SVdBpAhSlvMK-1d3PrE,14439pyarrow/include/arrow/util/string.h,sha256=UStQlZ3Fkhmwm5IcKDsbUABENDRnjV1cU5dRXnEv8IQ,5296pyarrow/include/arrow/util/string_util.h,sha256=iEAP9XR0KOD-zwHutsgVGeOw-fSqCv7p4exVPINhuS8,2382pyarrow/include/arrow/util/task_group.h,sha256=fI330NoJT8u84AEUA6pSxWrE7UBKn2LaM4DfPFoalqA,4362pyarrow/include/arrow/util/test_common.h,sha256=OqhWyOEVmWbzhr2JfiaMn1flC84pU6kHL5vYZV1bhUM,2981pyarrow/include/arrow/util/thread_pool.h,sha256=Q2KzKTxcikTEgdNAouFwjwsorFa3wE9IVkKqYd8o_Lw,25530pyarrow/include/arrow/util/time.h,sha256=_s6yyeTNkNPiLjtaWceItyD8_yGTx2GMiXj1ICVlzyU,3439pyarrow/include/arrow/util/tracing.h,sha256=sVfC_Rj2gwkWKVSKT0l0FOO5c2EGsfYwlkZX4d9ncxA,1286pyarrow/include/arrow/util/type_fwd.h,sha256=JeZ1muIiVKxHcAXzBikMCmk_7SxFz_IqmzuT6yY1F-A,1803pyarrow/include/arrow/util/type_traits.h,sha256=klLSN7GWceSMPE_BXlbK_TsFsHEBe29kw1gwOgo2Eew,2277pyarrow/include/arrow/util/ubsan.h,sha256=u9ALPU2KzP0xEcazRqv6I4SKX-k3ABbrXLDNSBcBwRY,3215pyarrow/include/arrow/util/union_util.h,sha256=PSssBiw-v-PDen_q75c6OkNO5PwyIPhGbf9PMJj7P2M,1211pyarrow/include/arrow/util/unreachable.h,sha256=O1TG4ozCYT3_xvDpJouKWrlFADIEpIemQ28y4DqIwu4,1070pyarrow/include/arrow/util/uri.h,sha256=D24zebazFcrKGt7iGpkcGQ87DuF-2AbjPKVkDlq9Nuk,3886pyarrow/include/arrow/util/utf8.h,sha256=flGZ786kHo33Xg_zw0zVA9GAT8jYdPUHTVhIPHGjOj8,2031pyarrow/include/arrow/util/value_parsing.h,sha256=p_7p_fUUw3jfUkiVnKADdHb3KCdJ7Xg2JQnc39uQHMI,30654pyarrow/include/arrow/util/vector.h,sha256=OKnWECz72otbpw6UZSzZIZHJXCXGb9IsPiFI-l3wODY,5609pyarrow/include/arrow/util/visibility.h,sha256=zuHLTwNcR34LcCtbhj1YXzfNL8NxO-3XHY_UgUJgdZY,3238pyarrow/include/arrow/util/windows_compatibility.h,sha256=Chme9fWRqYRzfIbLw7V_yeiIWd3F4dFeG6ImHHr4Xqw,1255pyarrow/include/arrow/util/windows_fixup.h,sha256=hjoh6zvB8u8OVUQqLtdcrmohMzoAoLy6XJFLxcfFhK0,1435pyarrow/include/arrow/vendored/ProducerConsumerQueue.h,sha256=Bz1ks3NDgXXLfT8TMUkE38RpMOSwKRRtwU1e37Y1CUw,6101pyarrow/include/arrow/vendored/datetime.h,sha256=tsFbz8LKBFzRzTEOAKZyWRbdFLfnCnZRCK9Tyi1PANs,1103pyarrow/include/arrow/vendored/datetime/date.h,sha256=fxQwHeOeCcN4Us8D_6i4cjRF4EZOSn5_fOqgQv3dwwU,237853pyarrow/include/arrow/vendored/datetime/ios.h,sha256=uicrj_LGA513a2MIQLpGfNaf4R1dilS-bXan7qkDN4U,1686pyarrow/include/arrow/vendored/datetime/tz.h,sha256=ymmYzeENAXEsUvQWQf-u3_n7AU7WpQ_H0fyESpo7z1M,85392pyarrow/include/arrow/vendored/datetime/tz_private.h,sha256=5Adfh-wKn9Y3dVaba3vSbIImV4xjok_2k0oLQwKGO1k,10751pyarrow/include/arrow/vendored/datetime/visibility.h,sha256=VCGKzhQOgL1zwGXKl_7lLULfSy0OsPt8FLWHwA4sOtU,1002pyarrow/include/arrow/vendored/double-conversion/bignum-dtoa.h,sha256=imGhcg0RywMsFNMYTqp6rlXw2HZCIAla8SC_n92gCqE,4358pyarrow/include/arrow/vendored/double-conversion/bignum.h,sha256=RnQ2CPL8Pt6fVCGh_8VDF11e_GyrrwO0IH0uMnTcsEs,5949pyarrow/include/arrow/vendored/double-conversion/cached-powers.h,sha256=jjwfR3bue7mNlE5lbTrFR2KlgjRew2OkmjBa7oQO0Qg,3079pyarrow/include/arrow/vendored/double-conversion/diy-fp.h,sha256=J-RgqH27jspT5Ubth9pTA9NAZH6e7n1OVhxModgi8Sc,5088pyarrow/include/arrow/vendored/double-conversion/double-conversion.h,sha256=J1Tl5-8aFY0A9SnaA9z5Q90jnMxw55illPIuE-jdD5Q,1804pyarrow/include/arrow/vendored/double-conversion/double-to-string.h,sha256=C-tKRi0IuLycXgS6CC1oiFkCroOo_-AO0VOjmfe0tlE,23925pyarrow/include/arrow/vendored/double-conversion/fast-dtoa.h,sha256=ZAho25fqeP3t2RM0XgqfhTBXQIIicACLpdyHHMRX3JU,4122pyarrow/include/arrow/vendored/double-conversion/fixed-dtoa.h,sha256=HLnpxkHjKldm-FBiDRbADYljJBSYbQGP4Gz-sVbiSJU,2828pyarrow/include/arrow/vendored/double-conversion/ieee.h,sha256=CVKA9RXSjv4ZygqDHMiF-H2hUh3QHQvp1GZYC3MAhkE,15281pyarrow/include/arrow/vendored/double-conversion/string-to-double.h,sha256=Ul6b-2R0pjUaAWNM3Ki4kH933LqrW6_XfPz4BSiE2v8,10906pyarrow/include/arrow/vendored/double-conversion/strtod.h,sha256=6xCRm47vmcghYJug5mhhTVbsZ3m3Y6tQfMehEyVZNx0,3096pyarrow/include/arrow/vendored/double-conversion/utils.h,sha256=wFRb5cGABiNoUSCnvKmdv_KIMcBtX1PX89tPFfvgbQI,15614pyarrow/include/arrow/vendored/pcg/pcg_extras.hpp,sha256=FEYzq8NFxPfdJyLs4kVtTBLkaD6iO71INz9EJnaxTdc,19784pyarrow/include/arrow/vendored/pcg/pcg_random.hpp,sha256=7TaV3nZhcwpf6XxlZ6cod1GaW5gm-iUn67t2fiMPNbA,73501pyarrow/include/arrow/vendored/pcg/pcg_uint128.hpp,sha256=DyavmKgq9ob13z--Lee8WKfiMBk1cvKhkZlDxQyQNOA,28750pyarrow/include/arrow/vendored/portable-snippets/debug-trap.h,sha256=9KphJ9gRtDT9DXR9iZ7aS23xa2T8tLmLsFEJMg0pLDQ,3081pyarrow/include/arrow/vendored/safeint/safe_math.h,sha256=HgcHut9A9VZGoZe6A-669uv1N8ydMJE9a3bJzZiOwFA,78099pyarrow/include/arrow/vendored/safeint/safe_math_impl.h,sha256=wzI4AvijLrtEg9aTtqoY1SQNOZ1XxsP5GyuN3juC6K4,61119pyarrow/include/arrow/vendored/strptime.h,sha256=q1IZi5CvyUp_PNzbQ4_XLroAV24VEovBEz2TkpwUJ9c,1212pyarrow/include/arrow/vendored/xxhash.h,sha256=MUwtyzu7xjkx9mBcS65SaDcCK7tgeqQgj-KYEMxcHWc,844pyarrow/include/arrow/vendored/xxhash/xxhash.h,sha256=PDFiHmNL4ul4A0wiSLDpY9JSrDS73RMulr1W9aNEW8s,279426pyarrow/include/arrow/visit_array_inline.h,sha256=XuQjuME8XZeJp7W86YuCsuoVVgmG1NulXAA0KJkmmB0,2446pyarrow/include/arrow/visit_data_inline.h,sha256=4MkdFVsrjhMyTDNrScQtOYV_nwzqR2ddSS2yYnbyLt0,12460pyarrow/include/arrow/visit_scalar_inline.h,sha256=KvNY0j8nE9gs_805LXMV3ATgvxvUqW4UeKpXUxR3rMA,2419pyarrow/include/arrow/visit_type_inline.h,sha256=jzNnCn_rcOi_StJ8drGPvvbQ9NebGx9x96KDrl4sPSg,5456pyarrow/include/arrow/visitor.h,sha256=NKos98j54uY9tdXzctI_n_nwFRrXNOwanxLDqDZONw4,8690pyarrow/include/arrow/visitor_generate.h,sha256=n2YKZW-5hY7ICQSwEUBZIYh2eg9ZoTfD54XRd9OlNDo,3324pyarrow/include/parquet/api/io.h,sha256=Ricq0d2R4QXHiGZCbjxZ_0F_QmKq0IrfTidNu5NoXPI,847pyarrow/include/parquet/api/reader.h,sha256=vnM5XDPn1TVsDJk4SDgb3ZU2Ta4vdrRzCpDWO90rYHk,1204pyarrow/include/parquet/api/schema.h,sha256=KsNJ529pEh7bGUa0rLUCcfanI9rW2uSTirgpvKq0hdc,855pyarrow/include/parquet/api/writer.h,sha256=UJZbY8QGVRMtAmozzjoM9TnI4gssqlNFUKCXBw2IfuI,1007pyarrow/include/parquet/arrow/reader.h,sha256=zVhAQabJlaz0AydvU6nHZmU9mKGSVBZheOkxiGa8yzk,18095pyarrow/include/parquet/arrow/schema.h,sha256=Mi56ul7itNS6NDbMpKOJCufjHVqaSY5_rbsNRNLE560,6204pyarrow/include/parquet/arrow/test_util.h,sha256=qCUHfC-7P2D32n2__AV35MbzKoL5KEgNHJQaiElFx6M,18849pyarrow/include/parquet/arrow/writer.h,sha256=0edx0fgyze6uxTgpDyacSljKMUay86pRqvIRQ7AZpXk,7005pyarrow/include/parquet/benchmark_util.h,sha256=emDpaIbtfUNlK0M2zMP-oTy2S2raQ-LpQULK_G74OtM,1758pyarrow/include/parquet/bloom_filter.h,sha256=sswrjMPSftey43AsoAA8JMtUHRak3DO3EBR3os5nj3M,17014pyarrow/include/parquet/bloom_filter_reader.h,sha256=Uds-nShfmAM0vyNDyWPtR8OTeGKtK3geO4Z-HpBFgCE,2890pyarrow/include/parquet/bloom_filter_writer.h,sha256=42Ajtm0uOSIcoE1-5Yeh4D8Nj18yw5qtO6i-GwoM9Uo,4341pyarrow/include/parquet/column_page.h,sha256=LsgnWdJ9PFttBgHcyfXNb7-xmbc8Liz3Z9XV1Ag6yNY,6999pyarrow/include/parquet/column_reader.h,sha256=84RUqQwA_LeLmzbdxBz3e3MtxM4Q2HXWncP1lC7B4Vk,19957pyarrow/include/parquet/column_scanner.h,sha256=HecBvh-z0n_1HJsD-GIdcGHQAvDOHKlLzppB9RBsD9s,8863pyarrow/include/parquet/column_writer.h,sha256=Sbrbp01FW4UQiE9SES9WOEGI67HgkLl5Zr4xH0DfFcw,12989pyarrow/include/parquet/encoding.h,sha256=e_BF06eatcpBbY_BCzVRQQoD0tI7a5T4EPp39G-E-b4,17711pyarrow/include/parquet/encryption/crypto_factory.h,sha256=NutbypTw9971ju95UkWtW-g8TYnR94TWZAnx5-dznPA,7064pyarrow/include/parquet/encryption/encryption.h,sha256=uvCsCxm8hQ20hg_M-HBzsp5ov_TiT75xHhJrbNUV51o,16558pyarrow/include/parquet/encryption/file_key_material_store.h,sha256=YzAVO3M2H5v5Fz2b_WlmB3GE5wVbMEnFTL3S9XPH6k0,2200pyarrow/include/parquet/encryption/file_key_unwrapper.h,sha256=VBuBwYeLqYHq_WGnjL2tfwB6mH3jjFVb-TpPKa6lb50,4717pyarrow/include/parquet/encryption/file_key_wrapper.h,sha256=xXlS-yyYhUW20S31REsSj5JxbVbij_td0WlPbgxNaYg,3778pyarrow/include/parquet/encryption/file_system_key_material_store.h,sha256=xAccp-7Il2UrnItxLmOE4ywhQKgeapyxVNwshDpan0Y,3695pyarrow/include/parquet/encryption/key_encryption_key.h,sha256=6dJNBYA_4Z_dyMph71Q5KI0axe-yzdjTnRgG_zj2OX0,2318pyarrow/include/parquet/encryption/key_material.h,sha256=kPTSIuRFYOnH4BCPIB33zG9hp5D2Ba-5kZVlq3rFnRI,6221pyarrow/include/parquet/encryption/key_metadata.h,sha256=Pc0nA9LW3Fc9NLMMxz7osbw8si2jSiOVTES-J-9R0y0,4003pyarrow/include/parquet/encryption/key_toolkit.h,sha256=xLHCsTK6bcrXd_MQv7GDTrLoZNeE_-WFb192LdYpcH0,4645pyarrow/include/parquet/encryption/kms_client.h,sha256=MM870qRC_yc4hkzx7xVPaPm12ErR8sqFgDTHLWHcRX0,3222pyarrow/include/parquet/encryption/kms_client_factory.h,sha256=VZ97CMgDQxx5oZWFGprjXsaM1hZ0wNudPmFU1_lniAc,1293pyarrow/include/parquet/encryption/local_wrap_kms_client.h,sha256=dW5Fe3lUHP8dmsSPDGMbldGl2GlnER4I9zWhCU6g_78,4037pyarrow/include/parquet/encryption/test_encryption_util.h,sha256=rYdlDq1nmZu3gsc7vPcBDVOwdxESyVcnVTDCNMPdmoA,5349pyarrow/include/parquet/encryption/test_in_memory_kms.h,sha256=c6GA-eObXQtCtzehYKr4uGMpjtLRUW0C5VIQQk8EynM,3743pyarrow/include/parquet/encryption/two_level_cache_with_expiration.h,sha256=2kNvixV36bYjUlUJquqnaaOO-NI7e8O3Vm1x-xDPyDA,4818pyarrow/include/parquet/encryption/type_fwd.h,sha256=dL8snyUwNjhTQE2FQ2dXAUjTboEXhH2JOehQovHfixc,955pyarrow/include/parquet/exception.h,sha256=TJbx6X_khxV6e61rUfHY0Pr65EoxKTu2xpvOAdh9BMo,6104pyarrow/include/parquet/file_reader.h,sha256=Z1RiOP74Y9tMv7kZ7FWX05IR05qzgSOTRKrY71pLOJE,11185pyarrow/include/parquet/file_writer.h,sha256=sakjyVxzBMhaQzO3JBtgYdGP7NgoTmiS0JwdaWBr5JY,9940pyarrow/include/parquet/geospatial/statistics.h,sha256=77ieKxQcY46FB7jgCZhk03fa2G_J2S9NJ8R0_JU-qGs,8892pyarrow/include/parquet/hasher.h,sha256=ry5YmXX9EUgyH82W9c-9uF1fklvslK5U28u6wVbfHtM,5428pyarrow/include/parquet/index_location.h,sha256=Gg8R4Fv-3pZ_eMrQhGBA4dYwA3kJHo2vW--Jt3SIcZY,1477pyarrow/include/parquet/level_comparison.h,sha256=5z4fUJJPWq9W60l2CsAI7T7E2auGYD7m0fpR5rfLmsw,1306pyarrow/include/parquet/level_comparison_inc.h,sha256=r20_6Rv5L7UmFGJ68f-JaZ5hLXb87wvZa80hZNQoF-I,2494pyarrow/include/parquet/level_conversion.h,sha256=OsuqK1xiUnEnOLPKwfm9X-pXTaXRMlDIkj3lwGb2ggI,9432pyarrow/include/parquet/level_conversion_inc.h,sha256=MoNU-tbJ3OfcyrkJOOYb5NjxDECMc-552JbSQfJYUCE,14218pyarrow/include/parquet/metadata.h,sha256=UcuSl7ofRNSBSPN4M72WQKc73Ru4kdopdTTcVTJ4HUY,20168pyarrow/include/parquet/page_index.h,sha256=3rj9g0DBzZOi--k3-KKE4z8lPdpf1jAy5W16FKRrBPo,17381pyarrow/include/parquet/parquet_version.h,sha256=CDmBZWMAI0X6COT5T9CaTp92arODokmFRIh8iei-6fM,1164pyarrow/include/parquet/platform.h,sha256=D1rXP6WsZVd6_plYPKsfu4PZe62UoTKVGe2zVWPqluE,3939pyarrow/include/parquet/printer.h,sha256=hXqzwuj5p1oKY2awZkVOq7qXx-Rsoo6QPH1oTE94AHU,1548pyarrow/include/parquet/properties.h,sha256=k9eNK3lTf3e9bYkrHACN_nUhogh7pe8i67_nJhioODY,63707pyarrow/include/parquet/schema.h,sha256=0pYU02LzEkEjiZm4MJ5BxNXO7Kp4BzA8kiCsXeez6Xg,18877pyarrow/include/parquet/size_statistics.h,sha256=7zDvHVQDnwuru46tRyrEubQBKX58k772tSd9aV0ArpE,4268pyarrow/include/parquet/statistics.h,sha256=a_PxrYdM3fiddB5-FvcoKQ7tNOi5aSEYi6AOefBHJRw,18025pyarrow/include/parquet/stream_reader.h,sha256=WoymH1axupulU3yG8XyClLmM5kmkVyPVKEDspqduBBw,8856pyarrow/include/parquet/stream_writer.h,sha256=N8JV3vY3y_67S4HuiO2BNkW6lLjjG8ASeJ4qKZ7V138,7807pyarrow/include/parquet/test_util.h,sha256=VHF8cjNduIW8P6Kw2sLUJmvbL7tmTG_kWIWOaC7G5OA,33538pyarrow/include/parquet/type_fwd.h,sha256=N_LtjEcS9J2DV4ylDiXzdmlKRTlcw1YzkzZu82Mizfs,3128pyarrow/include/parquet/types.h,sha256=CI3ErAhGJK_8TJri7g3R4m2K2gziUvCBhpU4KoF95PY,27720pyarrow/include/parquet/visit_type_inline.h,sha256=GNgE2_vYIFRluWedQjM55GXJ6hVp8qdYDBY0KAtuvg4,2321pyarrow/include/parquet/windows_compatibility.h,sha256=xIEGHW354URgdIP9A4V303TJL8A1IkCEvp08bMKsHTU,897pyarrow/include/parquet/windows_fixup.h,sha256=DpyWCywx8YIqouun6BJcgMrHFMTCBgowWdJ1mnJnQ2s,1052pyarrow/include/parquet/xxhasher.h,sha256=efek72ZxiECzupXj5n-sUE1GPe_NIcfY5qtDie6YHZo,2130pyarrow/includes/__init__.pxd,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0pyarrow/includes/common.pxd,sha256=me4htiESPFmZok1M8eDXk9OS-7p9Om_1pazNowvttuc,4950pyarrow/includes/libarrow.pxd,sha256=3XunFqhxlBrJBopMzXvp49ZEmvl-41qEmVcJ2zMFSXg,122352pyarrow/includes/libarrow_acero.pxd,sha256=c84RdYfIuFWW_36-1RELJsowfQwXhgUxbdC_xKQyFCI,5298pyarrow/includes/libarrow_cuda.pxd,sha256=0fRcHbCZY_gFdwIXIElnpGvTxeA5xVxZH1-vwZh16SM,4942pyarrow/includes/libarrow_dataset.pxd,sha256=cqV1LQvfsKtRwePFaWUh8dCFlb6JED8tLGCsrtS_Ml8,17270pyarrow/includes/libarrow_dataset_parquet.pxd,sha256=PW8g6CD2yjwgwoJgYQ9Ntg2e2v6Vfu4AYL5kiM4sq0Q,4584pyarrow/includes/libarrow_feather.pxd,sha256=MTJUDQbfKP8Ir700Fobl7xcbjX7WcrsUV4mxFXlfwn0,2140pyarrow/includes/libarrow_flight.pxd,sha256=QO7RJ5TUVA65gtkJLenjIOEW2eIbPuKLw-nGWD9oHRY,24724pyarrow/includes/libarrow_fs.pxd,sha256=tbUP-pPwCW3iErej-zuN7eMr99wyEkpXRfOdBaD8FBw,15525pyarrow/includes/libarrow_python.pxd,sha256=TAmCEK0BAkKwLFtbor5udsFhrtl8BNc76j7K4DozEJ0,11690pyarrow/includes/libarrow_substrait.pxd,sha256=PtgwVFqsCQBzCHzK-VqhQOdTyU9J4SziQ_lnxRwChfs,4061pyarrow/includes/libgandiva.pxd,sha256=o28v4Q43dYXQEcwldKO6RYs0tke2U6GZVxQmjq4rAt4,11530pyarrow/includes/libparquet.pxd,sha256=GxpFnNYuWGomnQ6VNLl4FkXXmCnAa04SHtjugleX4T4,27894pyarrow/includes/libparquet_encryption.pxd,sha256=oyvw0ZLyLWrHwMiOt6mbWYyTKb3rN9kmjOMMW1P2EsM,8690pyarrow/interchange/__init__.py,sha256=DH0bwbKpdjD1WCW1VinnXEuVLY098uHKkirv7DFc9JM,845pyarrow/interchange/buffer.py,sha256=NF_GU1uQ6INqHqCwzY6XQQqRxKDh6znEeDHiRqaEIQ0,3359pyarrow/interchange/column.py,sha256=n9f3mlViqUFOa3Kofdwoo52qC-WYVpyF2YilRsl4uaw,19350pyarrow/interchange/dataframe.py,sha256=tmSMmBvBAc-ZSUzE8tBNbvQLHuuxLuBkMkK6KYwtS8M,8405pyarrow/interchange/from_dataframe.py,sha256=nLwcr3H66Pq0A4EI0KRrfrVnZP9e3h70bsNUVHFeSz0,19072pyarrow/io.pxi,sha256=aTgp-dR1eN5fwAV1PJnCLKBcYR2HPDWiLDTppie2xgU,87884pyarrow/ipc.pxi,sha256=NTZxt0qAu-HIjDbbczp91sKUJoJQBz48z-IxcKn9b6w,44752pyarrow/ipc.py,sha256=ssicn1x2jRZt2m1nQZ4sB70sa1FB3d8PoqiOnWO-tzg,9603pyarrow/json.py,sha256=JMEXB5jNZp-DOYmGBrzs2RtwOCLdKCRa3E5kUfH0Ceg,869pyarrow/jvm.py,sha256=_cyen6Bi-cBUlg-OAb_RTG6nj2W57kMrR1HuAWVcEQs,9577pyarrow/lib.cpython-312-x86_64-linux-gnu.so,sha256=L7JKWLCXPrGbI2zC6kR-NWtKeC7qOaJ0FFsvDOhjaMI,4483984pyarrow/lib.pxd,sha256=TBZ-VMbqGwg-13X2_6hkErgoDeBfs5RAV_Mrvt7U9dM,18145pyarrow/lib.pyx,sha256=ho6Qf9pHZ6987dSs3Sj5jJ4r3wtZXYv8GrScGj9_kWY,6342pyarrow/libarrow.so.2500,sha256=1Ihf3ep1meib_i94XkMIt3Va3YTlfpo_9PPlASQcopI,55368864pyarrow/libarrow_acero.so.2500,sha256=NQuAbYApkIAdF5zDgc_ICxMK54F0eh4C8pweMyk3oGg,1998872pyarrow/libarrow_compute.so.2500,sha256=hHzYyKqpx37lmEiRWJuhPoCTO9hmiwbTvzwGhy8mDn4,18557840pyarrow/libarrow_dataset.so.2500,sha256=yH8LzTLrlCOCnbvl4e1mUfe8zsPc-71eqKWJ8G4s0TQ,2422608pyarrow/libarrow_flight.so.2500,sha256=knNn4y0skAE5mq32TfmGLoIPnblQVS5BWJMazaG44tw,30025232pyarrow/libarrow_python.so,sha256=Onp8V6zojYitmMlsgtCtRRE8IU7axgrTRae3nSkV0Gg,2370392pyarrow/libarrow_python.so.2500,sha256=Onp8V6zojYitmMlsgtCtRRE8IU7axgrTRae3nSkV0Gg,2370392pyarrow/libarrow_python.so.2500.1.0,sha256=Onp8V6zojYitmMlsgtCtRRE8IU7axgrTRae3nSkV0Gg,2370392pyarrow/libarrow_python_flight.so,sha256=vvlPNUftdIZS5z52vdp2F4X1M5I7ANwCxny3Tcpm7HU,104024pyarrow/libarrow_python_flight.so.2500,sha256=vvlPNUftdIZS5z52vdp2F4X1M5I7ANwCxny3Tcpm7HU,104024pyarrow/libarrow_python_flight.so.2500.1.0,sha256=vvlPNUftdIZS5z52vdp2F4X1M5I7ANwCxny3Tcpm7HU,104024pyarrow/libarrow_python_parquet_encryption.so,sha256=ALfP1LLwhTc56ZuLL7ukIKTXAdzHZGFF_wntBl-qzZY,38448pyarrow/libarrow_python_parquet_encryption.so.2500,sha256=ALfP1LLwhTc56ZuLL7ukIKTXAdzHZGFF_wntBl-qzZY,38448pyarrow/libarrow_python_parquet_encryption.so.2500.1.0,sha256=ALfP1LLwhTc56ZuLL7ukIKTXAdzHZGFF_wntBl-qzZY,38448pyarrow/libarrow_substrait.so.2500,sha256=-rxZt6o8m-K51RrXy0JWjubsEcrzjy81CSG5u3P0UKA,5874392pyarrow/libparquet.so.2500,sha256=4VbnWreNypdth4gCHeiuL0sBGfQNgefNflKz30dlORU,12803744pyarrow/memory.pxi,sha256=cZSlJ8Brteb9aWa7VzvCrpnw26wRkplF9KtF2nqtH8M,8806pyarrow/orc.py,sha256=yDp3vD4gOdOsOBmXKFe24Kq3xO3FDBfIOHvsvzQUkKY,12602pyarrow/pandas-shim.pxi,sha256=RM38cacj1TlQ5IN79CprIr4AUbbY5GiWdiLsnx0zn3g,8817pyarrow/pandas_compat.py,sha256=PYs7CeXhQYPlXDQp7BFRa6CC-DWmtqjjmE66wwDTvMo,46184pyarrow/parquet/__init__.py,sha256=4W64CbvwvO60tG58nfNtyCwMVCfuPumtu82p-kiGPaE,822pyarrow/parquet/core.py,sha256=FJz8pF-XZ1Qaa2qcAC2lvsw10Qb26sNesItoeLFThYs,98264pyarrow/parquet/encryption.py,sha256=_LKrTZ8GE5j0c8ABRUxcu8O1uEvzLr2AOJJdJf2Vx3I,1295pyarrow/public-api.pxi,sha256=G6tk0gOWMBoQaQGo4lyp0OLSkqEZqMhB0z27MoQR3rU,14064pyarrow/scalar.pxi,sha256=dD-6Bml5cymunOPBdLxcZrMQRbrUtOlUEjVHLeK_1Yc,54828pyarrow/src/arrow/python/CMakeLists.txt,sha256=D4Ypror_508aAd_juYkrS9Qu2maeirK4QXzwGEZEj0M,855pyarrow/src/arrow/python/api.h,sha256=2XyYOFAmorPGXrTVYZkiKL67nuH8w1ha6D1reU7K-Vs,1179pyarrow/src/arrow/python/arrow_to_pandas.cc,sha256=0lQ5wG_eqXa76QfuHdCr7Uex1yDM7nneD5G62ykDCzg,96642pyarrow/src/arrow/python/arrow_to_pandas.h,sha256=jQiSTN8IL95onwaclaWqCR5Nb2RHrBtubRyEOJR9eRE,6215pyarrow/src/arrow/python/arrow_to_python_internal.h,sha256=nQXPZTL3xa4Sm-a-Gv-8bpFs-qAOZHkqWmA_m-dSLVw,1740pyarrow/src/arrow/python/async.h,sha256=C0f8YYmgwBGgDau4xEFsdjukiZB4YvpylETHEZryHOo,2352pyarrow/src/arrow/python/benchmark.cc,sha256=z6qYRx4qMuNXPaC8fuPJlQd92aosMN85u1aD50R1-UU,1293pyarrow/src/arrow/python/benchmark.h,sha256=f-kzyMOlPKDse2bcLWhyMrDEMZrG_JHAPpDJgGW0bXU,1192pyarrow/src/arrow/python/common.cc,sha256=wS4R2yRykimmZMB_s3rxRYyRIlGDwjWNy-Zg95XKJl0,7708pyarrow/src/arrow/python/common.h,sha256=P0VTk_VUwki39_Qa_0CRlUAFKA6meOIXRV78BYuU6mc,14914pyarrow/src/arrow/python/config.cc,sha256=h5heY5rTH0VSrD5_KDFYknbGSNElktHFCtkqUDvNfZI,1393pyarrow/src/arrow/python/config.h,sha256=wAu5-RRtzqKaBwYm7h1iBsItuYN60b3IQMZFzGn0GQU,1298pyarrow/src/arrow/python/config_internal.h.cmake,sha256=WCieVYP1P2yLWsdeBKdmDsTlyn_BMDd1gXCu-kpIBYY,890pyarrow/src/arrow/python/csv.cc,sha256=ql5AY76AqiFksWsrmzSl551k5s9vS8YcmypM2A9rhw8,1803pyarrow/src/arrow/python/csv.h,sha256=QxU3B-Hv_RsoEcMGS9-1434ugouL2ygC64Lq6FgviNM,1397pyarrow/src/arrow/python/datetime.cc,sha256=6NmqTIuQ3_w_XeXenGPtgypO1D3XyXW8N9qoyyRSZb4,23602pyarrow/src/arrow/python/datetime.h,sha256=hK7BHBuqAS8wddgO4psIz_hwZoGlLvkfWS__9Q19aAc,7960pyarrow/src/arrow/python/decimal.cc,sha256=4CNaLDOWZelTllSIPdIKDlIhUy6AgKJxKG0WmzJyq94,9699pyarrow/src/arrow/python/decimal.h,sha256=K9ScmzSa7XCuuwpXKnq0GPbRDTuRU5yXfWr9zGtOchc,6362pyarrow/src/arrow/python/extension_type.cc,sha256=SOhG7u7MNnJkSe-dWi5-ZsGuzQC-M7PihaYFAr6x6hA,7033pyarrow/src/arrow/python/extension_type.h,sha256=0gzb42y_mbw4fsYs3u8cwPFLBRlG-kkHQLgbvGtrY0U,3181pyarrow/src/arrow/python/filesystem.cc,sha256=0twavI91TE20Otq5kkVUwnN5sindU_mBWoVAvz1ZMgI,6152pyarrow/src/arrow/python/filesystem.h,sha256=FG0AcLekqaDf9IQPqKixAfIcY_ZLgIKP5NvvXdtBVUM,5126pyarrow/src/arrow/python/flight.cc,sha256=tL3nFVTjDlmiuqDOSxf7HODdpqIMUSbSsNc1vaveP1w,14192pyarrow/src/arrow/python/flight.h,sha256=t4ZD8gWaubbO_mBDv0XZ58TCo1VQl0hzHn1_7w4U64I,14450pyarrow/src/arrow/python/gdb.cc,sha256=hkATQV6YlpxkBaLfY9_C24XJ6qYSg2T0DfQX4XfpvFY,22556pyarrow/src/arrow/python/gdb.h,sha256=H-qvM-nU8a_3Z5tk8PvppTwQtBMSZhQKQIVgRAsRfFg,972pyarrow/src/arrow/python/helpers.cc,sha256=51xLIMHgEd-GGeNk9ZJ_A57_dDARtBAYBFWhDnl6ouc,17468pyarrow/src/arrow/python/helpers.h,sha256=0VW-r2f52cJHjf2v4FLuTSXkHDq9TF79xyU15DZznI0,5534pyarrow/src/arrow/python/inference.cc,sha256=cuSNCjUJgukZLcHJnP0gWy89f7hcFYcpovoXaC56sY8,26872pyarrow/src/arrow/python/inference.h,sha256=FUFvB4Zy7V-tueXdmbDcqTeLK4xj5GZEeRW5yhiJlsU,2038pyarrow/src/arrow/python/io.cc,sha256=k2pgFsCFXaI7naqXcxDtZJJp7K06NnEhsDEoMQvbaxc,11948pyarrow/src/arrow/python/io.h,sha256=4jGnodpSUlnVqAVh9fWId7H4WldlLPkXyroABpdaW6w,3858pyarrow/src/arrow/python/ipc.cc,sha256=3D9iMbOFHlhNXX4432wsfbfjWvDryZWgdA0Ak19V_8Q,4472pyarrow/src/arrow/python/ipc.h,sha256=SZbw6jCCqLiLNCY3k632GmwHeD_r_xrDS0dhqV49VhY,2259pyarrow/src/arrow/python/iterators.h,sha256=Ugfm3JvetAH0l-oAjjpZfhrUBqRimVMaw4-xusvqLSg,7327pyarrow/src/arrow/python/numpy_convert.cc,sha256=gnOMBzZXlS-hjXkRTcuLEzP6ZSubo24yGmIJEHKFilI,21265pyarrow/src/arrow/python/numpy_convert.h,sha256=y13eHwfe1lJKzadoTr2-GyX6xPsE6Z7FN31s7PN-2Rk,4870pyarrow/src/arrow/python/numpy_init.cc,sha256=cJKOH946T7VCcB-gVIoGgfbWTrbj3FPkI4TgnsLTf7s,1178pyarrow/src/arrow/python/numpy_init.h,sha256=FniVHP7W2YBlenoMYhQrODvoqqvDMSls2JANGtNPQts,999pyarrow/src/arrow/python/numpy_internal.h,sha256=1R_tNINnHYMGNTA5k_BMbGWFlA297f3Yj4ufrhm-yiE,5320pyarrow/src/arrow/python/numpy_interop.h,sha256=rI6ek8JTOYtjo7gEADSDBS6QuAOHa2A0YQPZ2GeypFw,3418pyarrow/src/arrow/python/numpy_to_arrow.cc,sha256=uuQo_rewpuc882cuFy-uMmtRLR1iMT3Ew3JystLBXfc,31961pyarrow/src/arrow/python/numpy_to_arrow.h,sha256=z9KapsuoOSpWILPt9bea7GR4BL6AQ28T6DUO0mSkh3k,2760pyarrow/src/arrow/python/parquet_encryption.cc,sha256=5ilofycsTj6IP0RGCUZFHucHN53oZAmx32L6el7RQh0,4408pyarrow/src/arrow/python/parquet_encryption.h,sha256=7KjqRuxbO0UxxHikTDvrLH733UVe0uvTf_bQMiI_xCA,5596pyarrow/src/arrow/python/platform.h,sha256=AtkGgpUVqPHs9Z8Tm07yb2zN_wOtb2cvlf-5xFBkc4k,1268pyarrow/src/arrow/python/pyarrow.cc,sha256=vukhk0aEmqI2QZ54XMwyC3930mJHGUVSSW49GSgifWw,3683pyarrow/src/arrow/python/pyarrow.h,sha256=TK3BtD9n3QKOQ9dX3LXbQc0hu9alWcufV0O93iQW7B0,2761pyarrow/src/arrow/python/pyarrow_api.h,sha256=7l0G4-_m9yALYoifsY8Z6qh3HHD0PgkpVSgCn_JaGU4,867pyarrow/src/arrow/python/pyarrow_lib.h,sha256=-70_Ckj3_0ImlzaXSJOE_d3w9pGM66lXiGPyln9c96Y,863pyarrow/src/arrow/python/python_test.cc,sha256=7WZnh-qh0SvzAin20DHAAd_vdcj2EZQYCNhgqyECdN0,33047pyarrow/src/arrow/python/python_test.h,sha256=ea32mM20uHySlygi9MtVxr26O-ydTZHCUQIlxaIMjT4,1195pyarrow/src/arrow/python/python_to_arrow.cc,sha256=r_QfY1QO8mlBQSOjFeevCpKnOO22OBfiwlcMDCRCI0k,50022pyarrow/src/arrow/python/python_to_arrow.h,sha256=BoVytf6P7PBYXyznchElKZSFvEsFyimB-tLFdw0AUNo,2521pyarrow/src/arrow/python/type_traits.h,sha256=U7dW4sajVVmjXALsP-B8ZZwI4GgIUG3t-rbp2fwrHWI,10236pyarrow/src/arrow/python/udf.cc,sha256=tRd7cPh66N5tU4DdO70F8x1FqODcGZ3HtrYjF4BSs9w,29820pyarrow/src/arrow/python/udf.h,sha256=de3R8PhNJO5lT9oCqRxe8e2_SE3jBpHOkwbNqCrlgjQ,3104pyarrow/src/arrow/python/util.cc,sha256=Tkgz17XmYFzVybvQ9Vo9LChVo98R5BlbjqCNMHk86DM,1852pyarrow/src/arrow/python/util.h,sha256=sP2CEGG7NNqwjrEeNKB-VFqkKxn5P2Tsc0jPUMXQuLg,1732pyarrow/src/arrow/python/vendored/CMakeLists.txt,sha256=02XvDJAdKiajCEBOmnMKBpmzbRU7FPkNdlNXtw0-A24,837pyarrow/src/arrow/python/vendored/pythoncapi_compat.h,sha256=bzMnlHTCfjk5DQRIxwytunYh5aQxU3iSElaaDyNnAY8,40900pyarrow/src/arrow/python/visibility.h,sha256=hwJw5sGrWJckQkNaAuLe4Tf-VDjQbXknyzNOVgZI3FI,1381pyarrow/substrait.py,sha256=yOMgCb-A5XW9t2DKgutRydDHpFvQkiNNq6ZIu0hIUB8,1230pyarrow/table.pxi,sha256=USQXmA71n23-gCqfMOjAcKXOVMWvdurDqiLSJBDoAv0,209181pyarrow/tensor.pxi,sha256=HOsUF-VazhZ2avZEa9705QM1l1uaLNOxg53NBNTT3L8,47895pyarrow/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0pyarrow/tests/arrow_16597.py,sha256=DNb41h9E3ITGvAJJu86i5SfsKrwstQJ0E5gT_bpTS_k,1354pyarrow/tests/arrow_39313.py,sha256=0pyBixoX38fldTPO1Vwshi_H0XBACrz8esYoL4o71KI,1431pyarrow/tests/arrow_7980.py,sha256=tZKb_tRLfxHaosDk9Yu2GLEsJjMaruXD5CKhbK_6Hq8,1094pyarrow/tests/bound_function_visit_strings.pyx,sha256=vDEFoNYR8BWNkCntKDuBUT8sXNRBex_5G2bFKogr1Bs,2026pyarrow/tests/conftest.py,sha256=jmJZmgU4VIogZBTuS7vGvmPdDp9Bh0lkIvJLW44K3Do,10041pyarrow/tests/data/feather/v0.17.0.version.2-compression.lz4.feather,sha256=qzcc7Bo4OWBXYsyyKdDJwdTRstMqB1Zz0GiGYtndBnE,594pyarrow/tests/data/orc/README.md,sha256=_4X5XszZqQtWAVEz5N1Va4VyyayGQgNDKrcdMX2Ib4s,932pyarrow/tests/data/orc/TestOrcFile.emptyFile.jsn.gz,sha256=xLjAXd-3scx3DCyeAsmxTO3dv1cj9KRvYopKe5rQNiI,50pyarrow/tests/data/orc/TestOrcFile.emptyFile.orc,sha256=zj0579dQBXhF7JuB-ZphkmQ81ybLo6Ca4zPV4HXoImY,523pyarrow/tests/data/orc/TestOrcFile.test1.jsn.gz,sha256=kLxmwMVHtfzpHqBztFjfY_PTCloaXpfHq9DDDszb8Wk,323pyarrow/tests/data/orc/TestOrcFile.test1.orc,sha256=A4JxgMCffTkz9-XT1QT1tg2TlYZRRz1g7iIMmqzovqA,1711pyarrow/tests/data/orc/TestOrcFile.testDate1900.jsn.gz,sha256=oWf7eBR3ZtOA91OTvdeQJYos1an56msGsJwhGOan3lo,182453pyarrow/tests/data/orc/TestOrcFile.testDate1900.orc,sha256=nYsVYhUGGOL80gHj37si_vX0dh8QhIMSeU4sHjNideM,30941pyarrow/tests/data/orc/decimal.jsn.gz,sha256=kTEyYdPDAASFUX8Niyry5mRDF-Y-LsrhSAjbu453mvA,19313pyarrow/tests/data/orc/decimal.orc,sha256=W5cV2WdLy4OrSTnd_Qv5ntphG4TcB-MyG4UpRFwSxJY,16337pyarrow/tests/data/parquet/v0.7.1.all-named-index.parquet,sha256=YPGUXtw-TsOPbiNDieZHobNp3or7nHhAxJGjmIDAyqE,3948pyarrow/tests/data/parquet/v0.7.1.column-metadata-handling.parquet,sha256=7sebZgpfdcP37QksT3FhDL6vOA9gR6GBaq44NCVtOYw,2012pyarrow/tests/data/parquet/v0.7.1.parquet,sha256=vmdzhIzpBbmRkq3Gjww7KqurfSFNtQuSpSIDeQVmqys,4372pyarrow/tests/data/parquet/v0.7.1.some-named-index.parquet,sha256=VGgSjqihCRtdBxlUcfP5s3BSR7aUQKukW-bGgJLf_HY,4008pyarrow/tests/extensions.pyx,sha256=UVfIEnGYy2SDiYkMW6jp6zTo1tvO7gUREH4OGEWjU2k,3046pyarrow/tests/interchange/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785pyarrow/tests/interchange/test_conversion.py,sha256=KC8bZgWhdutayp3V7RqBYoxk79_2NCY5UwM_s9D-Eas,18716pyarrow/tests/interchange/test_interchange_spec.py,sha256=AwqwD8b2gV1f5HERtzG6UtOIshFGafUI_9CQOVLPnho,9381pyarrow/tests/pandas_examples.py,sha256=SDPL87Ea997nGi7afOqlceq6wH4Bh5IR5S0fHZV3Acs,5107pyarrow/tests/pandas_threaded_import.py,sha256=b_ubLr5dj4dWJht9552qc3S3Yt3fQQgaUH6208oZvHg,1429pyarrow/tests/parquet/__init__.py,sha256=dKsXU9M-sJyz2wYIuqwsKM9meOlK_qY6qhmQzIvEpCE,931pyarrow/tests/parquet/common.py,sha256=ezd4yAsRXI1R-MxE1iIbyHHIlEGyKumckQzVHAx46rM,6149pyarrow/tests/parquet/conftest.py,sha256=CyKJlVT-pQNb2f2BwlUaIAoWtobcZ65Y0vgpGX2ttnA,3157pyarrow/tests/parquet/encryption.py,sha256=Nr232E2ueexYXGWNZQOfQpw3LkPTbSNHWSfwf1DuBVI,5218pyarrow/tests/parquet/test_basic.py,sha256=wVoRH6qpNJncp-8HVZ6zPFVfdWgKv2xTLK50bzcT4ms,40906pyarrow/tests/parquet/test_compliant_nested_type.py,sha256=Lz7tCPrSpv9GrKPMS-eu1LehsCTwz7KdUdCYJ8tF8dE,3901pyarrow/tests/parquet/test_data_types.py,sha256=Y_RqQBfDgrxQnOc0IjuHA7ueIOmotH8CMkmqQ4prz9I,19319pyarrow/tests/parquet/test_dataset.py,sha256=5ikRmJd9cSqfMhFKSFUmJ7kg9_hcHBjsDBeAvijv7ig,42782pyarrow/tests/parquet/test_datetime.py,sha256=A3ZaRj88u0IrlhCNp2KY_A8txrb7y2pKPgEVvI7e7bU,16398pyarrow/tests/parquet/test_encryption.py,sha256=-lskqPlDIovdfW8P9zYKpaKR83q2dP6F-WWHcxQQDys,37403pyarrow/tests/parquet/test_metadata.py,sha256=v30MsJW2odifp7X3ZuFyBRl0Rf-rI4yBt4Nl_O2YKns,29821pyarrow/tests/parquet/test_pandas.py,sha256=4r9sip2N0XbkBb6SZuh51SUHJn9BlAtfjbzB3d3Gk_M,23543pyarrow/tests/parquet/test_parquet_file.py,sha256=VlsY4JwZUckF5uxDrVlrJRBVnvTmuuajd0h37BMkbOo,13872pyarrow/tests/parquet/test_parquet_writer.py,sha256=9-BjKiXjLzgKC0IodiT8KnCtSPBo1ZKinS_spFX8uWs,18215pyarrow/tests/pyarrow_cython_example.pyx,sha256=fx6zT1bUb2-cDnwKoG71K3ozpmrNJ53kKQHHJTExGz8,2115pyarrow/tests/read_record_batch.py,sha256=9Y0X0h03hUXwOKZz7jBBZSwgIrjxT-FkWIw6pu38Frc,953pyarrow/tests/strategies.py,sha256=bfNlK4SEBsHvbu9rrXh9WXi-RECOBeBBVTeBV8BO6Rw,16300pyarrow/tests/test_acero.py,sha256=hiZ_f2Sqt7bH9VmmM8z4-KdQyGuPzLLMippYkpznTK4,18569pyarrow/tests/test_adhoc_memory_leak.py,sha256=Pn4PcIbOBRtSJuz9Ar_ocubco0QOMZ-eAE9Bs7Wp4mA,1453pyarrow/tests/test_array.py,sha256=5-3hQ7tDBlbgbohAhxyjNcnhWfkqXf8sRH2Ro-M-4-g,153963pyarrow/tests/test_builder.py,sha256=zNEcslLwyb40oYbG7lInQcI81QHMKDOzi1zthw1Je7c,2803pyarrow/tests/test_cffi.py,sha256=j-9Ku_umsvHHACO5LLVFC0IIKZnH5fl0Xea0yAS81pA,27531pyarrow/tests/test_compute.py,sha256=7G2ch_YanxmDl7t8dD2nlaGW5b0pIir08Va2-M1mpIk,167268pyarrow/tests/test_convert_builtin.py,sha256=Kmyx7EVTWpCu3_M6_pJxcTmdNBuzluy2-b6TmWUMbnQ,82416pyarrow/tests/test_cpp_internals.py,sha256=SNRZJo9Fi5aHt7sYvt5290IXvAaewikqHNuzUYZD7sc,1923pyarrow/tests/test_csv.py,sha256=0Kdpo0-v44XZZo1sh1ESQRJUbho6hml1WZYkP4Bn5Q0,83458pyarrow/tests/test_cuda.py,sha256=fLhKzzs115IAH0hsW0SLbk3F3sWUNJ0hBDanwcvyxts,36219pyarrow/tests/test_cuda_numba_interop.py,sha256=NX9XP0nX_AUOs3AxXQBp7XbhFGZhQCNmK2955zlVxIE,8816pyarrow/tests/test_cython.py,sha256=p3Pz_w8Ysd6pMQfvjGPsBA-fYjX7os9M9B9K9UB42m8,7040pyarrow/tests/test_dataset.py,sha256=4-Ih37ShBXakclLcFeVVcUwZ4SsrlSJsJRXapNwjEBE,218478pyarrow/tests/test_dataset_encryption.py,sha256=EpD2zXVcLS_3i4fwli7Z45ibDFSgXCFFQ2qiXtAxBsg,18023pyarrow/tests/test_deprecations.py,sha256=W_rneq4jC6zqCNoGhBDf1F28Q-0LHI7YKLgtsbV6LHM,891pyarrow/tests/test_device.py,sha256=qe9Wiwo-XVazt9pdxyqQJUz6fNR0jTs9CHiyaoppNA4,2550pyarrow/tests/test_dlpack.py,sha256=GDDkx3P5jvu_xTzIDFcFvyIs9HnArIkI6H2_sgI0HaU,5996pyarrow/tests/test_exec_plan.py,sha256=pjOkSaWeqjN6celKxUEH3tBGXLh8kKbmSSsvKOWsbQQ,10096pyarrow/tests/test_extension_type.py,sha256=5om0tjhE5KV_YokZ9wCFBAjZYTk_kMuHOfVbLZkn8Ro,78016pyarrow/tests/test_feather.py,sha256=Tgx-t5ARrUwlo0H2XfCqPm7QxQ2iEdONCym5zcCsxjE,27446pyarrow/tests/test_flight.py,sha256=pVDSfUFmcBDo0ChO3X5rH25k0lktfxjy_qAGDhr_Ido,103657pyarrow/tests/test_flight_async.py,sha256=IDQ6CEwo5_2peCM3P2x1imaQHGXUrVFciSggil9Zrks,2870pyarrow/tests/test_fs.py,sha256=G_HceMKQM1ZMZgun3xwf1-3Gru0jDC6yckkA_M7Cb1o,74250pyarrow/tests/test_gandiva.py,sha256=AEf9ln-j5MmIMQ0JTQPhnZwbNh82ynSURsWPaKaNing,15623pyarrow/tests/test_gdb.py,sha256=mircGfK7H3PQgn4dVYfDUYbC03CzuAXqGW4oOmd-uZw,45052pyarrow/tests/test_io.py,sha256=_Q1TFpreNhOvW19Tw14BqpXFu99BdtjP9aHknZh0WCU,64458pyarrow/tests/test_ipc.py,sha256=KFK4E6Ee_zZ52k9hbxS6nMFNo41asuoppiFsJW8PGEI,46053pyarrow/tests/test_json.py,sha256=nU0jjdMy3PQx0IgNIFiLy3ms6TBJz1e2c9e87PtdUtI,23491pyarrow/tests/test_jvm.py,sha256=QLRHeFx8Gbz1UywlnDi2akV6DBtqGHReQEuNl2vSbcE,15475pyarrow/tests/test_memory.py,sha256=ZWbnQdYuF2nTa1NCs7419EPIvu3qjPNTBxfX8ty0wNk,9720pyarrow/tests/test_misc.py,sha256=KlwIAiTASoZzhkdtwdC8_vl2CSIhqjfE2ztvNrnxtKM,7657pyarrow/tests/test_orc.py,sha256=UrDyNHJoTX72KFGVLf-WRzzC8e6nsP-GsCm97x0l43o,21565pyarrow/tests/test_pandas.py,sha256=AJMKphQ9h2SMNl49MWvp_UauvRmBREkh6SHm0RbVGq0,198625pyarrow/tests/test_scalars.py,sha256=pQvRaMUTh1Nu27OTKmA4m5QyS_yDEg5lUokHs3Jts60,32216pyarrow/tests/test_schema.py,sha256=x5MSVt6kOhvSPTCIMIFVTm27Lp6znJ4emk9L5ziqJwc,23347pyarrow/tests/test_sparse_tensor.py,sha256=bGO7Es4D65zmGNRN013G9VUCQ_v-mPUb90sAk--3yyw,17666pyarrow/tests/test_strategies.py,sha256=9SL8I1JBjD-W2SmYyFygE6zWhzdi2WIr8WV_2alPjB4,2160pyarrow/tests/test_substrait.py,sha256=rsLPNlDPDAxZ1OIu-LAINSD4q_UZJhOvtTzPfXjrWM8,32223pyarrow/tests/test_table.py,sha256=97-VoA5gYH5l2dYsV95R81IPatfwyulOYaWA14eAYho,128035pyarrow/tests/test_tensor.py,sha256=LYSEYGUjtdnsbL0WAir9jFindo-r0bLySiDA1uAXL8E,6643pyarrow/tests/test_types.py,sha256=jeX6APkHL4JuBHkiOWs6BoYeQCE8Krwsk3GOrb6uXbc,44483pyarrow/tests/test_udf.py,sha256=WA9E5skUqh7uMr_zH3rQ11LRx0SK2G3WO8HjVHGWyQY,29792pyarrow/tests/test_util.py,sha256=216en304o-zqgoYBO08HxG-ZK9N0Aa1sbipRwRN4CWE,5092pyarrow/tests/test_without_numpy.py,sha256=ysbB-jML318I04ViQT4Ok7iMg1cI-NU8kguPu-FTSl4,1855pyarrow/tests/util.py,sha256=rx6zMuUkzq1TNTEddo5LJShctb4ax5Gpyx0ruJIn4VY,13197pyarrow/tests/wsgi_examples.py,sha256=vQIDb5989sRVLsELw-fRHhfX-dE96sTl5J2lEuEKup8,1348pyarrow/types.pxi,sha256=zjXXoRE7IQm_zOQoiOsStp2zVPtqwvwX3GxO_1q2I3I,163049pyarrow/types.py,sha256=d79cmgr2MDz79UQy6ChoKf4MScKCtDvtOBVGIbV1644,9734pyarrow/util.py,sha256=dTVaDktJnZN3iqdmww837TK_T46jkqlkpQXE1M9u5gY,9267pyarrow/vendored/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785pyarrow/vendored/docscrape.py,sha256=phTjwuzoO5hB88QerZk3uGu9c5OrZwjFzI7vEIIbCUQ,22975pyarrow/vendored/version.py,sha256=5-Vo4Q3kPJrm1DSGusnMlTxuA8ynI4hAryApBd6MnpQ,1434512345Wheel-Version: 1.0Generator: scikit-build-core 1.0.3Root-Is-Purelib: falseTag: cp312-cp312-manylinux_2_28_x86_64
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081Apache ArrowCopyright 2016-2026 The Apache Software Foundation
This product includes software developed atThe Apache Software Foundation (http://www.apache.org/).
This product includes software from the SFrame project (BSD, 3-clause).* Copyright (C) 2015 Dato, Inc.* Copyright (c) 2009 Carnegie Mellon University.
This product includes software from the Feather project (Apache 2.0)https://github.com/wesm/feather
This product includes software from the DyND project (BSD 2-clause)https://github.com/libdynd
This product includes software from the LLVM project * distributed under the University of Illinois Open Source
This product includes software from the mman-win32 project * Copyright https://code.google.com/p/mman-win32/ * Licensed under the MIT License;
This product includes software from the LevelDB project * Copyright (c) 2011 The LevelDB Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * Moved from Kudu http://github.com/cloudera/kudu
This product includes software from the CMake project * Copyright 2001-2009 Kitware, Inc. * Copyright 2012-2014 Continuum Analytics, Inc. * All rights reserved.
This product includes software from https://github.com/matthew-brett/multibuild (BSD 2-clause) * Copyright (c) 2013-2016, Matt Terry and Matthew Brett; all rights reserved.
This product includes software from the Ibis project (Apache 2.0) * Copyright (c) 2015 Cloudera, Inc. * https://github.com/cloudera/ibis
This product includes software from Dremio (Apache 2.0) * Copyright (C) 2017-2018 Dremio Corporation * https://github.com/dremio/dremio-oss
This product includes software from Google Guava (Apache 2.0) * Copyright (C) 2007 The Guava Authors * https://github.com/google/guava
This product include software from CMake (BSD 3-Clause) * CMake - Cross Platform Makefile Generator * Copyright 2000-2019 Kitware, Inc. and Contributors
The web site includes files generated by Jekyll.
--------------------------------------------------------------------------------
This product includes code from Apache Kudu, which includes the following inits NOTICE file:
Apache Kudu Copyright 2016 The Apache Software Foundation
This product includes software developed at The Apache Software Foundation (http://www.apache.org/).
Portions of this software were developed at Cloudera, Inc (http://www.cloudera.com/).
--------------------------------------------------------------------------------
This product includes code from Apache ORC, which includes the following inits NOTICE file:
Apache ORC Copyright 2013-2019 The Apache Software Foundation
This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
This product includes software developed by Hewlett-Packard: (c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>#include <random>#include <sstream>#include <string>#include <string_view>#include <utility>#include <vector>
#include "arrow/array.h"#include "arrow/array/builder_binary.h"#include "arrow/io/memory.h"#include "arrow/json/converter.h"#include "arrow/json/options.h"#include "arrow/json/parser.h"#include "arrow/json/rapidjson_defs.h"#include "arrow/testing/gtest_util.h"#include "arrow/testing/random.h"#include "arrow/type.h"#include "arrow/util/checked_cast.h"#include "arrow/visit_type_inline.h"
#include "rapidjson/document.h"#include "rapidjson/prettywriter.h"#include "rapidjson/reader.h"#include "rapidjson/writer.h"
namespace arrow {
using internal::checked_cast;
namespace json {
namespace rj = arrow::rapidjson;
using rj::StringBuffer;using std::string_view;using Writer = rj::Writer<StringBuffer>;
struct GenerateOptions { // Probability of a field being written double field_probability = 1.0; // Probability of a value being null double null_probability = 0.2; // Whether to randomize the order of written fields bool randomize_field_order = false;
static constexpr GenerateOptions Defaults() { return GenerateOptions{}; }};
inline static Status OK(bool ok) { return ok ? Status::OK() : Status::Invalid(""); }
template <typename Engine>inline static Status Generate( const std::shared_ptr<DataType>& type, Engine& e, Writer* writer, const GenerateOptions& options = GenerateOptions::Defaults());
template <typename Engine>inline static Status Generate( const std::vector<std::shared_ptr<Field>>& fields, Engine& e, Writer* writer, const GenerateOptions& options = GenerateOptions::Defaults());
template <typename Engine>inline static Status Generate( const std::shared_ptr<Schema>& schm, Engine& e, Writer* writer, const GenerateOptions& options = GenerateOptions::Defaults()) { return Generate(schm->fields(), e, writer, options);}
template <typename Engine>struct GenerateImpl { Status Visit(const NullType&) { return OK(writer.Null()); }
Status Visit(const BooleanType&) { return OK(writer.Bool(std::uniform_int_distribution<uint16_t>{}(e) & 1)); }
template <typename T> enable_if_physical_unsigned_integer<T, Status> Visit(const T&) { auto val = std::uniform_int_distribution<>{}(e); return OK(writer.Uint64(static_cast<typename T::c_type>(val))); }
template <typename T> enable_if_physical_signed_integer<T, Status> Visit(const T&) { auto val = std::uniform_int_distribution<>{}(e); return OK(writer.Int64(static_cast<typename T::c_type>(val))); }
template <typename T> enable_if_physical_floating_point<T, Status> Visit(const T&) { auto val = std::normal_distribution<typename T::c_type>{0, 1 << 10}(e); return OK(writer.Double(val)); }
Status GenerateUtf8(const DataType&) { auto num_codepoints = std::poisson_distribution<>{4}(e); auto seed = std::uniform_int_distribution<uint32_t>{}(e); std::string s = RandomUtf8String(seed, num_codepoints); return OK(writer.String(s)); }
template <typename T> enable_if_base_binary<T, Status> Visit(const T& t) { return GenerateUtf8(t); }
Status Visit(const BinaryViewType& t) { return GenerateUtf8(t); }
template <typename T> enable_if_list_like<T, Status> Visit(const T& t) { auto size = std::poisson_distribution<>{4}(e); writer.StartArray(); for (int i = 0; i < size; ++i) { RETURN_NOT_OK(Generate(t.value_type(), e, &writer, options)); } return OK(writer.EndArray(size)); }
Status Visit(const ListViewType& t) { return NotImplemented(t); }
Status Visit(const LargeListViewType& t) { return NotImplemented(t); }
Status Visit(const StructType& t) { return Generate(t.fields(), e, &writer, options); }
Status Visit(const DayTimeIntervalType& t) { return NotImplemented(t); }
Status Visit(const MonthDayNanoIntervalType& t) { return NotImplemented(t); }
Status Visit(const DictionaryType& t) { return NotImplemented(t); }
Status Visit(const ExtensionType& t) { return NotImplemented(t); }
Status Visit(const Decimal128Type& t) { return NotImplemented(t); }
Status Visit(const FixedSizeBinaryType& t) { return NotImplemented(t); }
Status Visit(const UnionType& t) { return NotImplemented(t); }
Status Visit(const RunEndEncodedType& t) { return NotImplemented(t); }
Status NotImplemented(const DataType& t) { return Status::NotImplemented("random generation of arrays of type ", t); }
Engine& e; rj::Writer<rj::StringBuffer>& writer; const GenerateOptions& options;};
template <typename Engine>inline static Status Generate(const std::shared_ptr<DataType>& type, Engine& e, Writer* writer, const GenerateOptions& options) { if (std::bernoulli_distribution(options.null_probability)(e)) { writer->Null(); return Status::OK(); } GenerateImpl<Engine> visitor = {e, *writer, options}; return VisitTypeInline(*type, &visitor);}
template <typename Engine>inline static Status Generate(const std::vector<std::shared_ptr<Field>>& fields, Engine& e, Writer* writer, const GenerateOptions& options) { RETURN_NOT_OK(OK(writer->StartObject()));
int num_fields = 0; auto write_field = [&](const Field& f) { ++num_fields; writer->Key(f.name().c_str()); return Generate(f.type(), e, writer, options); };
std::bernoulli_distribution bool_dist(options.field_probability); if (options.randomize_field_order) { std::vector<size_t> indices; indices.reserve(static_cast<size_t>(fields.size() * options.field_probability)); for (size_t i = 0; i < fields.size(); ++i) { if (bool_dist(e)) { indices.push_back(i); } } std::shuffle(indices.begin(), indices.end(), e); for (auto i : indices) { RETURN_NOT_OK(write_field(*fields[i])); } } else { for (const auto& f : fields) { if (bool_dist(e)) { RETURN_NOT_OK(write_field(*f)); } } }
return OK(writer->EndObject(num_fields));}
inline static Status MakeStream(string_view src_str, std::shared_ptr<io::InputStream>* out) { auto src = std::make_shared<Buffer>(src_str); *out = std::make_shared<io::BufferReader>(src); return Status::OK();}
// scalar values (numbers and strings) are parsed into a// dictionary<index:int32, value:string>. This can be decoded for ease of comparisoninline static Status DecodeStringDictionary(const DictionaryArray& dict_array, std::shared_ptr<Array>* decoded) { const StringArray& dict = checked_cast<const StringArray&>(*dict_array.dictionary()); const Int32Array& indices = checked_cast<const Int32Array&>(*dict_array.indices()); StringBuilder builder; RETURN_NOT_OK(builder.Resize(indices.length())); for (int64_t i = 0; i < indices.length(); ++i) { if (indices.IsNull(i)) { builder.UnsafeAppendNull(); continue; } auto value = dict.GetView(indices.GetView(i)); RETURN_NOT_OK(builder.ReserveData(value.size())); builder.UnsafeAppend(value); } return builder.Finish(decoded);}
inline static Status ParseFromString(ParseOptions options, string_view src_str, std::shared_ptr<Array>* parsed) { auto src = std::make_shared<Buffer>(src_str); std::unique_ptr<BlockParser> parser; RETURN_NOT_OK(BlockParser::Make(options, &parser)); RETURN_NOT_OK(parser->Parse(src)); return parser->Finish(parsed);}
inline static Status ParseFromString(ParseOptions options, string_view src_str, std::shared_ptr<StructArray>* parsed) { std::shared_ptr<Array> parsed_non_struct; RETURN_NOT_OK(ParseFromString(options, src_str, &parsed_non_struct)); *parsed = internal::checked_pointer_cast<StructArray>(parsed_non_struct); return Status::OK();}
static inline std::string PrettyPrint(string_view one_line) { rj::Document document;
// Must pass size to avoid ASAN issues. document.Parse(one_line.data(), one_line.size()); rj::StringBuffer sb; rj::PrettyWriter<rj::StringBuffer> writer(sb); document.Accept(writer); return sb.GetString();}
template <typename T>std::string RowsOfOneColumn(std::string_view name, std::initializer_list<T> values, decltype(std::to_string(*values.begin()))* = nullptr) { std::stringstream ss; for (auto value : values) { ss << R"({")" << name << R"(":)" << std::to_string(value) << "}\n"; } return ss.str();}
inline std::string RowsOfOneColumn(std::string_view name, std::initializer_list<std::string> values) { std::stringstream ss; for (auto value : values) { ss << R"({")" << name << R"(":)" << value << "}\n"; } return ss.str();}
inline static std::string scalars_only_src() { return R"( { "hello": 3.5, "world": false, "yo": "thing" } { "hello": 3.25, "world": null } { "hello": 3.125, "world": null, "yo": "\u5fcd" } { "hello": 0.0, "world": true, "yo": null } )";}
inline static std::string nested_src() { return R"( { "hello": 3.5, "world": false, "yo": "thing", "arr": [1, 2, 3], "nuf": {} } { "hello": 3.25, "world": null, "arr": [2], "nuf": null } { "hello": 3.125, "world": null, "yo": "\u5fcd", "arr": [], "nuf": { "ps": 78 } } { "hello": 0.0, "world": true, "yo": null, "arr": null, "nuf": { "ps": 90 } } )";}
inline static std::string null_src() { return R"( { "plain": null, "list1": [], "list2": [], "struct": { "plain": null } } { "plain": null, "list1": [], "list2": [null], "struct": {} } )";}
inline static std::string unquoted_decimal_src() { return R"( { "price": 30.04, "cost":30.001 } { "price": 1.23, "cost":1.229 } )";}
inline static std::string mixed_decimal_src() { return R"( { "price": 30.04, "cost": 30.001 } { "price": "1.23", "cost": "1.229" } )";}
} // namespace json} // namespace arrow1234567891011121314151617181920212223242526// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
namespace arrow {namespace json {
class TableReader;struct ReadOptions;struct ParseOptions;
} // namespace json} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <atomic>#include <cstdint>#include <functional>#include <memory>#include <string>
#include "arrow/result.h"#include "arrow/status.h"#include "arrow/type_fwd.h"#include "arrow/util/macros.h"#include "arrow/util/visibility.h"
namespace arrow {
namespace internal {
///////////////////////////////////////////////////////////////////////// Helper tracking memory statistics
/// \brief Memory pool statistics////// 64-byte aligned so that all atomic values are on the same cache line.class alignas(64) MemoryPoolStats { private: // All atomics are updated according to Acquire-Release ordering. // https://en.cppreference.com/w/cpp/atomic/memory_order#Release-Acquire_ordering // // max_memory_, total_allocated_bytes_, and num_allocs_ only go up (they are // monotonically increasing) which can allow some optimizations. std::atomic<int64_t> max_memory_{0}; std::atomic<int64_t> bytes_allocated_{0}; std::atomic<int64_t> total_allocated_bytes_{0}; std::atomic<int64_t> num_allocs_{0};
public: int64_t max_memory() const { return max_memory_.load(std::memory_order_acquire); }
int64_t bytes_allocated() const { return bytes_allocated_.load(std::memory_order_acquire); }
int64_t total_bytes_allocated() const { return total_allocated_bytes_.load(std::memory_order_acquire); }
int64_t num_allocations() const { return num_allocs_.load(std::memory_order_acquire); }
inline void DidAllocateBytes(int64_t size) { // Issue the load before everything else. max_memory_ is monotonically increasing, // so we can use a relaxed load before the read-modify-write. auto max_memory = max_memory_.load(std::memory_order_relaxed); const auto old_bytes_allocated = bytes_allocated_.fetch_add(size, std::memory_order_acq_rel); // Issue store operations on values that we don't depend on to proceed // with execution. When done, max_memory and old_bytes_allocated have // a higher chance of being available on CPU registers. This also has the // nice side-effect of putting 3 atomic stores close to each other in the // instruction stream. total_allocated_bytes_.fetch_add(size, std::memory_order_acq_rel); num_allocs_.fetch_add(1, std::memory_order_acq_rel);
// If other threads are updating max_memory_ concurrently we leave the loop without // updating knowing that it already reached a value even higher than ours. const auto allocated = old_bytes_allocated + size; while (max_memory < allocated && !max_memory_.compare_exchange_weak( /*expected=*/max_memory, /*desired=*/allocated, std::memory_order_acq_rel)) { } }
inline void DidReallocateBytes(int64_t old_size, int64_t new_size) { if (new_size > old_size) { DidAllocateBytes(new_size - old_size); } else { DidFreeBytes(old_size - new_size); } }
inline void DidFreeBytes(int64_t size) { bytes_allocated_.fetch_sub(size, std::memory_order_acq_rel); }};
} // namespace internal
/// Base class for memory allocation on the CPU.////// Besides tracking the number of allocated bytes, the allocator also should/// take care of the required 64-byte alignment.class ARROW_EXPORT MemoryPool { public: virtual ~MemoryPool() = default;
/// \brief EXPERIMENTAL. Create a new instance of the default MemoryPool static std::unique_ptr<MemoryPool> CreateDefault();
/// Allocate a new memory region of at least size bytes. /// /// The allocated region shall be 64-byte aligned. Status Allocate(int64_t size, uint8_t** out) { return Allocate(size, kDefaultBufferAlignment, out); }
/// Allocate a new memory region of at least size bytes aligned to alignment. virtual Status Allocate(int64_t size, int64_t alignment, uint8_t** out) = 0;
/// Resize an already allocated memory section. /// /// As by default most default allocators on a platform don't support aligned /// reallocation, this function can involve a copy of the underlying data. virtual Status Reallocate(int64_t old_size, int64_t new_size, int64_t alignment, uint8_t** ptr) = 0; Status Reallocate(int64_t old_size, int64_t new_size, uint8_t** ptr) { return Reallocate(old_size, new_size, kDefaultBufferAlignment, ptr); }
/// Free an allocated region. /// /// @param buffer Pointer to the start of the allocated memory region /// @param size Allocated size located at buffer. An allocator implementation /// may use this for tracking the amount of allocated bytes as well as for /// faster deallocation if supported by its backend. /// @param alignment The alignment of the allocation. Defaults to 64 bytes. virtual void Free(uint8_t* buffer, int64_t size, int64_t alignment) = 0; void Free(uint8_t* buffer, int64_t size) { Free(buffer, size, kDefaultBufferAlignment); }
/// Return unused memory to the OS /// /// Only applies to allocators that hold onto unused memory. This will be /// best effort, a memory pool may not implement this feature or may be /// unable to fulfill the request due to fragmentation. virtual void ReleaseUnused() {}
/// Print statistics /// /// Print allocation statistics on stderr. The output format is /// implementation-specific. Not all memory pools implement this method. virtual void PrintStats() {}
/// The number of bytes that were allocated and not yet free'd through /// this allocator. virtual int64_t bytes_allocated() const = 0;
/// Return peak memory allocation in this memory pool /// /// \return Maximum bytes allocated. If not known (or not implemented), /// returns -1 virtual int64_t max_memory() const;
/// The number of bytes that were allocated. virtual int64_t total_bytes_allocated() const = 0;
/// The number of allocations or reallocations that were requested. virtual int64_t num_allocations() const = 0;
/// The name of the backend used by this MemoryPool (e.g. "system" or "jemalloc"). virtual std::string backend_name() const = 0;
protected: MemoryPool() = default;};
class ARROW_EXPORT LoggingMemoryPool : public MemoryPool { public: explicit LoggingMemoryPool(MemoryPool* pool); ~LoggingMemoryPool() override = default;
using MemoryPool::Allocate; using MemoryPool::Free; using MemoryPool::Reallocate;
Status Allocate(int64_t size, int64_t alignment, uint8_t** out) override; Status Reallocate(int64_t old_size, int64_t new_size, int64_t alignment, uint8_t** ptr) override; void Free(uint8_t* buffer, int64_t size, int64_t alignment) override; void ReleaseUnused() override; void PrintStats() override;
int64_t bytes_allocated() const override;
int64_t max_memory() const override;
int64_t total_bytes_allocated() const override;
int64_t num_allocations() const override;
std::string backend_name() const override;
private: MemoryPool* pool_;};
/// Derived class for memory allocation.////// Tracks the number of bytes and maximum memory allocated through its direct/// calls. Actual allocation is delegated to MemoryPool class.class ARROW_EXPORT ProxyMemoryPool : public MemoryPool { public: explicit ProxyMemoryPool(MemoryPool* pool); ~ProxyMemoryPool() override;
using MemoryPool::Allocate; using MemoryPool::Free; using MemoryPool::Reallocate;
Status Allocate(int64_t size, int64_t alignment, uint8_t** out) override; Status Reallocate(int64_t old_size, int64_t new_size, int64_t alignment, uint8_t** ptr) override; void Free(uint8_t* buffer, int64_t size, int64_t alignment) override; void ReleaseUnused() override; void PrintStats() override;
int64_t bytes_allocated() const override;
int64_t max_memory() const override;
int64_t total_bytes_allocated() const override;
int64_t num_allocations() const override;
std::string backend_name() const override;
private: class ProxyMemoryPoolImpl; std::unique_ptr<ProxyMemoryPoolImpl> impl_;};
/// EXPERIMENTAL MemoryPool wrapper with an upper limit////// Checking for limits is not done in a fully thread-safe way, therefore/// multi-threaded allocations might be able to go successfully above the/// configured limit.class ARROW_EXPORT CappedMemoryPool : public MemoryPool { public: CappedMemoryPool(MemoryPool* wrapped_pool, int64_t bytes_allocated_limit) : wrapped_(wrapped_pool), bytes_allocated_limit_(bytes_allocated_limit) {}
using MemoryPool::Allocate; using MemoryPool::Reallocate;
Status Allocate(int64_t size, int64_t alignment, uint8_t** out) override; Status Reallocate(int64_t old_size, int64_t new_size, int64_t alignment, uint8_t** ptr) override; void Free(uint8_t* buffer, int64_t size, int64_t alignment) override;
void ReleaseUnused() override { wrapped_->ReleaseUnused(); }
void PrintStats() override { wrapped_->PrintStats(); }
int64_t bytes_allocated() const override { return wrapped_->bytes_allocated(); }
int64_t max_memory() const override { return wrapped_->max_memory(); }
int64_t total_bytes_allocated() const override { return wrapped_->total_bytes_allocated(); }
int64_t num_allocations() const override { return wrapped_->num_allocations(); }
std::string backend_name() const override { return wrapped_->backend_name(); }
private: Status OutOfMemory(int64_t current_allocated, int64_t requested) const;
MemoryPool* wrapped_; const int64_t bytes_allocated_limit_;};
/// \brief Return a process-wide memory pool based on the system allocator.ARROW_EXPORT MemoryPool* system_memory_pool();
/// \brief Return a process-wide memory pool based on jemalloc.////// May return NotImplemented if jemalloc is not available.ARROW_EXPORT Status jemalloc_memory_pool(MemoryPool** out);
/// \brief Set jemalloc memory page purging behavior for future-created arenas/// to the indicated number of milliseconds. See dirty_decay_ms and/// muzzy_decay_ms options in jemalloc for a description of what these do. The/// default is configured to 1000 (1 second) which releases memory more/// aggressively to the operating system than the jemalloc default of 10/// seconds. If you set the value to 0, dirty / muzzy pages will be released/// immediately rather than with a time decay, but this may reduce application/// performance.ARROW_EXPORTStatus jemalloc_set_decay_ms(int ms);
/// \brief Get basic statistics from jemalloc's mallctl./// See the MALLCTL NAMESPACE section in jemalloc project documentation for/// available stats.ARROW_EXPORTResult<int64_t> jemalloc_get_stat(const char* name);
/// \brief Reset the counter for peak bytes allocated in the calling thread to zero./// This affects subsequent calls to thread.peak.read, but not the values returned by/// thread.allocated or thread.deallocated.ARROW_EXPORTStatus jemalloc_peak_reset();
/// \brief Print summary statistics in human-readable form to stderr./// See malloc_stats_print documentation in jemalloc project documentation for/// available opt flags.ARROW_EXPORTStatus jemalloc_stats_print(const char* opts = "");
/// \brief Print summary statistics in human-readable form using a callback/// See malloc_stats_print documentation in jemalloc project documentation for/// available opt flags.ARROW_EXPORTStatus jemalloc_stats_print(std::function<void(const char*)> write_cb, const char* opts = "");
/// \brief Get summary statistics in human-readable form./// See malloc_stats_print documentation in jemalloc project documentation for/// available opt flags.ARROW_EXPORTResult<std::string> jemalloc_stats_string(const char* opts = "");
/// \brief Return a process-wide memory pool based on mimalloc.////// May return NotImplemented if mimalloc is not available.ARROW_EXPORT Status mimalloc_memory_pool(MemoryPool** out);
/// \brief Return the names of the backends supported by this Arrow build.ARROW_EXPORT std::vector<std::string> SupportedMemoryBackendNames();
} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <algorithm>#include <cstddef>#include <cstdint>#include <limits>
#include <gtest/gtest.h>
#include "arrow/memory_pool.h"#include "arrow/status.h"#include "arrow/testing/gtest_util.h"
namespace arrow {
class TestMemoryPoolBase : public ::testing::Test { public: virtual ::arrow::MemoryPool* memory_pool() = 0;
void TestMemoryTracking() { auto pool = memory_pool();
uint8_t* data; const auto old_bytes_allocated = pool->bytes_allocated(); ASSERT_OK(pool->Allocate(100, &data)); EXPECT_EQ(static_cast<uint64_t>(0), reinterpret_cast<uint64_t>(data) % 64); ASSERT_EQ(old_bytes_allocated + 100, pool->bytes_allocated());
uint8_t* data2; ASSERT_OK(pool->Allocate(27, &data2)); EXPECT_EQ(static_cast<uint64_t>(0), reinterpret_cast<uint64_t>(data2) % 64); ASSERT_EQ(old_bytes_allocated + 127, pool->bytes_allocated());
pool->Free(data, 100); ASSERT_EQ(old_bytes_allocated + 27, pool->bytes_allocated()); pool->Free(data2, 27); ASSERT_EQ(old_bytes_allocated, pool->bytes_allocated()); }
void TestOOM() { auto pool = memory_pool();
uint8_t* data; int64_t max_alloc = std::min<uint64_t>(std::numeric_limits<int64_t>::max(), std::numeric_limits<size_t>::max()); // subtract 63 to prevent overflow after the size is aligned for (int64_t to_alloc : {max_alloc, max_alloc - 63, max_alloc - 127}) { ASSERT_RAISES(OutOfMemory, pool->Allocate(to_alloc, &data)); } }
void TestReallocate() { auto pool = memory_pool();
uint8_t* data; ASSERT_OK(pool->Allocate(10, &data)); ASSERT_EQ(10, pool->bytes_allocated()); data[0] = 35; data[9] = 12;
// Expand ASSERT_OK(pool->Reallocate(10, 20, &data)); ASSERT_EQ(data[9], 12); ASSERT_EQ(20, pool->bytes_allocated());
// Shrink ASSERT_OK(pool->Reallocate(20, 5, &data)); ASSERT_EQ(data[0], 35); ASSERT_EQ(5, pool->bytes_allocated());
// Free pool->Free(data, 5); ASSERT_EQ(0, pool->bytes_allocated()); }
void TestAlignment() { auto pool = memory_pool(); { uint8_t* data64; ASSERT_OK(pool->Allocate(10, &data64)); ASSERT_EQ(reinterpret_cast<uintptr_t>(data64) % kDefaultBufferAlignment, 0); pool->Free(data64, 10); }
{ uint8_t* data512; ASSERT_OK(pool->Allocate(10, 512, &data512)); ASSERT_EQ(reinterpret_cast<uintptr_t>(data512) % 512, 0); pool->Free(data512, 10, 512); } }
void TestReleaseUnused() { auto pool = memory_pool(); const int64_t nbytes = pool->bytes_allocated(); pool->ReleaseUnused(); // Unfortunately there's not much that we can assert here ASSERT_EQ(nbytes, pool->bytes_allocated()); }};
} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <iosfwd>#include <string>#include <utility>
#include "arrow/util/visibility.h"
namespace arrow {
class Array;class ChunkedArray;class RecordBatch;class Schema;class Status;class Table;
/// \class PrettyPrintDelimiters/// \brief Options for controlling which delimiters to use when printing/// an Array or ChunkedArray.struct ARROW_EXPORT PrettyPrintDelimiters { /// Delimiter to use when opening an Array or ChunkedArray (e.g. "[") std::string open = "[";
/// Delimiter to use when closing an Array or ChunkedArray (e.g. "]") std::string close = "]";
/// Delimiter for separating individual elements of an Array (e.g. ","), /// or individual chunks of a ChunkedArray std::string element = ",";
/// Create a PrettyPrintDelimiters instance with default values static PrettyPrintDelimiters Defaults() { return PrettyPrintDelimiters(); }};
/// \class PrettyPrintOptions/// \brief Options for controlling how various Arrow types should be printed.struct ARROW_EXPORT PrettyPrintOptions { PrettyPrintOptions() = default;
PrettyPrintOptions(int indent, // NOLINT runtime/explicit int window = 10, int indent_size = 2, std::string null_rep = "null", bool skip_new_lines = false, bool truncate_metadata = true, int container_window = 2, int element_size_limit = 100) : indent(indent), indent_size(indent_size), window(window), container_window(container_window), null_rep(std::move(null_rep)), skip_new_lines(skip_new_lines), truncate_metadata(truncate_metadata), element_size_limit(element_size_limit) {}
/// Create a PrettyPrintOptions instance with default values static PrettyPrintOptions Defaults() { return PrettyPrintOptions(); }
/// Number of spaces to shift entire formatted object to the right int indent = 0;
/// Size of internal indents int indent_size = 2;
/// Maximum number of elements to show at the beginning and at the end. int window = 10;
/// Maximum number of elements to show at the beginning and at the end, for elements /// that are containers (that is, list in ListArray and chunks in ChunkedArray) int container_window = 2;
/// String to use for representing a null value, defaults to "null" std::string null_rep = "null";
/// Skip new lines between elements, defaults to false bool skip_new_lines = false;
/// Limit display of each KeyValueMetadata key/value pair to a single line at /// 80 character width bool truncate_metadata = true;
/// If true, display field metadata when pretty-printing a Schema bool show_field_metadata = true;
/// If true, display schema metadata when pretty-printing a Schema bool show_schema_metadata = true;
/// Limit each element to specified number of characters, defaults to 100 int element_size_limit = 100;
/// Delimiters to use when printing an Array PrettyPrintDelimiters array_delimiters = PrettyPrintDelimiters::Defaults();
/// Delimiters to use when printing a ChunkedArray PrettyPrintDelimiters chunked_array_delimiters = PrettyPrintDelimiters::Defaults();};
/// \brief Print human-readable representation of RecordBatchARROW_EXPORTStatus PrettyPrint(const RecordBatch& batch, int indent, std::ostream* sink);
ARROW_EXPORTStatus PrettyPrint(const RecordBatch& batch, const PrettyPrintOptions& options, std::ostream* sink);
/// \brief Print human-readable representation of TableARROW_EXPORTStatus PrettyPrint(const Table& table, const PrettyPrintOptions& options, std::ostream* sink);
/// \brief Print human-readable representation of ArrayARROW_EXPORTStatus PrettyPrint(const Array& arr, int indent, std::ostream* sink);
/// \brief Print human-readable representation of ArrayARROW_EXPORTStatus PrettyPrint(const Array& arr, const PrettyPrintOptions& options, std::ostream* sink);
/// \brief Print human-readable representation of ArrayARROW_EXPORTStatus PrettyPrint(const Array& arr, const PrettyPrintOptions& options, std::string* result);
/// \brief Print human-readable representation of ChunkedArrayARROW_EXPORTStatus PrettyPrint(const ChunkedArray& chunked_arr, const PrettyPrintOptions& options, std::ostream* sink);
/// \brief Print human-readable representation of ChunkedArrayARROW_EXPORTStatus PrettyPrint(const ChunkedArray& chunked_arr, const PrettyPrintOptions& options, std::string* result);
ARROW_EXPORTStatus PrettyPrint(const Schema& schema, const PrettyPrintOptions& options, std::ostream* sink);
ARROW_EXPORTStatus PrettyPrint(const Schema& schema, const PrettyPrintOptions& options, std::string* result);
ARROW_EXPORTStatus DebugPrint(const Array& arr, int indent);
} // namespace arrow1234567891011121314151617181920212223242526272829// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/arrow_to_pandas.h"#include "arrow/python/common.h"#include "arrow/python/datetime.h"#include "arrow/python/helpers.h"#include "arrow/python/inference.h"#include "arrow/python/io.h"#include "arrow/python/numpy_convert.h"#include "arrow/python/numpy_to_arrow.h"#include "arrow/python/python_to_arrow.h"#include "arrow/python/util.h"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Functions for converting between pandas's NumPy-based data representation// and Arrow data structures
#pragma once
#include "arrow/python/platform.h"
#include <memory>#include <string>#include <unordered_set>
#include "arrow/memory_pool.h"#include "arrow/python/visibility.h"
namespace arrow {
class Array;class ChunkedArray;class Column;class DataType;class MemoryPool;class Status;class Table;
namespace py {
enum class MapConversionType { DEFAULT, // convert arrow maps to assoc lists (list of kev-value tuples) in Pandas LOSSY, // report warnings when lossiness is encountered due to duplicate keys STRICT_, // raise a Python exception when lossiness is encountered due to duplicate // keys};
struct PandasOptions { bool HasCategoricalColumns() const { return categorical_columns && !categorical_columns->empty(); }
bool IsCategoricalColumn(const std::string& name) const { return categorical_columns && categorical_columns->count(name); }
bool HasExtensionColumns() const { return extension_columns && !extension_columns->empty(); }
bool IsExtensionColumn(const std::string& name) const { return extension_columns && extension_columns->count(name); }
/// arrow::MemoryPool to use for memory allocations MemoryPool* pool = default_memory_pool();
/// If true, we will convert all string columns to categoricals bool strings_to_categorical = false; bool zero_copy_only = false; bool integer_object_nulls = false; bool date_as_object = false; bool timestamp_as_object = false; bool use_threads = false;
/// Coerce all date and timestamp to datetime64[ns] bool coerce_temporal_nanoseconds = false;
/// Used to maintain backwards compatibility for /// timezone bugs (see ARROW-9528). Should be removed /// after Arrow 2.0 release. bool ignore_timezone = false;
/// \brief If true, do not create duplicate PyObject versions of equal /// objects. This only applies to immutable objects like strings or datetime /// objects bool deduplicate_objects = false;
/// \brief For certain data types, a cast is needed in order to store the /// data in a pandas DataFrame or Series (e.g. timestamps are always stored /// as nanoseconds in pandas). This option controls whether it is a safe /// cast or not. bool safe_cast = true;
/// \brief If true, create one block per column rather than consolidated /// blocks (1 per data type). Do zero-copy wrapping when there are no /// nulls. pandas currently will consolidate the blocks on its own, causing /// increased memory use, so keep this in mind if you are working on a /// memory-constrained situation. bool split_blocks = false;
/// \brief If true, allow non-writable zero-copy views to be created for /// single column blocks. This option is also used to provide zero copy for /// Series data bool allow_zero_copy_blocks = false;
/// \brief If true, attempt to deallocate buffers in passed Arrow object if /// it is the only remaining shared_ptr copy of it. See ARROW-3789 for /// original context for this feature. Only currently implemented for Table /// conversions bool self_destruct = false;
/// \brief The default behavior (DEFAULT), is to convert Arrow Map arrays to /// Python association lists (list-of-tuples) in the same order as the Arrow /// Map, as in [(key1, value1), (key2, value2), ...] /// If LOSSY or STRICT, convert Arrow Map arrays to native Python dicts. /// This can change the ordering of (key, value) pairs, and will deduplicate /// multiple keys, resulting in a possible loss of data. /// If 'lossy', this key deduplication results in a warning printed /// when detected. If 'strict', this instead results in an exception /// being raised when detected. MapConversionType maps_as_pydicts = MapConversionType::DEFAULT;
// Used internally for nested arrays. bool decode_dictionaries = false;
// Columns that should be casted to categorical // // This is wrapped in a shared_ptr because this struct is copied internally for // each column or nested field (see GH-47861). std::shared_ptr<const std::unordered_set<std::string>> categorical_columns;
// Columns that should be passed through to be converted to // ExtensionArray/Block std::shared_ptr<const std::unordered_set<std::string>> extension_columns;
// Used internally to decipher between to_numpy() and to_pandas() when // the expected output differs bool to_numpy = false;};
ARROW_PYTHON_EXPORTStatus ConvertArrayToPandas(const PandasOptions& options, std::shared_ptr<Array> arr, PyObject* py_ref, PyObject** out);
ARROW_PYTHON_EXPORTStatus ConvertChunkedArrayToPandas(const PandasOptions& options, std::shared_ptr<ChunkedArray> col, PyObject* py_ref, PyObject** out);
// Convert a whole table as efficiently as possible to a pandas.DataFrame.//// The returned Python object is a list of tuples consisting of the exact 2D// BlockManager structure of the pandas.DataFrame used as of pandas 0.19.x.//// tuple item: (indices: ndarray[int32], block: ndarray[TYPE, ndim=2])ARROW_PYTHON_EXPORTStatus ConvertTableToPandas(const PandasOptions& options, std::shared_ptr<Table> table, PyObject** out);
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <utility>
#include "arrow/python/common.h"#include "arrow/status.h"#include "arrow/util/future.h"
namespace arrow::py {
/// \brief Bind a Python callback to an arrow::Future.////// If the Future finishes successfully, py_wrapper is called with its/// result value and should return a PyObject*. If py_wrapper is successful,/// py_cb is called with its return value.////// If either the Future or py_wrapper fails, py_cb is called with the/// associated Python exception.////// \param future The future to bind to./// \param py_cb The Python callback function. Will be passed the result of/// py_wrapper, or a Python exception if the future failed or one was/// raised by py_wrapper./// \param py_wrapper A function (likely defined in Cython) to convert the C++/// result of the future to a Python object.template <typename T, typename PyWrapper = PyObject* (*)(T)>void BindFuture(Future<T> future, PyObject* py_cb, PyWrapper py_wrapper) { Py_INCREF(py_cb); OwnedRefNoGIL cb_ref(py_cb);
auto future_cb = [cb_ref = std::move(cb_ref), py_wrapper = std::move(py_wrapper)](Result<T> result) { SafeCallIntoPythonVoid([&]() { OwnedRef py_value_or_exc{WrapResult(std::move(result), std::move(py_wrapper))}; Py_XDECREF( PyObject_CallFunctionObjArgs(cb_ref.obj(), py_value_or_exc.obj(), NULLPTR)); ARROW_WARN_NOT_OK(CheckPyError(), "Internal error in async call"); }); }; future.AddCallback(std::move(future_cb));}
} // namespace arrow::py123456789101112131415161718192021222324252627282930313233343536// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/platform.h"
#include "arrow/python/visibility.h"
namespace arrow {namespace py {namespace benchmark {
// Micro-benchmark routines for use from ASV
// Run PandasObjectIsNull() once over every object in *list*ARROW_PYTHON_EXPORTvoid Benchmark_PandasObjectIsNull(PyObject* list);
} // namespace benchmark} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <functional>#include <memory>#include <optional>#include <utility>
#include "arrow/buffer.h"#include "arrow/python/pyarrow.h"#include "arrow/python/visibility.h"#include "arrow/result.h"#include "arrow/util/macros.h"
namespace arrow {
class MemoryPool;template <class T>class Result;
namespace py {
// Convert current Python error to a Status. The Python error state is cleared// and can be restored with RestorePyError().ARROW_PYTHON_EXPORT Status ConvertPyError(StatusCode code = StatusCode::UnknownError);// Query whether the given Status is a Python error (as wrapped by ConvertPyError()).ARROW_PYTHON_EXPORT bool IsPyError(const Status& status);// Restore a Python error wrapped in a Status.ARROW_PYTHON_EXPORT void RestorePyError(const Status& status);
// Catch a pending Python exception and return the corresponding Status.// If no exception is pending, Status::OK() is returned.inline Status CheckPyError(StatusCode code = StatusCode::UnknownError) { if (ARROW_PREDICT_TRUE(!PyErr_Occurred())) { return Status::OK(); } else { return ConvertPyError(code); }}
#define RETURN_IF_PYERROR() ARROW_RETURN_NOT_OK(CheckPyError())
#define PY_RETURN_IF_ERROR(CODE) ARROW_RETURN_NOT_OK(CheckPyError(CODE))
// For Cython, as you can't define template C++ functions in Cython, only use them.// This function can set a Python exception. It assumes that T has a (cheap)// default constructor.template <class T>T GetResultValue(Result<T> result) { if (ARROW_PREDICT_TRUE(result.ok())) { return *std::move(result); } else { int r = internal::check_status(result.status()); // takes the GIL assert(r == -1); // should have errored out ARROW_UNUSED(r); return {}; }}
/// \brief Wrap a Result and return the corresponding Python object.////// If the Result is successful, py_wrapper is called with its result value/// and should return a PyObject*. If py_wrapper is successful (returns/// a non-NULL value), its return value is returned.////// If either the Result or py_wrapper fails, the associated Python exception/// is raised and NULL is returned.///// \param result The Result whose value to wrap in a Python object./// \param py_wrapper A function (likely defined in Cython) to convert the C++/// value of the Result to a Python object./// \return A new Python reference, or NULL if an exception occurredtemplate <typename T, typename PyWrapper = PyObject* (*)(T)>PyObject* WrapResult(Result<T> result, PyWrapper&& py_wrapper) { static_assert(std::is_same_v<PyObject*, decltype(py_wrapper(std::declval<T>()))>, "PyWrapper argument to WrapResult should return a PyObject* " "when called with a T*"); Status st = result.status(); if (st.ok()) { PyObject* py_value = py_wrapper(result.MoveValueUnsafe()); st = CheckPyError(); if (st.ok()) { return py_value; } Py_XDECREF(py_value); // should be null, but who knows } // Status is an error, convert it to an exception. return internal::convert_status(st);}
// A RAII-style helper that ensures the GIL is acquired inside a lexical block.class ARROW_PYTHON_EXPORT PyAcquireGIL { public: PyAcquireGIL() : acquired_gil_(false) { acquire(); }
~PyAcquireGIL() { release(); }
void acquire() { if (!acquired_gil_) { state_ = PyGILState_Ensure(); acquired_gil_ = true; } }
// idempotent void release() { if (acquired_gil_) { PyGILState_Release(state_); acquired_gil_ = false; } }
private: bool acquired_gil_; PyGILState_STATE state_; ARROW_DISALLOW_COPY_AND_ASSIGN(PyAcquireGIL);};
// A RAII-style helper that releases the GIL until the end of a lexical blockclass ARROW_PYTHON_EXPORT PyReleaseGIL { public: PyReleaseGIL() : ptr_(PyEval_SaveThread(), &unique_ptr_deleter) {}
private: static void unique_ptr_deleter(PyThreadState* state) { if (state) { PyEval_RestoreThread(state); } } std::unique_ptr<PyThreadState, decltype(&unique_ptr_deleter)> ptr_;};
// A helper to call safely into the Python interpreter from arbitrary C++ code.// The GIL is acquired, and the current thread's error status is preserved.template <typename Function>auto SafeCallIntoPython(Function&& func) -> decltype(func()) { PyAcquireGIL lock; PyObject* exc_type; PyObject* exc_value; PyObject* exc_traceback; PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); auto maybe_status = std::forward<Function>(func)(); // If the return Status is a "Python error", the current Python error status // describes the error and shouldn't be clobbered. if (!IsPyError(::arrow::ToStatus(maybe_status)) && exc_type != NULLPTR) { PyErr_Restore(exc_type, exc_value, exc_traceback); } return maybe_status;}
template <typename Function>auto SafeCallIntoPythonVoid(Function&& func) -> decltype(func()) { PyAcquireGIL lock; PyObject* exc_type; PyObject* exc_value; PyObject* exc_traceback; PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); func(); if (exc_type != NULLPTR) { PyErr_Restore(exc_type, exc_value, exc_traceback); }}
// A RAII primitive that DECREFs the underlying PyObject* when it// goes out of scope.class ARROW_PYTHON_EXPORT OwnedRef { public: OwnedRef() : obj_(NULLPTR) {} OwnedRef(OwnedRef&& other) : OwnedRef(other.detach()) {} explicit OwnedRef(PyObject* obj) : obj_(obj) {}
OwnedRef& operator=(OwnedRef&& other) { obj_ = other.detach(); return *this; }
~OwnedRef() { // GH-38626: destructor may be called after the Python interpreter is finalized. if (Py_IsInitialized()) { reset(); } }
void reset(PyObject* obj) { Py_XDECREF(obj_); obj_ = obj; }
void reset() { reset(NULLPTR); }
PyObject* detach() { PyObject* result = obj_; obj_ = NULLPTR; return result; }
PyObject* obj() const { return obj_; }
PyObject** ref() { return &obj_; }
operator bool() const { return obj_ != NULLPTR; }
private: ARROW_DISALLOW_COPY_AND_ASSIGN(OwnedRef);
PyObject* obj_;};
// Same as OwnedRef, but ensures the GIL is taken when it goes out of scope.// This is for situations where the GIL is not always known to be held// (e.g. if it is released in the middle of a function for performance reasons)class ARROW_PYTHON_EXPORT OwnedRefNoGIL : public OwnedRef { public: OwnedRefNoGIL() : OwnedRef() {} OwnedRefNoGIL(OwnedRefNoGIL&& other) : OwnedRef(other.detach()) {} explicit OwnedRefNoGIL(PyObject* obj) : OwnedRef(obj) {}
~OwnedRefNoGIL() { // GH-38626: destructor may be called after the Python interpreter is finalized. if (Py_IsInitialized() && obj() != NULLPTR) { PyAcquireGIL lock; reset(); } }};
template <template <typename...> typename SmartPtr, typename... Ts>class SmartPtrNoGIL : public SmartPtr<Ts...> { using Base = SmartPtr<Ts...>;
public: template <typename... Args> SmartPtrNoGIL(Args&&... args) : Base(std::forward<Args>(args)...) {}
~SmartPtrNoGIL() { reset(); }
template <typename... Args> void reset(Args&&... args) { auto release_guard = optional_gil_release(); Base::reset(std::forward<Args>(args)...); }
template <typename V> SmartPtrNoGIL& operator=(V&& v) { auto release_guard = optional_gil_release(); Base::operator=(std::forward<V>(v)); return *this; }
private: // Only release the GIL if we own an object *and* the Python runtime is // valid *and* the GIL is held. std::optional<PyReleaseGIL> optional_gil_release() const { if (this->get() != nullptr && Py_IsInitialized() && PyGILState_Check()) { return PyReleaseGIL(); } return {}; }};
/// \brief A std::shared_ptr<T, ...> subclass that releases the GIL when destroying Ttemplate <typename... Ts>using SharedPtrNoGIL = SmartPtrNoGIL<std::shared_ptr, Ts...>;
/// \brief A std::unique_ptr<T, ...> subclass that releases the GIL when destroying Ttemplate <typename... Ts>using UniquePtrNoGIL = SmartPtrNoGIL<std::unique_ptr, Ts...>;
template <typename Fn>struct BoundFunction;
template <typename... Args>struct BoundFunction<void(PyObject*, Args...)> { // We bind `cdef void fn(object, ...)` to get a `Status(...)` // where the Status contains any Python error raised by `fn` using Unbound = void(PyObject*, Args...); using Bound = Status(Args...);
BoundFunction(Unbound* unbound, PyObject* bound_arg) : unbound_(unbound), bound_arg_(bound_arg) {}
Status Invoke(Args... args) const { PyAcquireGIL lock; unbound_(bound_arg_.obj(), std::forward<Args>(args)...); RETURN_IF_PYERROR(); return Status::OK(); }
Unbound* unbound_; OwnedRefNoGIL bound_arg_;};
template <typename Return, typename... Args>struct BoundFunction<Return(PyObject*, Args...)> { // We bind `cdef Return fn(object, ...)` to get a `Result<Return>(...)` // where the Result contains any Python error raised by `fn` or the // return value from `fn`. using Unbound = Return(PyObject*, Args...); using Bound = Result<Return>(Args...);
BoundFunction(Unbound* unbound, PyObject* bound_arg) : unbound_(unbound), bound_arg_(bound_arg) {}
Result<Return> Invoke(Args... args) const { PyAcquireGIL lock; Return ret = unbound_(bound_arg_.obj(), std::forward<Args>(args)...); RETURN_IF_PYERROR(); return ret; }
Unbound* unbound_; OwnedRefNoGIL bound_arg_;};
template <typename OutFn, typename Return, typename... Args>std::function<OutFn> BindFunction(Return (*unbound)(PyObject*, Args...), PyObject* bound_arg) { using Fn = BoundFunction<Return(PyObject*, Args...)>;
static_assert(std::is_same<typename Fn::Bound, OutFn>::value, "requested bound function of unsupported type");
Py_XINCREF(bound_arg); auto bound_fn = std::make_shared<Fn>(unbound, bound_arg); return [bound_fn](Args... args) { return bound_fn->Invoke(std::forward<Args>(args)...); };}
// A temporary conversion of a Python object to a bytes area.struct PyBytesView { const char* bytes; Py_ssize_t size; bool is_utf8;
static Result<PyBytesView> FromString(PyObject* obj, bool check_utf8 = false) { PyBytesView self; ARROW_RETURN_NOT_OK(self.ParseString(obj, check_utf8)); return std::move(self); }
static Result<PyBytesView> FromUnicode(PyObject* obj) { PyBytesView self; ARROW_RETURN_NOT_OK(self.ParseUnicode(obj)); return std::move(self); }
static Result<PyBytesView> FromBinary(PyObject* obj) { PyBytesView self; ARROW_RETURN_NOT_OK(self.ParseBinary(obj)); return std::move(self); }
// View the given Python object as string-like, i.e. str or (utf8) bytes Status ParseString(PyObject* obj, bool check_utf8 = false) { if (PyUnicode_Check(obj)) { return ParseUnicode(obj); } else { ARROW_RETURN_NOT_OK(ParseBinary(obj)); if (check_utf8) { // Check the bytes are utf8 utf-8 OwnedRef decoded(PyUnicode_FromStringAndSize(bytes, size)); if (ARROW_PREDICT_TRUE(!PyErr_Occurred())) { is_utf8 = true; } else { PyErr_Clear(); is_utf8 = false; } } return Status::OK(); } }
// View the given Python object as unicode string Status ParseUnicode(PyObject* obj) { // The utf-8 representation is cached on the unicode object bytes = PyUnicode_AsUTF8AndSize(obj, &size); RETURN_IF_PYERROR(); is_utf8 = true; return Status::OK(); }
// View the given Python object as binary-like, i.e. bytes Status ParseBinary(PyObject* obj) { if (PyBytes_Check(obj)) { bytes = PyBytes_AS_STRING(obj); size = PyBytes_GET_SIZE(obj); is_utf8 = false; } else if (PyByteArray_Check(obj)) { bytes = PyByteArray_AS_STRING(obj); size = PyByteArray_GET_SIZE(obj); is_utf8 = false; } else if (PyMemoryView_Check(obj)) { PyObject* ref = PyMemoryView_GetContiguous(obj, PyBUF_READ, 'C'); RETURN_IF_PYERROR(); Py_buffer* buffer = PyMemoryView_GET_BUFFER(ref); bytes = reinterpret_cast<const char*>(buffer->buf); size = buffer->len; is_utf8 = false; } else { return Status::TypeError("Expected bytes, got a '", Py_TYPE(obj)->tp_name, "' object"); } return Status::OK(); }
// Parse bytes from a uuid.UUID object (stores reference to keep bytes alive) Status ParseUuid(PyObject* obj) { ref.reset(PyObject_GetAttrString(obj, "bytes")); RETURN_IF_PYERROR(); if (!PyBytes_Check(ref.obj())) { return Status::TypeError("Expected uuid.UUID.bytes to return bytes, got '", Py_TYPE(ref.obj())->tp_name, "' object"); } bytes = PyBytes_AS_STRING(ref.obj()); size = PyBytes_GET_SIZE(ref.obj()); is_utf8 = false; return Status::OK(); }
protected: OwnedRef ref;};
class ARROW_PYTHON_EXPORT PyBuffer : public Buffer { public: /// While memoryview objects support multi-dimensional buffers, PyBuffer only supports /// one-dimensional byte buffers. ~PyBuffer();
static Result<std::shared_ptr<Buffer>> FromPyObject(PyObject* obj);
private: PyBuffer(); Status Init(PyObject*);
Py_buffer py_buf_;};
// Return the common PyArrow memory poolARROW_PYTHON_EXPORT void set_default_memory_pool(MemoryPool* pool);ARROW_PYTHON_EXPORT MemoryPool* get_memory_pool();
// This is annoying: because C++11 does not allow implicit conversion of string// literals to non-const char*, we need to go through some gymnastics to use// PyObject_CallMethod without a lot of pain (its arguments are non-const// char*)template <typename... ArgTypes>static inline PyObject* cpp_PyObject_CallMethod(PyObject* obj, const char* method_name, const char* argspec, ArgTypes... args) { return PyObject_CallMethod(obj, const_cast<char*>(method_name), const_cast<char*>(argspec), args...);}
} // namespace py} // namespace arrow1234567891011121314151617181920212223242526272829303132333435363738394041424344454647// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <string>
#include "arrow/python/visibility.h"
namespace arrow {namespace py {
struct BuildInfo { // The uppercase build type, e.g. "DEBUG" or "RELEASE" std::string build_type;};
/// \brief Get build info for PyArrow.///ARROW_PYTHON_EXPORTconst BuildInfo& GetBuildInfo();
namespace internal {
ARROW_PYTHON_EXPORTbool IsOpenTelemetryEnabled();
ARROW_PYTHON_EXPORTbool IsThreadingEnabled();
} // namespace internal} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <functional>#include <memory>#include <string>#include <vector>
#include "arrow/csv/options.h"#include "arrow/python/common.h"#include "arrow/util/macros.h"
namespace arrow {namespace py {namespace csv {
using PyInvalidRowCallback = std::function<::arrow::csv::InvalidRowResult( PyObject*, const ::arrow::csv::InvalidRow&)>;
ARROW_PYTHON_EXPORT::arrow::csv::InvalidRowHandler MakeInvalidRowHandler(PyInvalidRowCallback, PyObject* handler);
} // namespace csv} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <algorithm>#include <chrono>
#include "arrow/python/platform.h"#include "arrow/python/visibility.h"#include "arrow/result.h"#include "arrow/status.h"#include "arrow/type.h"#include "arrow/type_fwd.h"#include "arrow/util/int_util_overflow.h"#include "arrow/util/logging.h"
// By default, PyDateTimeAPI is a *static* variable. This forces// PyDateTime_IMPORT to be called in every C/C++ module using the// C datetime API. This is error-prone and potentially costly.// Instead, we redefine PyDateTimeAPI to point to a global variable,// which is initialized once by calling InitDatetime().#ifdef PYPY_VERSION# include "datetime.h"#else# define PyDateTimeAPI ::arrow::py::internal::datetime_api#endif
namespace arrow {using internal::AddWithOverflow;using internal::MultiplyWithOverflow;namespace py {namespace internal {
#ifndef PYPY_VERSIONextern PyDateTime_CAPI* datetime_api;
ARROW_PYTHON_EXPORTvoid InitDatetime();#endif
// Returns the MonthDayNano namedtuple type (increments the reference count).ARROW_PYTHON_EXPORTPyObject* NewMonthDayNanoTupleType();
ARROW_PYTHON_EXPORTinline int64_t PyTime_to_us(PyObject* pytime) { return (PyDateTime_TIME_GET_HOUR(pytime) * 3600000000LL + PyDateTime_TIME_GET_MINUTE(pytime) * 60000000LL + PyDateTime_TIME_GET_SECOND(pytime) * 1000000LL + PyDateTime_TIME_GET_MICROSECOND(pytime));}
ARROW_PYTHON_EXPORTinline int64_t PyTime_to_s(PyObject* pytime) { return PyTime_to_us(pytime) / 1000000; }
ARROW_PYTHON_EXPORTinline int64_t PyTime_to_ms(PyObject* pytime) { return PyTime_to_us(pytime) / 1000; }
ARROW_PYTHON_EXPORTinline int64_t PyTime_to_ns(PyObject* pytime) { return PyTime_to_us(pytime) * 1000; }
ARROW_PYTHON_EXPORTStatus PyTime_from_int(int64_t val, const TimeUnit::type unit, PyObject** out);
ARROW_PYTHON_EXPORTStatus PyDate_from_int(int64_t val, const DateUnit unit, PyObject** out);
// WARNING: This function returns a naive datetime.ARROW_PYTHON_EXPORTStatus PyDateTime_from_int(int64_t val, const TimeUnit::type unit, PyObject** out);
// This declaration must be the same as in filesystem/filesystem.husing TimePoint = std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>;
ARROW_PYTHON_EXPORTint64_t PyDate_to_days(PyDateTime_Date* pydate);
ARROW_PYTHON_EXPORTinline int64_t PyDate_to_s(PyDateTime_Date* pydate) { return PyDate_to_days(pydate) * 86400LL;}
ARROW_PYTHON_EXPORTinline int64_t PyDate_to_ms(PyDateTime_Date* pydate) { return PyDate_to_days(pydate) * 86400000LL;}
ARROW_PYTHON_EXPORTinline int64_t PyDateTime_to_s(PyDateTime_DateTime* pydatetime) { return (PyDate_to_s(reinterpret_cast<PyDateTime_Date*>(pydatetime)) + PyDateTime_DATE_GET_HOUR(pydatetime) * 3600LL + PyDateTime_DATE_GET_MINUTE(pydatetime) * 60LL + PyDateTime_DATE_GET_SECOND(pydatetime));}
ARROW_PYTHON_EXPORTinline int64_t PyDateTime_to_ms(PyDateTime_DateTime* pydatetime) { return (PyDateTime_to_s(pydatetime) * 1000LL + PyDateTime_DATE_GET_MICROSECOND(pydatetime) / 1000);}
ARROW_PYTHON_EXPORTinline int64_t PyDateTime_to_us(PyDateTime_DateTime* pydatetime) { return (PyDateTime_to_s(pydatetime) * 1000000LL + PyDateTime_DATE_GET_MICROSECOND(pydatetime));}
ARROW_PYTHON_EXPORTinline int64_t PyDateTime_to_ns(PyDateTime_DateTime* pydatetime) { return PyDateTime_to_us(pydatetime) * 1000LL;}
ARROW_PYTHON_EXPORTinline TimePoint PyDateTime_to_TimePoint(PyDateTime_DateTime* pydatetime) { return TimePoint(TimePoint::duration(PyDateTime_to_ns(pydatetime)));}
ARROW_PYTHON_EXPORTinline int64_t TimePoint_to_ns(TimePoint val) { return val.time_since_epoch().count(); }
ARROW_PYTHON_EXPORTinline TimePoint TimePoint_from_s(double val) { return TimePoint(TimePoint::duration(static_cast<int64_t>(1e9 * val)));}
ARROW_PYTHON_EXPORTinline TimePoint TimePoint_from_ns(int64_t val) { return TimePoint(TimePoint::duration(val));}
ARROW_PYTHON_EXPORTinline int64_t PyDelta_to_s(PyDateTime_Delta* pytimedelta) { return (PyDateTime_DELTA_GET_DAYS(pytimedelta) * 86400LL + PyDateTime_DELTA_GET_SECONDS(pytimedelta));}
ARROW_PYTHON_EXPORTinline int64_t PyDelta_to_ms(PyDateTime_Delta* pytimedelta) { return (PyDelta_to_s(pytimedelta) * 1000LL + PyDateTime_DELTA_GET_MICROSECONDS(pytimedelta) / 1000);}
ARROW_PYTHON_EXPORTinline Result<int64_t> PyDelta_to_us(PyDateTime_Delta* pytimedelta) { int64_t result = PyDelta_to_s(pytimedelta); if (MultiplyWithOverflow(result, 1000000LL, &result)) { return Status::Invalid("Timedelta too large to fit in 64-bit integer"); } if (AddWithOverflow(result, PyDateTime_DELTA_GET_MICROSECONDS(pytimedelta), &result)) { return Status::Invalid("Timedelta too large to fit in 64-bit integer"); } return result;}
ARROW_PYTHON_EXPORTinline Result<int64_t> PyDelta_to_ns(PyDateTime_Delta* pytimedelta) { ARROW_ASSIGN_OR_RAISE(int64_t result, PyDelta_to_us(pytimedelta)); if (MultiplyWithOverflow(result, 1000LL, &result)) { return Status::Invalid("Timedelta too large to fit in 64-bit integer"); } return result;}
ARROW_PYTHON_EXPORTResult<int64_t> PyDateTime_utcoffset_s(PyObject* pydatetime);
/// \brief Convert a time zone name into a time zone object.////// Supported input strings are:/// * As used in the Olson time zone database (the "tz database" or/// "tzdata"), such as "America/New_York"/// * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30/// GIL must be held when calling this method.ARROW_PYTHON_EXPORTResult<PyObject*> StringToTzinfo(const std::string& tz, bool prefer_zoneinfo = true);
/// \brief Convert a time zone object to a string representation.////// The output strings are:/// * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30/// if the input object is either an instance of pytz._FixedOffset or/// datetime.timedelta/// * The timezone's name if the input object's tzname() method returns with a/// non-empty timezone name such as "UTC" or "America/New_York"////// GIL must be held when calling this method.ARROW_PYTHON_EXPORTResult<std::string> TzinfoToString(PyObject* pytzinfo);
/// \brief Convert MonthDayNano to a python namedtuple.////// Return a named tuple (pyarrow.MonthDayNano) containing attributes/// "months", "days", "nanoseconds" in the given order/// with values extracted from the fields on interval.////// GIL must be held when calling this method.ARROW_PYTHON_EXPORTPyObject* MonthDayNanoIntervalToNamedTuple( const MonthDayNanoIntervalType::MonthDayNanos& interval);
/// \brief Convert the given Array to a PyList object containing/// pyarrow.MonthDayNano objects.ARROW_PYTHON_EXPORTResult<PyObject*> MonthDayNanoIntervalArrayToPyList( const MonthDayNanoIntervalArray& array);
/// \brief Convert the Scalar object to a pyarrow.MonthDayNano (or None if/// is isn't valid).ARROW_PYTHON_EXPORTResult<PyObject*> MonthDayNanoIntervalScalarToPyObject( const MonthDayNanoIntervalScalar& scalar);
} // namespace internal} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <string>
#include "arrow/python/visibility.h"#include "arrow/type.h"
namespace arrow {
class Decimal128;class Decimal256;
namespace py {
class OwnedRef;
//// Python Decimal support//
namespace internal {
// \brief Import the Python Decimal typeARROW_PYTHON_EXPORTStatus ImportDecimalType(OwnedRef* decimal_type);
// \brief Convert a Python Decimal object to a C++ string// \param[in] python_decimal A Python decimal.Decimal instance// \param[out] The string representation of the Python Decimal instance// \return The status of the operationARROW_PYTHON_EXPORTStatus PythonDecimalToString(PyObject* python_decimal, std::string* out);
// \brief Convert a C++ std::string to a Python Decimal instance// \param[in] decimal_constructor The decimal type object// \param[in] decimal_string A decimal string// \return An instance of decimal.DecimalARROW_PYTHON_EXPORTPyObject* DecimalFromString(PyObject* decimal_constructor, const std::string& decimal_string);
// \brief Convert a Python decimal to an Arrow Decimal128 object// \param[in] python_decimal A Python decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPythonDecimal(PyObject* python_decimal, const DecimalType& arrow_type, Decimal32* out);
// \brief Convert a Python object to an Arrow Decimal128 object// \param[in] python_decimal A Python int or decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPyObject(PyObject* obj, const DecimalType& arrow_type, Decimal32* out);
// \brief Convert a Python decimal to an Arrow Decimal128 object// \param[in] python_decimal A Python decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPythonDecimal(PyObject* python_decimal, const DecimalType& arrow_type, Decimal64* out);
// \brief Convert a Python object to an Arrow Decimal128 object// \param[in] python_decimal A Python int or decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPyObject(PyObject* obj, const DecimalType& arrow_type, Decimal64* out);
// \brief Convert a Python decimal to an Arrow Decimal128 object// \param[in] python_decimal A Python decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPythonDecimal(PyObject* python_decimal, const DecimalType& arrow_type, Decimal128* out);
// \brief Convert a Python object to an Arrow Decimal128 object// \param[in] python_decimal A Python int or decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal128// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPyObject(PyObject* obj, const DecimalType& arrow_type, Decimal128* out);
// \brief Convert a Python decimal to an Arrow Decimal256 object// \param[in] python_decimal A Python decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal256// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPythonDecimal(PyObject* python_decimal, const DecimalType& arrow_type, Decimal256* out);
// \brief Convert a Python object to an Arrow Decimal256 object// \param[in] python_decimal A Python int or decimal.Decimal instance// \param[in] arrow_type An instance of arrow::DecimalType// \param[out] out A pointer to a Decimal256// \return The status of the operationARROW_PYTHON_EXPORTStatus DecimalFromPyObject(PyObject* obj, const DecimalType& arrow_type, Decimal256* out);
// \brief Check whether obj is an instance of DecimalARROW_PYTHON_EXPORTbool PyDecimal_Check(PyObject* obj);
// \brief Check whether obj is nan. This function will abort the program if the argument// is not a Decimal instanceARROW_PYTHON_EXPORTbool PyDecimal_ISNAN(PyObject* obj);
// \brief Helper class to track and update the precision and scale of a decimalclass ARROW_PYTHON_EXPORT DecimalMetadata { public: DecimalMetadata(); DecimalMetadata(int32_t precision, int32_t scale);
// \brief Adjust the precision and scale of a decimal type given a new precision and a // new scale \param[in] suggested_precision A candidate precision \param[in] // suggested_scale A candidate scale \return The status of the operation Status Update(int32_t suggested_precision, int32_t suggested_scale);
// \brief A convenient interface for updating the precision and scale based on a Python // Decimal object \param object A Python Decimal object \return The status of the // operation Status Update(PyObject* object);
int32_t precision() const { return precision_; } int32_t scale() const { return scale_; }
private: int32_t precision_; int32_t scale_;};
} // namespace internal} // namespace py} // namespace arrow12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>#include <string>
#include "arrow/extension_type.h"#include "arrow/python/common.h"#include "arrow/python/visibility.h"#include "arrow/util/macros.h"
namespace arrow {namespace py {
class ARROW_PYTHON_EXPORT PyExtensionType : public ExtensionType { public: // Implement extensionType API std::string extension_name() const override { return extension_name_; }
std::string ToString(bool show_metadata = false) const override;
bool ExtensionEquals(const ExtensionType& other) const override;
std::shared_ptr<Array> MakeArray(std::shared_ptr<ArrayData> data) const override;
Result<std::shared_ptr<DataType>> Deserialize( std::shared_ptr<DataType> storage_type, const std::string& serialized) const override;
std::string Serialize() const override;
// For use from Cython // Assumes that `typ` is borrowed static Status FromClass(const std::shared_ptr<DataType> storage_type, const std::string extension_name, PyObject* typ, std::shared_ptr<ExtensionType>* out);
// Return new ref PyObject* GetInstance() const; Status SetInstance(PyObject*) const;
protected: PyExtensionType(std::shared_ptr<DataType> storage_type, PyObject* typ, PyObject* inst = NULLPTR); PyExtensionType(std::shared_ptr<DataType> storage_type, std::string extension_name, PyObject* typ, PyObject* inst = NULLPTR);
std::string extension_name_;
// These fields are mutable because of two-step initialization. mutable OwnedRefNoGIL type_class_; // A weakref or null. Storing a strong reference to the Python extension type // instance would create an unreclaimable reference cycle between Python and C++ // (the Python instance has to keep a strong reference to the C++ ExtensionType // in other direction). Instead, we store a weakref to the instance. // If the weakref is dead, we reconstruct the instance from its serialized form. mutable OwnedRefNoGIL type_instance_; // Empty if type_instance_ is null mutable std::string serialized_;};
ARROW_PYTHON_EXPORT std::string PyExtensionName();
ARROW_PYTHON_EXPORT Status RegisterPyExtensionType(const std::shared_ptr<DataType>&);
ARROW_PYTHON_EXPORT Status UnregisterPyExtensionType(const std::string& type_name);
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>#include <string>#include <vector>
#include "arrow/filesystem/filesystem.h"#include "arrow/python/common.h"#include "arrow/python/visibility.h"#include "arrow/util/macros.h"
namespace arrow::py::fs {
class ARROW_PYTHON_EXPORT PyFileSystemVtable { public: std::function<void(PyObject*, std::string* out)> get_type_name; std::function<bool(PyObject*, const arrow::fs::FileSystem& other)> equals;
std::function<void(PyObject*, const std::string& path, arrow::fs::FileInfo* out)> get_file_info; std::function<void(PyObject*, const std::vector<std::string>& paths, std::vector<arrow::fs::FileInfo>* out)> get_file_info_vector; std::function<void(PyObject*, const arrow::fs::FileSelector&, std::vector<arrow::fs::FileInfo>* out)> get_file_info_selector;
std::function<void(PyObject*, const std::string& path, bool)> create_dir; std::function<void(PyObject*, const std::string& path)> delete_dir; std::function<void(PyObject*, const std::string& path, bool)> delete_dir_contents; std::function<void(PyObject*)> delete_root_dir_contents; std::function<void(PyObject*, const std::string& path)> delete_file; std::function<void(PyObject*, const std::string& src, const std::string& dest)> move; std::function<void(PyObject*, const std::string& src, const std::string& dest)> copy_file;
std::function<void(PyObject*, const std::string& path, std::shared_ptr<io::InputStream>* out)> open_input_stream; std::function<void(PyObject*, const std::string& path, std::shared_ptr<io::RandomAccessFile>* out)> open_input_file; std::function<void(PyObject*, const std::string& path, const std::shared_ptr<const KeyValueMetadata>&, std::shared_ptr<io::OutputStream>* out)> open_output_stream; std::function<void(PyObject*, const std::string& path, const std::shared_ptr<const KeyValueMetadata>&, std::shared_ptr<io::OutputStream>* out)> open_append_stream;
std::function<void(PyObject*, const std::string& path, std::string* out)> normalize_path;};
class ARROW_PYTHON_EXPORT PyFileSystem : public arrow::fs::FileSystem { public: PyFileSystem(PyObject* handler, PyFileSystemVtable vtable); ~PyFileSystem() override;
static std::shared_ptr<PyFileSystem> Make(PyObject* handler, PyFileSystemVtable vtable);
std::string type_name() const override;
bool Equals(const FileSystem& other) const override;
/// \cond FALSE using FileSystem::CreateDir; using FileSystem::DeleteDirContents; using FileSystem::GetFileInfo; using FileSystem::OpenAppendStream; using FileSystem::OpenOutputStream; /// \endcond
Result<arrow::fs::FileInfo> GetFileInfo(const std::string& path) override; Result<std::vector<arrow::fs::FileInfo>> GetFileInfo( const std::vector<std::string>& paths) override; Result<std::vector<arrow::fs::FileInfo>> GetFileInfo( const arrow::fs::FileSelector& select) override;
Status CreateDir(const std::string& path, bool recursive) override;
Status DeleteDir(const std::string& path) override; Status DeleteDirContents(const std::string& path, bool missing_dir_ok) override; Status DeleteRootDirContents() override;
Status DeleteFile(const std::string& path) override;
Status Move(const std::string& src, const std::string& dest) override;
Status CopyFile(const std::string& src, const std::string& dest) override;
Result<std::shared_ptr<io::InputStream>> OpenInputStream( const std::string& path) override; Result<std::shared_ptr<io::RandomAccessFile>> OpenInputFile( const std::string& path) override; Result<std::shared_ptr<io::OutputStream>> OpenOutputStream( const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) override; Result<std::shared_ptr<io::OutputStream>> OpenAppendStream( const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) override;
Result<std::string> NormalizePath(std::string path) override;
PyObject* handler() const { return handler_.obj(); }
private: OwnedRefNoGIL handler_; PyFileSystemVtable vtable_;};
} // namespace arrow::py::fs123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>#include <string>#include <vector>
#include "arrow/flight/api.h"#include "arrow/ipc/dictionary.h"#include "arrow/python/common.h"
#if defined(_WIN32) || defined(__CYGWIN__) // Windows# if defined(_MSC_VER)# pragma warning(disable : 4251)# else# pragma GCC diagnostic ignored "-Wattributes"# endif
# ifdef ARROW_PYTHON_STATIC# define ARROW_PYFLIGHT_EXPORT# elif defined(ARROW_PYFLIGHT_EXPORTING)# define ARROW_PYFLIGHT_EXPORT __declspec(dllexport)# else# define ARROW_PYFLIGHT_EXPORT __declspec(dllimport)# endif
#else // Not Windows# ifndef ARROW_PYFLIGHT_EXPORT# define ARROW_PYFLIGHT_EXPORT __attribute__((visibility("default")))# endif#endif // Non-Windows
namespace arrow {
namespace py {
namespace flight {
ARROW_PYFLIGHT_EXPORTextern const char* kPyServerMiddlewareName;
/// \brief A table of function pointers for calling from C++ into/// Python.class ARROW_PYFLIGHT_EXPORT PyFlightServerVtable { public: std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, const arrow::flight::Criteria*, std::unique_ptr<arrow::flight::FlightListing>*)> list_flights; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, const arrow::flight::FlightDescriptor&, std::unique_ptr<arrow::flight::FlightInfo>*)> get_flight_info; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, const arrow::flight::FlightDescriptor&, std::unique_ptr<arrow::flight::SchemaResult>*)> get_schema; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, const arrow::flight::Ticket&, std::unique_ptr<arrow::flight::FlightDataStream>*)> do_get; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, std::unique_ptr<arrow::flight::FlightMessageReader>, std::unique_ptr<arrow::flight::FlightMetadataWriter>)> do_put; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, std::unique_ptr<arrow::flight::FlightMessageReader>, std::unique_ptr<arrow::flight::FlightMessageWriter>)> do_exchange; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, const arrow::flight::Action&, std::unique_ptr<arrow::flight::ResultStream>*)> do_action; std::function<Status(PyObject*, const arrow::flight::ServerCallContext&, std::vector<arrow::flight::ActionType>*)> list_actions;};
class ARROW_PYFLIGHT_EXPORT PyServerAuthHandlerVtable { public: std::function<Status(PyObject*, arrow::flight::ServerAuthSender*, arrow::flight::ServerAuthReader*)> authenticate; std::function<Status(PyObject*, const std::string&, std::string*)> is_valid;};
class ARROW_PYFLIGHT_EXPORT PyClientAuthHandlerVtable { public: std::function<Status(PyObject*, arrow::flight::ClientAuthSender*, arrow::flight::ClientAuthReader*)> authenticate; std::function<Status(PyObject*, std::string*)> get_token;};
/// \brief A helper to implement an auth mechanism in Python.class ARROW_PYFLIGHT_EXPORT PyServerAuthHandler : public arrow::flight::ServerAuthHandler { public: explicit PyServerAuthHandler(PyObject* handler, const PyServerAuthHandlerVtable& vtable); Status Authenticate(const arrow::flight::ServerCallContext& context, arrow::flight::ServerAuthSender* outgoing, arrow::flight::ServerAuthReader* incoming) override; Status IsValid(const std::string& token, std::string* peer_identity) override;
private: OwnedRefNoGIL handler_; PyServerAuthHandlerVtable vtable_;};
/// \brief A helper to implement an auth mechanism in Python.class ARROW_PYFLIGHT_EXPORT PyClientAuthHandler : public arrow::flight::ClientAuthHandler { public: explicit PyClientAuthHandler(PyObject* handler, const PyClientAuthHandlerVtable& vtable); Status Authenticate(arrow::flight::ClientAuthSender* outgoing, arrow::flight::ClientAuthReader* incoming) override; Status GetToken(std::string* token) override;
private: OwnedRefNoGIL handler_; PyClientAuthHandlerVtable vtable_;};
class ARROW_PYFLIGHT_EXPORT PyFlightServer : public arrow::flight::FlightServerBase { public: explicit PyFlightServer(PyObject* server, const PyFlightServerVtable& vtable);
// Like Serve(), but set up signals and invoke Python signal handlers // if necessary. This function may return with a Python exception set. Status ServeWithSignals();
Status ListFlights(const arrow::flight::ServerCallContext& context, const arrow::flight::Criteria* criteria, std::unique_ptr<arrow::flight::FlightListing>* listings) override; Status GetFlightInfo(const arrow::flight::ServerCallContext& context, const arrow::flight::FlightDescriptor& request, std::unique_ptr<arrow::flight::FlightInfo>* info) override; Status GetSchema(const arrow::flight::ServerCallContext& context, const arrow::flight::FlightDescriptor& request, std::unique_ptr<arrow::flight::SchemaResult>* result) override; Status DoGet(const arrow::flight::ServerCallContext& context, const arrow::flight::Ticket& request, std::unique_ptr<arrow::flight::FlightDataStream>* stream) override; Status DoPut(const arrow::flight::ServerCallContext& context, std::unique_ptr<arrow::flight::FlightMessageReader> reader, std::unique_ptr<arrow::flight::FlightMetadataWriter> writer) override; Status DoExchange(const arrow::flight::ServerCallContext& context, std::unique_ptr<arrow::flight::FlightMessageReader> reader, std::unique_ptr<arrow::flight::FlightMessageWriter> writer) override; Status DoAction(const arrow::flight::ServerCallContext& context, const arrow::flight::Action& action, std::unique_ptr<arrow::flight::ResultStream>* result) override; Status ListActions(const arrow::flight::ServerCallContext& context, std::vector<arrow::flight::ActionType>* actions) override;
private: OwnedRefNoGIL server_; PyFlightServerVtable vtable_;};
/// \brief A callback that obtains the next result from a Flight action.typedef std::function<Status(PyObject*, std::unique_ptr<arrow::flight::Result>*)> PyFlightResultStreamCallback;
/// \brief A ResultStream built around a Python callback.class ARROW_PYFLIGHT_EXPORT PyFlightResultStream : public arrow::flight::ResultStream { public: /// \brief Construct a FlightResultStream from a Python object and callback. /// Must only be called while holding the GIL. explicit PyFlightResultStream(PyObject* generator, PyFlightResultStreamCallback callback); arrow::Result<std::unique_ptr<arrow::flight::Result>> Next() override;
private: OwnedRefNoGIL generator_; PyFlightResultStreamCallback callback_;};
/// \brief A wrapper around a FlightDataStream that keeps alive a/// Python object backing it.class ARROW_PYFLIGHT_EXPORT PyFlightDataStream : public arrow::flight::FlightDataStream { public: /// \brief Construct a FlightDataStream from a Python object and underlying stream. /// Must only be called while holding the GIL. explicit PyFlightDataStream(PyObject* data_source, std::unique_ptr<arrow::flight::FlightDataStream> stream);
std::shared_ptr<Schema> schema() override; arrow::Result<arrow::flight::FlightPayload> GetSchemaPayload() override; arrow::Result<arrow::flight::FlightPayload> Next() override;
private: OwnedRefNoGIL data_source_; std::unique_ptr<arrow::flight::FlightDataStream> stream_;};
class ARROW_PYFLIGHT_EXPORT PyServerMiddlewareFactory : public arrow::flight::ServerMiddlewareFactory { public: /// \brief A callback to create the middleware instance in Python typedef std::function<Status( PyObject*, const arrow::flight::CallInfo& info, const arrow::flight::CallHeaders& incoming_headers, std::shared_ptr<arrow::flight::ServerMiddleware>* middleware)> StartCallCallback;
/// \brief Must only be called while holding the GIL. explicit PyServerMiddlewareFactory(PyObject* factory, StartCallCallback start_call);
Status StartCall(const arrow::flight::CallInfo& info, const arrow::flight::ServerCallContext& context, std::shared_ptr<arrow::flight::ServerMiddleware>* middleware) override;
private: OwnedRefNoGIL factory_; StartCallCallback start_call_;};
class ARROW_PYFLIGHT_EXPORT PyServerMiddleware : public arrow::flight::ServerMiddleware { public: typedef std::function<Status(PyObject*, arrow::flight::AddCallHeaders* outgoing_headers)> SendingHeadersCallback; typedef std::function<Status(PyObject*, const Status& status)> CallCompletedCallback;
struct Vtable { SendingHeadersCallback sending_headers; CallCompletedCallback call_completed; };
/// \brief Must only be called while holding the GIL. explicit PyServerMiddleware(PyObject* middleware, Vtable vtable);
void SendingHeaders(arrow::flight::AddCallHeaders* outgoing_headers) override; void CallCompleted(const Status& status) override; std::string name() const override; /// \brief Get the underlying Python object. PyObject* py_object() const;
private: OwnedRefNoGIL middleware_; Vtable vtable_;};
class ARROW_PYFLIGHT_EXPORT PyClientMiddlewareFactory : public arrow::flight::ClientMiddlewareFactory { public: /// \brief A callback to create the middleware instance in Python typedef std::function<Status( PyObject*, const arrow::flight::CallInfo& info, std::unique_ptr<arrow::flight::ClientMiddleware>* middleware)> StartCallCallback;
/// \brief Must only be called while holding the GIL. explicit PyClientMiddlewareFactory(PyObject* factory, StartCallCallback start_call);
void StartCall(const arrow::flight::CallInfo& info, std::unique_ptr<arrow::flight::ClientMiddleware>* middleware) override;
private: OwnedRefNoGIL factory_; StartCallCallback start_call_;};
class ARROW_PYFLIGHT_EXPORT PyClientMiddleware : public arrow::flight::ClientMiddleware { public: typedef std::function<Status(PyObject*, arrow::flight::AddCallHeaders* outgoing_headers)> SendingHeadersCallback; typedef std::function<Status(PyObject*, const arrow::flight::CallHeaders& incoming_headers)> ReceivedHeadersCallback; typedef std::function<Status(PyObject*, const Status& status)> CallCompletedCallback;
struct Vtable { SendingHeadersCallback sending_headers; ReceivedHeadersCallback received_headers; CallCompletedCallback call_completed; };
/// \brief Must only be called while holding the GIL. explicit PyClientMiddleware(PyObject* factory, Vtable vtable);
void SendingHeaders(arrow::flight::AddCallHeaders* outgoing_headers) override; void ReceivedHeaders(const arrow::flight::CallHeaders& incoming_headers) override; void CallCompleted(const Status& status) override;
private: OwnedRefNoGIL middleware_; Vtable vtable_;};
/// \brief A callback that obtains the next payload from a Flight result stream.typedef std::function<Status(PyObject*, arrow::flight::FlightPayload*)> PyGeneratorFlightDataStreamCallback;
/// \brief A FlightDataStream built around a Python callback.class ARROW_PYFLIGHT_EXPORT PyGeneratorFlightDataStream : public arrow::flight::FlightDataStream { public: /// \brief Construct a FlightDataStream from a Python object and underlying stream. /// Must only be called while holding the GIL. explicit PyGeneratorFlightDataStream(PyObject* generator, std::shared_ptr<arrow::Schema> schema, PyGeneratorFlightDataStreamCallback callback, const ipc::IpcWriteOptions& options); std::shared_ptr<Schema> schema() override; arrow::Result<arrow::flight::FlightPayload> GetSchemaPayload() override; arrow::Result<arrow::flight::FlightPayload> Next() override;
private: OwnedRefNoGIL generator_; std::shared_ptr<arrow::Schema> schema_; ipc::DictionaryFieldMapper mapper_; ipc::IpcWriteOptions options_; PyGeneratorFlightDataStreamCallback callback_;};
ARROW_PYFLIGHT_EXPORTStatus CreateFlightInfo(const std::shared_ptr<arrow::Schema>& schema, const arrow::flight::FlightDescriptor& descriptor, const std::vector<arrow::flight::FlightEndpoint>& endpoints, int64_t total_records, int64_t total_bytes, bool ordered, const std::string& app_metadata, std::unique_ptr<arrow::flight::FlightInfo>* out);
/// \brief Create a SchemaResult from schema.ARROW_PYFLIGHT_EXPORTStatus CreateSchemaResult(const std::shared_ptr<arrow::Schema>& schema, std::unique_ptr<arrow::flight::SchemaResult>* out);
} // namespace flight} // namespace py} // namespace arrow1234567891011121314151617181920212223242526272829// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/visibility.h"
namespace arrow {namespace gdb {
ARROW_PYTHON_EXPORTvoid TestSession();
} // namespace gdb} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/platform.h"
#include <limits>#include <memory>#include <string>#include <utility>
#include "arrow/python/numpy_interop.h"
#include "arrow/python/visibility.h"#include "arrow/type.h"#include "arrow/util/macros.h"
namespace arrow {
namespace py {
class OwnedRef;
// \brief Get an arrow DataType instance from Arrow's Type::type enum// \param[in] type One of the values of Arrow's Type::type enum// \return A shared pointer to DataTypeARROW_PYTHON_EXPORT std::shared_ptr<DataType> GetPrimitiveType(Type::type type);
// \brief Construct a Python float object from a half-float uint16_t value.ARROW_PYTHON_EXPORT PyObject* PyFloat_FromHalf(uint16_t value);
// \brief Convert a Python object to a half-float uint16_t value.ARROW_PYTHON_EXPORT Result<uint16_t> PyFloat_AsHalf(PyObject* obj);
namespace internal {
// \brief Check that a Python module has been already imported// \param[in] module_name The name of the moduleResult<bool> IsModuleImported(const std::string& module_name);
// \brief Import a Python module// \param[in] module_name The name of the module// \param[out] ref The OwnedRef containing the module PyObject*ARROW_PYTHON_EXPORTStatus ImportModule(const std::string& module_name, OwnedRef* ref);
// \brief Import an object from a Python module// \param[in] module A Python module// \param[in] name The name of the object to import// \param[out] ref The OwnedRef containing the \c name attribute of the Python module \c// moduleARROW_PYTHON_EXPORTStatus ImportFromModule(PyObject* module, const std::string& name, OwnedRef* ref);
// \brief Check whether obj is an integer, independent of Python versions.inline bool IsPyInteger(PyObject* obj) { return PyLong_Check(obj); }
// \brief Import symbols from pandas that we need for various type-checking,// like pandas.NaT or pandas.NAvoid InitPandasStaticData();
// \brief Use pandas missing value semantics to check if a value is nullARROW_PYTHON_EXPORTbool PandasObjectIsNull(PyObject* obj);
// \brief Check that obj is a pandas.Timedelta instanceARROW_PYTHON_EXPORTbool IsPandasTimedelta(PyObject* obj);
// \brief Check that obj is a pandas.Timestamp instancebool IsPandasTimestamp(PyObject* obj);
// \brief Returned a borrowed reference to the pandas.tseries.offsets.DateOffsetPyObject* BorrowPandasDataOffsetType();
// \brief Check whether obj is a floating-point NaNARROW_PYTHON_EXPORTbool PyFloat_IsNaN(PyObject* obj);
// \brief Check whether obj is a uuid.UUID instanceARROW_PYTHON_EXPORTbool IsPyUuid(PyObject* obj);
inline bool IsPyBinary(PyObject* obj) { return PyBytes_Check(obj) || PyByteArray_Check(obj) || PyMemoryView_Check(obj);}
// \brief Convert a Python integer into a C integer// \param[in] obj A Python integer// \param[out] out A pointer to a C integer to hold the result of the conversion// \return The status of the operationtemplate <typename Int>Status CIntFromPython(PyObject* obj, Int* out, const std::string& overflow_message = "");
// \brief Convert a Python unicode string to a std::stringARROW_PYTHON_EXPORTStatus PyUnicode_AsStdString(PyObject* obj, std::string* out);
// \brief Convert a Python bytes object to a std::stringARROW_PYTHON_EXPORTstd::string PyBytes_AsStdString(PyObject* obj);
// \brief Call str() on the given object and return the result as a std::stringARROW_PYTHON_EXPORTStatus PyObject_StdStringStr(PyObject* obj, std::string* out);
// \brief Return the repr() of the given object (always succeeds)ARROW_PYTHON_EXPORTstd::string PyObject_StdStringRepr(PyObject* obj);
// \brief Cast the given size to int32_t, with error checkinginline Status CastSize(Py_ssize_t size, int32_t* out, const char* error_msg = "Maximum size exceeded (2GB)") { // size is assumed to be positive if (size > std::numeric_limits<int32_t>::max()) { return Status::Invalid(error_msg); } *out = static_cast<int32_t>(size); return Status::OK();}
inline Status CastSize(Py_ssize_t size, int64_t* out, const char* error_msg = NULLPTR) { // size is assumed to be positive *out = static_cast<int64_t>(size); return Status::OK();}
// \brief Print the Python object's __str__ form along with the passed error// messageARROW_PYTHON_EXPORTStatus InvalidValue(PyObject* obj, const std::string& why);
ARROW_PYTHON_EXPORTStatus InvalidType(PyObject* obj, const std::string& why);
ARROW_PYTHON_EXPORTStatus IntegerScalarToDoubleSafe(PyObject* obj, double* result);ARROW_PYTHON_EXPORTStatus IntegerScalarToFloat32Safe(PyObject* obj, float* result);
// \brief Print Python object __repr__void DebugPrint(PyObject* obj);
} // namespace internal} // namespace py} // namespace arrow12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Functions for converting between CPython built-in data structures and Arrow// data structures
#pragma once
#include "arrow/python/platform.h"
#include <memory>
#include "arrow/python/visibility.h"#include "arrow/type.h"#include "arrow/util/macros.h"
#include "common.h"
namespace arrow {
class Array;class Status;
namespace py {
// These functions take a sequence input, not arbitrary iterables
/// \brief Infer Arrow type from a Python sequence/// \param[in] obj the sequence of values/// \param[in] mask an optional mask where True values are null. May/// be nullptr/// \param[in] pandas_null_sentinels use pandas's null value markersARROW_PYTHON_EXPORTResult<std::shared_ptr<arrow::DataType>> InferArrowType(PyObject* obj, PyObject* mask, bool pandas_null_sentinels);
/// Checks whether the passed Python object is a boolean scalarARROW_PYTHON_EXPORTbool IsPyBool(PyObject* obj);
/// Checks whether the passed Python object is an integer scalarARROW_PYTHON_EXPORTbool IsPyInt(PyObject* obj);
/// Checks whether the passed Python object is a float scalarARROW_PYTHON_EXPORTbool IsPyFloat(PyObject* obj);
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>
#include "arrow/io/interfaces.h"#include "arrow/io/transform.h"
#include "arrow/python/common.h"#include "arrow/python/visibility.h"
namespace arrow {namespace py {
class ARROW_NO_EXPORT PythonFile;
class ARROW_PYTHON_EXPORT PyReadableFile : public io::RandomAccessFile { public: explicit PyReadableFile(PyObject* file); ~PyReadableFile() override;
Status Close() override; Status Abort() override; bool closed() const override;
Result<int64_t> Read(int64_t nbytes, void* out) override; Result<std::shared_ptr<Buffer>> Read(int64_t nbytes) override;
// Thread-safe version Result<int64_t> ReadAt(int64_t position, int64_t nbytes, void* out) override;
// Thread-safe version Result<std::shared_ptr<Buffer>> ReadAt(int64_t position, int64_t nbytes) override;
Result<int64_t> GetSize() override;
Status Seek(int64_t position) override;
Result<int64_t> Tell() const override;
private: std::unique_ptr<PythonFile> file_;};
class ARROW_PYTHON_EXPORT PyOutputStream : public io::OutputStream { public: explicit PyOutputStream(PyObject* file); ~PyOutputStream() override;
Status Close() override; Status Abort() override; bool closed() const override; Result<int64_t> Tell() const override; Status Write(const void* data, int64_t nbytes) override; Status Write(const std::shared_ptr<Buffer>& buffer) override;
private: std::unique_ptr<PythonFile> file_; int64_t position_;};
// TODO(wesm): seekable output files
// A Buffer subclass that keeps a PyObject reference throughout its// lifetime, such that the Python object is kept alive as long as the// C++ buffer is still needed.// Keeping the reference in a Python wrapper would be incorrect as// the Python wrapper can get destroyed even though the wrapped C++// buffer is still alive (ARROW-2270).class ARROW_PYTHON_EXPORT PyForeignBuffer : public Buffer { public: static Status Make(const uint8_t* data, int64_t size, PyObject* base, std::shared_ptr<Buffer>* out);
private: PyForeignBuffer(const uint8_t* data, int64_t size, PyObject* base) : Buffer(data, size) { Py_INCREF(base); base_.reset(base); }
OwnedRefNoGIL base_;};
// All this rigamarole because Cython is really poor with std::function<>
using TransformCallback = std::function<void( PyObject*, const std::shared_ptr<Buffer>& src, std::shared_ptr<Buffer>* out)>;
struct TransformInputStreamVTable { TransformCallback transform;};
ARROW_PYTHON_EXPORTstd::shared_ptr<::arrow::io::InputStream> MakeTransformInputStream( std::shared_ptr<::arrow::io::InputStream> wrapped, TransformInputStreamVTable vtable, PyObject* arg);
using StreamWrapFunc = std::function<Result<std::shared_ptr<io::InputStream>>( std::shared_ptr<io::InputStream>)>;ARROW_PYTHON_EXPORTstd::shared_ptr<StreamWrapFunc> MakeStreamTransformFunc(TransformInputStreamVTable vtable, PyObject* handler);} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <memory>
#include "arrow/python/common.h"#include "arrow/python/visibility.h"#include "arrow/record_batch.h"#include "arrow/result.h"#include "arrow/util/macros.h"
namespace arrow {namespace py {
class ARROW_PYTHON_EXPORT PyRecordBatchReader : public RecordBatchReader { public: std::shared_ptr<Schema> schema() const override;
Status ReadNext(std::shared_ptr<RecordBatch>* batch) override;
// For use from Cython // Assumes that `iterable` is borrowed static Result<std::shared_ptr<RecordBatchReader>> Make(std::shared_ptr<Schema>, PyObject* iterable);
protected: PyRecordBatchReader();
Status Init(std::shared_ptr<Schema>, PyObject* iterable);
std::shared_ptr<Schema> schema_; OwnedRefNoGIL iterator_;};
class ARROW_PYTHON_EXPORT CastingRecordBatchReader : public RecordBatchReader { public: std::shared_ptr<Schema> schema() const override;
Status ReadNext(std::shared_ptr<RecordBatch>* batch) override;
static Result<std::shared_ptr<RecordBatchReader>> Make( std::shared_ptr<RecordBatchReader> parent, std::shared_ptr<Schema> schema);
Status Close() override;
protected: CastingRecordBatchReader();
Status Init(std::shared_ptr<RecordBatchReader> parent, std::shared_ptr<Schema> schema);
std::shared_ptr<RecordBatchReader> parent_; std::shared_ptr<Schema> schema_;};
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <utility>
#include "arrow/array/array_primitive.h"
#include "arrow/python/common.h"#include "arrow/python/numpy_init.h"#include "arrow/python/numpy_internal.h"
namespace arrow {namespace py {namespace internal {
using arrow::internal::checked_cast;
// Visit the Python sequence, calling the given callable on each element. If// the callable returns a non-OK status, iteration stops and the status is// returned.//// The call signature for Visitor must be//// Visit(PyObject* obj, int64_t index, bool* keep_going)//// If keep_going is set to false, the iteration terminatestemplate <class VisitorFunc>inline Status VisitSequenceGeneric(PyObject* obj, int64_t offset, VisitorFunc&& func) { // VisitorFunc may set to false to terminate iteration bool keep_going = true;
if (has_numpy() && PyArray_Check(obj)) { PyArrayObject* arr_obj = reinterpret_cast<PyArrayObject*>(obj); if (PyArray_NDIM(arr_obj) != 1) { return Status::Invalid("Only 1D arrays accepted"); }
if (PyArray_DESCR(arr_obj)->type_num == NPY_OBJECT) { // It's an array object, we can fetch object pointers directly const Ndarray1DIndexer<PyObject*> objects(arr_obj); for (int64_t i = offset; keep_going && i < objects.size(); ++i) { RETURN_NOT_OK(func(objects[i], i, &keep_going)); } return Status::OK(); } // It's a non-object array, fall back on regular sequence access. // (note PyArray_GETITEM() is slightly different: it returns standard // Python types, not Numpy scalar types) // This code path is inefficient: callers should implement dedicated // logic for non-object arrays. }
if (PySequence_Check(obj)) {#ifdef Py_GIL_DISABLED if (PyTuple_Check(obj)) {#else if (PyList_Check(obj) || PyTuple_Check(obj)) {#endif // Use fast item access const Py_ssize_t size = PySequence_Fast_GET_SIZE(obj); for (Py_ssize_t i = offset; keep_going && i < size; ++i) { PyObject* value = PySequence_Fast_GET_ITEM(obj, i); RETURN_NOT_OK(func(value, static_cast<int64_t>(i), &keep_going)); } } else { // Regular sequence: avoid making a potentially large copy const Py_ssize_t size = PySequence_Size(obj); RETURN_IF_PYERROR(); for (Py_ssize_t i = offset; keep_going && i < size; ++i) { OwnedRef value_ref(PySequence_ITEM(obj, i)); RETURN_IF_PYERROR(); RETURN_NOT_OK(func(value_ref.obj(), static_cast<int64_t>(i), &keep_going)); } } } else { return Status::TypeError("Object is not a sequence"); } return Status::OK();}
// Visit sequence with no null masktemplate <class VisitorFunc>inline Status VisitSequence(PyObject* obj, int64_t offset, VisitorFunc&& func) { return VisitSequenceGeneric( obj, offset, [&func](PyObject* value, int64_t i /* unused */, bool* keep_going) { return func(value, keep_going); });}
/// Visit sequence with null masktemplate <class VisitorFunc>inline Status VisitSequenceMasked(PyObject* obj, PyObject* mo, int64_t offset, VisitorFunc&& func) { if (has_numpy() && PyArray_Check(mo)) { PyArrayObject* mask = reinterpret_cast<PyArrayObject*>(mo); if (PyArray_NDIM(mask) != 1) { return Status::Invalid("Mask must be 1D array"); } if (PyArray_SIZE(mask) != static_cast<int64_t>(PySequence_Size(obj))) { return Status::Invalid("Mask was a different length from sequence being converted"); }
const int dtype = fix_numpy_type_num(PyArray_DESCR(mask)->type_num); if (dtype == NPY_BOOL) { Ndarray1DIndexer<uint8_t> mask_values(mask);
return VisitSequenceGeneric( obj, offset, [&func, &mask_values](PyObject* value, int64_t i, bool* keep_going) { return func(value, mask_values[i], keep_going); }); } else { return Status::TypeError("Mask must be boolean dtype"); } } else if (py::is_array(mo)) { auto unwrap_mask_result = unwrap_array(mo); ARROW_RETURN_NOT_OK(unwrap_mask_result); std::shared_ptr<Array> mask_ = unwrap_mask_result.ValueOrDie(); if (mask_->type_id() != Type::type::BOOL) { return Status::TypeError("Mask must be an array of booleans"); }
if (mask_->length() != PySequence_Size(obj)) { return Status::Invalid("Mask was a different length from sequence being converted"); }
if (mask_->null_count() != 0) { return Status::TypeError("Mask must be an array of booleans"); }
BooleanArray* boolmask = checked_cast<BooleanArray*>(mask_.get()); return VisitSequenceGeneric( obj, offset, [&func, &boolmask](PyObject* value, int64_t i, bool* keep_going) { return func(value, boolmask->Value(i), keep_going); }); } else if (PySequence_Check(mo)) { if (PySequence_Size(mo) != PySequence_Size(obj)) { return Status::Invalid("Mask was a different length from sequence being converted"); } RETURN_IF_PYERROR();
return VisitSequenceGeneric( obj, offset, [&func, &mo](PyObject* value, int64_t i, bool* keep_going) { OwnedRef value_ref(PySequence_ITEM(mo, i)); if (!PyBool_Check(value_ref.obj())) return Status::TypeError("Mask must be a sequence of booleans"); return func(value, value_ref.obj() == Py_True, keep_going); }); } else { return Status::Invalid("Null mask must be a NumPy array, Arrow array or a Sequence"); }
return Status::OK();}
// Like IterateSequence, but accepts any generic iterable (including// non-restartable iterators, e.g. generators).//// The call signature for VisitorFunc must be Visit(PyObject*, bool*// keep_going). If keep_going is set to false, the iteration terminatestemplate <class VisitorFunc>inline Status VisitIterable(PyObject* obj, VisitorFunc&& func) { if (PySequence_Check(obj)) { // Numpy arrays fall here as well return VisitSequence(obj, /*offset=*/0, std::forward<VisitorFunc>(func)); } // Fall back on the iterator protocol OwnedRef iter_ref(PyObject_GetIter(obj)); PyObject* iter = iter_ref.obj(); RETURN_IF_PYERROR(); PyObject* value;
bool keep_going = true; while (keep_going && (value = PyIter_Next(iter))) { OwnedRef value_ref(value); RETURN_NOT_OK(func(value_ref.obj(), &keep_going)); } RETURN_IF_PYERROR(); // __next__() might have raised return Status::OK();}
} // namespace internal} // namespace py} // namespace arrow12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879/* Generated by Cython 3.2.9 */
#ifndef __PYX_HAVE__pyarrow__lib#define __PYX_HAVE__pyarrow__lib
#include "Python.h"
#ifndef __PYX_HAVE_API__pyarrow__lib
#ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C#elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif#else #define __PYX_EXTERN_C extern "C++"#endif
#ifndef DL_IMPORT #define DL_IMPORT(_T) _T#endif
__PYX_EXTERN_C PyObject *pyarrow_wrap_buffer(std::shared_ptr< arrow::Buffer> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_resizable_buffer(std::shared_ptr< arrow::ResizableBuffer> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_data_type(std::shared_ptr< arrow::DataType> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_field(std::shared_ptr< arrow::Field> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_schema(std::shared_ptr< arrow::Schema> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_scalar(std::shared_ptr< arrow::Scalar> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_array(std::shared_ptr< arrow::Array> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_chunked_array(std::shared_ptr< arrow::ChunkedArray> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_coo_tensor(std::shared_ptr< arrow::SparseCOOTensor> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csc_matrix(std::shared_ptr< arrow::SparseCSCMatrix> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csf_tensor(std::shared_ptr< arrow::SparseCSFTensor> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_sparse_csr_matrix(std::shared_ptr< arrow::SparseCSRMatrix> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_tensor(std::shared_ptr< arrow::Tensor> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_batch(std::shared_ptr< arrow::RecordBatch> const &);__PYX_EXTERN_C PyObject *pyarrow_wrap_table(std::shared_ptr< arrow::Table> const &);__PYX_EXTERN_C std::shared_ptr< arrow::Buffer> pyarrow_unwrap_buffer(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::DataType> pyarrow_unwrap_data_type(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Field> pyarrow_unwrap_field(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Schema> pyarrow_unwrap_schema(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Scalar> pyarrow_unwrap_scalar(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Array> pyarrow_unwrap_array(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::ChunkedArray> pyarrow_unwrap_chunked_array(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::SparseCOOTensor> pyarrow_unwrap_sparse_coo_tensor(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSCMatrix> pyarrow_unwrap_sparse_csc_matrix(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSFTensor> pyarrow_unwrap_sparse_csf_tensor(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::SparseCSRMatrix> pyarrow_unwrap_sparse_csr_matrix(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Tensor> pyarrow_unwrap_tensor(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::RecordBatch> pyarrow_unwrap_batch(PyObject *);__PYX_EXTERN_C std::shared_ptr< arrow::Table> pyarrow_unwrap_table(PyObject *);
#endif /* !__PYX_HAVE_API__pyarrow__lib */
/* WARNING: the interface of the module init function changed in CPython 3.5. *//* It now returns a PyModuleDef instance instead of a PyModule instance. */
/* WARNING: Use PyImport_AppendInittab("lib", PyInit_lib) instead of calling PyInit_lib directly from Python 3.5 */PyMODINIT_FUNC PyInit_lib(void);
#if PY_VERSION_HEX >= 0x03050000 && (defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER) || (defined(__cplusplus) && __cplusplus >= 201402L))#if defined(__cplusplus) && __cplusplus >= 201402L[[deprecated("Use PyImport_AppendInittab(\"lib\", PyInit_lib) instead of calling PyInit_lib directly.")]] inline#elif defined(__GNUC__) || defined(__clang__)__attribute__ ((__deprecated__("Use PyImport_AppendInittab(\"lib\", PyInit_lib) instead of calling PyInit_lib directly."), __unused__)) __inline__#elif defined(_MSC_VER)__declspec(deprecated("Use PyImport_AppendInittab(\"lib\", PyInit_lib) instead of calling PyInit_lib directly.")) __inline#endifstatic PyObject* __PYX_WARN_IF_PyInit_lib_INIT_CALLED(PyObject* res) { return res;}#define PyInit_lib() __PYX_WARN_IF_PyInit_lib_INIT_CALLED(PyInit_lib())#endif
#endif /* !__PYX_HAVE__pyarrow__lib */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220/* Generated by Cython 3.2.9 */
#ifndef __PYX_HAVE_API__pyarrow__lib#define __PYX_HAVE_API__pyarrow__lib#ifdef __MINGW64__#define MS_WIN64#endif#include "Python.h"#include "lib.h"
static PyObject *(*__pyx_api_f_7pyarrow_3lib_box_memory_pool)( arrow::MemoryPool *) = 0;#define box_memory_pool __pyx_api_f_7pyarrow_3lib_box_memory_poolstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_buffer)(std::shared_ptr< arrow::Buffer> const &) = 0;#define pyarrow_wrap_buffer __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_bufferstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_resizable_buffer)(std::shared_ptr< arrow::ResizableBuffer> const &) = 0;#define pyarrow_wrap_resizable_buffer __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_resizable_bufferstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_data_type)(std::shared_ptr< arrow::DataType> const &) = 0;#define pyarrow_wrap_data_type __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_data_typestatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_field)(std::shared_ptr< arrow::Field> const &) = 0;#define pyarrow_wrap_field __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_fieldstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_schema)(std::shared_ptr< arrow::Schema> const &) = 0;#define pyarrow_wrap_schema __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_schemastatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_scalar)(std::shared_ptr< arrow::Scalar> const &) = 0;#define pyarrow_wrap_scalar __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_scalarstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_array)(std::shared_ptr< arrow::Array> const &) = 0;#define pyarrow_wrap_array __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_arraystatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_chunked_array)(std::shared_ptr< arrow::ChunkedArray> const &) = 0;#define pyarrow_wrap_chunked_array __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_chunked_arraystatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_coo_tensor)(std::shared_ptr< arrow::SparseCOOTensor> const &) = 0;#define pyarrow_wrap_sparse_coo_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_coo_tensorstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csc_matrix)(std::shared_ptr< arrow::SparseCSCMatrix> const &) = 0;#define pyarrow_wrap_sparse_csc_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csc_matrixstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csf_tensor)(std::shared_ptr< arrow::SparseCSFTensor> const &) = 0;#define pyarrow_wrap_sparse_csf_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csf_tensorstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csr_matrix)(std::shared_ptr< arrow::SparseCSRMatrix> const &) = 0;#define pyarrow_wrap_sparse_csr_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csr_matrixstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_tensor)(std::shared_ptr< arrow::Tensor> const &) = 0;#define pyarrow_wrap_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_tensorstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_batch)(std::shared_ptr< arrow::RecordBatch> const &) = 0;#define pyarrow_wrap_batch __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_batchstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_table)(std::shared_ptr< arrow::Table> const &) = 0;#define pyarrow_wrap_table __pyx_api_f_7pyarrow_3lib_pyarrow_wrap_tablestatic std::shared_ptr< arrow::Buffer> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_buffer)(PyObject *) = 0;#define pyarrow_unwrap_buffer __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_bufferstatic std::shared_ptr< arrow::DataType> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_data_type)(PyObject *) = 0;#define pyarrow_unwrap_data_type __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_data_typestatic std::shared_ptr< arrow::Field> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_field)(PyObject *) = 0;#define pyarrow_unwrap_field __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_fieldstatic std::shared_ptr< arrow::Schema> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_schema)(PyObject *) = 0;#define pyarrow_unwrap_schema __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_schemastatic std::shared_ptr< arrow::Scalar> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_scalar)(PyObject *) = 0;#define pyarrow_unwrap_scalar __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_scalarstatic std::shared_ptr< arrow::Array> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_array)(PyObject *) = 0;#define pyarrow_unwrap_array __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_arraystatic std::shared_ptr< arrow::ChunkedArray> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_chunked_array)(PyObject *) = 0;#define pyarrow_unwrap_chunked_array __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_chunked_arraystatic std::shared_ptr< arrow::SparseCOOTensor> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_coo_tensor)(PyObject *) = 0;#define pyarrow_unwrap_sparse_coo_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_coo_tensorstatic std::shared_ptr< arrow::SparseCSCMatrix> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csc_matrix)(PyObject *) = 0;#define pyarrow_unwrap_sparse_csc_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csc_matrixstatic std::shared_ptr< arrow::SparseCSFTensor> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csf_tensor)(PyObject *) = 0;#define pyarrow_unwrap_sparse_csf_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csf_tensorstatic std::shared_ptr< arrow::SparseCSRMatrix> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csr_matrix)(PyObject *) = 0;#define pyarrow_unwrap_sparse_csr_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csr_matrixstatic std::shared_ptr< arrow::Tensor> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_tensor)(PyObject *) = 0;#define pyarrow_unwrap_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_tensorstatic std::shared_ptr< arrow::RecordBatch> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_batch)(PyObject *) = 0;#define pyarrow_unwrap_batch __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_batchstatic std::shared_ptr< arrow::Table> (*__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_table)(PyObject *) = 0;#define pyarrow_unwrap_table __pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_tablestatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_internal_check_status)(arrow::Status const &) = 0;#define pyarrow_internal_check_status __pyx_api_f_7pyarrow_3lib_pyarrow_internal_check_statusstatic PyObject *(*__pyx_api_f_7pyarrow_3lib_pyarrow_internal_convert_status)(arrow::Status const &) = 0;#define pyarrow_internal_convert_status __pyx_api_f_7pyarrow_3lib_pyarrow_internal_convert_statusstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_buffer)(PyObject *) = 0;#define pyarrow_is_buffer __pyx_api_f_7pyarrow_3lib_pyarrow_is_bufferstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_data_type)(PyObject *) = 0;#define pyarrow_is_data_type __pyx_api_f_7pyarrow_3lib_pyarrow_is_data_typestatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_metadata)(PyObject *) = 0;#define pyarrow_is_metadata __pyx_api_f_7pyarrow_3lib_pyarrow_is_metadatastatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_field)(PyObject *) = 0;#define pyarrow_is_field __pyx_api_f_7pyarrow_3lib_pyarrow_is_fieldstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_schema)(PyObject *) = 0;#define pyarrow_is_schema __pyx_api_f_7pyarrow_3lib_pyarrow_is_schemastatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_array)(PyObject *) = 0;#define pyarrow_is_array __pyx_api_f_7pyarrow_3lib_pyarrow_is_arraystatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_chunked_array)(PyObject *) = 0;#define pyarrow_is_chunked_array __pyx_api_f_7pyarrow_3lib_pyarrow_is_chunked_arraystatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_scalar)(PyObject *) = 0;#define pyarrow_is_scalar __pyx_api_f_7pyarrow_3lib_pyarrow_is_scalarstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_tensor)(PyObject *) = 0;#define pyarrow_is_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_is_tensorstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor)(PyObject *) = 0;#define pyarrow_is_sparse_coo_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensorstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix)(PyObject *) = 0;#define pyarrow_is_sparse_csr_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrixstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix)(PyObject *) = 0;#define pyarrow_is_sparse_csc_matrix __pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrixstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor)(PyObject *) = 0;#define pyarrow_is_sparse_csf_tensor __pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensorstatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_table)(PyObject *) = 0;#define pyarrow_is_table __pyx_api_f_7pyarrow_3lib_pyarrow_is_tablestatic int (*__pyx_api_f_7pyarrow_3lib_pyarrow_is_batch)(PyObject *) = 0;#define pyarrow_is_batch __pyx_api_f_7pyarrow_3lib_pyarrow_is_batchstatic int __Pyx_ImportFunction_3_2_9(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_9#define __PYX_HAVE_RT_ImportFromPxd_3_2_9static int __Pyx_ImportFromPxd_3_2_9(PyObject *module, const char *name, void **p, const char *sig, const char *what) { PyObject *d = 0; PyObject *cobj = 0; d = PyObject_GetAttrString(module, "__pyx_capi__"); if (!d) goto bad;#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000) PyDict_GetItemStringRef(d, name, &cobj);#else cobj = PyDict_GetItemString(d, name); Py_XINCREF(cobj);#endif if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C %.8s %.200s", PyModule_GetName(module), what, name); goto bad; } if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); goto bad; } *p = PyCapsule_GetPointer(cobj, sig); if (!(*p)) goto bad; Py_DECREF(d); Py_DECREF(cobj); return 0;bad: Py_XDECREF(d); Py_XDECREF(cobj); return -1;}#endif
#ifndef __PYX_HAVE_RT_ImportFunction_3_2_9#define __PYX_HAVE_RT_ImportFunction_3_2_9static int __Pyx_ImportFunction_3_2_9(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { union { void (*fp)(void); void *p; } tmp; int result = __Pyx_ImportFromPxd_3_2_9(module, funcname, &tmp.p, sig, "function"); if (result == 0) { *f = tmp.fp; } return result;}#endif
static int import_pyarrow__lib(void) { PyObject *module = 0; module = PyImport_ImportModule("pyarrow.lib"); if (!module) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "box_memory_pool", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_box_memory_pool, "PyObject *( arrow::MemoryPool *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_buffer", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_buffer, "PyObject *(std::shared_ptr< arrow::Buffer> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_resizable_buffer", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_resizable_buffer, "PyObject *(std::shared_ptr< arrow::ResizableBuffer> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_data_type", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_data_type, "PyObject *(std::shared_ptr< arrow::DataType> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_field", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_field, "PyObject *(std::shared_ptr< arrow::Field> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_schema", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_schema, "PyObject *(std::shared_ptr< arrow::Schema> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_scalar", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_scalar, "PyObject *(std::shared_ptr< arrow::Scalar> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_array, "PyObject *(std::shared_ptr< arrow::Array> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_chunked_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_chunked_array, "PyObject *(std::shared_ptr< arrow::ChunkedArray> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_sparse_coo_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_coo_tensor, "PyObject *(std::shared_ptr< arrow::SparseCOOTensor> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_sparse_csc_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csc_matrix, "PyObject *(std::shared_ptr< arrow::SparseCSCMatrix> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_sparse_csf_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csf_tensor, "PyObject *(std::shared_ptr< arrow::SparseCSFTensor> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_sparse_csr_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_sparse_csr_matrix, "PyObject *(std::shared_ptr< arrow::SparseCSRMatrix> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_tensor, "PyObject *(std::shared_ptr< arrow::Tensor> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_batch", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_batch, "PyObject *(std::shared_ptr< arrow::RecordBatch> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_wrap_table", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_wrap_table, "PyObject *(std::shared_ptr< arrow::Table> const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_buffer", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_buffer, "std::shared_ptr< arrow::Buffer> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_data_type", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_data_type, "std::shared_ptr< arrow::DataType> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_field", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_field, "std::shared_ptr< arrow::Field> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_schema", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_schema, "std::shared_ptr< arrow::Schema> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_scalar", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_scalar, "std::shared_ptr< arrow::Scalar> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_array, "std::shared_ptr< arrow::Array> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_chunked_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_chunked_array, "std::shared_ptr< arrow::ChunkedArray> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_sparse_coo_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_coo_tensor, "std::shared_ptr< arrow::SparseCOOTensor> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_sparse_csc_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csc_matrix, "std::shared_ptr< arrow::SparseCSCMatrix> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_sparse_csf_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csf_tensor, "std::shared_ptr< arrow::SparseCSFTensor> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_sparse_csr_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_sparse_csr_matrix, "std::shared_ptr< arrow::SparseCSRMatrix> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_tensor, "std::shared_ptr< arrow::Tensor> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_batch", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_batch, "std::shared_ptr< arrow::RecordBatch> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_unwrap_table", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_unwrap_table, "std::shared_ptr< arrow::Table> (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_internal_check_status", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_internal_check_status, "int (arrow::Status const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_internal_convert_status", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_internal_convert_status, "PyObject *(arrow::Status const &)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_buffer", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_buffer, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_data_type", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_data_type, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_metadata", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_metadata, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_field", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_field, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_schema", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_schema, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_array, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_chunked_array", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_chunked_array, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_scalar", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_scalar, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_tensor, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_sparse_coo_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_coo_tensor, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_sparse_csr_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csr_matrix, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_sparse_csc_matrix", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csc_matrix, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_sparse_csf_tensor", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_sparse_csf_tensor, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_table", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_table, "int (PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction_3_2_9(module, "pyarrow_is_batch", (void (**)(void))&__pyx_api_f_7pyarrow_3lib_pyarrow_is_batch, "int (PyObject *)") < 0) goto bad; Py_DECREF(module); module = 0; return 0; bad: Py_XDECREF(module); return -1;}
#endif /* !__PYX_HAVE_API__pyarrow__lib */123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Functions for converting between pandas's NumPy-based data representation// and Arrow data structures
#pragma once
#include "arrow/python/platform.h"
#include <memory>#include <string>#include <vector>
#include "arrow/buffer.h"#include "arrow/python/visibility.h"#include "arrow/sparse_tensor.h"
namespace arrow {
class DataType;class MemoryPool;class Status;class Tensor;
namespace py {
class ARROW_PYTHON_EXPORT NumPyBuffer : public Buffer { public: explicit NumPyBuffer(PyObject* arr); virtual ~NumPyBuffer();
private: PyObject* arr_;};
ARROW_PYTHON_EXPORTResult<std::shared_ptr<DataType>> NumPyDtypeToArrow(PyObject* dtype);ARROW_PYTHON_EXPORTResult<std::shared_ptr<DataType>> NumPyDtypeToArrow(PyArray_Descr* descr);ARROW_PYTHON_EXPORTResult<std::shared_ptr<DataType>> NumPyScalarToArrowDataType(PyObject* scalar);
ARROW_PYTHON_EXPORT Status NdarrayToTensor(MemoryPool* pool, PyObject* ao, const std::vector<std::string>& dim_names, std::shared_ptr<Tensor>* out);
ARROW_PYTHON_EXPORT Status TensorToNdarray(const std::shared_ptr<Tensor>& tensor, PyObject* base, PyObject** out);
ARROW_PYTHON_EXPORT StatusSparseCOOTensorToNdarray(const std::shared_ptr<SparseCOOTensor>& sparse_tensor, PyObject* base, PyObject** out_data, PyObject** out_coords);
Status SparseCSXMatrixToNdarray(const std::shared_ptr<SparseTensor>& sparse_tensor, PyObject* base, PyObject** out_data, PyObject** out_indptr, PyObject** out_indices);
ARROW_PYTHON_EXPORT Status SparseCSRMatrixToNdarray( const std::shared_ptr<SparseCSRMatrix>& sparse_tensor, PyObject* base, PyObject** out_data, PyObject** out_indptr, PyObject** out_indices);
ARROW_PYTHON_EXPORT Status SparseCSCMatrixToNdarray( const std::shared_ptr<SparseCSCMatrix>& sparse_tensor, PyObject* base, PyObject** out_data, PyObject** out_indptr, PyObject** out_indices);
ARROW_PYTHON_EXPORT Status SparseCSFTensorToNdarray( const std::shared_ptr<SparseCSFTensor>& sparse_tensor, PyObject* base, PyObject** out_data, PyObject** out_indptr, PyObject** out_indices);
ARROW_PYTHON_EXPORT Status NdarraysToSparseCOOTensor( MemoryPool* pool, PyObject* data_ao, PyObject* coords_ao, const std::vector<int64_t>& shape, const std::vector<std::string>& dim_names, std::shared_ptr<SparseCOOTensor>* out);
ARROW_PYTHON_EXPORT Status NdarraysToSparseCSRMatrix( MemoryPool* pool, PyObject* data_ao, PyObject* indptr_ao, PyObject* indices_ao, const std::vector<int64_t>& shape, const std::vector<std::string>& dim_names, std::shared_ptr<SparseCSRMatrix>* out);
ARROW_PYTHON_EXPORT Status NdarraysToSparseCSCMatrix( MemoryPool* pool, PyObject* data_ao, PyObject* indptr_ao, PyObject* indices_ao, const std::vector<int64_t>& shape, const std::vector<std::string>& dim_names, std::shared_ptr<SparseCSCMatrix>* out);
ARROW_PYTHON_EXPORT Status NdarraysToSparseCSFTensor( MemoryPool* pool, PyObject* data_ao, PyObject* indptr_ao, PyObject* indices_ao, const std::vector<int64_t>& shape, const std::vector<int64_t>& axis_order, const std::vector<std::string>& dim_names, std::shared_ptr<SparseCSFTensor>* out);
ARROW_PYTHON_EXPORT StatusTensorToSparseCOOTensor(const std::shared_ptr<Tensor>& tensor, std::shared_ptr<SparseCOOTensor>* csparse_tensor);
ARROW_PYTHON_EXPORT StatusTensorToSparseCSRMatrix(const std::shared_ptr<Tensor>& tensor, std::shared_ptr<SparseCSRMatrix>* csparse_tensor);
ARROW_PYTHON_EXPORT StatusTensorToSparseCSCMatrix(const std::shared_ptr<Tensor>& tensor, std::shared_ptr<SparseCSCMatrix>* csparse_tensor);
ARROW_PYTHON_EXPORT StatusTensorToSparseCSFTensor(const std::shared_ptr<Tensor>& tensor, std::shared_ptr<SparseCSFTensor>* csparse_tensor);
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/platform.h"#include "arrow/python/visibility.h"
namespace arrow::py {ARROW_PYTHON_EXPORTint arrow_init_numpy();bool has_numpy();} // namespace arrow::py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/platform.h" // IWYU pragma: export
#include <numpy/numpyconfig.h> // IWYU pragma: export
// Don't use the deprecated Numpy functions#ifdef NPY_1_7_API_VERSION# define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION#else# define NPY_ARRAY_NOTSWAPPED NPY_NOTSWAPPED# define NPY_ARRAY_ALIGNED NPY_ALIGNED# define NPY_ARRAY_WRITEABLE NPY_WRITEABLE# define NPY_ARRAY_UPDATEIFCOPY NPY_UPDATEIFCOPY#endif
// This is required to be able to access the NumPy C API properly in C++ files// other than init.cc.#define PY_ARRAY_UNIQUE_SYMBOL arrow_ARRAY_API#ifndef NUMPY_IMPORT_ARRAY# define NO_IMPORT_ARRAY#endif
#include <numpy/arrayobject.h> // IWYU pragma: export#include <numpy/arrayscalars.h> // IWYU pragma: export#include <numpy/ufuncobject.h> // IWYU pragma: export
// A bit subtle. Numpy has 5 canonical integer types:// (or, rather, type pairs: signed and unsigned)// NPY_BYTE, NPY_SHORT, NPY_INT, NPY_LONG, NPY_LONGLONG// It also has 4 fixed-width integer aliases.// When mapping Arrow integer types to these 4 fixed-width aliases,// we always miss one of the canonical types (even though it may// have the same width as one of the aliases).// Which one depends on the platform...// On a LP64 system, NPY_INT64 maps to NPY_LONG and// NPY_LONGLONG needs to be handled separately.// On a LLP64 system, NPY_INT32 maps to NPY_LONG and// NPY_INT needs to be handled separately.
#if NPY_BITSOF_LONG == 32 && NPY_BITSOF_LONGLONG == 64# define NPY_INT64_IS_LONG_LONG 1#else# define NPY_INT64_IS_LONG_LONG 0#endif
#if NPY_BITSOF_INT == 32 && NPY_BITSOF_LONG == 64# define NPY_INT32_IS_INT 1#else# define NPY_INT32_IS_INT 0#endif
// Backported NumPy 2 API (can be removed if numpy 2 is required)#if NPY_ABI_VERSION < 0x02000000# define PyDataType_ELSIZE(descr) ((descr)->elsize)# define PyDataType_C_METADATA(descr) ((descr)->c_metadata)# define PyDataType_FIELDS(descr) ((descr)->fields)#endif
namespace arrow {namespace py {
inline int import_numpy() {#ifdef NUMPY_IMPORT_ARRAY import_array1(-1); import_umath1(-1);#endif
return 0;}
// See above about the missing Numpy integer type numbersinline int fix_numpy_type_num(int type_num) {#if !NPY_INT32_IS_INT && NPY_BITSOF_INT == 32 if (type_num == NPY_INT) return NPY_INT32; if (type_num == NPY_UINT) return NPY_UINT32;#endif#if !NPY_INT64_IS_LONG_LONG && NPY_BITSOF_LONGLONG == 64 if (type_num == NPY_LONGLONG) return NPY_INT64; if (type_num == NPY_ULONGLONG) return NPY_UINT64;#endif return type_num;}
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Converting from pandas memory representation to Arrow data structures
#pragma once
#include "arrow/python/platform.h"
#include <memory>
#include "arrow/compute/api.h"#include "arrow/python/visibility.h"
namespace arrow {
class Array;class ChunkedArray;class DataType;class MemoryPool;class Status;
namespace py {
/// Convert NumPy arrays to Arrow. If target data type is not known, pass a/// type with null////// \param[in] pool Memory pool for any memory allocations/// \param[in] ao an ndarray with the array data/// \param[in] mo an ndarray with a null mask (True is null), optional/// \param[in] from_pandas If true, use pandas's null sentinels to determine/// whether values are null/// \param[in] type a specific type to cast to, may be null/// \param[in] cast_options casting options/// \param[out] out a ChunkedArray, to accommodate chunked outputARROW_PYTHON_EXPORTStatus NdarrayToArrow(MemoryPool* pool, PyObject* ao, PyObject* mo, bool from_pandas, const std::shared_ptr<DataType>& type, const compute::CastOptions& cast_options, std::shared_ptr<ChunkedArray>* out);
/// Safely convert NumPy arrays to Arrow. If target data type is not known,/// pass a type with null.////// \param[in] pool Memory pool for any memory allocations/// \param[in] ao an ndarray with the array data/// \param[in] mo an ndarray with a null mask (True is null), optional/// \param[in] from_pandas If true, use pandas's null sentinels to determine/// whether values are null/// \param[in] type a specific type to cast to, may be null/// \param[out] out a ChunkedArray, to accommodate chunked outputARROW_PYTHON_EXPORTStatus NdarrayToArrow(MemoryPool* pool, PyObject* ao, PyObject* mo, bool from_pandas, const std::shared_ptr<DataType>& type, std::shared_ptr<ChunkedArray>* out);
} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <string>#include "arrow/python/common.h"#include "arrow/python/visibility.h"#include "arrow/result.h"#include "arrow/util/macros.h"#include "arrow/util/secure_string.h"#include "parquet/encryption/crypto_factory.h"#include "parquet/encryption/file_system_key_material_store.h"#include "parquet/encryption/key_material.h"#include "parquet/encryption/kms_client.h"#include "parquet/encryption/kms_client_factory.h"
#if defined(_WIN32) || defined(__CYGWIN__) // Windows# if defined(_MSC_VER)# pragma warning(disable : 4251)# else# pragma GCC diagnostic ignored "-Wattributes"# endif
# ifdef ARROW_PYTHON_STATIC# define ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT# elif defined(ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORTING)# define ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT __declspec(dllexport)# else# define ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT __declspec(dllimport)# endif
#else // Not Windows# ifndef ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT# define ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT __attribute__((visibility("default")))# endif#endif // Non-Windows
namespace arrow {namespace py {namespace parquet {namespace encryption {
/// \brief A table of function pointers for calling from C++ into/// Python.class ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT PyKmsClientVtable { public: std::function<void(PyObject*, const ::arrow::util::SecureString& key, const std::string& master_key_identifier, std::string* out)> wrap_key; std::function<void(PyObject*, const std::string& wrapped_key, const std::string& master_key_identifier, ::arrow::util::SecureString* out)> unwrap_key;};
/// \brief A helper for KmsClient implementation in Python.class ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT PyKmsClient : public ::parquet::encryption::KmsClient { public: PyKmsClient(PyObject* handler, PyKmsClientVtable vtable); ~PyKmsClient() override;
std::string WrapKey(const ::arrow::util::SecureString& key, const std::string& master_key_identifier) override;
::arrow::util::SecureString UnwrapKey( const std::string& wrapped_key, const std::string& master_key_identifier) override;
private: OwnedRefNoGIL handler_; PyKmsClientVtable vtable_;};
/// \brief A table of function pointers for calling from C++ into/// Python.class ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT PyKmsClientFactoryVtable { public: std::function<void( PyObject*, const ::parquet::encryption::KmsConnectionConfig& kms_connection_config, std::shared_ptr<::parquet::encryption::KmsClient>* out)> create_kms_client;};
/// \brief A helper for KmsClientFactory implementation in Python.class ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT PyKmsClientFactory : public ::parquet::encryption::KmsClientFactory { public: PyKmsClientFactory(PyObject* handler, PyKmsClientFactoryVtable vtable); ~PyKmsClientFactory() override;
std::shared_ptr<::parquet::encryption::KmsClient> CreateKmsClient( const ::parquet::encryption::KmsConnectionConfig& kms_connection_config) override;
private: OwnedRefNoGIL handler_; PyKmsClientFactoryVtable vtable_;};
/// \brief A CryptoFactory that returns Results instead of throwing exceptions.class ARROW_PYTHON_PARQUET_ENCRYPTION_EXPORT PyCryptoFactory : public ::parquet::encryption::CryptoFactory { public: arrow::Result<std::shared_ptr<::parquet::FileEncryptionProperties>> SafeGetFileEncryptionProperties( const ::parquet::encryption::KmsConnectionConfig& kms_connection_config, const ::parquet::encryption::EncryptionConfiguration& encryption_config, const std::string& parquet_file_path, const std::shared_ptr<::arrow::fs::FileSystem>& filesystem);
/// The returned FileDecryptionProperties object will use the cache inside this /// CryptoFactory object, so please keep this /// CryptoFactory object alive along with the returned /// FileDecryptionProperties object. arrow::Result<std::shared_ptr<::parquet::FileDecryptionProperties>> SafeGetFileDecryptionProperties( const ::parquet::encryption::KmsConnectionConfig& kms_connection_config, const ::parquet::encryption::DecryptionConfiguration& decryption_config, const std::string& parquet_file_path, const std::shared_ptr<::arrow::fs::FileSystem>& filesystem);
arrow::Status SafeRotateMasterKeys( const ::parquet::encryption::KmsConnectionConfig& kms_connection_config, const std::string& parquet_file_path, const std::shared_ptr<::arrow::fs::FileSystem>& filesystem, bool double_wrapping, double cache_lifetime_seconds);};
} // namespace encryption} // namespace parquet} // namespace py} // namespace arrow1234567891011121314151617181920212223242526272829303132333435// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Functions for converting between pandas's NumPy-based data representation// and Arrow data structures
#pragma once
// If PY_SSIZE_T_CLEAN is defined, argument parsing functions treat #-specifier// to mean Py_ssize_t (defining this to suppress deprecation warning)#define PY_SSIZE_T_CLEAN
#include <Python.h> // IWYU pragma: export#include <datetime.h>
// Work around C2528 error#ifdef _MSC_VER# if _MSC_VER >= 1900# undef timezone# endif#endif1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/platform.h"
#include <memory>
#include "arrow/python/visibility.h"
#include "arrow/sparse_tensor.h"
// Work around ARROW-2317 (C linkage warning from Cython)extern "C++" {
namespace arrow {
class Array;class Buffer;class DataType;class Field;class RecordBatch;class Schema;class Status;class Table;class Tensor;
namespace py {
// Returns 0 on success, -1 on error.ARROW_PYTHON_EXPORT int import_pyarrow();
#define DECLARE_WRAP_FUNCTIONS(FUNC_SUFFIX, TYPE_NAME) \ ARROW_PYTHON_EXPORT bool is_##FUNC_SUFFIX(PyObject*); \ ARROW_PYTHON_EXPORT Result<std::shared_ptr<TYPE_NAME>> unwrap_##FUNC_SUFFIX( \ PyObject*); \ ARROW_PYTHON_EXPORT PyObject* wrap_##FUNC_SUFFIX(const std::shared_ptr<TYPE_NAME>&);
DECLARE_WRAP_FUNCTIONS(buffer, Buffer)
DECLARE_WRAP_FUNCTIONS(data_type, DataType)DECLARE_WRAP_FUNCTIONS(field, Field)DECLARE_WRAP_FUNCTIONS(schema, Schema)
DECLARE_WRAP_FUNCTIONS(scalar, Scalar)
DECLARE_WRAP_FUNCTIONS(array, Array)DECLARE_WRAP_FUNCTIONS(chunked_array, ChunkedArray)
DECLARE_WRAP_FUNCTIONS(sparse_coo_tensor, SparseCOOTensor)DECLARE_WRAP_FUNCTIONS(sparse_csc_matrix, SparseCSCMatrix)DECLARE_WRAP_FUNCTIONS(sparse_csf_tensor, SparseCSFTensor)DECLARE_WRAP_FUNCTIONS(sparse_csr_matrix, SparseCSRMatrix)DECLARE_WRAP_FUNCTIONS(tensor, Tensor)
DECLARE_WRAP_FUNCTIONS(batch, RecordBatch)DECLARE_WRAP_FUNCTIONS(table, Table)
#undef DECLARE_WRAP_FUNCTIONS
namespace internal {
// If status is ok, return 0.// If status is not ok, set Python error indicator and return -1.ARROW_PYTHON_EXPORT int check_status(const Status& status);
// Convert status to a Python exception object. Status must not be ok.ARROW_PYTHON_EXPORT PyObject* convert_status(const Status& status);
} // namespace internal} // namespace py} // namespace arrow
} // extern "C++"12345678910111213141516171819// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// For backward compatibility.#include "arrow/python/lib_api.h"12345678910111213141516171819// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// For backward compatibility.#include "arrow/python/lib.h"123456789101112131415161718192021222324252627282930313233343536373839404142// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <functional>#include <string>#include <vector>
#include "arrow/status.h"
#include "arrow/python/visibility.h"
namespace arrow {namespace py {namespace testing {
struct TestCase { std::string name; std::function<Status()> func;};
ARROW_PYTHON_EXPORTstd::vector<TestCase> GetCppTestCases();
} // namespace testing} // namespace py} // namespace arrow1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Functions for converting between CPython built-in data structures and Arrow// data structures
#pragma once
#include "arrow/python/platform.h"
#include <cstdint>#include <memory>
#include "arrow/python/visibility.h"#include "arrow/type.h"#include "arrow/util/macros.h"
#include "arrow/python/common.h"
namespace arrow {
class Array;class Status;
namespace py {
struct PyConversionOptions { PyConversionOptions() = default;
PyConversionOptions(const std::shared_ptr<DataType>& type, int64_t size, MemoryPool* pool, bool from_pandas) : type(type), size(size), from_pandas(from_pandas) {}
// Set to null if to be inferred std::shared_ptr<DataType> type;
// Default is -1, which indicates the size should the same as the input sequence int64_t size = -1;
bool from_pandas = false;
/// Used to maintain backwards compatibility for /// timezone bugs (see ARROW-9528). Should be removed /// after Arrow 2.0 release. bool ignore_timezone = false;
bool strict = false;};
/// \brief Convert sequence (list, generator, NumPy array with dtype object) of/// Python objects./// \param[in] obj the sequence to convert/// \param[in] mask a NumPy array of true/false values to indicate whether/// values in the sequence are null (true) or not null (false). This parameter/// may be null/// \param[in] options various conversion options/// \param[in] pool MemoryPool to use for allocations/// \return Result ChunkedArrayARROW_PYTHON_EXPORTResult<std::shared_ptr<ChunkedArray>> ConvertPySequence( PyObject* obj, PyObject* mask, PyConversionOptions options, MemoryPool* pool = default_memory_pool());
} // namespace py
} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
// Internal header
#pragma once
#include "arrow/python/platform.h"
#include <cstdint>#include <limits>
#include "arrow/python/numpy_interop.h"
#include "arrow/type_fwd.h"#include "arrow/util/float16.h"#include "arrow/util/logging.h"
namespace arrow {namespace py {
static constexpr int64_t kPandasTimestampNull = std::numeric_limits<int64_t>::min();constexpr int64_t kNanosecondsInDay = 86400000000000LL;
namespace internal {
//// Type traits for Numpy -> Arrow equivalence//template <int TYPE>struct npy_traits {};
template <>struct npy_traits<NPY_BOOL> { typedef uint8_t value_type; using TypeClass = BooleanType; using BuilderClass = BooleanBuilder;
static constexpr bool supports_nulls = false; static inline bool isnull(uint8_t v) { return false; }};
#define NPY_INT_DECL(TYPE, CapType, T) \ template <> \ struct npy_traits<NPY_##TYPE> { \ typedef T value_type; \ using TypeClass = CapType##Type; \ using BuilderClass = CapType##Builder; \ \ static constexpr bool supports_nulls = false; \ static inline bool isnull(T v) { return false; } \ };
NPY_INT_DECL(INT8, Int8, int8_t);NPY_INT_DECL(INT16, Int16, int16_t);NPY_INT_DECL(INT32, Int32, int32_t);NPY_INT_DECL(INT64, Int64, int64_t);
NPY_INT_DECL(UINT8, UInt8, uint8_t);NPY_INT_DECL(UINT16, UInt16, uint16_t);NPY_INT_DECL(UINT32, UInt32, uint32_t);NPY_INT_DECL(UINT64, UInt64, uint64_t);
#if !NPY_INT32_IS_INT && NPY_BITSOF_INT == 32NPY_INT_DECL(INT, Int32, int32_t);NPY_INT_DECL(UINT, UInt32, uint32_t);#endif#if !NPY_INT64_IS_LONG_LONG && NPY_BITSOF_LONGLONG == 64NPY_INT_DECL(LONGLONG, Int64, int64_t);NPY_INT_DECL(ULONGLONG, UInt64, uint64_t);#endif
template <>struct npy_traits<NPY_FLOAT16> { typedef uint16_t value_type; using TypeClass = HalfFloatType; using BuilderClass = HalfFloatBuilder;
static constexpr uint16_t na_sentinel = std::numeric_limits<arrow::util::Float16>::quiet_NaN().bits();
static constexpr bool supports_nulls = true;
static inline bool isnull(uint16_t v) { return arrow::util::Float16::FromBits(v).is_nan(); }};
template <>struct npy_traits<NPY_FLOAT32> { typedef float value_type; using TypeClass = FloatType; using BuilderClass = FloatBuilder;
// We need to use quiet_NaN here instead of the NAN macro as on Windows // the NAN macro leads to "division-by-zero" compile-time error with clang. static constexpr float na_sentinel = std::numeric_limits<float>::quiet_NaN();
static constexpr bool supports_nulls = true;
static inline bool isnull(float v) { return v != v; }};
template <>struct npy_traits<NPY_FLOAT64> { typedef double value_type; using TypeClass = DoubleType; using BuilderClass = DoubleBuilder;
static constexpr double na_sentinel = std::numeric_limits<double>::quiet_NaN();
static constexpr bool supports_nulls = true;
static inline bool isnull(double v) { return v != v; }};
template <>struct npy_traits<NPY_DATETIME> { typedef int64_t value_type; using TypeClass = TimestampType; using BuilderClass = TimestampBuilder;
static constexpr bool supports_nulls = true;
static inline bool isnull(int64_t v) { // NaT = -2**63 // = -0x8000000000000000 // = -9223372036854775808; // = std::numeric_limits<int64_t>::min() return v == std::numeric_limits<int64_t>::min(); }};
template <>struct npy_traits<NPY_TIMEDELTA> { typedef int64_t value_type; using TypeClass = DurationType; using BuilderClass = DurationBuilder;
static constexpr bool supports_nulls = true;
static inline bool isnull(int64_t v) { // NaT = -2**63 = std::numeric_limits<int64_t>::min() return v == std::numeric_limits<int64_t>::min(); }};
template <>struct npy_traits<NPY_OBJECT> { typedef PyObject* value_type; static constexpr bool supports_nulls = true;
static inline bool isnull(PyObject* v) { return v == Py_None; }};
//// Type traits for Arrow -> Numpy equivalence// Note *supports_nulls* means the equivalent Numpy type support nulls//template <int TYPE>struct arrow_traits {};
template <>struct arrow_traits<Type::BOOL> { static constexpr int npy_type = NPY_BOOL; static constexpr bool supports_nulls = false; typedef typename npy_traits<NPY_BOOL>::value_type T;};
#define INT_DECL(TYPE) \ template <> \ struct arrow_traits<Type::TYPE> { \ static constexpr int npy_type = NPY_##TYPE; \ static constexpr bool supports_nulls = false; \ static constexpr double na_value = std::numeric_limits<double>::quiet_NaN(); \ typedef typename npy_traits<NPY_##TYPE>::value_type T; \ };
INT_DECL(INT8);INT_DECL(INT16);INT_DECL(INT32);INT_DECL(INT64);INT_DECL(UINT8);INT_DECL(UINT16);INT_DECL(UINT32);INT_DECL(UINT64);
template <>struct arrow_traits<Type::HALF_FLOAT> { static constexpr int npy_type = NPY_FLOAT16; static constexpr bool supports_nulls = true; static constexpr uint16_t na_value = std::numeric_limits<arrow::util::Float16>::quiet_NaN().bits(); typedef typename npy_traits<NPY_FLOAT16>::value_type T;};
template <>struct arrow_traits<Type::FLOAT> { static constexpr int npy_type = NPY_FLOAT32; static constexpr bool supports_nulls = true; static constexpr float na_value = std::numeric_limits<float>::quiet_NaN(); typedef typename npy_traits<NPY_FLOAT32>::value_type T;};
template <>struct arrow_traits<Type::DOUBLE> { static constexpr int npy_type = NPY_FLOAT64; static constexpr bool supports_nulls = true; static constexpr double na_value = std::numeric_limits<double>::quiet_NaN(); typedef typename npy_traits<NPY_FLOAT64>::value_type T;};
template <>struct arrow_traits<Type::TIMESTAMP> { static constexpr int npy_type = NPY_DATETIME; static constexpr int64_t npy_shift = 1;
static constexpr bool supports_nulls = true; static constexpr int64_t na_value = kPandasTimestampNull; typedef typename npy_traits<NPY_DATETIME>::value_type T;};
template <>struct arrow_traits<Type::DURATION> { static constexpr int npy_type = NPY_TIMEDELTA; static constexpr int64_t npy_shift = 1;
static constexpr bool supports_nulls = true; static constexpr int64_t na_value = kPandasTimestampNull; typedef typename npy_traits<NPY_TIMEDELTA>::value_type T;};
template <>struct arrow_traits<Type::DATE32> { // Data stores as FR_D day unit static constexpr int npy_type = NPY_DATETIME; static constexpr int64_t npy_shift = 1;
static constexpr bool supports_nulls = true; typedef typename npy_traits<NPY_DATETIME>::value_type T;
static constexpr int64_t na_value = kPandasTimestampNull; static inline bool isnull(int64_t v) { return npy_traits<NPY_DATETIME>::isnull(v); }};
template <>struct arrow_traits<Type::DATE64> { // Data stores as FR_D day unit static constexpr int npy_type = NPY_DATETIME;
// There are 1000 * 60 * 60 * 24 = 86400000ms in a day static constexpr int64_t npy_shift = 86400000;
static constexpr bool supports_nulls = true; typedef typename npy_traits<NPY_DATETIME>::value_type T;
static constexpr int64_t na_value = kPandasTimestampNull; static inline bool isnull(int64_t v) { return npy_traits<NPY_DATETIME>::isnull(v); }};
template <>struct arrow_traits<Type::TIME32> { static constexpr int npy_type = NPY_OBJECT; static constexpr bool supports_nulls = true; static constexpr int64_t na_value = kPandasTimestampNull; typedef typename npy_traits<NPY_DATETIME>::value_type T;};
template <>struct arrow_traits<Type::TIME64> { static constexpr int npy_type = NPY_OBJECT; static constexpr bool supports_nulls = true; typedef typename npy_traits<NPY_DATETIME>::value_type T;};
template <>struct arrow_traits<Type::STRING> { static constexpr int npy_type = NPY_OBJECT; static constexpr bool supports_nulls = true;};
template <>struct arrow_traits<Type::BINARY> { static constexpr int npy_type = NPY_OBJECT; static constexpr bool supports_nulls = true;};
static inline NPY_DATETIMEUNIT NumPyFrequency(TimeUnit::type unit) { switch (unit) { case TimestampType::Unit::SECOND: return NPY_FR_s; case TimestampType::Unit::MILLI: return NPY_FR_ms; break; case TimestampType::Unit::MICRO: return NPY_FR_us; default: // NANO return NPY_FR_ns; }}
static inline int NumPyTypeSize(int npy_type) { npy_type = fix_numpy_type_num(npy_type);
switch (npy_type) { case NPY_BOOL: case NPY_INT8: case NPY_UINT8: return 1; case NPY_INT16: case NPY_UINT16: return 2; case NPY_INT32: case NPY_UINT32: return 4; case NPY_INT64: case NPY_UINT64: return 8; case NPY_FLOAT16: return 2; case NPY_FLOAT32: return 4; case NPY_FLOAT64: return 8; case NPY_DATETIME: return 8; case NPY_OBJECT: return sizeof(void*); default: ARROW_CHECK(false) << "unhandled numpy type"; break; } return -1;}
} // namespace internal} // namespace py} // namespace arrow123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/compute/exec.h"#include "arrow/compute/function.h"#include "arrow/compute/registry.h"#include "arrow/python/platform.h"#include "arrow/record_batch.h"#include "arrow/util/iterator.h"
#include "arrow/python/common.h"#include "arrow/python/pyarrow.h"#include "arrow/python/visibility.h"
namespace arrow {
namespace py {
// TODO: TODO(ARROW-16041): UDF Options are not exposed to the Python// users. This feature will be included when extending to provide advanced// options for the users.struct ARROW_PYTHON_EXPORT UdfOptions { std::string func_name; compute::Arity arity; compute::FunctionDoc func_doc; std::vector<std::shared_ptr<DataType>> input_types; std::shared_ptr<DataType> output_type;};
/// \brief A context passed as the first argument of UDF functions.struct ARROW_PYTHON_EXPORT UdfContext { MemoryPool* pool; int64_t batch_length;};
using UdfWrapperCallback = std::function<PyObject*( PyObject* user_function, const UdfContext& context, PyObject* inputs)>;
/// \brief register a Scalar user-defined-function from PythonStatus ARROW_PYTHON_EXPORT RegisterScalarFunction( PyObject* user_function, UdfWrapperCallback wrapper, const UdfOptions& options, compute::FunctionRegistry* registry = NULLPTR);
/// \brief register a Table user-defined-function from PythonStatus ARROW_PYTHON_EXPORT RegisterTabularFunction( PyObject* user_function, UdfWrapperCallback wrapper, const UdfOptions& options, compute::FunctionRegistry* registry = NULLPTR);
/// \brief register a Aggregate user-defined-function from PythonStatus ARROW_PYTHON_EXPORT RegisterAggregateFunction( PyObject* user_function, UdfWrapperCallback wrapper, const UdfOptions& options, compute::FunctionRegistry* registry = NULLPTR);
/// \brief register a Vector user-defined-function from PythonStatus ARROW_PYTHON_EXPORT RegisterVectorFunction( PyObject* user_function, UdfWrapperCallback wrapper, const UdfOptions& options, compute::FunctionRegistry* registry = NULLPTR);
Result<std::shared_ptr<RecordBatchReader>> ARROW_PYTHON_EXPORTCallTabularFunction(const std::string& func_name, const std::vector<Datum>& args, compute::FunctionRegistry* registry = NULLPTR);
} // namespace py
} // namespace arrow12345678910111213141516171819202122232425262728293031323334353637383940// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include "arrow/python/common.h"#include "arrow/python/visibility.h"
namespace arrow::py {
/// \brief Create an array of evenly spaced values within a given interval./// This function is similar to Python's `range` function./// The resulting array will contain values starting from `start` up to but not/// including `stop`, with a step size of `step`. If `step` is zero, the function/// will return an error./// The resulting array will have a data type of `int64`./// \param[in] start initial value of the sequence./// \param[in] stop final value of the sequence (exclusive)./// \param[in] step step size between consecutive values./// \param[in] pool Memory pool for any memory allocations./// \return Result ArrayARROW_PYTHON_EXPORTResult<std::shared_ptr<Array>> Arange(int64_t start, int64_t stop, int64_t step, MemoryPool* pool);
} // namespace arrow::py1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519// Header file providing new C API functions to old Python versions.//// File distributed under the Zero Clause BSD (0BSD) license.// Copyright Contributors to the pythoncapi_compat project.//// Homepage:// https://github.com/python/pythoncapi_compat//// Latest version:// https://raw.githubusercontent.com/python/pythoncapi_compat/master/pythoncapi_compat.h//// Vendored from git revision:// 39e2663e6acc0b68d5dd75bdaad0af33152552ae// https://raw.githubusercontent.com/python/pythoncapi-compat/39e2663e6acc0b68d5dd75bdaad0af33152552ae/pythoncapi_compat.h//// SPDX-License-Identifier: 0BSD
/* clang-format off */
#ifndef PYTHONCAPI_COMPAT#define PYTHONCAPI_COMPAT
#ifdef __cplusplusextern "C" {#endif
#include <Python.h>
// Python 3.11.0b4 added PyFrame_Back() to Python.h#if PY_VERSION_HEX < 0x030b00B4 && !defined(PYPY_VERSION)# include "frameobject.h" // PyFrameObject, PyFrame_GetBack()#endif
#ifndef _Py_CAST# define _Py_CAST(type, expr) ((type)(expr))#endif
// Static inline functions should use _Py_NULL rather than using directly NULL// to prevent C++ compiler warnings. On C23 and newer and on C++11 and newer,// _Py_NULL is defined as nullptr.#if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \ || (defined(__cplusplus) && __cplusplus >= 201103)# define _Py_NULL nullptr#else# define _Py_NULL NULL#endif
// Cast argument to PyObject* type.#ifndef _PyObject_CAST# define _PyObject_CAST(op) _Py_CAST(PyObject*, op)#endif
// bpo-42262 added Py_NewRef() to Python 3.10.0a3#if PY_VERSION_HEX < 0x030A00A3 && !defined(Py_NewRef)static inline PyObject* _Py_NewRef(PyObject *obj){ Py_INCREF(obj); return obj;}#define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))#endif
// bpo-42262 added Py_XNewRef() to Python 3.10.0a3#if PY_VERSION_HEX < 0x030A00A3 && !defined(Py_XNewRef)static inline PyObject* _Py_XNewRef(PyObject *obj){ Py_XINCREF(obj); return obj;}#define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))#endif
// bpo-39573 added Py_SET_REFCNT() to Python 3.9.0a4#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_REFCNT)static inline void _Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt){ ob->ob_refcnt = refcnt;}#define Py_SET_REFCNT(ob, refcnt) _Py_SET_REFCNT(_PyObject_CAST(ob), refcnt)#endif
// Py_SETREF() and Py_XSETREF() were added to Python 3.5.2.// It is excluded from the limited C API.#if (PY_VERSION_HEX < 0x03050200 && !defined(Py_SETREF)) && !defined(Py_LIMITED_API)#define Py_SETREF(dst, src) \ do { \ PyObject **_tmp_dst_ptr = _Py_CAST(PyObject**, &(dst)); \ PyObject *_tmp_dst = (*_tmp_dst_ptr); \ *_tmp_dst_ptr = _PyObject_CAST(src); \ Py_DECREF(_tmp_dst); \ } while (0)
#define Py_XSETREF(dst, src) \ do { \ PyObject **_tmp_dst_ptr = _Py_CAST(PyObject**, &(dst)); \ PyObject *_tmp_dst = (*_tmp_dst_ptr); \ *_tmp_dst_ptr = _PyObject_CAST(src); \ Py_XDECREF(_tmp_dst); \ } while (0)#endif
// bpo-43753 added Py_Is(), Py_IsNone(), Py_IsTrue() and Py_IsFalse()// to Python 3.10.0b1.#if PY_VERSION_HEX < 0x030A00B1 && !defined(Py_Is)# define Py_Is(x, y) ((x) == (y))#endif#if PY_VERSION_HEX < 0x030A00B1 && !defined(Py_IsNone)# define Py_IsNone(x) Py_Is(x, Py_None)#endif#if (PY_VERSION_HEX < 0x030A00B1 || defined(PYPY_VERSION)) && !defined(Py_IsTrue)# define Py_IsTrue(x) Py_Is(x, Py_True)#endif#if (PY_VERSION_HEX < 0x030A00B1 || defined(PYPY_VERSION)) && !defined(Py_IsFalse)# define Py_IsFalse(x) Py_Is(x, Py_False)#endif
// bpo-39573 added Py_SET_TYPE() to Python 3.9.0a4#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type){ ob->ob_type = type;}#define Py_SET_TYPE(ob, type) _Py_SET_TYPE(_PyObject_CAST(ob), type)#endif
// bpo-39573 added Py_SET_SIZE() to Python 3.9.0a4#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_SIZE)static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size){ ob->ob_size = size;}#define Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject*)(ob), size)#endif
// bpo-40421 added PyFrame_GetCode() to Python 3.9.0b1#if PY_VERSION_HEX < 0x030900B1 || defined(PYPY_VERSION)static inline PyCodeObject* PyFrame_GetCode(PyFrameObject *frame){ assert(frame != _Py_NULL); assert(frame->f_code != _Py_NULL); return _Py_CAST(PyCodeObject*, Py_NewRef(frame->f_code));}#endif
static inline PyCodeObject* _PyFrame_GetCodeBorrow(PyFrameObject *frame){ PyCodeObject *code = PyFrame_GetCode(frame); Py_DECREF(code); return code;}
// bpo-40421 added PyFrame_GetBack() to Python 3.9.0b1#if PY_VERSION_HEX < 0x030900B1 && !defined(PYPY_VERSION)static inline PyFrameObject* PyFrame_GetBack(PyFrameObject *frame){ assert(frame != _Py_NULL); return _Py_CAST(PyFrameObject*, Py_XNewRef(frame->f_back));}#endif
#if !defined(PYPY_VERSION)static inline PyFrameObject* _PyFrame_GetBackBorrow(PyFrameObject *frame){ PyFrameObject *back = PyFrame_GetBack(frame); Py_XDECREF(back); return back;}#endif
// bpo-40421 added PyFrame_GetLocals() to Python 3.11.0a7#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)static inline PyObject* PyFrame_GetLocals(PyFrameObject *frame){#if PY_VERSION_HEX >= 0x030400B1 if (PyFrame_FastToLocalsWithError(frame) < 0) { return NULL; }#else PyFrame_FastToLocals(frame);#endif return Py_NewRef(frame->f_locals);}#endif
// bpo-40421 added PyFrame_GetGlobals() to Python 3.11.0a7#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)static inline PyObject* PyFrame_GetGlobals(PyFrameObject *frame){ return Py_NewRef(frame->f_globals);}#endif
// bpo-40421 added PyFrame_GetBuiltins() to Python 3.11.0a7#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)static inline PyObject* PyFrame_GetBuiltins(PyFrameObject *frame){ return Py_NewRef(frame->f_builtins);}#endif
// bpo-40421 added PyFrame_GetLasti() to Python 3.11.0b1#if PY_VERSION_HEX < 0x030B00B1 && !defined(PYPY_VERSION)static inline int PyFrame_GetLasti(PyFrameObject *frame){#if PY_VERSION_HEX >= 0x030A00A7 // bpo-27129: Since Python 3.10.0a7, f_lasti is an instruction offset, // not a bytes offset anymore. Python uses 16-bit "wordcode" (2 bytes) // instructions. if (frame->f_lasti < 0) { return -1; } return frame->f_lasti * 2;#else return frame->f_lasti;#endif}#endif
// gh-91248 added PyFrame_GetVar() to Python 3.12.0a2#if PY_VERSION_HEX < 0x030C00A2 && !defined(PYPY_VERSION)static inline PyObject* PyFrame_GetVar(PyFrameObject *frame, PyObject *name){ PyObject *locals, *value;
locals = PyFrame_GetLocals(frame); if (locals == NULL) { return NULL; }#if PY_VERSION_HEX >= 0x03000000 value = PyDict_GetItemWithError(locals, name);#else value = _PyDict_GetItemWithError(locals, name);#endif Py_DECREF(locals);
if (value == NULL) { if (PyErr_Occurred()) { return NULL; }#if PY_VERSION_HEX >= 0x03000000 PyErr_Format(PyExc_NameError, "variable %R does not exist", name);#else PyErr_SetString(PyExc_NameError, "variable does not exist");#endif return NULL; } return Py_NewRef(value);}#endif
// gh-91248 added PyFrame_GetVarString() to Python 3.12.0a2#if PY_VERSION_HEX < 0x030C00A2 && !defined(PYPY_VERSION)static inline PyObject*PyFrame_GetVarString(PyFrameObject *frame, const char *name){ PyObject *name_obj, *value;#if PY_VERSION_HEX >= 0x03000000 name_obj = PyUnicode_FromString(name);#else name_obj = PyString_FromString(name);#endif if (name_obj == NULL) { return NULL; } value = PyFrame_GetVar(frame, name_obj); Py_DECREF(name_obj); return value;}#endif
// bpo-39947 added PyThreadState_GetInterpreter() to Python 3.9.0a5#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)static inline PyInterpreterState *PyThreadState_GetInterpreter(PyThreadState *tstate){ assert(tstate != _Py_NULL); return tstate->interp;}#endif
// bpo-40429 added PyThreadState_GetFrame() to Python 3.9.0b1#if PY_VERSION_HEX < 0x030900B1 && !defined(PYPY_VERSION)static inline PyFrameObject* PyThreadState_GetFrame(PyThreadState *tstate){ assert(tstate != _Py_NULL); return _Py_CAST(PyFrameObject *, Py_XNewRef(tstate->frame));}#endif
#if !defined(PYPY_VERSION)static inline PyFrameObject*_PyThreadState_GetFrameBorrow(PyThreadState *tstate){ PyFrameObject *frame = PyThreadState_GetFrame(tstate); Py_XDECREF(frame); return frame;}#endif
// bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a5#if PY_VERSION_HEX < 0x030900A5 || defined(PYPY_VERSION)static inline PyInterpreterState* PyInterpreterState_Get(void){ PyThreadState *tstate; PyInterpreterState *interp;
tstate = PyThreadState_GET(); if (tstate == _Py_NULL) { Py_FatalError("GIL released (tstate is NULL)"); } interp = tstate->interp; if (interp == _Py_NULL) { Py_FatalError("no current interpreter"); } return interp;}#endif
// bpo-39947 added PyInterpreterState_Get() to Python 3.9.0a6#if 0x030700A1 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030900A6 && !defined(PYPY_VERSION)static inline uint64_t PyThreadState_GetID(PyThreadState *tstate){ assert(tstate != _Py_NULL); return tstate->id;}#endif
// bpo-43760 added PyThreadState_EnterTracing() to Python 3.11.0a2#if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION)static inline void PyThreadState_EnterTracing(PyThreadState *tstate){ tstate->tracing++;#if PY_VERSION_HEX >= 0x030A00A1 tstate->cframe->use_tracing = 0;#else tstate->use_tracing = 0;#endif}#endif
// bpo-43760 added PyThreadState_LeaveTracing() to Python 3.11.0a2#if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION)static inline void PyThreadState_LeaveTracing(PyThreadState *tstate){ int use_tracing = (tstate->c_tracefunc != _Py_NULL || tstate->c_profilefunc != _Py_NULL); tstate->tracing--;#if PY_VERSION_HEX >= 0x030A00A1 tstate->cframe->use_tracing = use_tracing;#else tstate->use_tracing = use_tracing;#endif}#endif
// bpo-37194 added PyObject_CallNoArgs() to Python 3.9.0a1// PyObject_CallNoArgs() added to PyPy 3.9.16-v7.3.11#if !defined(PyObject_CallNoArgs) && PY_VERSION_HEX < 0x030900A1static inline PyObject* PyObject_CallNoArgs(PyObject *func){ return PyObject_CallFunctionObjArgs(func, NULL);}#endif
// bpo-39245 made PyObject_CallOneArg() public (previously called// _PyObject_CallOneArg) in Python 3.9.0a4// PyObject_CallOneArg() added to PyPy 3.9.16-v7.3.11#if !defined(PyObject_CallOneArg) && PY_VERSION_HEX < 0x030900A4static inline PyObject* PyObject_CallOneArg(PyObject *func, PyObject *arg){ return PyObject_CallFunctionObjArgs(func, arg, NULL);}#endif
// bpo-1635741 added PyModule_AddObjectRef() to Python 3.10.0a3#if PY_VERSION_HEX < 0x030A00A3static inline intPyModule_AddObjectRef(PyObject *module, const char *name, PyObject *value){ int res;
if (!value && !PyErr_Occurred()) { // PyModule_AddObject() raises TypeError in this case PyErr_SetString(PyExc_SystemError, "PyModule_AddObjectRef() must be called " "with an exception raised if value is NULL"); return -1; }
Py_XINCREF(value); res = PyModule_AddObject(module, name, value); if (res < 0) { Py_XDECREF(value); } return res;}#endif
// bpo-40024 added PyModule_AddType() to Python 3.9.0a5#if PY_VERSION_HEX < 0x030900A5static inline int PyModule_AddType(PyObject *module, PyTypeObject *type){ const char *name, *dot;
if (PyType_Ready(type) < 0) { return -1; }
// inline _PyType_Name() name = type->tp_name; assert(name != _Py_NULL); dot = strrchr(name, '.'); if (dot != _Py_NULL) { name = dot + 1; }
return PyModule_AddObjectRef(module, name, _PyObject_CAST(type));}#endif
// bpo-40241 added PyObject_GC_IsTracked() to Python 3.9.0a6.// bpo-4688 added _PyObject_GC_IS_TRACKED() to Python 2.7.0a2.#if PY_VERSION_HEX < 0x030900A6 && !defined(PYPY_VERSION)static inline int PyObject_GC_IsTracked(PyObject* obj){ return (PyObject_IS_GC(obj) && _PyObject_GC_IS_TRACKED(obj));}#endif
// bpo-40241 added PyObject_GC_IsFinalized() to Python 3.9.0a6.// bpo-18112 added _PyGCHead_FINALIZED() to Python 3.4.0 final.#if PY_VERSION_HEX < 0x030900A6 && PY_VERSION_HEX >= 0x030400F0 && !defined(PYPY_VERSION)static inline int PyObject_GC_IsFinalized(PyObject *obj){ PyGC_Head *gc = _Py_CAST(PyGC_Head*, obj) - 1; return (PyObject_IS_GC(obj) && _PyGCHead_FINALIZED(gc));}#endif
// bpo-39573 added Py_IS_TYPE() to Python 3.9.0a4#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_IS_TYPE)static inline int _Py_IS_TYPE(PyObject *ob, PyTypeObject *type) { return Py_TYPE(ob) == type;}#define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST(ob), type)#endif
// bpo-46906 added PyFloat_Pack2() and PyFloat_Unpack2() to Python 3.11a7.// bpo-11734 added _PyFloat_Pack2() and _PyFloat_Unpack2() to Python 3.6.0b1.// Python 3.11a2 moved _PyFloat_Pack2() and _PyFloat_Unpack2() to the internal// C API: Python 3.11a2-3.11a6 versions are not supported.#if 0x030600B1 <= PY_VERSION_HEX && PY_VERSION_HEX <= 0x030B00A1 && !defined(PYPY_VERSION)static inline int PyFloat_Pack2(double x, char *p, int le){ return _PyFloat_Pack2(x, (unsigned char*)p, le); }
static inline double PyFloat_Unpack2(const char *p, int le){ return _PyFloat_Unpack2((const unsigned char *)p, le); }#endif
// bpo-46906 added PyFloat_Pack4(), PyFloat_Pack8(), PyFloat_Unpack4() and// PyFloat_Unpack8() to Python 3.11a7.// Python 3.11a2 moved _PyFloat_Pack4(), _PyFloat_Pack8(), _PyFloat_Unpack4()// and _PyFloat_Unpack8() to the internal C API: Python 3.11a2-3.11a6 versions// are not supported.#if PY_VERSION_HEX <= 0x030B00A1 && !defined(PYPY_VERSION)static inline int PyFloat_Pack4(double x, char *p, int le){ return _PyFloat_Pack4(x, (unsigned char*)p, le); }
static inline int PyFloat_Pack8(double x, char *p, int le){ return _PyFloat_Pack8(x, (unsigned char*)p, le); }
static inline double PyFloat_Unpack4(const char *p, int le){ return _PyFloat_Unpack4((const unsigned char *)p, le); }
static inline double PyFloat_Unpack8(const char *p, int le){ return _PyFloat_Unpack8((const unsigned char *)p, le); }#endif
// gh-92154 added PyCode_GetCode() to Python 3.11.0b1#if PY_VERSION_HEX < 0x030B00B1 && !defined(PYPY_VERSION)static inline PyObject* PyCode_GetCode(PyCodeObject *code){ return Py_NewRef(code->co_code);}#endif
// gh-95008 added PyCode_GetVarnames() to Python 3.11.0rc1#if PY_VERSION_HEX < 0x030B00C1 && !defined(PYPY_VERSION)static inline PyObject* PyCode_GetVarnames(PyCodeObject *code){ return Py_NewRef(code->co_varnames);}#endif
// gh-95008 added PyCode_GetFreevars() to Python 3.11.0rc1#if PY_VERSION_HEX < 0x030B00C1 && !defined(PYPY_VERSION)static inline PyObject* PyCode_GetFreevars(PyCodeObject *code){ return Py_NewRef(code->co_freevars);}#endif
// gh-95008 added PyCode_GetCellvars() to Python 3.11.0rc1#if PY_VERSION_HEX < 0x030B00C1 && !defined(PYPY_VERSION)static inline PyObject* PyCode_GetCellvars(PyCodeObject *code){ return Py_NewRef(code->co_cellvars);}#endif
// Py_UNUSED() was added to Python 3.4.0b2.#if PY_VERSION_HEX < 0x030400B2 && !defined(Py_UNUSED)# if defined(__GNUC__) || defined(__clang__)# define Py_UNUSED(name) _unused_ ## name __attribute__((unused))# else# define Py_UNUSED(name) _unused_ ## name# endif#endif
// gh-105922 added PyImport_AddModuleRef() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A0static inline PyObject* PyImport_AddModuleRef(const char *name){ return Py_XNewRef(PyImport_AddModule(name));}#endif
// gh-105927 added PyWeakref_GetRef() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D0000static inline int PyWeakref_GetRef(PyObject *ref, PyObject **pobj){ PyObject *obj; if (ref != NULL && !PyWeakref_Check(ref)) { *pobj = NULL; PyErr_SetString(PyExc_TypeError, "expected a weakref"); return -1; } obj = PyWeakref_GetObject(ref); if (obj == NULL) { // SystemError if ref is NULL *pobj = NULL; return -1; } if (obj == Py_None) { *pobj = NULL; return 0; } *pobj = Py_NewRef(obj); return (*pobj != NULL);}#endif
// bpo-36974 added PY_VECTORCALL_ARGUMENTS_OFFSET to Python 3.8b1#ifndef PY_VECTORCALL_ARGUMENTS_OFFSET# define PY_VECTORCALL_ARGUMENTS_OFFSET (_Py_CAST(size_t, 1) << (8 * sizeof(size_t) - 1))#endif
// bpo-36974 added PyVectorcall_NARGS() to Python 3.8b1#if PY_VERSION_HEX < 0x030800B1static inline Py_ssize_t PyVectorcall_NARGS(size_t n){ return n & ~PY_VECTORCALL_ARGUMENTS_OFFSET;}#endif
// gh-105922 added PyObject_Vectorcall() to Python 3.9.0a4#if PY_VERSION_HEX < 0x030900A4static inline PyObject*PyObject_Vectorcall(PyObject *callable, PyObject *const *args, size_t nargsf, PyObject *kwnames){#if PY_VERSION_HEX >= 0x030800B1 && !defined(PYPY_VERSION) // bpo-36974 added _PyObject_Vectorcall() to Python 3.8.0b1 return _PyObject_Vectorcall(callable, args, nargsf, kwnames);#else PyObject *posargs = NULL, *kwargs = NULL; PyObject *res; Py_ssize_t nposargs, nkwargs, i;
if (nargsf != 0 && args == NULL) { PyErr_BadInternalCall(); goto error; } if (kwnames != NULL && !PyTuple_Check(kwnames)) { PyErr_BadInternalCall(); goto error; }
nposargs = (Py_ssize_t)PyVectorcall_NARGS(nargsf); if (kwnames) { nkwargs = PyTuple_GET_SIZE(kwnames); } else { nkwargs = 0; }
posargs = PyTuple_New(nposargs); if (posargs == NULL) { goto error; } if (nposargs) { for (i=0; i < nposargs; i++) { PyTuple_SET_ITEM(posargs, i, Py_NewRef(*args)); args++; } }
if (nkwargs) { kwargs = PyDict_New(); if (kwargs == NULL) { goto error; }
for (i = 0; i < nkwargs; i++) { PyObject *key = PyTuple_GET_ITEM(kwnames, i); PyObject *value = *args; args++; if (PyDict_SetItem(kwargs, key, value) < 0) { goto error; } } } else { kwargs = NULL; }
res = PyObject_Call(callable, posargs, kwargs); Py_DECREF(posargs); Py_XDECREF(kwargs); return res;
error: Py_DECREF(posargs); Py_XDECREF(kwargs); return NULL;#endif}#endif
// gh-106521 added PyObject_GetOptionalAttr() and// PyObject_GetOptionalAttrString() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyObject_GetOptionalAttr(PyObject *obj, PyObject *attr_name, PyObject **result){ // bpo-32571 added _PyObject_LookupAttr() to Python 3.7.0b1#if PY_VERSION_HEX >= 0x030700B1 && !defined(PYPY_VERSION) return _PyObject_LookupAttr(obj, attr_name, result);#else *result = PyObject_GetAttr(obj, attr_name); if (*result != NULL) { return 1; } if (!PyErr_Occurred()) { return 0; } if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); return 0; } return -1;#endif}
static inline intPyObject_GetOptionalAttrString(PyObject *obj, const char *attr_name, PyObject **result){ PyObject *name_obj; int rc;#if PY_VERSION_HEX >= 0x03000000 name_obj = PyUnicode_FromString(attr_name);#else name_obj = PyString_FromString(attr_name);#endif if (name_obj == NULL) { *result = NULL; return -1; } rc = PyObject_GetOptionalAttr(obj, name_obj, result); Py_DECREF(name_obj); return rc;}#endif
// gh-106307 added PyObject_GetOptionalAttr() and// PyMapping_GetOptionalItemString() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyMapping_GetOptionalItem(PyObject *obj, PyObject *key, PyObject **result){ *result = PyObject_GetItem(obj, key); if (*result) { return 1; } if (!PyErr_ExceptionMatches(PyExc_KeyError)) { return -1; } PyErr_Clear(); return 0;}
static inline intPyMapping_GetOptionalItemString(PyObject *obj, const char *key, PyObject **result){ PyObject *key_obj; int rc;#if PY_VERSION_HEX >= 0x03000000 key_obj = PyUnicode_FromString(key);#else key_obj = PyString_FromString(key);#endif if (key_obj == NULL) { *result = NULL; return -1; } rc = PyMapping_GetOptionalItem(obj, key_obj, result); Py_DECREF(key_obj); return rc;}#endif
// gh-108511 added PyMapping_HasKeyWithError() and// PyMapping_HasKeyStringWithError() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyMapping_HasKeyWithError(PyObject *obj, PyObject *key){ PyObject *res; int rc = PyMapping_GetOptionalItem(obj, key, &res); Py_XDECREF(res); return rc;}
static inline intPyMapping_HasKeyStringWithError(PyObject *obj, const char *key){ PyObject *res; int rc = PyMapping_GetOptionalItemString(obj, key, &res); Py_XDECREF(res); return rc;}#endif
// gh-108511 added PyObject_HasAttrWithError() and// PyObject_HasAttrStringWithError() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyObject_HasAttrWithError(PyObject *obj, PyObject *attr){ PyObject *res; int rc = PyObject_GetOptionalAttr(obj, attr, &res); Py_XDECREF(res); return rc;}
static inline intPyObject_HasAttrStringWithError(PyObject *obj, const char *attr){ PyObject *res; int rc = PyObject_GetOptionalAttrString(obj, attr, &res); Py_XDECREF(res); return rc;}#endif
// gh-106004 added PyDict_GetItemRef() and PyDict_GetItemStringRef()// to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyDict_GetItemRef(PyObject *mp, PyObject *key, PyObject **result){#if PY_VERSION_HEX >= 0x03000000 PyObject *item = PyDict_GetItemWithError(mp, key);#else PyObject *item = _PyDict_GetItemWithError(mp, key);#endif if (item != NULL) { *result = Py_NewRef(item); return 1; // found } if (!PyErr_Occurred()) { *result = NULL; return 0; // not found } *result = NULL; return -1;}
static inline intPyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result){ int res;#if PY_VERSION_HEX >= 0x03000000 PyObject *key_obj = PyUnicode_FromString(key);#else PyObject *key_obj = PyString_FromString(key);#endif if (key_obj == NULL) { *result = NULL; return -1; } res = PyDict_GetItemRef(mp, key_obj, result); Py_DECREF(key_obj); return res;}#endif
// gh-106307 added PyModule_Add() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyModule_Add(PyObject *mod, const char *name, PyObject *value){ int res = PyModule_AddObjectRef(mod, name, value); Py_XDECREF(value); return res;}#endif
// gh-108014 added Py_IsFinalizing() to Python 3.13.0a1// bpo-1856 added _Py_Finalizing to Python 3.2.1b1.// _Py_IsFinalizing() was added to PyPy 7.3.0.#if (0x030201B1 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030D00A1) \ && (!defined(PYPY_VERSION_NUM) || PYPY_VERSION_NUM >= 0x7030000)static inline int Py_IsFinalizing(void){#if PY_VERSION_HEX >= 0x030700A1 // _Py_IsFinalizing() was added to Python 3.7.0a1. return _Py_IsFinalizing();#else return (_Py_Finalizing != NULL);#endif}#endif
// gh-108323 added PyDict_ContainsString() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline int PyDict_ContainsString(PyObject *op, const char *key){ PyObject *key_obj = PyUnicode_FromString(key); if (key_obj == NULL) { return -1; } int res = PyDict_Contains(op, key_obj); Py_DECREF(key_obj); return res;}#endif
// gh-108445 added PyLong_AsInt() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline int PyLong_AsInt(PyObject *obj){#ifdef PYPY_VERSION long value = PyLong_AsLong(obj); if (value == -1 && PyErr_Occurred()) { return -1; } if (value < (long)INT_MIN || (long)INT_MAX < value) { PyErr_SetString(PyExc_OverflowError, "Python int too large to convert to C int"); return -1; } return (int)value;#else return _PyLong_AsInt(obj);#endif}#endif
// gh-107073 added PyObject_VisitManagedDict() to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyObject_VisitManagedDict(PyObject *obj, visitproc visit, void *arg){ PyObject **dict = _PyObject_GetDictPtr(obj); if (*dict == NULL) { return -1; } Py_VISIT(*dict); return 0;}
static inline voidPyObject_ClearManagedDict(PyObject *obj){ PyObject **dict = _PyObject_GetDictPtr(obj); if (*dict == NULL) { return; } Py_CLEAR(*dict);}#endif
// gh-108867 added PyThreadState_GetUnchecked() to Python 3.13.0a1// Python 3.5.2 added _PyThreadState_UncheckedGet().#if PY_VERSION_HEX >= 0x03050200 && PY_VERSION_HEX < 0x030D00A1static inline PyThreadState*PyThreadState_GetUnchecked(void){ return _PyThreadState_UncheckedGet();}#endif
// gh-110289 added PyUnicode_EqualToUTF8() and PyUnicode_EqualToUTF8AndSize()// to Python 3.13.0a1#if PY_VERSION_HEX < 0x030D00A1static inline intPyUnicode_EqualToUTF8AndSize(PyObject *unicode, const char *str, Py_ssize_t str_len){ Py_ssize_t len; const void *utf8; PyObject *exc_type, *exc_value, *exc_tb; int res;
// API cannot report errors so save/restore the exception PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
// Python 3.3.0a1 added PyUnicode_AsUTF8AndSize()#if PY_VERSION_HEX >= 0x030300A1 if (PyUnicode_IS_ASCII(unicode)) { utf8 = PyUnicode_DATA(unicode); len = PyUnicode_GET_LENGTH(unicode); } else { utf8 = PyUnicode_AsUTF8AndSize(unicode, &len); if (utf8 == NULL) { // Memory allocation failure. The API cannot report error, // so ignore the exception and return 0. res = 0; goto done; } }
if (len != str_len) { res = 0; goto done; } res = (memcmp(utf8, str, (size_t)len) == 0);#else PyObject *bytes = PyUnicode_AsUTF8String(unicode); if (bytes == NULL) { // Memory allocation failure. The API cannot report error, // so ignore the exception and return 0. res = 0; goto done; }
#if PY_VERSION_HEX >= 0x03000000 len = PyBytes_GET_SIZE(bytes); utf8 = PyBytes_AS_STRING(bytes);#else len = PyString_GET_SIZE(bytes); utf8 = PyString_AS_STRING(bytes);#endif if (len != str_len) { Py_DECREF(bytes); res = 0; goto done; }
res = (memcmp(utf8, str, (size_t)len) == 0); Py_DECREF(bytes);#endif
done: PyErr_Restore(exc_type, exc_value, exc_tb); return res;}
static inline intPyUnicode_EqualToUTF8(PyObject *unicode, const char *str){ return PyUnicode_EqualToUTF8AndSize(unicode, str, (Py_ssize_t)strlen(str));}#endif
// gh-111138 added PyList_Extend() and PyList_Clear() to Python 3.13.0a2#if PY_VERSION_HEX < 0x030D00A2static inline intPyList_Extend(PyObject *list, PyObject *iterable){ return PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable);}
static inline intPyList_Clear(PyObject *list){ return PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL);}#endif
// gh-111262 added PyDict_Pop() and PyDict_PopString() to Python 3.13.0a2#if PY_VERSION_HEX < 0x030D00A2static inline intPyDict_Pop(PyObject *dict, PyObject *key, PyObject **result){ PyObject *value;
if (!PyDict_Check(dict)) { PyErr_BadInternalCall(); if (result) { *result = NULL; } return -1; }
// bpo-16991 added _PyDict_Pop() to Python 3.5.0b2. // Python 3.6.0b3 changed _PyDict_Pop() first argument type to PyObject*. // Python 3.13.0a1 removed _PyDict_Pop().#if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x030500b2 || PY_VERSION_HEX >= 0x030D0000 value = PyObject_CallMethod(dict, "pop", "O", key);#elif PY_VERSION_HEX < 0x030600b3 value = _PyDict_Pop(_Py_CAST(PyDictObject*, dict), key, NULL);#else value = _PyDict_Pop(dict, key, NULL);#endif if (value == NULL) { if (result) { *result = NULL; } if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_KeyError)) { return -1; } PyErr_Clear(); return 0; } if (result) { *result = value; } else { Py_DECREF(value); } return 1;}
static inline intPyDict_PopString(PyObject *dict, const char *key, PyObject **result){ PyObject *key_obj = PyUnicode_FromString(key); if (key_obj == NULL) { if (result != NULL) { *result = NULL; } return -1; }
int res = PyDict_Pop(dict, key_obj, result); Py_DECREF(key_obj); return res;}#endif
#if PY_VERSION_HEX < 0x030200A4// Python 3.2.0a4 added Py_hash_t typetypedef Py_ssize_t Py_hash_t;#endif
// gh-111545 added Py_HashPointer() to Python 3.13.0a3#if PY_VERSION_HEX < 0x030D00A3static inline Py_hash_t Py_HashPointer(const void *ptr){#if PY_VERSION_HEX >= 0x030900A4 && !defined(PYPY_VERSION) return _Py_HashPointer(ptr);#else return _Py_HashPointer(_Py_CAST(void*, ptr));#endif}#endif
// Python 3.13a4 added a PyTime API.// Use the private API added to Python 3.5.#if PY_VERSION_HEX < 0x030D00A4 && PY_VERSION_HEX >= 0x03050000typedef _PyTime_t PyTime_t;#define PyTime_MIN _PyTime_MIN#define PyTime_MAX _PyTime_MAX
static inline double PyTime_AsSecondsDouble(PyTime_t t){ return _PyTime_AsSecondsDouble(t); }
static inline int PyTime_Monotonic(PyTime_t *result){ return _PyTime_GetMonotonicClockWithInfo(result, NULL); }
static inline int PyTime_Time(PyTime_t *result){ return _PyTime_GetSystemClockWithInfo(result, NULL); }
static inline int PyTime_PerfCounter(PyTime_t *result){#if PY_VERSION_HEX >= 0x03070000 && !defined(PYPY_VERSION) return _PyTime_GetPerfCounterWithInfo(result, NULL);#elif PY_VERSION_HEX >= 0x03070000 // Call time.perf_counter_ns() and convert Python int object to PyTime_t. // Cache time.perf_counter_ns() function for best performance. static PyObject *func = NULL; if (func == NULL) { PyObject *mod = PyImport_ImportModule("time"); if (mod == NULL) { return -1; }
func = PyObject_GetAttrString(mod, "perf_counter_ns"); Py_DECREF(mod); if (func == NULL) { return -1; } }
PyObject *res = PyObject_CallNoArgs(func); if (res == NULL) { return -1; } long long value = PyLong_AsLongLong(res); Py_DECREF(res);
if (value == -1 && PyErr_Occurred()) { return -1; }
Py_BUILD_ASSERT(sizeof(value) >= sizeof(PyTime_t)); *result = (PyTime_t)value; return 0;#else // Call time.perf_counter() and convert C double to PyTime_t. // Cache time.perf_counter() function for best performance. static PyObject *func = NULL; if (func == NULL) { PyObject *mod = PyImport_ImportModule("time"); if (mod == NULL) { return -1; }
func = PyObject_GetAttrString(mod, "perf_counter"); Py_DECREF(mod); if (func == NULL) { return -1; } }
PyObject *res = PyObject_CallNoArgs(func); if (res == NULL) { return -1; } double d = PyFloat_AsDouble(res); Py_DECREF(res);
if (d == -1.0 && PyErr_Occurred()) { return -1; }
// Avoid floor() to avoid having to link to libm *result = (PyTime_t)(d * 1e9); return 0;#endif}
#endif
// gh-111389 added hash constants to Python 3.13.0a5. These constants were// added first as private macros to Python 3.4.0b1 and PyPy 7.3.9.#if (!defined(PyHASH_BITS) \ && ((!defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x030400B1) \ || (defined(PYPY_VERSION) && PY_VERSION_HEX >= 0x03070000 \ && PYPY_VERSION_NUM >= 0x07090000)))# define PyHASH_BITS _PyHASH_BITS# define PyHASH_MODULUS _PyHASH_MODULUS# define PyHASH_INF _PyHASH_INF# define PyHASH_IMAG _PyHASH_IMAG#endif
// gh-111545 added Py_GetConstant() and Py_GetConstantBorrowed()// to Python 3.13.0a6#if PY_VERSION_HEX < 0x030D00A6 && !defined(Py_CONSTANT_NONE)
#define Py_CONSTANT_NONE 0#define Py_CONSTANT_FALSE 1#define Py_CONSTANT_TRUE 2#define Py_CONSTANT_ELLIPSIS 3#define Py_CONSTANT_NOT_IMPLEMENTED 4#define Py_CONSTANT_ZERO 5#define Py_CONSTANT_ONE 6#define Py_CONSTANT_EMPTY_STR 7#define Py_CONSTANT_EMPTY_BYTES 8#define Py_CONSTANT_EMPTY_TUPLE 9
static inline PyObject* Py_GetConstant(unsigned int constant_id){ static PyObject* constants[Py_CONSTANT_EMPTY_TUPLE + 1] = {NULL};
if (constants[Py_CONSTANT_NONE] == NULL) { constants[Py_CONSTANT_NONE] = Py_None; constants[Py_CONSTANT_FALSE] = Py_False; constants[Py_CONSTANT_TRUE] = Py_True; constants[Py_CONSTANT_ELLIPSIS] = Py_Ellipsis; constants[Py_CONSTANT_NOT_IMPLEMENTED] = Py_NotImplemented;
constants[Py_CONSTANT_ZERO] = PyLong_FromLong(0); if (constants[Py_CONSTANT_ZERO] == NULL) { goto fatal_error; }
constants[Py_CONSTANT_ONE] = PyLong_FromLong(1); if (constants[Py_CONSTANT_ONE] == NULL) { goto fatal_error; }
constants[Py_CONSTANT_EMPTY_STR] = PyUnicode_FromStringAndSize("", 0); if (constants[Py_CONSTANT_EMPTY_STR] == NULL) { goto fatal_error; }
constants[Py_CONSTANT_EMPTY_BYTES] = PyBytes_FromStringAndSize("", 0); if (constants[Py_CONSTANT_EMPTY_BYTES] == NULL) { goto fatal_error; }
constants[Py_CONSTANT_EMPTY_TUPLE] = PyTuple_New(0); if (constants[Py_CONSTANT_EMPTY_TUPLE] == NULL) { goto fatal_error; } // goto dance to avoid compiler warnings about Py_FatalError() goto init_done;
fatal_error: // This case should never happen Py_FatalError("Py_GetConstant() failed to get constants"); }
init_done: if (constant_id <= Py_CONSTANT_EMPTY_TUPLE) { return Py_NewRef(constants[constant_id]); } else { PyErr_BadInternalCall(); return NULL; }}
static inline PyObject* Py_GetConstantBorrowed(unsigned int constant_id){ PyObject *obj = Py_GetConstant(constant_id); Py_XDECREF(obj); return obj;}#endif
// gh-114329 added PyList_GetItemRef() to Python 3.13.0a4#if PY_VERSION_HEX < 0x030D00A4static inline PyObject *PyList_GetItemRef(PyObject *op, Py_ssize_t index){ PyObject *item = PyList_GetItem(op, index); Py_XINCREF(item); return item;}#endif
// gh-114329 added PyList_GetItemRef() to Python 3.13.0a4#if PY_VERSION_HEX < 0x030D00A4static inline intPyDict_SetDefaultRef(PyObject *d, PyObject *key, PyObject *default_value, PyObject **result){ PyObject *value; if (PyDict_GetItemRef(d, key, &value) < 0) { // get error if (result) { *result = NULL; } return -1; } if (value != NULL) { // present if (result) { *result = value; } else { Py_DECREF(value); } return 1; }
// missing: set the item if (PyDict_SetItem(d, key, default_value) < 0) { // set error if (result) { *result = NULL; } return -1; } if (result) { *result = Py_NewRef(default_value); } return 0;}#endif
#if PY_VERSION_HEX < 0x030E0000 && PY_VERSION_HEX >= 0x03060000 && !defined(PYPY_VERSION)typedef struct PyUnicodeWriter PyUnicodeWriter;
static inline void PyUnicodeWriter_Discard(PyUnicodeWriter *writer){ _PyUnicodeWriter_Dealloc((_PyUnicodeWriter*)writer); PyMem_Free(writer);}
static inline PyUnicodeWriter* PyUnicodeWriter_Create(Py_ssize_t length){ if (length < 0) { PyErr_SetString(PyExc_ValueError, "length must be positive"); return NULL; }
const size_t size = sizeof(_PyUnicodeWriter); PyUnicodeWriter *pub_writer = (PyUnicodeWriter *)PyMem_Malloc(size); if (pub_writer == _Py_NULL) { PyErr_NoMemory(); return _Py_NULL; } _PyUnicodeWriter *writer = (_PyUnicodeWriter *)pub_writer;
_PyUnicodeWriter_Init(writer); if (_PyUnicodeWriter_Prepare(writer, length, 127) < 0) { PyUnicodeWriter_Discard(pub_writer); return NULL; } writer->overallocate = 1; return pub_writer;}
static inline PyObject* PyUnicodeWriter_Finish(PyUnicodeWriter *writer){ PyObject *str = _PyUnicodeWriter_Finish((_PyUnicodeWriter*)writer); assert(((_PyUnicodeWriter*)writer)->buffer == NULL); PyMem_Free(writer); return str;}
static inline intPyUnicodeWriter_WriteChar(PyUnicodeWriter *writer, Py_UCS4 ch){ if (ch > 0x10ffff) { PyErr_SetString(PyExc_ValueError, "character must be in range(0x110000)"); return -1; }
return _PyUnicodeWriter_WriteChar((_PyUnicodeWriter*)writer, ch);}
static inline intPyUnicodeWriter_WriteStr(PyUnicodeWriter *writer, PyObject *obj){ PyObject *str = PyObject_Str(obj); if (str == NULL) { return -1; }
int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str); Py_DECREF(str); return res;}
static inline intPyUnicodeWriter_WriteRepr(PyUnicodeWriter *writer, PyObject *obj){ PyObject *str = PyObject_Repr(obj); if (str == NULL) { return -1; }
int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str); Py_DECREF(str); return res;}
static inline intPyUnicodeWriter_WriteUTF8(PyUnicodeWriter *writer, const char *str, Py_ssize_t size){ if (size < 0) { size = (Py_ssize_t)strlen(str); }
PyObject *str_obj = PyUnicode_FromStringAndSize(str, size); if (str_obj == _Py_NULL) { return -1; }
int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str_obj); Py_DECREF(str_obj); return res;}
static inline intPyUnicodeWriter_WriteWideChar(PyUnicodeWriter *writer, const wchar_t *str, Py_ssize_t size){ if (size < 0) { size = (Py_ssize_t)wcslen(str); }
PyObject *str_obj = PyUnicode_FromWideChar(str, size); if (str_obj == _Py_NULL) { return -1; }
int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str_obj); Py_DECREF(str_obj); return res;}
static inline intPyUnicodeWriter_WriteSubstring(PyUnicodeWriter *writer, PyObject *str, Py_ssize_t start, Py_ssize_t end){ if (!PyUnicode_Check(str)) { PyErr_Format(PyExc_TypeError, "expect str, not %T", str); return -1; } if (start < 0 || start > end) { PyErr_Format(PyExc_ValueError, "invalid start argument"); return -1; } if (end > PyUnicode_GET_LENGTH(str)) { PyErr_Format(PyExc_ValueError, "invalid end argument"); return -1; }
return _PyUnicodeWriter_WriteSubstring((_PyUnicodeWriter*)writer, str, start, end);}
static inline intPyUnicodeWriter_Format(PyUnicodeWriter *writer, const char *format, ...){ va_list vargs; va_start(vargs, format); PyObject *str = PyUnicode_FromFormatV(format, vargs); va_end(vargs); if (str == _Py_NULL) { return -1; }
int res = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter*)writer, str); Py_DECREF(str); return res;}#endif // PY_VERSION_HEX < 0x030E0000
// gh-116560 added PyLong_GetSign() to Python 3.14.0a0#if PY_VERSION_HEX < 0x030E00A0static inline int PyLong_GetSign(PyObject *obj, int *sign){ if (!PyLong_Check(obj)) { PyErr_Format(PyExc_TypeError, "expect int, got %s", Py_TYPE(obj)->tp_name); return -1; }
*sign = _PyLong_Sign(obj); return 0;}#endif
#ifdef __cplusplus}#endif#endif // PYTHONCAPI_COMPAT123456789101112131415161718192021222324252627282930313233343536373839// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#if defined(_WIN32) || defined(__CYGWIN__) // Windows# if defined(_MSC_VER)# pragma warning(disable : 4251)# else# pragma GCC diagnostic ignored "-Wattributes"# endif
# ifdef ARROW_PYTHON_STATIC# define ARROW_PYTHON_EXPORT# elif defined(ARROW_PYTHON_EXPORTING)# define ARROW_PYTHON_EXPORT __declspec(dllexport)# else# define ARROW_PYTHON_EXPORT __declspec(dllimport)# endif
#else // Not Windows# ifndef ARROW_PYTHON_EXPORT# define ARROW_PYTHON_EXPORT __attribute__((visibility("default")))# endif#endif // Non-Windows123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information// regarding copyright ownership. The ASF licenses this file// to you under the Apache License, Version 2.0 (the// "License"); you may not use this file except in compliance// with the License. You may obtain a copy of the License at//// http://www.apache.org/licenses/LICENSE-2.0//// Unless required by applicable law or agreed to in writing,// software distributed under the License is distributed on an// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY// KIND, either express or implied. See the License for the// specific language governing permissions and limitations// under the License.
#pragma once
#include <cstdint>#include <memory>#include <string>#include <vector>
#include "arrow/compare.h"#include "arrow/device.h"#include "arrow/result.h"#include "arrow/status.h"#include "arrow/type_fwd.h"#include "arrow/util/iterator.h"#include "arrow/util/macros.h"#include "arrow/util/visibility.h"
namespace arrow {
/// \class RecordBatch/// \brief Collection of equal-length arrays matching a particular Schema////// A record batch is table-like data structure that is semantically a sequence/// of fields, each a contiguous Arrow arrayclass ARROW_EXPORT RecordBatch { public: virtual ~RecordBatch() = default;
/// \param[in] schema The record batch schema /// \param[in] num_rows length of fields in the record batch. Each array /// should have the same length as num_rows /// \param[in] columns the record batch fields as vector of arrays /// \param[in] sync_event optional synchronization event for non-CPU device /// memory used by buffers static std::shared_ptr<RecordBatch> Make( std::shared_ptr<Schema> schema, int64_t num_rows, std::vector<std::shared_ptr<Array>> columns, std::shared_ptr<Device::SyncEvent> sync_event = NULLPTR);
/// \brief Construct record batch from vector of internal data structures /// \since 0.5.0 /// /// This class is intended for internal use, or advanced users. /// /// \param schema the record batch schema /// \param num_rows the number of semantic rows in the record batch. This /// should be equal to the length of each field /// \param columns the data for the batch's columns /// \param device_type the type of the device that the Arrow columns are /// allocated on /// \param sync_event optional synchronization event for non-CPU device /// memory used by buffers static std::shared_ptr<RecordBatch> Make( std::shared_ptr<Schema> schema, int64_t num_rows, std::vector<std::shared_ptr<ArrayData>> columns, DeviceAllocationType device_type = DeviceAllocationType::kCPU, std::shared_ptr<Device::SyncEvent> sync_event = NULLPTR);
/// \brief Create an empty RecordBatch of a given schema /// /// The output RecordBatch will be created with DataTypes from /// the given schema. /// /// \param[in] schema the schema of the empty RecordBatch /// \param[in] pool the memory pool to allocate memory from /// \return the resulting RecordBatch static Result<std::shared_ptr<RecordBatch>> MakeEmpty( std::shared_ptr<Schema> schema, MemoryPool* pool = default_memory_pool());
/// \brief Convert record batch to struct array /// /// Create a struct array whose child arrays are the record batch's columns. /// Note that the record batch's top-level field metadata cannot be reflected /// in the resulting struct array. Result<std::shared_ptr<StructArray>> ToStructArray() const;
/// \brief Convert RecordBatch to Tensor /// /// Create a Tensor object. /// /// \param[in] null_to_nan if true, convert nulls to NaN /// \param[in] row_major if true, create row-major Tensor else column-major Tensor /// \param[in] pool the memory pool to allocate the tensor buffer /// \return the resulting Tensor Result<std::shared_ptr<Tensor>> ToTensor( bool null_to_nan = false, bool row_major = true, MemoryPool* pool = default_memory_pool()) const;
/// \brief Construct record batch from struct array /// /// This constructs a record batch using the child arrays of the given /// array, which must be a struct array. /// /// \param[in] array the source array, must be a StructArray /// \param[in] pool the memory pool to allocate new validity bitmaps /// /// This operation will usually be zero-copy. However, if the struct array has an /// offset or a validity bitmap then these will need to be pushed into the child arrays. /// Pushing the offset is zero-copy but pushing the validity bitmap is not. static Result<std::shared_ptr<RecordBatch>> FromStructArray( const std::shared_ptr<Array>& array, MemoryPool* pool = default_memory_pool());
/// \brief Determine if two record batches are equal /// /// \param[in] other the RecordBatch to compare with /// \param[in] check_metadata if true, the schema metadata will be compared, /// regardless of the value set in \ref EqualOptions::use_metadata /// \param[in] opts the options for equality comparisons /// \return true if batches are equal bool Equals(const RecordBatch& other, bool check_metadata = false, const EqualOptions& opts = EqualOptions::Defaults()) const;
/// \brief Determine if two record batches are equal /// /// \param[in] other the RecordBatch to compare with /// \param[in] opts the options for equality comparisons /// \return true if batches are equal bool Equals(const RecordBatch& other, const EqualOptions& opts) const;
/// \brief Determine if two record batches are approximately equal /// /// If the absolute tolerance (atol) is not specified in \ref arrow::EqualOptions, /// 'arrow::kDefaultAbsoluteTolerance' is used. /// /// \param[in] other the RecordBatch to compare with /// \param[in] opts the options for equality comparisons /// \return true if batches are approximately equal bool ApproxEquals(const RecordBatch& other, const EqualOptions& opts = EqualOptions::Defaults()) const { auto resolved_options = opts.use_schema(false); if (!resolved_options.atol()) { resolved_options = resolved_options.atol(kDefaultAbsoluteTolerance); } return Equals(other, resolved_options); }
/// \return the record batch's schema const std::shared_ptr<Schema>& schema() const { return schema_; }
/// \brief Replace the schema with another schema with the same types, but potentially /// different field names and/or metadata. Result<std::shared_ptr<RecordBatch>> ReplaceSchema( std::shared_ptr<Schema> schema) const;
/// \brief Retrieve all columns at once virtual const std::vector<std::shared_ptr<Array>>& columns() const = 0;
/// \brief Retrieve an array from the record batch /// \param[in] i field index, does not boundscheck /// \return an Array object virtual std::shared_ptr<Array> column(int i) const = 0;
/// \brief Retrieve an array from the record batch /// \param[in] name field name /// \return an Array or null if no field was found std::shared_ptr<Array> GetColumnByName(const std::string& name) const;
/// \brief Retrieve an array's internal data from the record batch /// \param[in] i field index, does not boundscheck /// \return an internal ArrayData object virtual std::shared_ptr<ArrayData> column_data(int i) const = 0;
/// \brief Retrieve all arrays' internal data from the record batch. virtual const ArrayDataVector& column_data() const = 0;
/// \brief Add column to the record batch, producing a new RecordBatch /// /// \param[in] i field index, which will be boundschecked /// \param[in] field field to be added /// \param[in] column column to be added virtual Result<std::shared_ptr<RecordBatch>> AddColumn( int i, const std::shared_ptr<Field>& field, const std::shared_ptr<Array>& column) const = 0;
/// \brief Add new nullable column to the record batch, producing a new /// RecordBatch. /// /// For non-nullable columns, use the Field-based version of this method. /// /// \param[in] i field index, which will be boundschecked /// \param[in] field_name name of field to be added /// \param[in] column column to be added virtual Result<std::shared_ptr<RecordBatch>> AddColumn( int i, std::string field_name, const std::shared_ptr<Array>& column) const;
/// \brief Replace a column in the record batch, producing a new RecordBatch /// /// \param[in] i field index, does boundscheck /// \param[in] field field to be replaced /// \param[in] column column to be replaced virtual Result<std::shared_ptr<RecordBatch>> SetColumn( int i, const std::shared_ptr<Field>& field, const std::shared_ptr<Array>& column) const = 0;
/// \brief Remove column from the record batch, producing a new RecordBatch /// /// \param[in] i field index, does boundscheck virtual Result<std::shared_ptr<RecordBatch>> RemoveColumn(int i) const = 0;
virtual std::shared_ptr<RecordBatch> ReplaceSchemaMetadata( const std::shared_ptr<const KeyValueMetadata>& metadata) const = 0;
/// \brief Name in i-th column const std::string& column_name(int i) const;
/// \return the number of columns in the table int num_columns() const;
/// \return the number of rows (the corresponding length of each column) int64_t num_rows() const { return num_rows_; }
/// \brief Copy the entire RecordBatch to destination MemoryManager /// /// This uses Array::CopyTo on each column of the record batch to create /// a new record batch where all underlying buffers for the columns have /// been copied to the destination MemoryManager. This uses /// MemoryManager::CopyBuffer under the hood. Result<std::shared_ptr<RecordBatch>> CopyTo( const std::shared_ptr<MemoryManager>& to) const;
/// \brief View or Copy the entire RecordBatch to destination MemoryManager /// /// This uses Array::ViewOrCopyTo on each column of the record batch to create /// a new record batch where all underlying buffers for the columns have /// been zero-copy viewed on the destination MemoryManager, falling back /// to performing a copy if it can't be viewed as a zero-copy buffer. This uses /// Buffer::ViewOrCopy under the hood. Result<std::shared_ptr<RecordBatch>> ViewOrCopyTo( const std::shared_ptr<MemoryManager>& to) const;
/// \brief Slice each of the arrays in the record batch /// \param[in] offset the starting offset to slice, through end of batch /// \return new record batch virtual std::shared_ptr<RecordBatch> Slice(int64_t offset) const;
/// \brief Slice each of the arrays in the record batch /// \param[in] offset the starting offset to slice /// \param[in] length the number of elements to slice from offset /// \return new record batch virtual std::shared_ptr<RecordBatch> Slice(int64_t offset, int64_t length) const = 0;
/// \return PrettyPrint representation suitable for debugging std::string ToString() const;
/// \brief Return names of all columns std::vector<std::string> ColumnNames() const;
/// \brief Rename columns with provided names Result<std::shared_ptr<RecordBatch>> RenameColumns( const std::vector<std::string>& names) const;
/// \brief Return new record batch with specified columns Result<std::shared_ptr<RecordBatch>> SelectColumns( const std::vector<int>& indices) const;
/// \brief Perform cheap validation checks to determine obvious inconsistencies /// within the record batch's schema and internal data. /// /// This is O(k) where k is the total number of fields and array descendents. /// /// \return Status virtual Status Validate() const;
/// \brief Perform extensive validation checks to determine inconsistencies /// within the record batch's schema and internal data. /// /// This is potentially O(k*n) where n is the number of rows. /// /// \return Status virtual Status ValidateFull() const;
/// \brief EXPERIMENTAL: Return a top-level sync event object for this record batch /// /// If all of the data for this record batch is in CPU memory, then this /// will return null. If the data for this batch is /// on a device, then if synchronization is needed before accessing the /// data the returned sync event will allow for it. /// /// \return null or a Device::SyncEvent virtual const std::shared_ptr<Device::SyncEvent>& GetSyncEvent() const = 0;
virtual DeviceAllocationType device_type() const = 0;
/// \brief Create a statistics array of this record batch /// /// The created array follows the C data interface statistics /// specification. See /// https://arrow.apache.org/docs/format/StatisticsSchema.html /// for details. /// /// \param[in] pool the memory pool to allocate memory from /// \return the statistics array of this record batch Result<std::shared_ptr<Array>> MakeStatisticsArray( MemoryPool* pool = default_memory_pool()) const;
protected: RecordBatch(std::shared_ptr<Schema> schema, int64_t num_rows);
std::shared_ptr<Schema> schema_; int64_t num_rows_;
private: ARROW_DISALLOW_COPY_AND_ASSIGN(RecordBatch);};
struct ARROW_EXPORT RecordBatchWithMetadata { std::shared_ptr<RecordBatch> batch; std::shared_ptr<KeyValueMetadata> custom_metadata;};
template <>struct IterationTraits<RecordBatchWithMetadata> { static RecordBatchWithMetadata End() { return {NULLPTR, NULLPTR}; } static bool IsEnd(const RecordBatchWithMetadata& val) { return val.batch == NULLPTR; }};
/// \brief Abstract interface for reading stream of record batchesclass ARROW_EXPORT RecordBatchReader { public: using ValueType = std::shared_ptr<RecordBatch>;
virtual ~RecordBatchReader();
/// \return the shared schema of the record batches in the stream virtual std::shared_ptr<Schema> schema() const = 0;
/// \brief Read the next record batch in the stream. Return null for batch /// when reaching end of stream /// /// Example: /// /// ``` /// while (true) { /// std::shared_ptr<RecordBatch> batch; /// ARROW_RETURN_NOT_OK(reader->ReadNext(&batch)); /// if (!batch) { /// break; /// } /// // handling the `batch`, the `batch->num_rows()` /// // might be 0. /// } /// ``` /// /// \param[out] batch the next loaded batch, null at end of stream. Returning /// an empty batch doesn't mean the end of stream because it is valid data. /// \return Status virtual Status ReadNext(std::shared_ptr<RecordBatch>* batch) = 0;
virtual Result<RecordBatchWithMetadata> ReadNext() { return Status::NotImplemented("ReadNext with custom metadata"); }
/// \brief Iterator interface Result<std::shared_ptr<RecordBatch>> Next() { std::shared_ptr<RecordBatch> batch; ARROW_RETURN_NOT_OK(ReadNext(&batch)); return batch; }
/// \brief finalize reader virtual Status Close() { return Status::OK(); }
/// \brief EXPERIMENTAL: Get the device type for record batches this reader produces /// /// default implementation is to return DeviceAllocationType::kCPU virtual DeviceAllocationType device_type() const { return DeviceAllocationType::kCPU; }
class RecordBatchReaderIterator { public: using iterator_category = std::input_iterator_tag; using difference_type = std::ptrdiff_t; using value_type = std::shared_ptr<RecordBatch>; using pointer = const value_type*; using reference = const value_type&;
RecordBatchReaderIterator() : batch_(RecordBatchEnd()), reader_(NULLPTR) {}
explicit RecordBatchReaderIterator(RecordBatchReader* reader) : batch_(RecordBatchEnd()), reader_(reader) { Next(); }
bool operator==(const RecordBatchReaderIterator& other) const { return batch_ == other.batch_; }
bool operator!=(const RecordBatchReaderIterator& other) const { return !(*this == other); }
Result<std::shared_ptr<RecordBatch>> operator*() { ARROW_RETURN_NOT_OK(batch_);
return batch_; }
RecordBatchReaderIterator& operator++() { Next(); return *this; }
RecordBatchReaderIterator operator++(int) { RecordBatchReaderIterator tmp(*this); Next(); return tmp; }
private: std::shared_ptr<RecordBatch> RecordBatchEnd() { return std::shared_ptr<RecordBatch>(NULLPTR); }
void Next() { if (reader_ == NULLPTR) { batch_ = RecordBatchEnd(); return; } batch_ = reader_->Next(); }
Result<std::shared_ptr<RecordBatch>> batch_; RecordBatchReader* reader_; }; /// \brief Return an iterator to the first record batch in the stream RecordBatchReaderIterator begin() { return RecordBatchReaderIterator(this); }
/// \brief Return an iterator to the end of the stream RecordBatchReaderIterator end() { return RecordBatchReaderIterator(); }
/// \brief Consume entire stream as a vector of record batches Result<RecordBatchVector> ToRecordBatches();
/// \brief Read all batches and concatenate as arrow::Table Result<std::shared_ptr<Table>> ToTable();
/// \brief Create a RecordBatchReader from a vector of RecordBatch. /// /// \param[in] batches the vector of RecordBatch to read from /// \param[in] schema schema to conform to. Will be inferred from the first /// element if not provided. /// \param[in] device_type the type of device that the batches are allocated on static Result<std::shared_ptr<RecordBatchReader>> Make( RecordBatchVector batches, std::shared_ptr<Schema> schema = NULLPTR, DeviceAllocationType device_type = DeviceAllocationType::kCPU);
/// \brief Create a RecordBatchReader from an Iterator of RecordBatch. /// /// \param[in] batches an iterator of RecordBatch to read from. /// \param[in] schema schema that each record batch in iterator will conform to. /// \param[in] device_type the type of device that the batches are allocated on static Result<std::shared_ptr<RecordBatchReader>> MakeFromIterator( Iterator<std::shared_ptr<RecordBatch>> batches, std::shared_ptr<Schema> schema, DeviceAllocationType device_type = DeviceAllocationType::kCPU);};
/// \brief Concatenate record batches////// The columns of the new batch are formed by concatenate the same columns of each input/// batch. Concatenate multiple batches into a new batch requires that the schema must be/// consistent. It supports merging batches without columns (only length, scenarios such/// as count(*)).////// \param[in] batches a vector of record batches to be concatenated/// \param[in] pool memory to store the result will be allocated from this memory pool/// \return the concatenated record batchARROW_EXPORTResult<std::shared_ptr<RecordBatch>> ConcatenateRecordBatches( const RecordBatchVector& batches, MemoryPool* pool = default_memory_pool());
} // namespace arrow.gitattributes+14
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/INSTALLERAdded+1
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/METADATAAdded+78
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/RECORDAdded+755
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/REQUESTEDAdded
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/WHEELAdded+5
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/licenses/LICENSE.txtAdded
.venv/lib/python3.12/site-packages/pyarrow-25.0.1.dist-info/licenses/NOTICE.txtAdded+81
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/json/test_common.hAdded+330
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/json/type_fwd.hAdded+26
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/memory_pool.hAdded+348
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/memory_pool_test.hAdded+119
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/pretty_print.hAdded+161
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/api.hAdded+29
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/arrow_to_pandas.hAdded+165
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/async.hAdded+60
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/benchmark.hAdded+36
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/common.hAdded+471
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/config.hAdded+47
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/csv.hAdded+42
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/datetime.hAdded+231
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/decimal.hAdded+162
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/extension_type.hAdded+85
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/filesystem.hAdded+130
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/flight.hAdded+352
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/gdb.hAdded+29
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/helpers.hAdded+161
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/inference.hAdded+64
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/io.hAdded+121
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/ipc.hAdded+72
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/iterators.hAdded+200
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/lib.hAdded+79
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/lib_api.hAdded+220
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_convert.hAdded+122
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_init.hAdded+27
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_interop.hAdded+103
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/numpy_to_arrow.hAdded+72
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/parquet_encryption.hAdded+146
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/platform.hAdded+35
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow.hAdded+89
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow_api.hAdded+19
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/pyarrow_lib.hAdded+19
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/python_test.hAdded+42
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/python_to_arrow.hAdded+80
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/type_traits.hAdded+353
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/udf.hAdded+81
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/util.hAdded+40
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/vendored/pythoncapi_compat.hAdded+1519
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/python/visibility.hAdded+39
.venv/lib/python3.12/site-packages/pyarrow/include/arrow/record_batch.hAdded+486