publish built book
diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..a236cf9
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,39 @@
+# 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.
+
+github:
+  enabled_merge_buttons:
+    merge: false
+    rebase: false
+    squash: true
+  features:
+    issues: true
+  protected_branches:
+    main:
+      foo: bar # dummy value to make main a dictionary
+  ghp_branch:  gh-pages
+  ghp_path:    .
+
+notifications:
+  commits:      commits@arrow.apache.org
+  issues_status: issues@arrow.apache.org
+  issues:       github@arrow.apache.org
+  pullrequests: github@arrow.apache.org
+
+publish:
+  whoami: asf-site
+  subdir: cookbook
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.nojekyll
diff --git a/arrow.png b/arrow.png
new file mode 100644
index 0000000..72104b0
--- /dev/null
+++ b/arrow.png
Binary files differ
diff --git a/cpp/_sources/basic.rst.txt b/cpp/_sources/basic.rst.txt
new file mode 100644
index 0000000..287fd39
--- /dev/null
+++ b/cpp/_sources/basic.rst.txt
@@ -0,0 +1,92 @@
+.. 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.
+
+===================================
+Working with the C++ Implementation
+===================================
+
+This section of the cookbook goes over basic concepts
+that will be needed regardless of how you intend to use
+the Arrow C++ implementation.
+
+.. contents::
+
+Working with Status and Result
+==============================
+
+C++ libraries often have to choose between throwing exceptions and
+returning error codes.  Arrow chooses to return Status and Result
+objects as a middle ground.  This makes it clear when a function
+can fail and is easier to use than integer arrow codes.
+
+It is important to always check the value of a returned Status object to
+ensure that the operation succeeded.  However, this can quickly become
+tedious:
+
+.. recipe:: ../code/basic_arrow.cc ReturnNotOkNoMacro
+  :caption: Checking the status of every function manually
+  :dedent: 2
+
+The macro :c:macro:`ARROW_RETURN_NOT_OK` will take care of some of this
+boilerplate for you.  It will run the contained expression and check the resulting
+``Status`` or ``Result`` object.  If it failed then it will return the failure.
+
+.. recipe:: ../code/basic_arrow.cc ReturnNotOk
+  :caption: Using ARROW_RETURN_NOT_OK to check the status
+  :dedent: 2
+
+
+Using the Visitor Pattern
+=========================
+
+Arrow classes :cpp:class:`arrow::DataType`, :cpp:class:`arrow::Scalar`, and
+:cpp:class:`arrow::Array` have specialized subclasses for each Arrow type. In 
+order to specialize logic for each subclass, you can use the visitor pattern. 
+Arrow provides inline template functions that allow you to call visitors 
+efficiently:
+
+ * :cpp:func:`arrow::VisitTypeInline`
+ * :cpp:func:`arrow::VisitScalarInline`
+ * :cpp:func:`arrow::VisitArrayInline`
+
+Generate Random Data
+--------------------
+
+See example at :ref:`Generate Random Data Example`.
+
+
+Generalize Computations Across Arrow Types
+------------------------------------------
+
+Array visitors can be useful when writing functions that can handle multiple
+array types. However, implementing a visitor for each type individually can be
+excessively verbose. Fortunately, Arrow provides type traits that allow you to
+write templated functions to handle subsets of types. The example below
+demonstrates a table sum function that can handle any integer or floating point 
+array with only a single visitor implementation by leveraging
+:cpp:type:`arrow::enable_if_number`.
+
+.. literalinclude:: ../code/basic_arrow.cc
+   :language: cpp
+   :linenos:
+   :start-at: class TableSummation
+   :end-at: };  // TableSummation
+   :caption: Using visitor pattern that can compute sum of table with any numeric type
+  
+
+.. recipe:: ../code/basic_arrow.cc VisitorSummationExample
+   :dedent: 2
diff --git a/cpp/_sources/create.rst.txt b/cpp/_sources/create.rst.txt
new file mode 100644
index 0000000..305f733
--- /dev/null
+++ b/cpp/_sources/create.rst.txt
@@ -0,0 +1,72 @@
+.. 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.
+
+======================
+Creating Arrow Objects
+======================
+
+Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.
+
+.. contents::
+
+Create Arrays from Standard C++
+===============================
+
+Typed subclasses of :cpp:class:`arrow::ArrayBuilder` make it easy
+to efficiently create Arrow arrays from existing C++ data:
+
+.. recipe:: ../code/creating_arrow_objects.cc CreatingArrays
+  :caption: Creating an array from C++ primitives
+  :dedent: 2
+
+.. note::
+
+    Builders will allocate data as needed and insertion should
+    have constant amortized time.
+
+Builders can also consume standard C++ containers:
+
+.. recipe:: ../code/creating_arrow_objects.cc CreatingArraysPtr
+  :dedent: 2
+
+.. note::
+    
+    Builders will not take ownership of data in containers and will make a
+    copy of the underlying data.
+
+.. _Generate Random Data Example:
+
+Generate Random Data for a Given Schema
+=======================================
+
+To generate random data for a given schema, implementing a type visitor is a
+good idea. The following example only implements double arrays and list arrays,
+but could be easily extended to all types.
+
+
+.. literalinclude:: ../code/creating_arrow_objects.cc
+   :language: cpp
+   :linenos:
+   :start-at: class RandomBatchGenerator
+   :end-at: };  // RandomBatchGenerator
+   :caption: Using visitor pattern to generate random record batches
+  
+Given such a generator, you can create random test data for any supported schema:
+
+.. recipe:: ../code/creating_arrow_objects.cc GenerateRandomData
+   :dedent: 2
diff --git a/cpp/_sources/datasets.rst.txt b/cpp/_sources/datasets.rst.txt
new file mode 100644
index 0000000..f434da5
--- /dev/null
+++ b/cpp/_sources/datasets.rst.txt
@@ -0,0 +1,67 @@
+.. 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.
+
+============================
+Reading and Writing Datasets
+============================
+
+This section contains a number of recipes for reading and writing
+datasets.  Datasets are a collection of one or more files containing
+tabular data.
+
+.. contents::
+
+Read a Partitioned Dataset
+==========================
+
+The individual data files that make up a dataset will often be
+distributed across several different directories according to some
+kind of partitioning scheme.
+
+This simplifies management of the data and also allows for partial
+reads of the dataset by inspecting the file paths and utilizing the
+guarantees provided by the partitioning scheme.
+
+This recipe demonstrates the basics of reading a partitioned dataset.
+First let us inspect our data:
+
+.. recipe:: ../code/datasets.cc ListPartitionedDataset
+  :caption: A listing of files in our dataset
+  :dedent: 2
+
+.. note::
+
+    This partitioning scheme of key=value is referred to as "hive"
+    partitioning within Arrow.
+
+Now that we have a filesystem and a selector we can go ahead and create
+a dataset.  To do this we need to pick a format and a partitioning
+scheme.  Once we have all of the pieces we need we can create an 
+arrow::dataset::Dataset instance.
+
+.. recipe:: ../code/datasets.cc CreatingADataset
+  :caption: Creating an arrow::dataset::Dataset instance
+  :dedent: 2
+
+Once we have a dataset object we can read in the data.  Reading the data
+from a dataset is sometimes called "scanning" the dataset and the object
+we use to do this is an arrow::dataset::Scanner.  The following snippet
+shows how to scan the entire dataset into an in-memory table:
+
+.. recipe:: ../code/datasets.cc ScanningADataset
+  :caption: Scanning a dataset into an arrow::Table
+  :dedent: 2
diff --git a/cpp/_sources/flight.rst.txt b/cpp/_sources/flight.rst.txt
new file mode 100644
index 0000000..77c36e3
--- /dev/null
+++ b/cpp/_sources/flight.rst.txt
@@ -0,0 +1,153 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+This section contains a number of recipes for working with Arrow
+Flight, an RPC library specialized for tabular datasets. For more
+about Flight, see :doc:`format/Flight`.
+
+.. contents::
+
+Simple Parquet storage service with Arrow Flight
+================================================
+
+We'll implement a service that provides a key-value store for tabular
+data, using Flight to handle uploads/requests and Parquet to store the
+actual data.
+
+First, we'll implement the service itself. For simplicity, we won't
+use the :doc:`Datasets <./datasets>` API in favor of just using the
+Parquet API directly.
+
+.. literalinclude:: ../code/flight.cc
+   :language: cpp
+   :linenos:
+   :start-at: class ParquetStorageService
+   :end-at: end ParquetStorageService
+   :caption: Parquet storage service, server implementation
+
+First, we'll start our server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::StartServer
+   :dedent: 2
+
+We can then create a client and connect to the server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::Connect
+   :dedent: 2
+
+First, we'll create and upload a table, which will get stored in a
+Parquet file by the server.
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoPut
+   :dedent: 2
+
+Once we do so, we can retrieve the metadata for that dataset:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::GetFlightInfo
+   :dedent: 2
+
+And get the data back:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoGet
+   :dedent: 2
+
+Then, we'll delete the dataset:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoAction
+   :dedent: 2
+
+And confirm that it's been deleted:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::ListFlights
+   :dedent: 2
+
+Finally, we'll stop our server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::StopServer
+   :dedent: 2
+
+
+Setting gRPC client options
+===========================
+
+Options for gRPC clients can be passed in using the ``generic_options`` field of
+:cpp:class:`arrow::flight::FlightClientOptions`. There is a list of available
+client options in the `gRPC API documentation <https://grpc.github.io/grpc/cpp/group__grpc__arg__keys.html>`_. 
+
+For example, you can change the maximum message length sent with:
+
+.. recipe:: ../code/flight.cc TestClientOptions::Connect
+   :dedent: 2
+
+
+Flight Service with other gRPC endpoints
+========================================
+
+If you are using the gRPC backend, you can add other gRPC endpoints to the 
+Flight server. While Flight clients won't recognize these endpoints, general
+gRPC clients will be able to.
+
+.. note::
+   If statically linking Arrow Flight, Protobuf and gRPC must also be statically
+   linked, and the same goes for dynamic linking. Read more at
+   https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking
+
+Creating the server
+-------------------
+
+To create a gRPC service, first define a service using protobuf.
+
+.. literalinclude:: ../code/protos/helloworld.proto
+   :language: protobuf
+   :linenos:
+   :start-at: syntax = "proto3";
+   :caption: Hello world protobuf specification
+
+Next, you'll need to compile that to provide the protobuf and gRPC generated
+files. See gRPC's `generating client and server code 
+<https://grpc.io/docs/languages/cpp/basics/#generating-client-and-server-code>`_
+docs for details.
+
+Then write an implementation for the gRPC service:
+
+.. literalinclude:: ../code/flight.cc
+   :language: cpp
+   :linenos:
+   :start-at: class HelloWorldServiceImpl
+   :end-at: };  // end HelloWorldServiceImpl
+   :caption: Hello world gRPC service implementation
+
+Finally, use the ``builder_hook`` hook on :cpp:class:`arrow::flight::FlightServerOptions`
+to register the additional gRPC service.
+
+.. recipe:: ../code/flight.cc CustomGrpcImpl::StartServer
+   :dedent: 2
+
+Creating the client
+-------------------
+
+The Flight client implementation doesn't know about any custom gRPC services,
+so to call them you'll need to create a normal gRPC client. For the Hello World
+service, we use the HelloWorldService stub, which is provided by the compiled 
+gRPC definition.
+
+.. recipe:: ../code/flight.cc CustomGrpcImpl::CreateClient
+   :dedent: 2
diff --git a/cpp/_sources/index.rst.txt b/cpp/_sources/index.rst.txt
new file mode 100644
index 0000000..35e7bcd
--- /dev/null
+++ b/cpp/_sources/index.rst.txt
@@ -0,0 +1,40 @@
+.. 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.
+
+Apache Arrow C++ Cookbook
+=========================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   basic
+   create
+   datasets
+   flight
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/cpp/_static/alabaster.css b/cpp/_static/alabaster.css
new file mode 100644
index 0000000..cfaa100
--- /dev/null
+++ b/cpp/_static/alabaster.css
@@ -0,0 +1,703 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Make nested-list/multi-paragraph items look better in Releases changelog
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
+ * formatting between different release sub-lists.
+ */
+div#changelog > div.section > ul > li > p:only-child {
+    margin-bottom: 0;
+}
+
+/* Hide fugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/cpp/_static/basic.css b/cpp/_static/basic.css
new file mode 100644
index 0000000..30fee9d
--- /dev/null
+++ b/cpp/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: 360px;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/cpp/_static/custom.css b/cpp/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/cpp/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/cpp/_static/doctools.js b/cpp/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/cpp/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/cpp/_static/documentation_options.js b/cpp/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/cpp/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/cpp/_static/favicon.ico b/cpp/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/cpp/_static/favicon.ico
Binary files differ
diff --git a/cpp/_static/file.png b/cpp/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/cpp/_static/file.png
Binary files differ
diff --git a/cpp/_static/language_data.js b/cpp/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/cpp/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/cpp/_static/minus.png b/cpp/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/cpp/_static/minus.png
Binary files differ
diff --git a/cpp/_static/plus.png b/cpp/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/cpp/_static/plus.png
Binary files differ
diff --git a/cpp/_static/pygments.css b/cpp/_static/pygments.css
new file mode 100644
index 0000000..57c7df3
--- /dev/null
+++ b/cpp/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/cpp/_static/searchtools.js b/cpp/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/cpp/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/cpp/_static/sphinx_highlight.js b/cpp/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/cpp/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/cpp/basic.html b/cpp/basic.html
new file mode 100644
index 0000000..5ab1f4c
--- /dev/null
+++ b/cpp/basic.html
@@ -0,0 +1,329 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with the C++ Implementation &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+    <link rel="prev" title="Apache Arrow C++ Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-the-c-implementation">
+<h1><a class="toc-backref" href="#id7" role="doc-backlink">Working with the C++ Implementation</a><a class="headerlink" href="#working-with-the-c-implementation" title="Link to this heading">¶</a></h1>
+<p>This section of the cookbook goes over basic concepts
+that will be needed regardless of how you intend to use
+the Arrow C++ implementation.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-the-c-implementation" id="id7">Working with the C++ Implementation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#working-with-status-and-result" id="id8">Working with Status and Result</a></p></li>
+<li><p><a class="reference internal" href="#using-the-visitor-pattern" id="id9">Using the Visitor Pattern</a></p>
+<ul>
+<li><p><a class="reference internal" href="#generate-random-data" id="id10">Generate Random Data</a></p></li>
+<li><p><a class="reference internal" href="#generalize-computations-across-arrow-types" id="id11">Generalize Computations Across Arrow Types</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="working-with-status-and-result">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Working with Status and Result</a><a class="headerlink" href="#working-with-status-and-result" title="Link to this heading">¶</a></h2>
+<p>C++ libraries often have to choose between throwing exceptions and
+returning error codes.  Arrow chooses to return Status and Result
+objects as a middle ground.  This makes it clear when a function
+can fail and is easier to use than integer arrow codes.</p>
+<p>It is important to always check the value of a returned Status object to
+ensure that the operation succeeded.  However, this can quickly become
+tedious:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Checking the status of every function manually</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="n">test_fn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">NullBuilder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Reserve</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">  </span><span class="c1">// Tedious return value check</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">st</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">st</span><span class="p">;</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="w">  </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">AppendNulls</span><span class="p">(</span><span class="mi">-1</span><span class="p">);</span>
+<span class="w">  </span><span class="c1">// Tedious return value check</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">st</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">st</span><span class="p">;</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Appended -1 null values?&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">test_fn</span><span class="p">();</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Invalid</span><span class="p">:</span> <span class="n">length</span> <span class="n">must</span> <span class="n">be</span> <span class="n">positive</span>
+</pre></div>
+</div>
+</div>
+<p>The macro <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/support.html#c.ARROW_RETURN_NOT_OK" title="(in Apache Arrow v14.0.1)"><code class="xref c c-macro docutils literal notranslate"><span class="pre">ARROW_RETURN_NOT_OK</span></code></a> will take care of some of this
+boilerplate for you.  It will run the contained expression and check the resulting
+<code class="docutils literal notranslate"><span class="pre">Status</span></code> or <code class="docutils literal notranslate"><span class="pre">Result</span></code> object.  If it failed then it will return the failure.</p>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Using ARROW_RETURN_NOT_OK to check the status</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="n">test_fn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">NullBuilder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Reserve</span><span class="p">(</span><span class="mi">2</span><span class="p">));</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">AppendNulls</span><span class="p">(</span><span class="mi">-1</span><span class="p">));</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Appended -1 null values?&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">test_fn</span><span class="p">();</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Invalid</span><span class="p">:</span> <span class="n">length</span> <span class="n">must</span> <span class="n">be</span> <span class="n">positive</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="using-the-visitor-pattern">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Using the Visitor Pattern</a><a class="headerlink" href="#using-the-visitor-pattern" title="Link to this heading">¶</a></h2>
+<p>Arrow classes <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/datatype.html#_CPPv4N5arrow8DataTypeE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::DataType</span></code></a>, <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/scalar.html#_CPPv4N5arrow6ScalarE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::Scalar</span></code></a>, and
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/api/array.html#_CPPv4N5arrow5ArrayE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::Array</span></code></a> have specialized subclasses for each Arrow type. In
+order to specialize logic for each subclass, you can use the visitor pattern.
+Arrow provides inline template functions that allow you to call visitors
+efficiently:</p>
+<blockquote>
+<div><ul class="simple">
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow15VisitTypeInlineE6StatusRK8DataTypeP7VISITORDpRR4ARGS" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitTypeInline()</span></code></a></p></li>
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow17VisitScalarInlineE6StatusRK6ScalarP7VISITORDpRR4ARGS" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitScalarInline()</span></code></a></p></li>
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow16VisitArrayInlineE6StatusRK5ArrayP7VISITORDpRR4ARGS" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitArrayInline()</span></code></a></p></li>
+</ul>
+</div></blockquote>
+<section id="generate-random-data">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Generate Random Data</a><a class="headerlink" href="#generate-random-data" title="Link to this heading">¶</a></h3>
+<p>See example at <a class="reference internal" href="create.html#generate-random-data-example"><span class="std std-ref">Generate Random Data for a Given Schema</span></a>.</p>
+</section>
+<section id="generalize-computations-across-arrow-types">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Generalize Computations Across Arrow Types</a><a class="headerlink" href="#generalize-computations-across-arrow-types" title="Link to this heading">¶</a></h3>
+<p>Array visitors can be useful when writing functions that can handle multiple
+array types. However, implementing a visitor for each type individually can be
+excessively verbose. Fortunately, Arrow provides type traits that allow you to
+write templated functions to handle subsets of types. The example below
+demonstrates a table sum function that can handle any integer or floating point
+array with only a single visitor implementation by leveraging
+<code class="xref cpp cpp-type docutils literal notranslate"><span class="pre">arrow::enable_if_number</span></code>.</p>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Using visitor pattern that can compute sum of table with any numeric type</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">TableSummation</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w">  </span><span class="kt">double</span><span class="w"> </span><span class="n">partial</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">0.0</span><span class="p">;</span>
+<span class="linenos"> 3</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos"> 4</span>
+<span class="linenos"> 5</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Compute</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 6</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">array</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">columns</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 7</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">VisitArrayInline</span><span class="p">(</span><span class="o">*</span><span class="n">array</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">partial</span><span class="p">;</span>
+<span class="linenos">10</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">11</span>
+<span class="linenos">12</span><span class="w">  </span><span class="c1">// Default implementation</span>
+<span class="linenos">13</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&amp;</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">14</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Can not compute sum for array of type &quot;</span><span class="p">,</span>
+<span class="linenos">15</span><span class="w">                                         </span><span class="n">array</span><span class="p">.</span><span class="n">type</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos">16</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">17</span>
+<span class="linenos">18</span><span class="w">  </span><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">ArrayType</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">ArrayType</span><span class="o">::</span><span class="n">TypeClass</span><span class="o">&gt;</span>
+<span class="linenos">19</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">enable_if_number</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">ArrayType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">20</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">optional</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">::</span><span class="n">c_type</span><span class="o">&gt;</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">21</span><span class="w">      </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">.</span><span class="n">has_value</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">22</span><span class="w">        </span><span class="n">partial</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="k">static_cast</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="p">(</span><span class="n">value</span><span class="p">.</span><span class="n">value</span><span class="p">());</span>
+<span class="linenos">23</span><span class="w">      </span><span class="p">}</span>
+<span class="linenos">24</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">25</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">26</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">27</span><span class="p">};</span><span class="w">  </span><span class="c1">// TableSummation</span>
+</pre></div>
+</div>
+</div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;a&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">int32</span><span class="p">()),</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;b&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()),</span>
+<span class="p">});</span>
+<span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="w"> </span><span class="n">a_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int32_t</span><span class="o">&gt;</span><span class="w"> </span><span class="n">a_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">a_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">a_vals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">a_arr</span><span class="p">,</span><span class="w"> </span><span class="n">a_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">columns</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">a_arr</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="w"> </span><span class="n">b_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">b_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">4.0</span><span class="p">,</span><span class="w"> </span><span class="mf">5.0</span><span class="p">,</span><span class="w"> </span><span class="mf">6.0</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">b_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">b_vals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">b_arr</span><span class="p">,</span><span class="w"> </span><span class="n">b_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">columns</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">b_arr</span><span class="p">);</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">num_rows</span><span class="p">,</span><span class="w"> </span><span class="n">columns</span><span class="p">);</span>
+
+<span class="c1">// Call</span>
+<span class="n">TableSummation</span><span class="w"> </span><span class="n">summation</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">total</span><span class="p">,</span><span class="w"> </span><span class="n">summation</span><span class="p">.</span><span class="n">Compute</span><span class="p">(</span><span class="n">batch</span><span class="p">));</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Total is &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">total</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Total</span> <span class="ow">is</span> <span class="mi">21</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with the C++ Implementation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#working-with-status-and-result">Working with Status and Result</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#using-the-visitor-pattern">Using the Visitor Pattern</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow C++ Cookbook</a></li>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/basic.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/create.html b/cpp/create.html
new file mode 100644
index 0000000..0ed85dd
--- /dev/null
+++ b/cpp/create.html
@@ -0,0 +1,384 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and Writing Datasets" href="datasets.html" />
+    <link rel="prev" title="Working with the C++ Implementation" href="basic.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<h1><a class="toc-backref" href="#id6" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id6">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#create-arrays-from-standard-c" id="id7">Create Arrays from Standard C++</a></p></li>
+<li><p><a class="reference internal" href="#generate-random-data-for-a-given-schema" id="id8">Generate Random Data for a Given Schema</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="create-arrays-from-standard-c">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Create Arrays from Standard C++</a><a class="headerlink" href="#create-arrays-from-standard-c" title="Link to this heading">¶</a></h2>
+<p>Typed subclasses of <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/builder.html#_CPPv4N5arrow12ArrayBuilderE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::ArrayBuilder</span></code></a> make it easy
+to efficiently create Arrow arrays from existing C++ data:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Creating an array from C++ primitives</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">2</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">3</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">())</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="mi">2</span><span class="p">,</span>
+  <span class="mi">3</span>
+<span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Builders will allocate data as needed and insertion should
+have constant amortized time.</p>
+</div>
+<p>Builders can also consume standard C++ containers:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Raw pointers</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Int64Builder</span><span class="w"> </span><span class="n">long_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int64Builder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">array</span><span class="o">&lt;</span><span class="kt">int64_t</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="o">&gt;</span><span class="w"> </span><span class="n">values</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">long_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">values</span><span class="p">.</span><span class="n">data</span><span class="p">(),</span><span class="w"> </span><span class="n">values</span><span class="p">.</span><span class="n">size</span><span class="p">()));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">long_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+
+<span class="c1">// Vectors</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">StringBuilder</span><span class="w"> </span><span class="n">str_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">StringBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="w"> </span><span class="n">strvals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;y&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;z&quot;</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">str_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">strvals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">str_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+
+<span class="c1">// Iterators</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="w"> </span><span class="n">dbl_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">set</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dblvals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">1.1</span><span class="p">,</span><span class="w"> </span><span class="mf">1.1</span><span class="p">,</span><span class="w"> </span><span class="mf">2.3</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">dbl_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">dblvals</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">dblvals</span><span class="p">.</span><span class="n">end</span><span class="p">()));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">dbl_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="mi">2</span><span class="p">,</span>
+  <span class="mi">3</span><span class="p">,</span>
+  <span class="mi">4</span>
+<span class="p">]</span>
+<span class="p">[</span>
+  <span class="s2">&quot;x&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;y&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;z&quot;</span>
+<span class="p">]</span>
+<span class="p">[</span>
+  <span class="mf">1.1</span><span class="p">,</span>
+  <span class="mf">2.3</span>
+<span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Builders will not take ownership of data in containers and will make a
+copy of the underlying data.</p>
+</div>
+</section>
+<section id="generate-random-data-for-a-given-schema">
+<span id="generate-random-data-example"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Generate Random Data for a Given Schema</a><a class="headerlink" href="#generate-random-data-for-a-given-schema" title="Link to this heading">¶</a></h2>
+<p>To generate random data for a given schema, implementing a type visitor is a
+good idea. The following example only implements double arrays and list arrays,
+but could be easily extended to all types.</p>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Using visitor pattern to generate random record batches</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">RandomBatchGenerator</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos"> 3</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="linenos"> 4</span>
+<span class="linenos"> 5</span><span class="w">  </span><span class="n">RandomBatchGenerator</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">schema</span><span class="p">(</span><span class="n">schema</span><span class="p">){};</span>
+<span class="linenos"> 6</span>
+<span class="linenos"> 7</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">Generate</span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="n">num_rows_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">num_rows</span><span class="p">;</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">field</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">schema</span><span class="o">-&gt;</span><span class="n">fields</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">10</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">VisitTypeInline</span><span class="p">(</span><span class="o">*</span><span class="n">field</span><span class="o">-&gt;</span><span class="n">type</span><span class="p">(),</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
+<span class="linenos">11</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">12</span>
+<span class="linenos">13</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">num_rows</span><span class="p">,</span><span class="w"> </span><span class="n">arrays_</span><span class="p">);</span>
+<span class="linenos">14</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">15</span>
+<span class="linenos">16</span><span class="w">  </span><span class="c1">// Default implementation</span>
+<span class="linenos">17</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DataType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">18</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Generating data for&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">type</span><span class="p">.</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos">19</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">20</span>
+<span class="linenos">21</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleType</span><span class="o">&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">22</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="linenos">23</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">normal_distribution</span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">d</span><span class="p">{</span><span class="cm">/*mean=*/</span><span class="mf">5.0</span><span class="p">,</span><span class="w"> </span><span class="cm">/*stddev=*/</span><span class="mf">2.0</span><span class="p">};</span>
+<span class="linenos">24</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">25</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="n">d</span><span class="p">(</span><span class="n">gen_</span><span class="p">)));</span>
+<span class="linenos">26</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">27</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">array</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="linenos">28</span><span class="w">    </span><span class="n">arrays_</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">array</span><span class="p">);</span>
+<span class="linenos">29</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">30</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">31</span>
+<span class="linenos">32</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">ListType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">33</span><span class="w">    </span><span class="c1">// Generate offsets first, which determines number of values in sub-array</span>
+<span class="linenos">34</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">poisson_distribution</span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">d</span><span class="p">{</span><span class="cm">/*mean=*/</span><span class="mi">4</span><span class="p">};</span>
+<span class="linenos">35</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="p">();</span>
+<span class="linenos">36</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">0</span><span class="p">));</span>
+<span class="linenos">37</span><span class="w">    </span><span class="kt">int32_t</span><span class="w"> </span><span class="n">last_val</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="linenos">38</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">39</span><span class="w">      </span><span class="n">last_val</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">d</span><span class="p">(</span><span class="n">gen_</span><span class="p">);</span>
+<span class="linenos">40</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="n">last_val</span><span class="p">));</span>
+<span class="linenos">41</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">42</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">offsets</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="linenos">43</span>
+<span class="linenos">44</span><span class="w">    </span><span class="c1">// Since children of list has a new length, will use a new generator</span>
+<span class="linenos">45</span><span class="w">    </span><span class="n">RandomBatchGenerator</span><span class="w"> </span><span class="n">value_gen</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">type</span><span class="p">.</span><span class="n">value_type</span><span class="p">())}));</span>
+<span class="linenos">46</span><span class="w">    </span><span class="c1">// Last index from the offsets array becomes the length of the sub-array</span>
+<span class="linenos">47</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">inner_batch</span><span class="p">,</span><span class="w"> </span><span class="n">value_gen</span><span class="p">.</span><span class="n">Generate</span><span class="p">(</span><span class="n">last_val</span><span class="p">));</span>
+<span class="linenos">48</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">values</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inner_batch</span><span class="o">-&gt;</span><span class="n">column</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="linenos">49</span>
+<span class="linenos">50</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">array</span><span class="p">,</span>
+<span class="linenos">51</span><span class="w">                          </span><span class="n">arrow</span><span class="o">::</span><span class="n">ListArray</span><span class="o">::</span><span class="n">FromArrays</span><span class="p">(</span><span class="o">*</span><span class="n">offsets</span><span class="p">.</span><span class="n">get</span><span class="p">(),</span><span class="w"> </span><span class="o">*</span><span class="n">values</span><span class="p">.</span><span class="n">get</span><span class="p">()));</span>
+<span class="linenos">52</span><span class="w">    </span><span class="n">arrays_</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">array</span><span class="p">);</span>
+<span class="linenos">53</span>
+<span class="linenos">54</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">55</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">56</span>
+<span class="linenos">57</span><span class="w"> </span><span class="k">protected</span><span class="o">:</span>
+<span class="linenos">58</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">random_device</span><span class="w"> </span><span class="n">rd_</span><span class="p">{};</span>
+<span class="linenos">59</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">mt19937</span><span class="w"> </span><span class="n">gen_</span><span class="p">{</span><span class="n">rd_</span><span class="p">()};</span>
+<span class="linenos">60</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">arrays_</span><span class="p">;</span>
+<span class="linenos">61</span><span class="w">  </span><span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span>
+<span class="linenos">62</span><span class="p">};</span><span class="w">  </span><span class="c1">// RandomBatchGenerator</span>
+</pre></div>
+</div>
+</div>
+<p>Given such a generator, you can create random test data for any supported schema:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()),</span>
+<span class="w">                   </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;y&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">list</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()))});</span>
+
+<span class="n">RandomBatchGenerator</span><span class="w"> </span><span class="nf">generator</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch</span><span class="p">,</span><span class="w"> </span><span class="n">generator</span><span class="p">.</span><span class="n">Generate</span><span class="p">(</span><span class="mi">5</span><span class="p">));</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Created batch: </span><span class="se">\n</span><span class="s">&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">();</span>
+
+<span class="c1">// Consider using ValidateFull to check correctness</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">ValidateFull</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Created</span> <span class="n">batch</span><span class="p">:</span> 
+<span class="n">x</span><span class="p">:</span>   <span class="p">[</span>
+    <span class="mf">4.546911589795752</span><span class="p">,</span>
+    <span class="mf">6.984533198458078</span><span class="p">,</span>
+    <span class="mf">7.617112892424505</span><span class="p">,</span>
+    <span class="mf">7.071039704261608</span><span class="p">,</span>
+    <span class="mf">5.333380507036075</span>
+  <span class="p">]</span>
+<span class="n">y</span><span class="p">:</span>   <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mf">6.162093180569001</span><span class="p">,</span>
+      <span class="mf">4.264271666435832</span><span class="p">,</span>
+      <span class="mf">4.453379826203139</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">5.550493157228391</span><span class="p">,</span>
+      <span class="mf">2.2790346108514914</span><span class="p">,</span>
+      <span class="mf">6.320687795635024</span><span class="p">,</span>
+      <span class="mf">5.790474643286342</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">6.1749549303569</span><span class="p">,</span>
+      <span class="mf">1.2247191609769907</span><span class="p">,</span>
+      <span class="mf">10.309335708651332</span><span class="p">,</span>
+      <span class="mf">2.7148579213976567</span><span class="p">,</span>
+      <span class="mf">0.7332353370369562</span><span class="p">,</span>
+      <span class="mf">7.925025202564361</span><span class="p">,</span>
+      <span class="mf">4.011131470597689</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">3.051431659823732</span><span class="p">,</span>
+      <span class="mf">6.459224633329098</span><span class="p">,</span>
+      <span class="mf">6.545469562979236</span><span class="p">,</span>
+      <span class="mf">4.2098221381083905</span><span class="p">,</span>
+      <span class="mf">4.227733269678735</span><span class="p">,</span>
+      <span class="mf">5.916080551640544</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">5.996692460353367</span><span class="p">,</span>
+      <span class="mf">3.8667241669428876</span><span class="p">,</span>
+      <span class="mf">1.3804329308731353</span><span class="p">,</span>
+      <span class="mf">5.711691758211411</span><span class="p">,</span>
+      <span class="mf">3.4554154047425714</span><span class="p">,</span>
+      <span class="mf">3.102919934591531</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#create-arrays-from-standard-c">Create Arrays from Standard C++</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#generate-random-data-for-a-given-schema">Generate Random Data for a Given Schema</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="basic.html" title="previous chapter">Working with the C++ Implementation</a></li>
+      <li>Next: <a href="datasets.html" title="next chapter">Reading and Writing Datasets</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/datasets.html b/cpp/datasets.html
new file mode 100644
index 0000000..6a0e186
--- /dev/null
+++ b/cpp/datasets.html
@@ -0,0 +1,311 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and Writing Datasets &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-datasets">
+<h1><a class="toc-backref" href="#id7" role="doc-backlink">Reading and Writing Datasets</a><a class="headerlink" href="#reading-and-writing-datasets" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for reading and writing
+datasets.  Datasets are a collection of one or more files containing
+tabular data.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-datasets" id="id7">Reading and Writing Datasets</a></p>
+<ul>
+<li><p><a class="reference internal" href="#read-a-partitioned-dataset" id="id8">Read a Partitioned Dataset</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="read-a-partitioned-dataset">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Read a Partitioned Dataset</a><a class="headerlink" href="#read-a-partitioned-dataset" title="Link to this heading">¶</a></h2>
+<p>The individual data files that make up a dataset will often be
+distributed across several different directories according to some
+kind of partitioning scheme.</p>
+<p>This simplifies management of the data and also allows for partial
+reads of the dataset by inspecting the file paths and utilizing the
+guarantees provided by the partitioning scheme.</p>
+<p>This recipe demonstrates the basics of reading a partitioned dataset.
+First let us inspect our data:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">A listing of files in our dataset</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">directory_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">airquality_basedir</span><span class="p">;</span>
+
+<span class="c1">// Create a filesystem</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">fs</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="p">();</span>
+
+<span class="c1">// Create a file selector which describes which files are part of</span>
+<span class="c1">// the dataset.  This selector performs a recursive search of a base</span>
+<span class="c1">// directory which is typical with partitioned datasets.  You can also</span>
+<span class="c1">// create a dataset from a list of one or more paths.</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSelector</span><span class="w"> </span><span class="n">selector</span><span class="p">;</span>
+<span class="n">selector</span><span class="p">.</span><span class="n">base_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">directory_base</span><span class="p">;</span>
+<span class="n">selector</span><span class="p">.</span><span class="n">recursive</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
+
+<span class="c1">// List out the files so we can see how our data is partitioned.</span>
+<span class="c1">// This step is not necessary for reading a dataset</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">file_infos</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">selector</span><span class="p">));</span>
+<span class="kt">int</span><span class="w"> </span><span class="n">num_printed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">file_infos</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">.</span><span class="n">IsFile</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">path</span><span class="p">.</span><span class="n">path</span><span class="p">().</span><span class="n">substr</span><span class="p">(</span><span class="n">directory_base</span><span class="p">.</span><span class="n">size</span><span class="p">())</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">++</span><span class="n">num_printed</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">10</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">      </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;...&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">      </span><span class="k">break</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">15</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">20</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">24</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">23</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">16</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">13</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">25</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">18</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">8</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">17</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">...</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>This partitioning scheme of key=value is referred to as “hive”
+partitioning within Arrow.</p>
+</div>
+<p>Now that we have a filesystem and a selector we can go ahead and create
+a dataset.  To do this we need to pick a format and a partitioning
+scheme.  Once we have all of the pieces we need we can create an
+arrow::dataset::Dataset instance.</p>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Creating an arrow::dataset::Dataset instance</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Create a file format which describes the format of the files.</span>
+<span class="c1">// Here we specify we are reading parquet files.  We could pick a different format</span>
+<span class="c1">// such as Arrow-IPC files or CSV files or we could customize the parquet format with</span>
+<span class="c1">// additional reading &amp; parsing options.</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ParquetFileFormat</span><span class="o">&gt;</span><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ParquetFileFormat</span><span class="o">&gt;</span><span class="p">();</span>
+
+<span class="c1">// Create a partitioning factory.  A partitioning factory will be used by a dataset</span>
+<span class="c1">// factory to infer the partitioning schema from the filenames.  All we need to</span>
+<span class="c1">// specify is the flavor of partitioning which, in our case, is &quot;hive&quot;.</span>
+<span class="c1">//</span>
+<span class="c1">// Alternatively, we could manually create a partitioning scheme from a schema.  This</span>
+<span class="c1">// is typically not necessary for hive partitioning as inference works well.</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">PartitioningFactory</span><span class="o">&gt;</span><span class="w"> </span><span class="n">partitioning_factory</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">HivePartitioning</span><span class="o">::</span><span class="n">MakeFactory</span><span class="p">();</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">FileSystemFactoryOptions</span><span class="w"> </span><span class="n">options</span><span class="p">;</span>
+<span class="n">options</span><span class="p">.</span><span class="n">partitioning</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">partitioning_factory</span><span class="p">;</span>
+
+<span class="c1">// Create a dataset factory</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">DatasetFactory</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dataset_factory</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">FileSystemDatasetFactory</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">fs</span><span class="p">,</span><span class="w"> </span><span class="n">selector</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">options</span><span class="p">));</span>
+
+<span class="c1">// Create the dataset, this will scan the dataset directory to find all the files</span>
+<span class="c1">// and may scan some file metadata in order to determine the dataset schema.</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">Dataset</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dataset</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">dataset_factory</span><span class="o">-&gt;</span><span class="n">Finish</span><span class="p">());</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;We discovered the following schema for the dataset:&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">dataset</span><span class="o">-&gt;</span><span class="n">schema</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">We</span> <span class="n">discovered</span> <span class="n">the</span> <span class="n">following</span> <span class="n">schema</span> <span class="k">for</span> <span class="n">the</span> <span class="n">dataset</span><span class="p">:</span>
+
+<span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+</pre></div>
+</div>
+</div>
+<p>Once we have a dataset object we can read in the data.  Reading the data
+from a dataset is sometimes called “scanning” the dataset and the object
+we use to do this is an arrow::dataset::Scanner.  The following snippet
+shows how to scan the entire dataset into an in-memory table:</p>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Scanning a dataset into an arrow::Table</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Create a scanner</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ScannerBuilder</span><span class="w"> </span><span class="nf">scanner_builder</span><span class="p">(</span><span class="n">dataset</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">scanner_builder</span><span class="p">.</span><span class="n">UseThreads</span><span class="p">(</span><span class="nb">true</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">Scanner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">scanner</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">scanner_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+
+<span class="c1">// Scan the dataset.  There are a variety of other methods available on the scanner as</span>
+<span class="c1">// well</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">scanner</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Read in a table with &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">num_rows</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; rows and &quot;</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">num_columns</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; columns&quot;</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Read</span> <span class="ow">in</span> <span class="n">a</span> <span class="n">table</span> <span class="k">with</span> <span class="mi">153</span> <span class="n">rows</span> <span class="ow">and</span> <span class="mi">6</span> <span class="n">columns</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and Writing Datasets</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#read-a-partitioned-dataset">Read a Partitioned Dataset</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/datasets.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/flight.html b/cpp/flight.html
new file mode 100644
index 0000000..dfbe765
--- /dev/null
+++ b/cpp/flight.html
@@ -0,0 +1,702 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Reading and Writing Datasets" href="datasets.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id15" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for working with Arrow
+Flight, an RPC library specialized for tabular datasets. For more
+about Flight, see <span class="xref std std-doc">format/Flight</span>.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id15">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight" id="id16">Simple Parquet storage service with Arrow Flight</a></p></li>
+<li><p><a class="reference internal" href="#setting-grpc-client-options" id="id17">Setting gRPC client options</a></p></li>
+<li><p><a class="reference internal" href="#flight-service-with-other-grpc-endpoints" id="id18">Flight Service with other gRPC endpoints</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-the-server" id="id19">Creating the server</a></p></li>
+<li><p><a class="reference internal" href="#creating-the-client" id="id20">Creating the client</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-parquet-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id16" role="doc-backlink">Simple Parquet storage service with Arrow Flight</a><a class="headerlink" href="#simple-parquet-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>We’ll implement a service that provides a key-value store for tabular
+data, using Flight to handle uploads/requests and Parquet to store the
+actual data.</p>
+<p>First, we’ll implement the service itself. For simplicity, we won’t
+use the <a class="reference internal" href="datasets.html"><span class="doc">Datasets</span></a> API in favor of just using the
+Parquet API directly.</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Parquet storage service, server implementation</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos">  1</span><span class="k">class</span><span class="w"> </span><span class="nc">ParquetStorageService</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">  2</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos">  3</span><span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ActionType</span><span class="w"> </span><span class="n">kActionDropDataset</span><span class="p">{</span><span class="s">&quot;drop_dataset&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Delete a dataset.&quot;</span><span class="p">};</span>
+<span class="linenos">  4</span>
+<span class="linenos">  5</span><span class="w">  </span><span class="k">explicit</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">root</span><span class="p">)</span>
+<span class="linenos">  6</span><span class="w">      </span><span class="o">:</span><span class="w"> </span><span class="n">root_</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">))</span><span class="w"> </span><span class="p">{}</span>
+<span class="linenos">  7</span>
+<span class="linenos">  8</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">ListFlights</span><span class="p">(</span>
+<span class="linenos">  9</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Criteria</span><span class="o">*</span><span class="p">,</span>
+<span class="linenos"> 10</span><span class="w">      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">listings</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 11</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSelector</span><span class="w"> </span><span class="n">selector</span><span class="p">;</span>
+<span class="linenos"> 12</span><span class="w">    </span><span class="n">selector</span><span class="p">.</span><span class="n">base_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;/&quot;</span><span class="p">;</span>
+<span class="linenos"> 13</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">listing</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">selector</span><span class="p">));</span>
+<span class="linenos"> 14</span>
+<span class="linenos"> 15</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flights</span><span class="p">;</span>
+<span class="linenos"> 16</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">file_info</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">listing</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 17</span><span class="w">      </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">file_info</span><span class="p">.</span><span class="n">IsFile</span><span class="p">()</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">extension</span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="s">&quot;parquet&quot;</span><span class="p">)</span><span class="w"> </span><span class="k">continue</span><span class="p">;</span>
+<span class="linenos"> 18</span><span class="w">      </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 19</span><span class="w">      </span><span class="n">flights</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">info</span><span class="p">));</span>
+<span class="linenos"> 20</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 21</span>
+<span class="linenos"> 22</span><span class="w">    </span><span class="o">*</span><span class="n">listings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 23</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">SimpleFlightListing</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">flights</span><span class="p">)));</span>
+<span class="linenos"> 24</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 25</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 26</span>
+<span class="linenos"> 27</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">GetFlightInfo</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 28</span><span class="w">                              </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">&amp;</span><span class="w"> </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="linenos"> 29</span><span class="w">                              </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 30</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span><span class="n">descriptor</span><span class="p">));</span>
+<span class="linenos"> 31</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 32</span><span class="w">    </span><span class="o">*</span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 33</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">flight_info</span><span class="p">)));</span>
+<span class="linenos"> 34</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 35</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 36</span>
+<span class="linenos"> 37</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoPut</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 38</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMessageReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">,</span>
+<span class="linenos"> 39</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMetadataWriter</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 40</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">()));</span>
+<span class="linenos"> 41</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">sink</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenOutputStream</span><span class="p">(</span><span class="n">file_info</span><span class="p">.</span><span class="n">path</span><span class="p">()));</span>
+<span class="linenos"> 42</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="linenos"> 43</span>
+<span class="linenos"> 44</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">WriteTable</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span>
+<span class="linenos"> 45</span><span class="w">                                                   </span><span class="n">sink</span><span class="p">,</span><span class="w"> </span><span class="cm">/*chunk_size=*/</span><span class="mi">65536</span><span class="p">));</span>
+<span class="linenos"> 46</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 47</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 48</span>
+<span class="linenos"> 49</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoGet</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 50</span><span class="w">                      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Ticket</span><span class="o">&amp;</span><span class="w"> </span><span class="n">request</span><span class="p">,</span>
+<span class="linenos"> 51</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDataStream</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">stream</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 52</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">input</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">request</span><span class="p">.</span><span class="n">ticket</span><span class="p">));</span>
+<span class="linenos"> 53</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="linenos"> 54</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span>
+<span class="linenos"> 55</span><span class="w">                                                 </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+<span class="linenos"> 56</span>
+<span class="linenos"> 57</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">;</span>
+<span class="linenos"> 58</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">ReadTable</span><span class="p">(</span><span class="o">&amp;</span><span class="n">table</span><span class="p">));</span>
+<span class="linenos"> 59</span><span class="w">    </span><span class="c1">// Note that we can&#39;t directly pass TableBatchReader to</span>
+<span class="linenos"> 60</span><span class="w">    </span><span class="c1">// RecordBatchStream because TableBatchReader keeps a non-owning</span>
+<span class="linenos"> 61</span><span class="w">    </span><span class="c1">// reference to the underlying Table, which would then get freed</span>
+<span class="linenos"> 62</span><span class="w">    </span><span class="c1">// when we exit this function</span>
+<span class="linenos"> 63</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="linenos"> 64</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">TableBatchReader</span><span class="w"> </span><span class="nf">batch_reader</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">);</span>
+<span class="linenos"> 65</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">batch_reader</span><span class="p">.</span><span class="n">ToRecordBatches</span><span class="p">());</span>
+<span class="linenos"> 66</span>
+<span class="linenos"> 67</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">owning_reader</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatchReader</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span>
+<span class="linenos"> 68</span><span class="w">                                                  </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">batches</span><span class="p">),</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">schema</span><span class="p">()));</span>
+<span class="linenos"> 69</span><span class="w">    </span><span class="o">*</span><span class="n">stream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDataStream</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 70</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">RecordBatchStream</span><span class="p">(</span><span class="n">owning_reader</span><span class="p">));</span>
+<span class="linenos"> 71</span>
+<span class="linenos"> 72</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 73</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 74</span>
+<span class="linenos"> 75</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">ListActions</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 76</span><span class="w">                            </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ActionType</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">actions</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 77</span><span class="w">    </span><span class="o">*</span><span class="n">actions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="n">kActionDropDataset</span><span class="p">};</span>
+<span class="linenos"> 78</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 79</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 80</span>
+<span class="linenos"> 81</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoAction</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 82</span><span class="w">                         </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Action</span><span class="o">&amp;</span><span class="w"> </span><span class="n">action</span><span class="p">,</span>
+<span class="linenos"> 83</span><span class="w">                         </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">result</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 84</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">kActionDropDataset</span><span class="p">.</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 85</span><span class="w">      </span><span class="o">*</span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 86</span><span class="w">          </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">SimpleResultStream</span><span class="p">({}));</span>
+<span class="linenos"> 87</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">DoActionDropDataset</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="n">body</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos"> 88</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 89</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Unknown action type: &quot;</span><span class="p">,</span><span class="w"> </span><span class="n">action</span><span class="p">.</span><span class="n">type</span><span class="p">);</span>
+<span class="linenos"> 90</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 91</span>
+<span class="linenos"> 92</span><span class="w"> </span><span class="k">private</span><span class="o">:</span>
+<span class="linenos"> 93</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span>
+<span class="linenos"> 94</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&amp;</span><span class="w"> </span><span class="n">file_info</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 95</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">input</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 96</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="linenos"> 97</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span>
+<span class="linenos"> 98</span><span class="w">                                                 </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+<span class="linenos"> 99</span>
+<span class="linenos">100</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="linenos">101</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">schema</span><span class="p">));</span>
+<span class="linenos">102</span>
+<span class="linenos">103</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">descriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">Path</span><span class="p">({</span><span class="n">file_info</span><span class="p">.</span><span class="n">base_name</span><span class="p">()});</span>
+<span class="linenos">104</span>
+<span class="linenos">105</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">endpoint</span><span class="p">;</span>
+<span class="linenos">106</span><span class="w">    </span><span class="n">endpoint</span><span class="p">.</span><span class="n">ticket</span><span class="p">.</span><span class="n">ticket</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">base_name</span><span class="p">();</span>
+<span class="linenos">107</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="linenos">108</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="linenos">109</span><span class="w">        </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">()));</span>
+<span class="linenos">110</span><span class="w">    </span><span class="n">endpoint</span><span class="p">.</span><span class="n">locations</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">location</span><span class="p">);</span>
+<span class="linenos">111</span>
+<span class="linenos">112</span><span class="w">    </span><span class="kt">int64_t</span><span class="w"> </span><span class="n">total_records</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">parquet_reader</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">metadata</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">num_rows</span><span class="p">();</span>
+<span class="linenos">113</span><span class="w">    </span><span class="kt">int64_t</span><span class="w"> </span><span class="n">total_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+<span class="linenos">114</span>
+<span class="linenos">115</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="o">*</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">descriptor</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">endpoint</span><span class="p">},</span><span class="w"> </span><span class="n">total_records</span><span class="p">,</span>
+<span class="linenos">116</span><span class="w">                                           </span><span class="n">total_bytes</span><span class="p">);</span>
+<span class="linenos">117</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">118</span>
+<span class="linenos">119</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span>
+<span class="linenos">120</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">&amp;</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">121</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">PATH</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">122</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">Invalid</span><span class="p">(</span><span class="s">&quot;Must provide PATH-type FlightDescriptor&quot;</span><span class="p">);</span>
+<span class="linenos">123</span><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">path</span><span class="p">.</span><span class="n">size</span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">124</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">Invalid</span><span class="p">(</span>
+<span class="linenos">125</span><span class="w">          </span><span class="s">&quot;Must provide PATH-type FlightDescriptor with one path component&quot;</span><span class="p">);</span>
+<span class="linenos">126</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">127</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span>
+<span class="linenos">128</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">129</span>
+<span class="linenos">130</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoActionDropDataset</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">key</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">131</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">DeleteFile</span><span class="p">(</span><span class="n">key</span><span class="p">);</span>
+<span class="linenos">132</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">133</span>
+<span class="linenos">134</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">root_</span><span class="p">;</span>
+<span class="linenos">135</span><span class="p">};</span><span class="w">  </span><span class="c1">// end ParquetStorageService</span>
+</pre></div>
+</div>
+</div>
+<p>First, we’ll start our server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">fs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="p">();</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">CreateDir</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">DeleteDirContents</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">));</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">SubTreeFileSystem</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">fs</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">server_location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">server_location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">));</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerOptions</span><span class="w"> </span><span class="nf">options</span><span class="p">(</span><span class="n">server_location</span><span class="p">);</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="w">    </span><span class="k">new</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">)));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Init</span><span class="p">(</span><span class="n">options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Listening on port &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Listening</span> <span class="n">on</span> <span class="n">port</span> <span class="mi">34553</span>
+</pre></div>
+</div>
+</div>
+<p>We can then create a client and connect to the server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()));</span>
+
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">&gt;</span><span class="w"> </span><span class="n">client</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">::</span><span class="n">Connect</span><span class="p">(</span><span class="n">location</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Connected to &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Connected</span> <span class="n">to</span> <span class="n">grpc</span><span class="o">+</span><span class="n">tcp</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">34553</span>
+</pre></div>
+</div>
+</div>
+<p>First, we’ll create and upload a table, which will get stored in a
+Parquet file by the server.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Open example data file to upload</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">airquality_path</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">FindTestDataFile</span><span class="p">(</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">io</span><span class="o">::</span><span class="n">RandomAccessFile</span><span class="o">&gt;</span><span class="w"> </span><span class="n">input</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">airquality_path</span><span class="p">));</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span>
+<span class="w">    </span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">descriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">Path</span><span class="p">({</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">});</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">schema</span><span class="p">));</span>
+
+<span class="c1">// Start the RPC call</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightStreamWriter</span><span class="o">&gt;</span><span class="w"> </span><span class="n">writer</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMetadataReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadata_reader</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">put_stream</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoPut</span><span class="p">(</span><span class="n">descriptor</span><span class="p">,</span><span class="w"> </span><span class="n">schema</span><span class="p">));</span>
+<span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">put_stream</span><span class="p">.</span><span class="n">writer</span><span class="p">);</span>
+<span class="n">metadata_reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">put_stream</span><span class="p">.</span><span class="n">reader</span><span class="p">);</span>
+
+<span class="c1">// Upload data</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatchReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch_reader</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">row_groups</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">num_row_groups</span><span class="p">());</span>
+<span class="n">std</span><span class="o">::</span><span class="n">iota</span><span class="p">(</span><span class="n">row_groups</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">row_groups</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetRecordBatchReader</span><span class="p">(</span><span class="n">row_groups</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">batch_reader</span><span class="p">));</span>
+<span class="kt">int64_t</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="nb">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">batch</span><span class="p">,</span><span class="w"> </span><span class="n">batch_reader</span><span class="o">-&gt;</span><span class="n">Next</span><span class="p">());</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">batch</span><span class="p">)</span><span class="w"> </span><span class="k">break</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">writer</span><span class="o">-&gt;</span><span class="n">WriteRecordBatch</span><span class="p">(</span><span class="o">*</span><span class="n">batch</span><span class="p">));</span>
+<span class="w">  </span><span class="n">batches</span><span class="o">++</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">writer</span><span class="o">-&gt;</span><span class="n">Close</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Wrote &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; batches&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Wrote</span> <span class="mi">1</span> <span class="n">batches</span>
+</pre></div>
+</div>
+</div>
+<p>Once we do so, we can retrieve the metadata for that dataset:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flight_info</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">GetFlightInfo</span><span class="p">(</span><span class="n">descriptor</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">().</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;=== Schema ===&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">info_schema</span><span class="p">;</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">ipc</span><span class="o">::</span><span class="n">DictionaryMemo</span><span class="w"> </span><span class="n">dictionary_memo</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">info_schema</span><span class="p">,</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">dictionary_memo</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">info_schema</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;==============&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">FlightDescriptor</span> <span class="n">path</span><span class="o">=</span><span class="s1">&#39;airquality.parquet&#39;</span><span class="o">&gt;</span>
+<span class="o">===</span> <span class="n">Schema</span> <span class="o">===</span>
+<span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+<span class="o">==============</span>
+</pre></div>
+</div>
+</div>
+<p>And get the data back:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightStreamReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">stream</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoGet</span><span class="p">(</span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">endpoints</span><span class="p">()[</span><span class="mi">0</span><span class="p">].</span><span class="n">ticket</span><span class="p">));</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">PrettyPrintOptions</span><span class="w"> </span><span class="nf">print_options</span><span class="p">(</span><span class="cm">/*indent=*/</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="cm">/*window=*/</span><span class="mi">2</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">PrettyPrint</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">print_options</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rout</span><span class="p">));</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+<span class="o">----</span>
+<span class="n">Ozone</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">41</span><span class="p">,</span>
+      <span class="mi">36</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">18</span><span class="p">,</span>
+      <span class="mi">20</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">190</span><span class="p">,</span>
+      <span class="mi">118</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">131</span><span class="p">,</span>
+      <span class="mi">223</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Wind</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mf">7.4</span><span class="p">,</span>
+      <span class="mi">8</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">8</span><span class="p">,</span>
+      <span class="mf">11.5</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Temp</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">67</span><span class="p">,</span>
+      <span class="mi">72</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">76</span><span class="p">,</span>
+      <span class="mi">68</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Month</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">5</span><span class="p">,</span>
+      <span class="mi">5</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">9</span><span class="p">,</span>
+      <span class="mi">9</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Day</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">1</span><span class="p">,</span>
+      <span class="mi">2</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">29</span><span class="p">,</span>
+      <span class="mi">30</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<p>Then, we’ll delete the dataset:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">{</span><span class="s">&quot;drop_dataset&quot;</span><span class="p">,</span>
+<span class="w">                             </span><span class="n">arrow</span><span class="o">::</span><span class="n">Buffer</span><span class="o">::</span><span class="n">FromString</span><span class="p">(</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">)};</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;</span><span class="w"> </span><span class="n">results</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">results</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoAction</span><span class="p">(</span><span class="n">action</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Deleted dataset&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id7">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id7" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Deleted</span> <span class="n">dataset</span>
+</pre></div>
+</div>
+</div>
+<p>And confirm that it’s been deleted:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listing</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">listing</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">ListFlights</span><span class="p">());</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="nb">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flight_info</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">listing</span><span class="o">-&gt;</span><span class="n">Next</span><span class="p">());</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">flight_info</span><span class="p">)</span><span class="w"> </span><span class="k">break</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">().</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;=== Schema ===&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">info_schema</span><span class="p">;</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">ipc</span><span class="o">::</span><span class="n">DictionaryMemo</span><span class="w"> </span><span class="n">dictionary_memo</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">info_schema</span><span class="p">,</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">dictionary_memo</span><span class="p">));</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">info_schema</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;==============&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="p">}</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;End of listing&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id8">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id8" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">End</span> <span class="n">of</span> <span class="n">listing</span>
+</pre></div>
+</div>
+</div>
+<p>Finally, we’ll stop our server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Shutdown</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Server shut down successfully&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id9">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id9" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Server</span> <span class="n">shut</span> <span class="n">down</span> <span class="n">successfully</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="setting-grpc-client-options">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Setting gRPC client options</a><a class="headerlink" href="#setting-grpc-client-options" title="Link to this heading">¶</a></h2>
+<p>Options for gRPC clients can be passed in using the <code class="docutils literal notranslate"><span class="pre">generic_options</span></code> field of
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/api/flight.html#_CPPv4N5arrow6flight19FlightClientOptionsE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::flight::FlightClientOptions</span></code></a>. There is a list of available
+client options in the <a class="reference external" href="https://grpc.github.io/grpc/cpp/group__grpc__arg__keys.html">gRPC API documentation</a>.</p>
+<p>For example, you can change the maximum message length sent with:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">client_options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClientOptions</span><span class="o">::</span><span class="n">Defaults</span><span class="p">();</span>
+<span class="c1">// Set a very low limit at the gRPC layer to fail all calls</span>
+<span class="n">client_options</span><span class="p">.</span><span class="n">generic_options</span><span class="p">.</span><span class="n">emplace_back</span><span class="p">(</span><span class="n">GRPC_ARG_MAX_SEND_MESSAGE_LENGTH</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()));</span>
+
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">&gt;</span><span class="w"> </span><span class="n">client</span><span class="p">;</span>
+<span class="c1">// pass client_options into Connect()</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">client</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">::</span><span class="n">Connect</span><span class="p">(</span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">client_options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Connected to &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id10">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id10" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Connected</span> <span class="n">to</span> <span class="n">grpc</span><span class="o">+</span><span class="n">tcp</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">41329</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="flight-service-with-other-grpc-endpoints">
+<h2><a class="toc-backref" href="#id18" role="doc-backlink">Flight Service with other gRPC endpoints</a><a class="headerlink" href="#flight-service-with-other-grpc-endpoints" title="Link to this heading">¶</a></h2>
+<p>If you are using the gRPC backend, you can add other gRPC endpoints to the
+Flight server. While Flight clients won’t recognize these endpoints, general
+gRPC clients will be able to.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>If statically linking Arrow Flight, Protobuf and gRPC must also be statically
+linked, and the same goes for dynamic linking. Read more at
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking">https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking</a></p>
+</div>
+<section id="creating-the-server">
+<h3><a class="toc-backref" href="#id19" role="doc-backlink">Creating the server</a><a class="headerlink" href="#creating-the-server" title="Link to this heading">¶</a></h3>
+<p>To create a gRPC service, first define a service using protobuf.</p>
+<div class="literal-block-wrapper docutils container" id="id11">
+<div class="code-block-caption"><span class="caption-text">Hello world protobuf specification</span><a class="headerlink" href="#id11" title="Link to this code">¶</a></div>
+<div class="highlight-protobuf notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">syntax</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;proto3&quot;</span><span class="p">;</span>
+<span class="linenos"> 2</span>
+<span class="linenos"> 3</span><span class="kd">service</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 4</span><span class="w">  </span><span class="k">rpc</span><span class="w"> </span><span class="n">SayHello</span><span class="p">(</span><span class="n">HelloRequest</span><span class="p">)</span><span class="w"> </span><span class="k">returns</span><span class="w"> </span><span class="p">(</span><span class="n">HelloResponse</span><span class="p">);</span>
+<span class="linenos"> 5</span><span class="p">}</span>
+<span class="linenos"> 6</span>
+<span class="linenos"> 7</span><span class="kd">message</span><span class="w"> </span><span class="nc">HelloRequest</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 8</span><span class="w">  </span><span class="kt">string</span><span class="w"> </span><span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="linenos"> 9</span><span class="p">}</span>
+<span class="linenos">10</span>
+<span class="linenos">11</span><span class="kd">message</span><span class="w"> </span><span class="nc">HelloResponse</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">12</span><span class="w">  </span><span class="kt">string</span><span class="w"> </span><span class="na">reply</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="linenos">13</span><span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<p>Next, you’ll need to compile that to provide the protobuf and gRPC generated
+files. See gRPC’s <a class="reference external" href="https://grpc.io/docs/languages/cpp/basics/#generating-client-and-server-code">generating client and server code</a>
+docs for details.</p>
+<p>Then write an implementation for the gRPC service:</p>
+<div class="literal-block-wrapper docutils container" id="id12">
+<div class="code-block-caption"><span class="caption-text">Hello world gRPC service implementation</span><a class="headerlink" href="#id12" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">HelloWorldServiceImpl</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="o">::</span><span class="n">Service</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w">  </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="nf">SayHello</span><span class="p">(</span><span class="n">grpc</span><span class="o">::</span><span class="n">ServerContext</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">HelloRequest</span><span class="o">*</span><span class="w"> </span><span class="n">request</span><span class="p">,</span>
+<span class="linenos"> 3</span><span class="w">                        </span><span class="n">HelloResponse</span><span class="o">*</span><span class="w"> </span><span class="n">reply</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 4</span><span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">request</span><span class="o">-&gt;</span><span class="n">name</span><span class="p">();</span>
+<span class="linenos"> 5</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">.</span><span class="n">empty</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 6</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="p">(</span><span class="n">grpc</span><span class="o">::</span><span class="n">StatusCode</span><span class="o">::</span><span class="n">INVALID_ARGUMENT</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Must provide a name!&quot;</span><span class="p">);</span>
+<span class="linenos"> 7</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="n">reply</span><span class="o">-&gt;</span><span class="n">set_reply</span><span class="p">(</span><span class="s">&quot;Hello, &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">name</span><span class="p">);</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">;</span>
+<span class="linenos">10</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">11</span><span class="p">};</span><span class="w">  </span><span class="c1">// end HelloWorldServiceImpl</span>
+</pre></div>
+</div>
+</div>
+<p>Finally, use the <code class="docutils literal notranslate"><span class="pre">builder_hook</span></code> hook on <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/flight.html#_CPPv4N5arrow6flight19FlightServerOptionsE" title="(in Apache Arrow v14.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::flight::FlightServerOptions</span></code></a>
+to register the additional gRPC service.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">server_location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">server_location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">5000</span><span class="p">));</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerOptions</span><span class="w"> </span><span class="nf">options</span><span class="p">(</span><span class="n">server_location</span><span class="p">);</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="w">    </span><span class="k">new</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">)));</span>
+
+<span class="c1">// Create hello world service</span>
+<span class="n">HelloWorldServiceImpl</span><span class="w"> </span><span class="n">grpc_service</span><span class="p">;</span>
+
+<span class="c1">// Use builder_hook to register grpc service</span>
+<span class="n">options</span><span class="p">.</span><span class="n">builder_hook</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="o">&amp;</span><span class="p">](</span><span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="n">raw_builder</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">auto</span><span class="o">*</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">reinterpret_cast</span><span class="o">&lt;</span><span class="n">grpc</span><span class="o">::</span><span class="n">ServerBuilder</span><span class="o">*&gt;</span><span class="p">(</span><span class="n">raw_builder</span><span class="p">);</span>
+<span class="w">  </span><span class="n">builder</span><span class="o">-&gt;</span><span class="n">RegisterService</span><span class="p">(</span><span class="o">&amp;</span><span class="n">grpc_service</span><span class="p">);</span>
+<span class="p">};</span>
+
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Init</span><span class="p">(</span><span class="n">options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Listening on port &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id13">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id13" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Listening</span> <span class="n">on</span> <span class="n">port</span> <span class="mi">5000</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="creating-the-client">
+<h3><a class="toc-backref" href="#id20" role="doc-backlink">Creating the client</a><a class="headerlink" href="#creating-the-client" title="Link to this heading">¶</a></h3>
+<p>The Flight client implementation doesn’t know about any custom gRPC services,
+so to call them you’ll need to create a normal gRPC client. For the Hello World
+service, we use the HelloWorldService stub, which is provided by the compiled
+gRPC definition.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">client_channel</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">grpc</span><span class="o">::</span><span class="n">CreateChannel</span><span class="p">(</span><span class="s">&quot;0.0.0.0:5000&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">InsecureChannelCredentials</span><span class="p">());</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">stub</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="o">::</span><span class="n">NewStub</span><span class="p">(</span><span class="n">client_channel</span><span class="p">);</span>
+
+<span class="n">grpc</span><span class="o">::</span><span class="n">ClientContext</span><span class="w"> </span><span class="n">context</span><span class="p">;</span>
+<span class="n">HelloRequest</span><span class="w"> </span><span class="n">request</span><span class="p">;</span>
+<span class="n">request</span><span class="p">.</span><span class="n">set_name</span><span class="p">(</span><span class="s">&quot;Arrow User&quot;</span><span class="p">);</span>
+<span class="n">HelloResponse</span><span class="w"> </span><span class="n">response</span><span class="p">;</span>
+<span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stub</span><span class="o">-&gt;</span><span class="n">SayHello</span><span class="p">(</span><span class="o">&amp;</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">request</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">response</span><span class="p">);</span>
+<span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">status</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">IOError</span><span class="p">(</span><span class="n">status</span><span class="p">.</span><span class="n">error_message</span><span class="p">());</span>
+<span class="p">}</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">response</span><span class="p">.</span><span class="n">reply</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id14">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id14" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Hello</span><span class="p">,</span> <span class="n">Arrow</span> <span class="n">User</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#setting-grpc-client-options">Setting gRPC client options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#flight-service-with-other-grpc-endpoints">Flight Service with other gRPC endpoints</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="datasets.html" title="previous chapter">Reading and Writing Datasets</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/genindex.html b/cpp/genindex.html
new file mode 100644
index 0000000..8ff5d12
--- /dev/null
+++ b/cpp/genindex.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/index.html b/cpp/index.html
new file mode 100644
index 0000000..a74935a
--- /dev/null
+++ b/cpp/index.html
@@ -0,0 +1,185 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow C++ Cookbook &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with the C++ Implementation" href="basic.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-c-cookbook">
+<h1>Apache Arrow C++ Cookbook<a class="headerlink" href="#apache-arrow-c-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="basic.html#working-with-status-and-result">Working with Status and Result</a></li>
+<li class="toctree-l2"><a class="reference internal" href="basic.html#using-the-visitor-pattern">Using the Visitor Pattern</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#create-arrays-from-standard-c">Create Arrays from Standard C++</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#generate-random-data-for-a-given-schema">Generate Random Data for a Given Schema</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="datasets.html#read-a-partitioned-dataset">Read a Partitioned Dataset</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#setting-grpc-client-options">Setting gRPC client options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#flight-service-with-other-grpc-endpoints">Flight Service with other gRPC endpoints</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="basic.html" title="next chapter">Working with the C++ Implementation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/objects.inv b/cpp/objects.inv
new file mode 100644
index 0000000..02133e6
--- /dev/null
+++ b/cpp/objects.inv
Binary files differ
diff --git a/cpp/search.html b/cpp/search.html
new file mode 100644
index 0000000..9ac81a8
--- /dev/null
+++ b/cpp/search.html
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/cpp/searchindex.js b/cpp/searchindex.js
new file mode 100644
index 0000000..3994f62
--- /dev/null
+++ b/cpp/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["basic", "create", "datasets", "flight", "index"], "filenames": ["basic.rst", "create.rst", "datasets.rst", "flight.rst", "index.rst"], "titles": ["Working with the C++ Implementation", "Creating Arrow Objects", "Reading and Writing Datasets", "Arrow Flight", "Apache Arrow C++ Cookbook"], "terms": {"thi": [0, 1, 2, 3, 4], "section": [0, 2, 3], "cookbook": 0, "goe": [0, 3], "over": 0, "basic": [0, 2], "concept": 0, "need": [0, 1, 2, 3, 4], "regardless": 0, "how": [0, 2, 4], "you": [0, 1, 2, 3], "intend": 0, "librari": [0, 3], "often": [0, 2], "have": [0, 1, 2], "choos": 0, "between": 0, "throw": 0, "except": 0, "return": [0, 1, 3], "error": 0, "code": [0, 1, 2, 3], "object": [0, 2, 4], "middl": 0, "ground": 0, "make": [0, 1, 2, 3], "clear": 0, "when": [0, 3, 4], "function": [0, 3], "can": [0, 1, 2, 3], "fail": [0, 3], "i": [0, 1, 2, 3, 4], "easier": 0, "than": 0, "integ": 0, "It": 0, "import": 0, "alwai": 0, "check": [0, 1], "valu": [0, 1, 2, 3], "ensur": 0, "oper": 0, "succeed": 0, "howev": 0, "quickli": 0, "becom": [0, 1], "tediou": 0, "everi": 0, "manual": [0, 2], "std": [0, 1, 2, 3], "test_fn": 0, "nullbuild": 0, "builder": [0, 1, 3], "st": 0, "reserv": 0, "2": [0, 1, 3], "ok": [0, 1, 3], "appendnul": 0, "1": [0, 1, 2, 3], "rout": [0, 1, 2, 3], "append": [0, 1], "null": 0, "endl": [0, 1, 2, 3], "output": [0, 1, 2, 3], "invalid": [0, 3], "length": [0, 1, 3], "must": [0, 3], "posit": 0, "The": [0, 1, 2, 3, 4], "macro": 0, "arrow_return_not_ok": [0, 1, 2, 3], "take": [0, 1], "care": 0, "some": [0, 2], "boilerpl": 0, "run": 0, "contain": [0, 1, 2, 3], "express": 0, "If": [0, 3], "failur": 0, "class": [0, 1, 3], "datatyp": [0, 1], "scalar": 0, "arrai": [0, 4], "special": [0, 3], "subclass": [0, 1], "each": 0, "In": 0, "order": [0, 2], "logic": 0, "provid": [0, 2, 3], "inlin": 0, "templat": 0, "allow": [0, 2], "call": [0, 2, 3], "effici": [0, 1], "visittypeinlin": [0, 1], "visitscalarinlin": 0, "visitarrayinlin": 0, "see": [0, 2, 3], "exampl": [0, 1, 3, 4], "given": [0, 4], "schema": [0, 2, 3, 4], "write": [0, 3, 4], "handl": [0, 3], "multipl": 0, "individu": [0, 2], "excess": 0, "verbos": 0, "fortun": 0, "trait": 0, "subset": 0, "below": 0, "demonstr": [0, 2, 4], "tabl": [0, 1, 2, 3], "sum": 0, "ani": [0, 1, 3], "float": 0, "point": 0, "onli": [0, 1], "singl": 0, "leverag": 0, "enable_if_numb": 0, "numer": 0, "tablesumm": 0, "doubl": [0, 1, 2, 3], "partial": [0, 2], "0": [0, 1, 2, 3], "public": [0, 1, 3], "shared_ptr": [0, 1, 2, 3], "recordbatch": [0, 1, 3], "batch": [0, 1, 3], "column": [0, 1, 2], "default": [0, 1, 3], "visit": [0, 1], "const": [0, 1, 2, 3], "notimpl": [0, 1, 3], "tostr": [0, 1, 2, 3], "typenam": 0, "arraytyp": 0, "t": [0, 3], "typeclass": 0, "option": [0, 2, 4], "c_type": 0, "has_valu": 0, "static_cast": 0, "field": [0, 1, 3], "int32": [0, 2, 3], "b": 0, "float64": [0, 1], "int32_t": [0, 1], "num_row": [0, 1, 2, 3], "3": [0, 1], "vector": [0, 1, 2, 3], "int32build": [0, 1], "a_build": 0, "a_val": 0, "appendvalu": [0, 1], "arrow_assign_or_rais": [0, 1, 2, 3], "auto": [0, 1, 2, 3], "a_arr": 0, "finish": [0, 1, 2], "push_back": [0, 1, 3], "doublebuild": [0, 1], "b_builder": 0, "b_val": 0, "4": [0, 1, 3], "5": [0, 1, 3], "6": [0, 1, 2], "b_arr": 0, "summat": 0, "total": 0, "21": 0, "recip": [1, 2, 3, 4], "relat": 1, "creation": 1, "tensor": 1, "all": [1, 2, 3], "other": [1, 2, 4], "entiti": 1, "type": [1, 3], "arraybuild": 1, "easi": 1, "exist": 1, "an": [1, 2, 3], "primit": 1, "arr": 1, "alloc": 1, "insert": 1, "should": 1, "constant": 1, "amort": 1, "time": 1, "also": [1, 2, 3, 4], "consum": 1, "raw": 1, "pointer": 1, "int64build": 1, "long_build": 1, "int64_t": [1, 3], "size": [1, 2, 3], "stringbuild": 1, "str_builder": 1, "string": [1, 2, 3], "strval": 1, "x": 1, "y": 1, "z": 1, "iter": 1, "dbl_builder": 1, "set": [1, 4], "dblval": 1, "begin": [1, 3], "end": [1, 3], "ownership": 1, "copi": 1, "underli": [1, 3], "To": [1, 2, 3], "implement": [1, 3, 4], "visitor": [1, 4], "good": 1, "idea": 1, "follow": [1, 2], "list": [1, 2, 3], "could": [1, 2], "easili": 1, "extend": 1, "us": [1, 2, 3, 4], "pattern": [1, 4], "record": 1, "randombatchgener": 1, "result": [1, 3, 4], "num_rows_": 1, "arrays_": 1, "statu": [1, 3, 4], "doubletyp": 1, "normal_distribut": 1, "d": 1, "mean": 1, "stddev": 1, "gen_": 1, "listtyp": 1, "offset": 1, "first": [1, 2, 3], "which": [1, 2, 3, 4], "determin": [1, 2], "number": [1, 2, 3], "sub": 1, "poisson_distribut": 1, "last_val": 1, "sinc": 1, "children": 1, "ha": 1, "new": [1, 3], "value_gen": 1, "value_typ": 1, "last": 1, "index": [1, 4], "inner_batch": 1, "listarrai": 1, "fromarrai": 1, "get": [1, 3], "protect": 1, "random_devic": 1, "rd_": 1, "mt19937": 1, "test": 1, "support": 1, "n": 1, "consid": 1, "validateful": 1, "correct": 1, "546911589795752": 1, "984533198458078": 1, "7": [1, 3], "617112892424505": 1, "071039704261608": 1, "333380507036075": 1, "162093180569001": 1, "264271666435832": 1, "453379826203139": 1, "550493157228391": 1, "2790346108514914": 1, "320687795635024": 1, "790474643286342": 1, "1749549303569": 1, "2247191609769907": 1, "10": [1, 2], "309335708651332": 1, "7148579213976567": 1, "7332353370369562": 1, "925025202564361": 1, "011131470597689": 1, "051431659823732": 1, "459224633329098": 1, "545469562979236": 1, "2098221381083905": 1, "227733269678735": 1, "916080551640544": 1, "996692460353367": 1, "8667241669428876": 1, "3804329308731353": 1, "711691758211411": 1, "4554154047425714": 1, "102919934591531": 1, "ar": [2, 3], "collect": [2, 4], "one": [2, 3], "more": [2, 3], "file": [2, 3], "tabular": [2, 3], "data": [2, 3, 4], "up": 2, "distribut": 2, "across": 2, "sever": 2, "differ": 2, "directori": 2, "accord": 2, "kind": 2, "scheme": 2, "simplifi": 2, "manag": 2, "inspect": 2, "path": [2, 3], "util": 2, "guarante": 2, "let": 2, "u": 2, "our": [2, 3], "A": 2, "directory_bas": 2, "airquality_basedir": 2, "creat": [2, 4], "filesystem": [2, 3], "arrow": 2, "f": [2, 3], "localfilesystem": [2, 3], "make_shar": [2, 3], "selector": [2, 3], "describ": 2, "part": 2, "perform": [2, 4], "recurs": 2, "search": [2, 4], "base": 2, "typic": 2, "from": [2, 4], "fileselector": [2, 3], "base_dir": [2, 3], "true": [2, 3], "out": 2, "so": [2, 3], "we": [2, 3], "step": 2, "necessari": 2, "fileinfo": [2, 3], "file_info": [2, 3], "getfileinfo": [2, 3], "int": [2, 3], "num_print": 2, "isfil": [2, 3], "substr": 2, "break": [2, 3], "month": [2, 3], "8": [2, 3], "dai": [2, 3], "15": 2, "chunk": 2, "parquet": [2, 4], "20": [2, 3], "24": 2, "23": 2, "16": 2, "13": 2, "25": 2, "18": [2, 3], "17": 2, "kei": [2, 3], "refer": [2, 3], "hive": 2, "within": 2, "now": 2, "go": 2, "ahead": 2, "do": [2, 3], "pick": 2, "format": [2, 3], "onc": [2, 3], "piec": 2, "instanc": 2, "here": 2, "specifi": 2, "ipc": [2, 3], "csv": 2, "custom": [2, 3], "addit": [2, 3], "pars": 2, "parquetfileformat": 2, "factori": 2, "infer": 2, "filenam": 2, "flavor": 2, "case": 2, "altern": 2, "work": [2, 3, 4], "well": [2, 4], "partitioningfactori": 2, "partitioning_factori": 2, "hivepartit": 2, "makefactori": 2, "filesystemfactoryopt": 2, "datasetfactori": 2, "dataset_factori": 2, "filesystemdatasetfactori": 2, "scan": 2, "find": 2, "mai": 2, "metadata": [2, 3], "discov": 2, "ozon": [2, 3], "solar": [2, 3], "r": [2, 3], "wind": [2, 3], "temp": [2, 3], "sometim": 2, "scanner": 2, "snippet": 2, "show": 2, "entir": 2, "memori": 2, "scannerbuild": 2, "scanner_build": 2, "usethread": 2, "There": [2, 3], "varieti": 2, "method": 2, "avail": [2, 3], "totabl": [2, 3], "row": 2, "num_column": 2, "153": 2, "rpc": 3, "dataset": [3, 4], "For": 3, "about": 3, "ll": 3, "store": 3, "upload": 3, "request": 3, "actual": 3, "itself": 3, "simplic": 3, "won": 3, "api": 3, "favor": 3, "just": 3, "directli": 3, "parquetstorageservic": 3, "flightserverbas": 3, "actiontyp": 3, "kactiondropdataset": 3, "drop_dataset": 3, "delet": 3, "explicit": 3, "root": 3, "root_": 3, "move": 3, "listflight": 3, "servercallcontext": 3, "criteria": 3, "unique_ptr": 3, "flightlist": 3, "overrid": 3, "flightinfo": 3, "extens": 3, "continu": 3, "info": 3, "makeflightinfo": 3, "simpleflightlist": 3, "getflightinfo": 3, "flightdescriptor": 3, "descriptor": 3, "fileinfofromdescriptor": 3, "flight_info": 3, "doput": 3, "flightmessageread": 3, "reader": 3, "flightmetadatawrit": 3, "sink": 3, "openoutputstream": 3, "writet": 3, "default_memory_pool": 3, "chunk_siz": 3, "65536": 3, "doget": 3, "ticket": 3, "flightdatastream": 3, "stream": 3, "input": 3, "openinputfil": 3, "fileread": 3, "openfil": 3, "readtabl": 3, "note": 3, "pass": 3, "tablebatchread": 3, "recordbatchstream": 3, "becaus": 3, "keep": 3, "non": 3, "own": 3, "would": 3, "freed": 3, "exit": 3, "batch_read": 3, "torecordbatch": 3, "owning_read": 3, "recordbatchread": 3, "listact": 3, "action": 3, "doaction": 3, "resultstream": 3, "simpleresultstream": 3, "doactiondropdataset": 3, "bodi": 3, "unknown": 3, "privat": 3, "getschema": 3, "base_nam": 3, "flightendpoint": 3, "locat": 3, "forgrpctcp": 3, "localhost": 3, "port": 3, "total_record": 3, "parquet_read": 3, "total_byt": 3, "els": 3, "compon": 3, "deletefil": 3, "start": 3, "createdir": 3, "flight_dataset": 3, "deletedircont": 3, "subtreefilesystem": 3, "server_loc": 3, "flightserveropt": 3, "init": 3, "listen": 3, "34553": 3, "connect": 3, "flightclient": 3, "tcp": 3, "open": 3, "airquality_path": 3, "findtestdatafil": 3, "airqual": 3, "io": 3, "randomaccessfil": 3, "flightstreamwrit": 3, "writer": 3, "flightmetadataread": 3, "metadata_read": 3, "put_stream": 3, "row_group": 3, "num_row_group": 3, "iota": 3, "getrecordbatchread": 3, "while": 3, "next": 3, "writerecordbatch": 3, "close": 3, "wrote": 3, "retriev": 3, "info_schema": 3, "dictionarymemo": 3, "dictionary_memo": 3, "And": 3, "back": 3, "flightstreamread": 3, "prettyprintopt": 3, "print_opt": 3, "indent": 3, "window": 3, "prettyprint": 3, "41": 3, "36": 3, "190": 3, "118": 3, "131": 3, "223": 3, "11": 3, "67": 3, "72": 3, "76": 3, "68": 3, "9": 3, "29": 3, "30": 3, "Then": 3, "buffer": 3, "fromstr": 3, "confirm": 3, "": 3, "been": 3, "final": 3, "stop": 3, "shutdown": 3, "shut": 3, "down": 3, "successfulli": 3, "generic_opt": 3, "flightclientopt": 3, "document": 3, "chang": 3, "maximum": 3, "messag": 3, "sent": 3, "client_opt": 3, "veri": 3, "low": 3, "limit": 3, "layer": 3, "emplace_back": 3, "grpc_arg_max_send_message_length": 3, "41329": 3, "backend": 3, "add": 3, "recogn": 3, "gener": [3, 4], "abl": 3, "static": 3, "link": 3, "protobuf": 3, "same": 3, "dynam": 3, "read": [3, 4], "http": 3, "apach": 3, "org": 3, "doc": 3, "cpp": 3, "build_system": 3, "html": 3, "defin": 3, "hello": 3, "world": 3, "specif": 3, "syntax": 3, "proto3": 3, "helloworldservic": 3, "sayhello": 3, "hellorequest": 3, "hellorespons": 3, "name": 3, "repli": 3, "compil": 3, "detail": 3, "helloworldserviceimpl": 3, "servercontext": 3, "empti": 3, "statuscod": 3, "invalid_argu": 3, "set_repli": 3, "builder_hook": 3, "hook": 3, "regist": 3, "5000": 3, "grpc_servic": 3, "void": 3, "raw_build": 3, "reinterpret_cast": 3, "serverbuild": 3, "registerservic": 3, "doesn": 3, "know": 3, "them": 3, "normal": 3, "stub": 3, "definit": 3, "client_channel": 3, "createchannel": 3, "insecurechannelcredenti": 3, "newstub": 3, "clientcontext": 3, "context": 3, "set_nam": 3, "user": [3, 4], "respons": 3, "ioerror": 3, "error_messag": 3, "solv": 4, "mani": 4, "common": 4, "task": 4, "might": 4, "serv": 4, "robust": 4, "solut": 4, "those": 4, "standard": 4, "random": 4, "partit": 4, "flight": 4, "simpl": 4, "storag": 4, "servic": 4, "grpc": 4, "client": 4, "endpoint": 4, "modul": 4, "page": 4}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"work": 0, "c": [0, 1, 4], "implement": 0, "content": [0, 1, 2, 3, 4], "statu": 0, "result": 0, "us": 0, "visitor": 0, "pattern": 0, "gener": [0, 1], "random": [0, 1], "data": [0, 1], "comput": 0, "across": 0, "arrow": [0, 1, 3, 4], "type": 0, "creat": [1, 3], "object": 1, "arrai": 1, "from": 1, "standard": 1, "given": 1, "schema": 1, "read": 2, "write": 2, "dataset": 2, "partit": 2, "flight": 3, "simpl": 3, "parquet": 3, "storag": 3, "servic": 3, "set": 3, "grpc": 3, "client": 3, "option": 3, "other": 3, "endpoint": 3, "server": 3, "apach": 4, "cookbook": 4, "indic": 4, "tabl": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Working with the C++ Implementation": [[0, "working-with-the-c-implementation"]], "Contents": [[0, "contents"], [1, "contents"], [2, "contents"], [3, "contents"]], "Working with Status and Result": [[0, "working-with-status-and-result"]], "Using the Visitor Pattern": [[0, "using-the-visitor-pattern"]], "Generate Random Data": [[0, "generate-random-data"]], "Generalize Computations Across Arrow Types": [[0, "generalize-computations-across-arrow-types"]], "Creating Arrow Objects": [[1, "creating-arrow-objects"]], "Create Arrays from Standard C++": [[1, "create-arrays-from-standard-c"]], "Generate Random Data for a Given Schema": [[1, "generate-random-data-for-a-given-schema"]], "Reading and Writing Datasets": [[2, "reading-and-writing-datasets"]], "Read a Partitioned Dataset": [[2, "read-a-partitioned-dataset"]], "Arrow Flight": [[3, "arrow-flight"]], "Simple Parquet storage service with Arrow Flight": [[3, "simple-parquet-storage-service-with-arrow-flight"]], "Setting gRPC client options": [[3, "setting-grpc-client-options"]], "Flight Service with other gRPC endpoints": [[3, "flight-service-with-other-grpc-endpoints"]], "Creating the server": [[3, "creating-the-server"]], "Creating the client": [[3, "creating-the-client"]], "Apache Arrow C++ Cookbook": [[4, "apache-arrow-c-cookbook"]], "Contents:": [[4, null]], "Indices and tables": [[4, "indices-and-tables"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/dev/.nojekyll b/dev/.nojekyll
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dev/.nojekyll
diff --git a/dev/arrow.png b/dev/arrow.png
new file mode 100644
index 0000000..72104b0
--- /dev/null
+++ b/dev/arrow.png
Binary files differ
diff --git a/dev/cpp/_sources/basic.rst.txt b/dev/cpp/_sources/basic.rst.txt
new file mode 100644
index 0000000..287fd39
--- /dev/null
+++ b/dev/cpp/_sources/basic.rst.txt
@@ -0,0 +1,92 @@
+.. 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.
+
+===================================
+Working with the C++ Implementation
+===================================
+
+This section of the cookbook goes over basic concepts
+that will be needed regardless of how you intend to use
+the Arrow C++ implementation.
+
+.. contents::
+
+Working with Status and Result
+==============================
+
+C++ libraries often have to choose between throwing exceptions and
+returning error codes.  Arrow chooses to return Status and Result
+objects as a middle ground.  This makes it clear when a function
+can fail and is easier to use than integer arrow codes.
+
+It is important to always check the value of a returned Status object to
+ensure that the operation succeeded.  However, this can quickly become
+tedious:
+
+.. recipe:: ../code/basic_arrow.cc ReturnNotOkNoMacro
+  :caption: Checking the status of every function manually
+  :dedent: 2
+
+The macro :c:macro:`ARROW_RETURN_NOT_OK` will take care of some of this
+boilerplate for you.  It will run the contained expression and check the resulting
+``Status`` or ``Result`` object.  If it failed then it will return the failure.
+
+.. recipe:: ../code/basic_arrow.cc ReturnNotOk
+  :caption: Using ARROW_RETURN_NOT_OK to check the status
+  :dedent: 2
+
+
+Using the Visitor Pattern
+=========================
+
+Arrow classes :cpp:class:`arrow::DataType`, :cpp:class:`arrow::Scalar`, and
+:cpp:class:`arrow::Array` have specialized subclasses for each Arrow type. In 
+order to specialize logic for each subclass, you can use the visitor pattern. 
+Arrow provides inline template functions that allow you to call visitors 
+efficiently:
+
+ * :cpp:func:`arrow::VisitTypeInline`
+ * :cpp:func:`arrow::VisitScalarInline`
+ * :cpp:func:`arrow::VisitArrayInline`
+
+Generate Random Data
+--------------------
+
+See example at :ref:`Generate Random Data Example`.
+
+
+Generalize Computations Across Arrow Types
+------------------------------------------
+
+Array visitors can be useful when writing functions that can handle multiple
+array types. However, implementing a visitor for each type individually can be
+excessively verbose. Fortunately, Arrow provides type traits that allow you to
+write templated functions to handle subsets of types. The example below
+demonstrates a table sum function that can handle any integer or floating point 
+array with only a single visitor implementation by leveraging
+:cpp:type:`arrow::enable_if_number`.
+
+.. literalinclude:: ../code/basic_arrow.cc
+   :language: cpp
+   :linenos:
+   :start-at: class TableSummation
+   :end-at: };  // TableSummation
+   :caption: Using visitor pattern that can compute sum of table with any numeric type
+  
+
+.. recipe:: ../code/basic_arrow.cc VisitorSummationExample
+   :dedent: 2
diff --git a/dev/cpp/_sources/create.rst.txt b/dev/cpp/_sources/create.rst.txt
new file mode 100644
index 0000000..305f733
--- /dev/null
+++ b/dev/cpp/_sources/create.rst.txt
@@ -0,0 +1,72 @@
+.. 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.
+
+======================
+Creating Arrow Objects
+======================
+
+Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.
+
+.. contents::
+
+Create Arrays from Standard C++
+===============================
+
+Typed subclasses of :cpp:class:`arrow::ArrayBuilder` make it easy
+to efficiently create Arrow arrays from existing C++ data:
+
+.. recipe:: ../code/creating_arrow_objects.cc CreatingArrays
+  :caption: Creating an array from C++ primitives
+  :dedent: 2
+
+.. note::
+
+    Builders will allocate data as needed and insertion should
+    have constant amortized time.
+
+Builders can also consume standard C++ containers:
+
+.. recipe:: ../code/creating_arrow_objects.cc CreatingArraysPtr
+  :dedent: 2
+
+.. note::
+    
+    Builders will not take ownership of data in containers and will make a
+    copy of the underlying data.
+
+.. _Generate Random Data Example:
+
+Generate Random Data for a Given Schema
+=======================================
+
+To generate random data for a given schema, implementing a type visitor is a
+good idea. The following example only implements double arrays and list arrays,
+but could be easily extended to all types.
+
+
+.. literalinclude:: ../code/creating_arrow_objects.cc
+   :language: cpp
+   :linenos:
+   :start-at: class RandomBatchGenerator
+   :end-at: };  // RandomBatchGenerator
+   :caption: Using visitor pattern to generate random record batches
+  
+Given such a generator, you can create random test data for any supported schema:
+
+.. recipe:: ../code/creating_arrow_objects.cc GenerateRandomData
+   :dedent: 2
diff --git a/dev/cpp/_sources/datasets.rst.txt b/dev/cpp/_sources/datasets.rst.txt
new file mode 100644
index 0000000..f434da5
--- /dev/null
+++ b/dev/cpp/_sources/datasets.rst.txt
@@ -0,0 +1,67 @@
+.. 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.
+
+============================
+Reading and Writing Datasets
+============================
+
+This section contains a number of recipes for reading and writing
+datasets.  Datasets are a collection of one or more files containing
+tabular data.
+
+.. contents::
+
+Read a Partitioned Dataset
+==========================
+
+The individual data files that make up a dataset will often be
+distributed across several different directories according to some
+kind of partitioning scheme.
+
+This simplifies management of the data and also allows for partial
+reads of the dataset by inspecting the file paths and utilizing the
+guarantees provided by the partitioning scheme.
+
+This recipe demonstrates the basics of reading a partitioned dataset.
+First let us inspect our data:
+
+.. recipe:: ../code/datasets.cc ListPartitionedDataset
+  :caption: A listing of files in our dataset
+  :dedent: 2
+
+.. note::
+
+    This partitioning scheme of key=value is referred to as "hive"
+    partitioning within Arrow.
+
+Now that we have a filesystem and a selector we can go ahead and create
+a dataset.  To do this we need to pick a format and a partitioning
+scheme.  Once we have all of the pieces we need we can create an 
+arrow::dataset::Dataset instance.
+
+.. recipe:: ../code/datasets.cc CreatingADataset
+  :caption: Creating an arrow::dataset::Dataset instance
+  :dedent: 2
+
+Once we have a dataset object we can read in the data.  Reading the data
+from a dataset is sometimes called "scanning" the dataset and the object
+we use to do this is an arrow::dataset::Scanner.  The following snippet
+shows how to scan the entire dataset into an in-memory table:
+
+.. recipe:: ../code/datasets.cc ScanningADataset
+  :caption: Scanning a dataset into an arrow::Table
+  :dedent: 2
diff --git a/dev/cpp/_sources/flight.rst.txt b/dev/cpp/_sources/flight.rst.txt
new file mode 100644
index 0000000..77c36e3
--- /dev/null
+++ b/dev/cpp/_sources/flight.rst.txt
@@ -0,0 +1,153 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+This section contains a number of recipes for working with Arrow
+Flight, an RPC library specialized for tabular datasets. For more
+about Flight, see :doc:`format/Flight`.
+
+.. contents::
+
+Simple Parquet storage service with Arrow Flight
+================================================
+
+We'll implement a service that provides a key-value store for tabular
+data, using Flight to handle uploads/requests and Parquet to store the
+actual data.
+
+First, we'll implement the service itself. For simplicity, we won't
+use the :doc:`Datasets <./datasets>` API in favor of just using the
+Parquet API directly.
+
+.. literalinclude:: ../code/flight.cc
+   :language: cpp
+   :linenos:
+   :start-at: class ParquetStorageService
+   :end-at: end ParquetStorageService
+   :caption: Parquet storage service, server implementation
+
+First, we'll start our server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::StartServer
+   :dedent: 2
+
+We can then create a client and connect to the server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::Connect
+   :dedent: 2
+
+First, we'll create and upload a table, which will get stored in a
+Parquet file by the server.
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoPut
+   :dedent: 2
+
+Once we do so, we can retrieve the metadata for that dataset:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::GetFlightInfo
+   :dedent: 2
+
+And get the data back:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoGet
+   :dedent: 2
+
+Then, we'll delete the dataset:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::DoAction
+   :dedent: 2
+
+And confirm that it's been deleted:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::ListFlights
+   :dedent: 2
+
+Finally, we'll stop our server:
+
+.. recipe:: ../code/flight.cc ParquetStorageService::StopServer
+   :dedent: 2
+
+
+Setting gRPC client options
+===========================
+
+Options for gRPC clients can be passed in using the ``generic_options`` field of
+:cpp:class:`arrow::flight::FlightClientOptions`. There is a list of available
+client options in the `gRPC API documentation <https://grpc.github.io/grpc/cpp/group__grpc__arg__keys.html>`_. 
+
+For example, you can change the maximum message length sent with:
+
+.. recipe:: ../code/flight.cc TestClientOptions::Connect
+   :dedent: 2
+
+
+Flight Service with other gRPC endpoints
+========================================
+
+If you are using the gRPC backend, you can add other gRPC endpoints to the 
+Flight server. While Flight clients won't recognize these endpoints, general
+gRPC clients will be able to.
+
+.. note::
+   If statically linking Arrow Flight, Protobuf and gRPC must also be statically
+   linked, and the same goes for dynamic linking. Read more at
+   https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking
+
+Creating the server
+-------------------
+
+To create a gRPC service, first define a service using protobuf.
+
+.. literalinclude:: ../code/protos/helloworld.proto
+   :language: protobuf
+   :linenos:
+   :start-at: syntax = "proto3";
+   :caption: Hello world protobuf specification
+
+Next, you'll need to compile that to provide the protobuf and gRPC generated
+files. See gRPC's `generating client and server code 
+<https://grpc.io/docs/languages/cpp/basics/#generating-client-and-server-code>`_
+docs for details.
+
+Then write an implementation for the gRPC service:
+
+.. literalinclude:: ../code/flight.cc
+   :language: cpp
+   :linenos:
+   :start-at: class HelloWorldServiceImpl
+   :end-at: };  // end HelloWorldServiceImpl
+   :caption: Hello world gRPC service implementation
+
+Finally, use the ``builder_hook`` hook on :cpp:class:`arrow::flight::FlightServerOptions`
+to register the additional gRPC service.
+
+.. recipe:: ../code/flight.cc CustomGrpcImpl::StartServer
+   :dedent: 2
+
+Creating the client
+-------------------
+
+The Flight client implementation doesn't know about any custom gRPC services,
+so to call them you'll need to create a normal gRPC client. For the Hello World
+service, we use the HelloWorldService stub, which is provided by the compiled 
+gRPC definition.
+
+.. recipe:: ../code/flight.cc CustomGrpcImpl::CreateClient
+   :dedent: 2
diff --git a/dev/cpp/_sources/index.rst.txt b/dev/cpp/_sources/index.rst.txt
new file mode 100644
index 0000000..35e7bcd
--- /dev/null
+++ b/dev/cpp/_sources/index.rst.txt
@@ -0,0 +1,40 @@
+.. 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.
+
+Apache Arrow C++ Cookbook
+=========================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   basic
+   create
+   datasets
+   flight
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/dev/cpp/_static/alabaster.css b/dev/cpp/_static/alabaster.css
new file mode 100644
index 0000000..d377d9c
--- /dev/null
+++ b/dev/cpp/_static/alabaster.css
@@ -0,0 +1,708 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar {
+    max-height: 100%;
+    overflow-y: auto;
+}
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 160px;
+}
+
+div.sphinxsidebar .search > div {
+    display: table-cell;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Hide ugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/dev/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/dev/cpp/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/dev/cpp/_static/basic.css b/dev/cpp/_static/basic.css
new file mode 100644
index 0000000..4157edf
--- /dev/null
+++ b/dev/cpp/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: inherit;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/cpp/_static/custom.css b/dev/cpp/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/dev/cpp/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/dev/cpp/_static/doctools.js b/dev/cpp/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/dev/cpp/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/dev/cpp/_static/documentation_options.js b/dev/cpp/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/dev/cpp/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/dev/cpp/_static/favicon.ico b/dev/cpp/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/dev/cpp/_static/favicon.ico
Binary files differ
diff --git a/dev/cpp/_static/file.png b/dev/cpp/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/dev/cpp/_static/file.png
Binary files differ
diff --git a/dev/cpp/_static/language_data.js b/dev/cpp/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/dev/cpp/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/dev/cpp/_static/minus.png b/dev/cpp/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/dev/cpp/_static/minus.png
Binary files differ
diff --git a/dev/cpp/_static/plus.png b/dev/cpp/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/dev/cpp/_static/plus.png
Binary files differ
diff --git a/dev/cpp/_static/pygments.css b/dev/cpp/_static/pygments.css
new file mode 100644
index 0000000..04a4174
--- /dev/null
+++ b/dev/cpp/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/dev/cpp/_static/searchtools.js b/dev/cpp/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/dev/cpp/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/dev/cpp/_static/sphinx_highlight.js b/dev/cpp/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/dev/cpp/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/dev/cpp/basic.html b/dev/cpp/basic.html
new file mode 100644
index 0000000..5fd7f84
--- /dev/null
+++ b/dev/cpp/basic.html
@@ -0,0 +1,330 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with the C++ Implementation &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+    <link rel="prev" title="Apache Arrow C++ Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-the-c-implementation">
+<h1><a class="toc-backref" href="#id7" role="doc-backlink">Working with the C++ Implementation</a><a class="headerlink" href="#working-with-the-c-implementation" title="Link to this heading">¶</a></h1>
+<p>This section of the cookbook goes over basic concepts
+that will be needed regardless of how you intend to use
+the Arrow C++ implementation.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-the-c-implementation" id="id7">Working with the C++ Implementation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#working-with-status-and-result" id="id8">Working with Status and Result</a></p></li>
+<li><p><a class="reference internal" href="#using-the-visitor-pattern" id="id9">Using the Visitor Pattern</a></p>
+<ul>
+<li><p><a class="reference internal" href="#generate-random-data" id="id10">Generate Random Data</a></p></li>
+<li><p><a class="reference internal" href="#generalize-computations-across-arrow-types" id="id11">Generalize Computations Across Arrow Types</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="working-with-status-and-result">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Working with Status and Result</a><a class="headerlink" href="#working-with-status-and-result" title="Link to this heading">¶</a></h2>
+<p>C++ libraries often have to choose between throwing exceptions and
+returning error codes.  Arrow chooses to return Status and Result
+objects as a middle ground.  This makes it clear when a function
+can fail and is easier to use than integer arrow codes.</p>
+<p>It is important to always check the value of a returned Status object to
+ensure that the operation succeeded.  However, this can quickly become
+tedious:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Checking the status of every function manually</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="n">test_fn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">NullBuilder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Reserve</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">  </span><span class="c1">// Tedious return value check</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">st</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">st</span><span class="p">;</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="w">  </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">AppendNulls</span><span class="p">(</span><span class="mi">-1</span><span class="p">);</span>
+<span class="w">  </span><span class="c1">// Tedious return value check</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">st</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">st</span><span class="p">;</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Appended -1 null values?&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">test_fn</span><span class="p">();</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Invalid</span><span class="p">:</span> <span class="n">length</span> <span class="n">must</span> <span class="n">be</span> <span class="n">positive</span>
+</pre></div>
+</div>
+</div>
+<p>The macro <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/support.html#c.ARROW_RETURN_NOT_OK" title="(in Apache Arrow v15.0.1)"><code class="xref c c-macro docutils literal notranslate"><span class="pre">ARROW_RETURN_NOT_OK</span></code></a> will take care of some of this
+boilerplate for you.  It will run the contained expression and check the resulting
+<code class="docutils literal notranslate"><span class="pre">Status</span></code> or <code class="docutils literal notranslate"><span class="pre">Result</span></code> object.  If it failed then it will return the failure.</p>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Using ARROW_RETURN_NOT_OK to check the status</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="p">()</span><span class="o">&gt;</span><span class="w"> </span><span class="n">test_fn</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[]</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">NullBuilder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Reserve</span><span class="p">(</span><span class="mi">2</span><span class="p">));</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">AppendNulls</span><span class="p">(</span><span class="mi">-1</span><span class="p">));</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Appended -1 null values?&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="p">};</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">test_fn</span><span class="p">();</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">st</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Invalid</span><span class="p">:</span> <span class="n">length</span> <span class="n">must</span> <span class="n">be</span> <span class="n">positive</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="using-the-visitor-pattern">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Using the Visitor Pattern</a><a class="headerlink" href="#using-the-visitor-pattern" title="Link to this heading">¶</a></h2>
+<p>Arrow classes <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/datatype.html#_CPPv4N5arrow8DataTypeE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::DataType</span></code></a>, <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/scalar.html#_CPPv4N5arrow6ScalarE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::Scalar</span></code></a>, and
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/api/array.html#_CPPv4N5arrow5ArrayE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::Array</span></code></a> have specialized subclasses for each Arrow type. In
+order to specialize logic for each subclass, you can use the visitor pattern.
+Arrow provides inline template functions that allow you to call visitors
+efficiently:</p>
+<blockquote>
+<div><ul class="simple">
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow15VisitTypeInlineE6StatusRK8DataTypeP7VISITORDpRR4ARGS" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitTypeInline()</span></code></a></p></li>
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow17VisitScalarInlineE6StatusRK6ScalarP7VISITORDpRR4ARGS" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitScalarInline()</span></code></a></p></li>
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/cpp/api/utilities.html#_CPPv4I0DpEN5arrow16VisitArrayInlineE6StatusRK5ArrayP7VISITORDpRR4ARGS" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">arrow::VisitArrayInline()</span></code></a></p></li>
+</ul>
+</div></blockquote>
+<section id="generate-random-data">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Generate Random Data</a><a class="headerlink" href="#generate-random-data" title="Link to this heading">¶</a></h3>
+<p>See example at <a class="reference internal" href="create.html#generate-random-data-example"><span class="std std-ref">Generate Random Data for a Given Schema</span></a>.</p>
+</section>
+<section id="generalize-computations-across-arrow-types">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Generalize Computations Across Arrow Types</a><a class="headerlink" href="#generalize-computations-across-arrow-types" title="Link to this heading">¶</a></h3>
+<p>Array visitors can be useful when writing functions that can handle multiple
+array types. However, implementing a visitor for each type individually can be
+excessively verbose. Fortunately, Arrow provides type traits that allow you to
+write templated functions to handle subsets of types. The example below
+demonstrates a table sum function that can handle any integer or floating point
+array with only a single visitor implementation by leveraging
+<code class="xref cpp cpp-type docutils literal notranslate"><span class="pre">arrow::enable_if_number</span></code>.</p>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Using visitor pattern that can compute sum of table with any numeric type</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">TableSummation</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w">  </span><span class="kt">double</span><span class="w"> </span><span class="n">partial</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">0.0</span><span class="p">;</span>
+<span class="linenos"> 3</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos"> 4</span>
+<span class="linenos"> 5</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Compute</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 6</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">array</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">columns</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 7</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">VisitArrayInline</span><span class="p">(</span><span class="o">*</span><span class="n">array</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">partial</span><span class="p">;</span>
+<span class="linenos">10</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">11</span>
+<span class="linenos">12</span><span class="w">  </span><span class="c1">// Default implementation</span>
+<span class="linenos">13</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&amp;</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">14</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Can not compute sum for array of type &quot;</span><span class="p">,</span>
+<span class="linenos">15</span><span class="w">                                         </span><span class="n">array</span><span class="p">.</span><span class="n">type</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos">16</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">17</span>
+<span class="linenos">18</span><span class="w">  </span><span class="k">template</span><span class="w"> </span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">ArrayType</span><span class="p">,</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">typename</span><span class="w"> </span><span class="nc">ArrayType</span><span class="o">::</span><span class="n">TypeClass</span><span class="o">&gt;</span>
+<span class="linenos">19</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">enable_if_number</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">ArrayType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">20</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">optional</span><span class="o">&lt;</span><span class="k">typename</span><span class="w"> </span><span class="nc">T</span><span class="o">::</span><span class="n">c_type</span><span class="o">&gt;</span><span class="w"> </span><span class="n">value</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">array</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">21</span><span class="w">      </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">value</span><span class="p">.</span><span class="n">has_value</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">22</span><span class="w">        </span><span class="n">partial</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="k">static_cast</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="p">(</span><span class="n">value</span><span class="p">.</span><span class="n">value</span><span class="p">());</span>
+<span class="linenos">23</span><span class="w">      </span><span class="p">}</span>
+<span class="linenos">24</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">25</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">26</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">27</span><span class="p">};</span><span class="w">  </span><span class="c1">// TableSummation</span>
+</pre></div>
+</div>
+</div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;a&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">int32</span><span class="p">()),</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;b&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()),</span>
+<span class="p">});</span>
+<span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">columns</span><span class="p">;</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="w"> </span><span class="n">a_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int32_t</span><span class="o">&gt;</span><span class="w"> </span><span class="n">a_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">a_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">a_vals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">a_arr</span><span class="p">,</span><span class="w"> </span><span class="n">a_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">columns</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">a_arr</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="w"> </span><span class="n">b_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">b_vals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">4.0</span><span class="p">,</span><span class="w"> </span><span class="mf">5.0</span><span class="p">,</span><span class="w"> </span><span class="mf">6.0</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">b_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">b_vals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">b_arr</span><span class="p">,</span><span class="w"> </span><span class="n">b_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">columns</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">b_arr</span><span class="p">);</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">num_rows</span><span class="p">,</span><span class="w"> </span><span class="n">columns</span><span class="p">);</span>
+
+<span class="c1">// Call</span>
+<span class="n">TableSummation</span><span class="w"> </span><span class="n">summation</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">total</span><span class="p">,</span><span class="w"> </span><span class="n">summation</span><span class="p">.</span><span class="n">Compute</span><span class="p">(</span><span class="n">batch</span><span class="p">));</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Total is &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">total</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Total</span> <span class="ow">is</span> <span class="mi">21</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with the C++ Implementation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#working-with-status-and-result">Working with Status and Result</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#using-the-visitor-pattern">Using the Visitor Pattern</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow C++ Cookbook</a></li>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/basic.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/create.html b/dev/cpp/create.html
new file mode 100644
index 0000000..d86744c
--- /dev/null
+++ b/dev/cpp/create.html
@@ -0,0 +1,373 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and Writing Datasets" href="datasets.html" />
+    <link rel="prev" title="Working with the C++ Implementation" href="basic.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<h1><a class="toc-backref" href="#id6" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id6">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#create-arrays-from-standard-c" id="id7">Create Arrays from Standard C++</a></p></li>
+<li><p><a class="reference internal" href="#generate-random-data-for-a-given-schema" id="id8">Generate Random Data for a Given Schema</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="create-arrays-from-standard-c">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Create Arrays from Standard C++</a><a class="headerlink" href="#create-arrays-from-standard-c" title="Link to this heading">¶</a></h2>
+<p>Typed subclasses of <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/builder.html#_CPPv4N5arrow12ArrayBuilderE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::ArrayBuilder</span></code></a> make it easy
+to efficiently create Arrow arrays from existing C++ data:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Creating an array from C++ primitives</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="w"> </span><span class="n">builder</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">1</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">2</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">3</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">())</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="mi">2</span><span class="p">,</span>
+  <span class="mi">3</span>
+<span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Builders will allocate data as needed and insertion should
+have constant amortized time.</p>
+</div>
+<p>Builders can also consume standard C++ containers:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Raw pointers</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">Int64Builder</span><span class="w"> </span><span class="n">long_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int64Builder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">array</span><span class="o">&lt;</span><span class="kt">int64_t</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="o">&gt;</span><span class="w"> </span><span class="n">values</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">long_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">values</span><span class="p">.</span><span class="n">data</span><span class="p">(),</span><span class="w"> </span><span class="n">values</span><span class="p">.</span><span class="n">size</span><span class="p">()));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">long_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+
+<span class="c1">// Vectors</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">StringBuilder</span><span class="w"> </span><span class="n">str_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">StringBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="w"> </span><span class="n">strvals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;y&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;z&quot;</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">str_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">strvals</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">str_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+
+<span class="c1">// Iterators</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="w"> </span><span class="n">dbl_builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="n">std</span><span class="o">::</span><span class="n">set</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dblvals</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="mf">1.1</span><span class="p">,</span><span class="w"> </span><span class="mf">1.1</span><span class="p">,</span><span class="w"> </span><span class="mf">2.3</span><span class="p">};</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">dbl_builder</span><span class="p">.</span><span class="n">AppendValues</span><span class="p">(</span><span class="n">dblvals</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">dblvals</span><span class="p">.</span><span class="n">end</span><span class="p">()));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span><span class="w"> </span><span class="n">dbl_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">arr</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="mi">2</span><span class="p">,</span>
+  <span class="mi">3</span><span class="p">,</span>
+  <span class="mi">4</span>
+<span class="p">]</span>
+<span class="p">[</span>
+  <span class="s2">&quot;x&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;y&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;z&quot;</span>
+<span class="p">]</span>
+<span class="p">[</span>
+  <span class="mf">1.1</span><span class="p">,</span>
+  <span class="mf">2.3</span>
+<span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Builders will not take ownership of data in containers and will make a
+copy of the underlying data.</p>
+</div>
+</section>
+<section id="generate-random-data-for-a-given-schema">
+<span id="generate-random-data-example"></span><h2><a class="toc-backref" href="#id8" role="doc-backlink">Generate Random Data for a Given Schema</a><a class="headerlink" href="#generate-random-data-for-a-given-schema" title="Link to this heading">¶</a></h2>
+<p>To generate random data for a given schema, implementing a type visitor is a
+good idea. The following example only implements double arrays and list arrays,
+but could be easily extended to all types.</p>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Using visitor pattern to generate random record batches</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">RandomBatchGenerator</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos"> 3</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="linenos"> 4</span>
+<span class="linenos"> 5</span><span class="w">  </span><span class="n">RandomBatchGenerator</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">schema</span><span class="p">(</span><span class="n">schema</span><span class="p">){};</span>
+<span class="linenos"> 6</span>
+<span class="linenos"> 7</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">Generate</span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="n">num_rows_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">num_rows</span><span class="p">;</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">field</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">schema</span><span class="o">-&gt;</span><span class="n">fields</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">10</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">VisitTypeInline</span><span class="p">(</span><span class="o">*</span><span class="n">field</span><span class="o">-&gt;</span><span class="n">type</span><span class="p">(),</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
+<span class="linenos">11</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">12</span>
+<span class="linenos">13</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">num_rows</span><span class="p">,</span><span class="w"> </span><span class="n">arrays_</span><span class="p">);</span>
+<span class="linenos">14</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">15</span>
+<span class="linenos">16</span><span class="w">  </span><span class="c1">// Default implementation</span>
+<span class="linenos">17</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DataType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">18</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Generating data for&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">type</span><span class="p">.</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos">19</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">20</span>
+<span class="linenos">21</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleType</span><span class="o">&amp;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">22</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">DoubleBuilder</span><span class="p">();</span>
+<span class="linenos">23</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">normal_distribution</span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">d</span><span class="p">{</span><span class="cm">/*mean=*/</span><span class="mf">5.0</span><span class="p">,</span><span class="w"> </span><span class="cm">/*stddev=*/</span><span class="mf">2.0</span><span class="p">};</span>
+<span class="linenos">24</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">25</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="n">d</span><span class="p">(</span><span class="n">gen_</span><span class="p">)));</span>
+<span class="linenos">26</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">27</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">array</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="linenos">28</span><span class="w">    </span><span class="n">arrays_</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">array</span><span class="p">);</span>
+<span class="linenos">29</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">30</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">31</span>
+<span class="linenos">32</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">Visit</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">ListType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">33</span><span class="w">    </span><span class="c1">// Generate offsets first, which determines number of values in sub-array</span>
+<span class="linenos">34</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">poisson_distribution</span><span class="o">&lt;&gt;</span><span class="w"> </span><span class="n">d</span><span class="p">{</span><span class="cm">/*mean=*/</span><span class="mi">4</span><span class="p">};</span>
+<span class="linenos">35</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Int32Builder</span><span class="p">();</span>
+<span class="linenos">36</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="mi">0</span><span class="p">));</span>
+<span class="linenos">37</span><span class="w">    </span><span class="kt">int32_t</span><span class="w"> </span><span class="n">last_val</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="linenos">38</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int32_t</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span><span class="w"> </span><span class="o">++</span><span class="n">i</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">39</span><span class="w">      </span><span class="n">last_val</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">d</span><span class="p">(</span><span class="n">gen_</span><span class="p">);</span>
+<span class="linenos">40</span><span class="w">      </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">builder</span><span class="p">.</span><span class="n">Append</span><span class="p">(</span><span class="n">last_val</span><span class="p">));</span>
+<span class="linenos">41</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">42</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">offsets</span><span class="p">,</span><span class="w"> </span><span class="n">builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+<span class="linenos">43</span>
+<span class="linenos">44</span><span class="w">    </span><span class="c1">// Since children of list has a new length, will use a new generator</span>
+<span class="linenos">45</span><span class="w">    </span><span class="n">RandomBatchGenerator</span><span class="w"> </span><span class="n">value_gen</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">type</span><span class="p">.</span><span class="n">value_type</span><span class="p">())}));</span>
+<span class="linenos">46</span><span class="w">    </span><span class="c1">// Last index from the offsets array becomes the length of the sub-array</span>
+<span class="linenos">47</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">inner_batch</span><span class="p">,</span><span class="w"> </span><span class="n">value_gen</span><span class="p">.</span><span class="n">Generate</span><span class="p">(</span><span class="n">last_val</span><span class="p">));</span>
+<span class="linenos">48</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;</span><span class="w"> </span><span class="n">values</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">inner_batch</span><span class="o">-&gt;</span><span class="n">column</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="linenos">49</span>
+<span class="linenos">50</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">array</span><span class="p">,</span>
+<span class="linenos">51</span><span class="w">                          </span><span class="n">arrow</span><span class="o">::</span><span class="n">ListArray</span><span class="o">::</span><span class="n">FromArrays</span><span class="p">(</span><span class="o">*</span><span class="n">offsets</span><span class="p">.</span><span class="n">get</span><span class="p">(),</span><span class="w"> </span><span class="o">*</span><span class="n">values</span><span class="p">.</span><span class="n">get</span><span class="p">()));</span>
+<span class="linenos">52</span><span class="w">    </span><span class="n">arrays_</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">array</span><span class="p">);</span>
+<span class="linenos">53</span>
+<span class="linenos">54</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos">55</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">56</span>
+<span class="linenos">57</span><span class="w"> </span><span class="k">protected</span><span class="o">:</span>
+<span class="linenos">58</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">random_device</span><span class="w"> </span><span class="n">rd_</span><span class="p">{};</span>
+<span class="linenos">59</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">mt19937</span><span class="w"> </span><span class="n">gen_</span><span class="p">{</span><span class="n">rd_</span><span class="p">()};</span>
+<span class="linenos">60</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Array</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">arrays_</span><span class="p">;</span>
+<span class="linenos">61</span><span class="w">  </span><span class="kt">int32_t</span><span class="w"> </span><span class="n">num_rows_</span><span class="p">;</span>
+<span class="linenos">62</span><span class="p">};</span><span class="w">  </span><span class="c1">// RandomBatchGenerator</span>
+</pre></div>
+</div>
+</div>
+<p>Given such a generator, you can create random test data for any supported schema:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">schema</span><span class="p">({</span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()),</span>
+<span class="w">                   </span><span class="n">arrow</span><span class="o">::</span><span class="n">field</span><span class="p">(</span><span class="s">&quot;y&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">list</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">float64</span><span class="p">()))});</span>
+
+<span class="n">RandomBatchGenerator</span><span class="w"> </span><span class="nf">generator</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch</span><span class="p">,</span><span class="w"> </span><span class="n">generator</span><span class="p">.</span><span class="n">Generate</span><span class="p">(</span><span class="mi">5</span><span class="p">));</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Created batch: </span><span class="se">\n</span><span class="s">&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">();</span>
+
+<span class="c1">// Consider using ValidateFull to check correctness</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">batch</span><span class="o">-&gt;</span><span class="n">ValidateFull</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Created</span> <span class="n">batch</span><span class="p">:</span> 
+<span class="n">x</span><span class="p">:</span>   <span class="p">[</span>
+    <span class="mf">5.7749457054407385</span><span class="p">,</span>
+    <span class="mf">2.0933840401667188</span><span class="p">,</span>
+    <span class="mf">4.151061032305716</span><span class="p">,</span>
+    <span class="mf">1.2743626615405068</span><span class="p">,</span>
+    <span class="mf">7.807288980357406</span>
+  <span class="p">]</span>
+<span class="n">y</span><span class="p">:</span>   <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mf">2.7501724590028584</span><span class="p">,</span>
+      <span class="mf">6.190815426035369</span><span class="p">,</span>
+      <span class="mf">5.712751957042635</span><span class="p">,</span>
+      <span class="mf">1.0996700439976563</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">2.932978908317865</span><span class="p">,</span>
+      <span class="mf">4.524595732842056</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">4.27851996441237</span><span class="p">,</span>
+      <span class="mf">2.939813825113755</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">6.246285518812158</span><span class="p">,</span>
+      <span class="mf">5.758513888797805</span>
+    <span class="p">],</span>
+    <span class="p">[</span>
+      <span class="mf">7.715064898757889</span><span class="p">,</span>
+      <span class="mf">6.41303825595227</span><span class="p">,</span>
+      <span class="mf">7.037590810191184</span><span class="p">,</span>
+      <span class="mf">6.897252934113762</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#create-arrays-from-standard-c">Create Arrays from Standard C++</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#generate-random-data-for-a-given-schema">Generate Random Data for a Given Schema</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="basic.html" title="previous chapter">Working with the C++ Implementation</a></li>
+      <li>Next: <a href="datasets.html" title="next chapter">Reading and Writing Datasets</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/datasets.html b/dev/cpp/datasets.html
new file mode 100644
index 0000000..dbd6a5e
--- /dev/null
+++ b/dev/cpp/datasets.html
@@ -0,0 +1,312 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and Writing Datasets &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-datasets">
+<h1><a class="toc-backref" href="#id7" role="doc-backlink">Reading and Writing Datasets</a><a class="headerlink" href="#reading-and-writing-datasets" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for reading and writing
+datasets.  Datasets are a collection of one or more files containing
+tabular data.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-datasets" id="id7">Reading and Writing Datasets</a></p>
+<ul>
+<li><p><a class="reference internal" href="#read-a-partitioned-dataset" id="id8">Read a Partitioned Dataset</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="read-a-partitioned-dataset">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Read a Partitioned Dataset</a><a class="headerlink" href="#read-a-partitioned-dataset" title="Link to this heading">¶</a></h2>
+<p>The individual data files that make up a dataset will often be
+distributed across several different directories according to some
+kind of partitioning scheme.</p>
+<p>This simplifies management of the data and also allows for partial
+reads of the dataset by inspecting the file paths and utilizing the
+guarantees provided by the partitioning scheme.</p>
+<p>This recipe demonstrates the basics of reading a partitioned dataset.
+First let us inspect our data:</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">A listing of files in our dataset</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">directory_base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">airquality_basedir</span><span class="p">;</span>
+
+<span class="c1">// Create a filesystem</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">fs</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="p">();</span>
+
+<span class="c1">// Create a file selector which describes which files are part of</span>
+<span class="c1">// the dataset.  This selector performs a recursive search of a base</span>
+<span class="c1">// directory which is typical with partitioned datasets.  You can also</span>
+<span class="c1">// create a dataset from a list of one or more paths.</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSelector</span><span class="w"> </span><span class="n">selector</span><span class="p">;</span>
+<span class="n">selector</span><span class="p">.</span><span class="n">base_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">directory_base</span><span class="p">;</span>
+<span class="n">selector</span><span class="p">.</span><span class="n">recursive</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
+
+<span class="c1">// List out the files so we can see how our data is partitioned.</span>
+<span class="c1">// This step is not necessary for reading a dataset</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">file_infos</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">selector</span><span class="p">));</span>
+<span class="kt">int</span><span class="w"> </span><span class="n">num_printed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">file_infos</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">path</span><span class="p">.</span><span class="n">IsFile</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">path</span><span class="p">.</span><span class="n">path</span><span class="p">().</span><span class="n">substr</span><span class="p">(</span><span class="n">directory_base</span><span class="p">.</span><span class="n">size</span><span class="p">())</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">++</span><span class="n">num_printed</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">10</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">      </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;...&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">      </span><span class="k">break</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">11</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">19</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">23</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">7</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">18</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">10</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">26</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">28</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">/</span><span class="n">Month</span><span class="o">=</span><span class="mi">9</span><span class="o">/</span><span class="n">Day</span><span class="o">=</span><span class="mi">27</span><span class="o">/</span><span class="n">chunk</span><span class="o">-</span><span class="mf">0.</span><span class="n">parquet</span>
+<span class="o">...</span>
+</pre></div>
+</div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>This partitioning scheme of key=value is referred to as “hive”
+partitioning within Arrow.</p>
+</div>
+<p>Now that we have a filesystem and a selector we can go ahead and create
+a dataset.  To do this we need to pick a format and a partitioning
+scheme.  Once we have all of the pieces we need we can create an
+arrow::dataset::Dataset instance.</p>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Creating an arrow::dataset::Dataset instance</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Create a file format which describes the format of the files.</span>
+<span class="c1">// Here we specify we are reading parquet files.  We could pick a different format</span>
+<span class="c1">// such as Arrow-IPC files or CSV files or we could customize the parquet format with</span>
+<span class="c1">// additional reading &amp; parsing options.</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ParquetFileFormat</span><span class="o">&gt;</span><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ParquetFileFormat</span><span class="o">&gt;</span><span class="p">();</span>
+
+<span class="c1">// Create a partitioning factory.  A partitioning factory will be used by a dataset</span>
+<span class="c1">// factory to infer the partitioning schema from the filenames.  All we need to</span>
+<span class="c1">// specify is the flavor of partitioning which, in our case, is &quot;hive&quot;.</span>
+<span class="c1">//</span>
+<span class="c1">// Alternatively, we could manually create a partitioning scheme from a schema.  This</span>
+<span class="c1">// is typically not necessary for hive partitioning as inference works well.</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">PartitioningFactory</span><span class="o">&gt;</span><span class="w"> </span><span class="n">partitioning_factory</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">HivePartitioning</span><span class="o">::</span><span class="n">MakeFactory</span><span class="p">();</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">FileSystemFactoryOptions</span><span class="w"> </span><span class="n">options</span><span class="p">;</span>
+<span class="n">options</span><span class="p">.</span><span class="n">partitioning</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">partitioning_factory</span><span class="p">;</span>
+
+<span class="c1">// Create a dataset factory</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span>
+<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">DatasetFactory</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dataset_factory</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">FileSystemDatasetFactory</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="n">fs</span><span class="p">,</span><span class="w"> </span><span class="n">selector</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">options</span><span class="p">));</span>
+
+<span class="c1">// Create the dataset, this will scan the dataset directory to find all the files</span>
+<span class="c1">// and may scan some file metadata in order to determine the dataset schema.</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">Dataset</span><span class="o">&gt;</span><span class="w"> </span><span class="n">dataset</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">dataset_factory</span><span class="o">-&gt;</span><span class="n">Finish</span><span class="p">());</span>
+
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;We discovered the following schema for the dataset:&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">dataset</span><span class="o">-&gt;</span><span class="n">schema</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">We</span> <span class="n">discovered</span> <span class="n">the</span> <span class="n">following</span> <span class="n">schema</span> <span class="k">for</span> <span class="n">the</span> <span class="n">dataset</span><span class="p">:</span>
+
+<span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+</pre></div>
+</div>
+</div>
+<p>Once we have a dataset object we can read in the data.  Reading the data
+from a dataset is sometimes called “scanning” the dataset and the object
+we use to do this is an arrow::dataset::Scanner.  The following snippet
+shows how to scan the entire dataset into an in-memory table:</p>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Scanning a dataset into an arrow::Table</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Create a scanner</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">ScannerBuilder</span><span class="w"> </span><span class="nf">scanner_builder</span><span class="p">(</span><span class="n">dataset</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">scanner_builder</span><span class="p">.</span><span class="n">UseThreads</span><span class="p">(</span><span class="nb">true</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">dataset</span><span class="o">::</span><span class="n">Scanner</span><span class="o">&gt;</span><span class="w"> </span><span class="n">scanner</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">scanner_builder</span><span class="p">.</span><span class="n">Finish</span><span class="p">());</span>
+
+<span class="c1">// Scan the dataset.  There are a variety of other methods available on the scanner as</span>
+<span class="c1">// well</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">scanner</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Read in a table with &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">num_rows</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; rows and &quot;</span>
+<span class="w">     </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">num_columns</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; columns&quot;</span><span class="p">;</span>
+</pre></div>
+</div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Read</span> <span class="ow">in</span> <span class="n">a</span> <span class="n">table</span> <span class="k">with</span> <span class="mi">153</span> <span class="n">rows</span> <span class="ow">and</span> <span class="mi">6</span> <span class="n">columns</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and Writing Datasets</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#read-a-partitioned-dataset">Read a Partitioned Dataset</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/datasets.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/flight.html b/dev/cpp/flight.html
new file mode 100644
index 0000000..917b4f8
--- /dev/null
+++ b/dev/cpp/flight.html
@@ -0,0 +1,703 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Reading and Writing Datasets" href="datasets.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id15" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for working with Arrow
+Flight, an RPC library specialized for tabular datasets. For more
+about Flight, see <span class="xref std std-doc">format/Flight</span>.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id15">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight" id="id16">Simple Parquet storage service with Arrow Flight</a></p></li>
+<li><p><a class="reference internal" href="#setting-grpc-client-options" id="id17">Setting gRPC client options</a></p></li>
+<li><p><a class="reference internal" href="#flight-service-with-other-grpc-endpoints" id="id18">Flight Service with other gRPC endpoints</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-the-server" id="id19">Creating the server</a></p></li>
+<li><p><a class="reference internal" href="#creating-the-client" id="id20">Creating the client</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-parquet-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id16" role="doc-backlink">Simple Parquet storage service with Arrow Flight</a><a class="headerlink" href="#simple-parquet-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>We’ll implement a service that provides a key-value store for tabular
+data, using Flight to handle uploads/requests and Parquet to store the
+actual data.</p>
+<p>First, we’ll implement the service itself. For simplicity, we won’t
+use the <a class="reference internal" href="datasets.html"><span class="doc">Datasets</span></a> API in favor of just using the
+Parquet API directly.</p>
+<div class="literal-block-wrapper docutils container" id="id1">
+<div class="code-block-caption"><span class="caption-text">Parquet storage service, server implementation</span><a class="headerlink" href="#id1" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos">  1</span><span class="k">class</span><span class="w"> </span><span class="nc">ParquetStorageService</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">  2</span><span class="w"> </span><span class="k">public</span><span class="o">:</span>
+<span class="linenos">  3</span><span class="w">  </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ActionType</span><span class="w"> </span><span class="n">kActionDropDataset</span><span class="p">{</span><span class="s">&quot;drop_dataset&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Delete a dataset.&quot;</span><span class="p">};</span>
+<span class="linenos">  4</span>
+<span class="linenos">  5</span><span class="w">  </span><span class="k">explicit</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">root</span><span class="p">)</span>
+<span class="linenos">  6</span><span class="w">      </span><span class="o">:</span><span class="w"> </span><span class="n">root_</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">))</span><span class="w"> </span><span class="p">{}</span>
+<span class="linenos">  7</span>
+<span class="linenos">  8</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">ListFlights</span><span class="p">(</span>
+<span class="linenos">  9</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Criteria</span><span class="o">*</span><span class="p">,</span>
+<span class="linenos"> 10</span><span class="w">      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">listings</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 11</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSelector</span><span class="w"> </span><span class="n">selector</span><span class="p">;</span>
+<span class="linenos"> 12</span><span class="w">    </span><span class="n">selector</span><span class="p">.</span><span class="n">base_dir</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;/&quot;</span><span class="p">;</span>
+<span class="linenos"> 13</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">listing</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">selector</span><span class="p">));</span>
+<span class="linenos"> 14</span>
+<span class="linenos"> 15</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flights</span><span class="p">;</span>
+<span class="linenos"> 16</span><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="k">auto</span><span class="o">&amp;</span><span class="w"> </span><span class="n">file_info</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">listing</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 17</span><span class="w">      </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">file_info</span><span class="p">.</span><span class="n">IsFile</span><span class="p">()</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">extension</span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="s">&quot;parquet&quot;</span><span class="p">)</span><span class="w"> </span><span class="k">continue</span><span class="p">;</span>
+<span class="linenos"> 18</span><span class="w">      </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">info</span><span class="p">,</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 19</span><span class="w">      </span><span class="n">flights</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">info</span><span class="p">));</span>
+<span class="linenos"> 20</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 21</span>
+<span class="linenos"> 22</span><span class="w">    </span><span class="o">*</span><span class="n">listings</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 23</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">SimpleFlightListing</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">flights</span><span class="p">)));</span>
+<span class="linenos"> 24</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 25</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 26</span>
+<span class="linenos"> 27</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">GetFlightInfo</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 28</span><span class="w">                              </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">&amp;</span><span class="w"> </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="linenos"> 29</span><span class="w">                              </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">info</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 30</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span><span class="n">descriptor</span><span class="p">));</span>
+<span class="linenos"> 31</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 32</span><span class="w">    </span><span class="o">*</span><span class="n">info</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 33</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">flight_info</span><span class="p">)));</span>
+<span class="linenos"> 34</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 35</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 36</span>
+<span class="linenos"> 37</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoPut</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 38</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMessageReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">,</span>
+<span class="linenos"> 39</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMetadataWriter</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 40</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">file_info</span><span class="p">,</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">()));</span>
+<span class="linenos"> 41</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">sink</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenOutputStream</span><span class="p">(</span><span class="n">file_info</span><span class="p">.</span><span class="n">path</span><span class="p">()));</span>
+<span class="linenos"> 42</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="linenos"> 43</span>
+<span class="linenos"> 44</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">WriteTable</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span>
+<span class="linenos"> 45</span><span class="w">                                                   </span><span class="n">sink</span><span class="p">,</span><span class="w"> </span><span class="cm">/*chunk_size=*/</span><span class="mi">65536</span><span class="p">));</span>
+<span class="linenos"> 46</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 47</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 48</span>
+<span class="linenos"> 49</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoGet</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 50</span><span class="w">                      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Ticket</span><span class="o">&amp;</span><span class="w"> </span><span class="n">request</span><span class="p">,</span>
+<span class="linenos"> 51</span><span class="w">                      </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDataStream</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">stream</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 52</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">input</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">request</span><span class="p">.</span><span class="n">ticket</span><span class="p">));</span>
+<span class="linenos"> 53</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="linenos"> 54</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span>
+<span class="linenos"> 55</span><span class="w">                                                 </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+<span class="linenos"> 56</span>
+<span class="linenos"> 57</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">;</span>
+<span class="linenos"> 58</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">ReadTable</span><span class="p">(</span><span class="o">&amp;</span><span class="n">table</span><span class="p">));</span>
+<span class="linenos"> 59</span><span class="w">    </span><span class="c1">// Note that we can&#39;t directly pass TableBatchReader to</span>
+<span class="linenos"> 60</span><span class="w">    </span><span class="c1">// RecordBatchStream because TableBatchReader keeps a non-owning</span>
+<span class="linenos"> 61</span><span class="w">    </span><span class="c1">// reference to the underlying Table, which would then get freed</span>
+<span class="linenos"> 62</span><span class="w">    </span><span class="c1">// when we exit this function</span>
+<span class="linenos"> 63</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatch</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="linenos"> 64</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">TableBatchReader</span><span class="w"> </span><span class="nf">batch_reader</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">);</span>
+<span class="linenos"> 65</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">batch_reader</span><span class="p">.</span><span class="n">ToRecordBatches</span><span class="p">());</span>
+<span class="linenos"> 66</span>
+<span class="linenos"> 67</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">owning_reader</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatchReader</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span>
+<span class="linenos"> 68</span><span class="w">                                                  </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">batches</span><span class="p">),</span><span class="w"> </span><span class="n">table</span><span class="o">-&gt;</span><span class="n">schema</span><span class="p">()));</span>
+<span class="linenos"> 69</span><span class="w">    </span><span class="o">*</span><span class="n">stream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDataStream</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 70</span><span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">RecordBatchStream</span><span class="p">(</span><span class="n">owning_reader</span><span class="p">));</span>
+<span class="linenos"> 71</span>
+<span class="linenos"> 72</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 73</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 74</span>
+<span class="linenos"> 75</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">ListActions</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 76</span><span class="w">                            </span><span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ActionType</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">actions</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 77</span><span class="w">    </span><span class="o">*</span><span class="n">actions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="n">kActionDropDataset</span><span class="p">};</span>
+<span class="linenos"> 78</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">();</span>
+<span class="linenos"> 79</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 80</span>
+<span class="linenos"> 81</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoAction</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ServerCallContext</span><span class="o">&amp;</span><span class="p">,</span>
+<span class="linenos"> 82</span><span class="w">                         </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Action</span><span class="o">&amp;</span><span class="w"> </span><span class="n">action</span><span class="p">,</span>
+<span class="linenos"> 83</span><span class="w">                         </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;*</span><span class="w"> </span><span class="n">result</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 84</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">kActionDropDataset</span><span class="p">.</span><span class="n">type</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 85</span><span class="w">      </span><span class="o">*</span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="linenos"> 86</span><span class="w">          </span><span class="k">new</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">SimpleResultStream</span><span class="p">({}));</span>
+<span class="linenos"> 87</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">DoActionDropDataset</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="n">body</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">());</span>
+<span class="linenos"> 88</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 89</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">NotImplemented</span><span class="p">(</span><span class="s">&quot;Unknown action type: &quot;</span><span class="p">,</span><span class="w"> </span><span class="n">action</span><span class="p">.</span><span class="n">type</span><span class="p">);</span>
+<span class="linenos"> 90</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos"> 91</span>
+<span class="linenos"> 92</span><span class="w"> </span><span class="k">private</span><span class="o">:</span>
+<span class="linenos"> 93</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">MakeFlightInfo</span><span class="p">(</span>
+<span class="linenos"> 94</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&amp;</span><span class="w"> </span><span class="n">file_info</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 95</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">input</span><span class="p">,</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">file_info</span><span class="p">));</span>
+<span class="linenos"> 96</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="linenos"> 97</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span>
+<span class="linenos"> 98</span><span class="w">                                                 </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+<span class="linenos"> 99</span>
+<span class="linenos">100</span><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="linenos">101</span><span class="w">    </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">schema</span><span class="p">));</span>
+<span class="linenos">102</span>
+<span class="linenos">103</span><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">descriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">Path</span><span class="p">({</span><span class="n">file_info</span><span class="p">.</span><span class="n">base_name</span><span class="p">()});</span>
+<span class="linenos">104</span>
+<span class="linenos">105</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">endpoint</span><span class="p">;</span>
+<span class="linenos">106</span><span class="w">    </span><span class="n">endpoint</span><span class="p">.</span><span class="n">ticket</span><span class="p">.</span><span class="n">ticket</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">base_name</span><span class="p">();</span>
+<span class="linenos">107</span><span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="linenos">108</span><span class="w">    </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="linenos">109</span><span class="w">        </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">()));</span>
+<span class="linenos">110</span><span class="w">    </span><span class="n">endpoint</span><span class="p">.</span><span class="n">locations</span><span class="p">.</span><span class="n">push_back</span><span class="p">(</span><span class="n">location</span><span class="p">);</span>
+<span class="linenos">111</span>
+<span class="linenos">112</span><span class="w">    </span><span class="kt">int64_t</span><span class="w"> </span><span class="n">total_records</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">parquet_reader</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">metadata</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">num_rows</span><span class="p">();</span>
+<span class="linenos">113</span><span class="w">    </span><span class="kt">int64_t</span><span class="w"> </span><span class="n">total_bytes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">file_info</span><span class="p">.</span><span class="n">size</span><span class="p">();</span>
+<span class="linenos">114</span>
+<span class="linenos">115</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">::</span><span class="n">Make</span><span class="p">(</span><span class="o">*</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">descriptor</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">endpoint</span><span class="p">},</span><span class="w"> </span><span class="n">total_records</span><span class="p">,</span>
+<span class="linenos">116</span><span class="w">                                           </span><span class="n">total_bytes</span><span class="p">);</span>
+<span class="linenos">117</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">118</span>
+<span class="linenos">119</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Result</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">FileInfoFromDescriptor</span><span class="p">(</span>
+<span class="linenos">120</span><span class="w">      </span><span class="k">const</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">&amp;</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">121</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">type</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">PATH</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">122</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">Invalid</span><span class="p">(</span><span class="s">&quot;Must provide PATH-type FlightDescriptor&quot;</span><span class="p">);</span>
+<span class="linenos">123</span><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">path</span><span class="p">.</span><span class="n">size</span><span class="p">()</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">124</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">Invalid</span><span class="p">(</span>
+<span class="linenos">125</span><span class="w">          </span><span class="s">&quot;Must provide PATH-type FlightDescriptor with one path component&quot;</span><span class="p">);</span>
+<span class="linenos">126</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos">127</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">GetFileInfo</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]);</span>
+<span class="linenos">128</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">129</span>
+<span class="linenos">130</span><span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">DoActionDropDataset</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">key</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">131</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">root_</span><span class="o">-&gt;</span><span class="n">DeleteFile</span><span class="p">(</span><span class="n">key</span><span class="p">);</span>
+<span class="linenos">132</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">133</span>
+<span class="linenos">134</span><span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">FileSystem</span><span class="o">&gt;</span><span class="w"> </span><span class="n">root_</span><span class="p">;</span>
+<span class="linenos">135</span><span class="p">};</span><span class="w">  </span><span class="c1">// end ParquetStorageService</span>
+</pre></div>
+</div>
+</div>
+<p>First, we’ll start our server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">fs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">LocalFileSystem</span><span class="o">&gt;</span><span class="p">();</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">CreateDir</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">DeleteDirContents</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">));</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">make_shared</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">fs</span><span class="o">::</span><span class="n">SubTreeFileSystem</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;./flight_datasets/&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">fs</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">server_location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">server_location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">));</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerOptions</span><span class="w"> </span><span class="nf">options</span><span class="p">(</span><span class="n">server_location</span><span class="p">);</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="w">    </span><span class="k">new</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">)));</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Init</span><span class="p">(</span><span class="n">options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Listening on port &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id2">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id2" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Listening</span> <span class="n">on</span> <span class="n">port</span> <span class="mi">37117</span>
+</pre></div>
+</div>
+</div>
+<p>We can then create a client and connect to the server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()));</span>
+
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">&gt;</span><span class="w"> </span><span class="n">client</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">client</span><span class="p">,</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">::</span><span class="n">Connect</span><span class="p">(</span><span class="n">location</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Connected to &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id3">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id3" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Connected</span> <span class="n">to</span> <span class="n">grpc</span><span class="o">+</span><span class="n">tcp</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">37117</span>
+</pre></div>
+</div>
+</div>
+<p>First, we’ll create and upload a table, which will get stored in a
+Parquet file by the server.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// Open example data file to upload</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="w"> </span><span class="n">airquality_path</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">FindTestDataFile</span><span class="p">(</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">));</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">io</span><span class="o">::</span><span class="n">RandomAccessFile</span><span class="o">&gt;</span><span class="w"> </span><span class="n">input</span><span class="p">,</span>
+<span class="w">                      </span><span class="n">fs</span><span class="o">-&gt;</span><span class="n">OpenInputFile</span><span class="p">(</span><span class="n">airquality_path</span><span class="p">));</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">FileReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">reader</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span>
+<span class="w">    </span><span class="n">parquet</span><span class="o">::</span><span class="n">arrow</span><span class="o">::</span><span class="n">OpenFile</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">input</span><span class="p">),</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">default_memory_pool</span><span class="p">(),</span><span class="w"> </span><span class="o">&amp;</span><span class="n">reader</span><span class="p">));</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">descriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightDescriptor</span><span class="o">::</span><span class="n">Path</span><span class="p">({</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">});</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">schema</span><span class="p">));</span>
+
+<span class="c1">// Start the RPC call</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightStreamWriter</span><span class="o">&gt;</span><span class="w"> </span><span class="n">writer</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightMetadataReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadata_reader</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">put_stream</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoPut</span><span class="p">(</span><span class="n">descriptor</span><span class="p">,</span><span class="w"> </span><span class="n">schema</span><span class="p">));</span>
+<span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">put_stream</span><span class="p">.</span><span class="n">writer</span><span class="p">);</span>
+<span class="n">metadata_reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">put_stream</span><span class="p">.</span><span class="n">reader</span><span class="p">);</span>
+
+<span class="c1">// Upload data</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">RecordBatchReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batch_reader</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">row_groups</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">num_row_groups</span><span class="p">());</span>
+<span class="n">std</span><span class="o">::</span><span class="n">iota</span><span class="p">(</span><span class="n">row_groups</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">row_groups</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">reader</span><span class="o">-&gt;</span><span class="n">GetRecordBatchReader</span><span class="p">(</span><span class="n">row_groups</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">batch_reader</span><span class="p">));</span>
+<span class="kt">int64_t</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="nb">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">batch</span><span class="p">,</span><span class="w"> </span><span class="n">batch_reader</span><span class="o">-&gt;</span><span class="n">Next</span><span class="p">());</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">batch</span><span class="p">)</span><span class="w"> </span><span class="k">break</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">writer</span><span class="o">-&gt;</span><span class="n">WriteRecordBatch</span><span class="p">(</span><span class="o">*</span><span class="n">batch</span><span class="p">));</span>
+<span class="w">  </span><span class="n">batches</span><span class="o">++</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">writer</span><span class="o">-&gt;</span><span class="n">Close</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Wrote &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot; batches&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id4">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id4" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Wrote</span> <span class="mi">1</span> <span class="n">batches</span>
+</pre></div>
+</div>
+</div>
+<p>Once we do so, we can retrieve the metadata for that dataset:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flight_info</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">GetFlightInfo</span><span class="p">(</span><span class="n">descriptor</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">().</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;=== Schema ===&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">info_schema</span><span class="p">;</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">ipc</span><span class="o">::</span><span class="n">DictionaryMemo</span><span class="w"> </span><span class="n">dictionary_memo</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">info_schema</span><span class="p">,</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">dictionary_memo</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">info_schema</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;==============&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id5">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id5" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">&lt;</span><span class="n">FlightDescriptor</span> <span class="n">path</span><span class="o">=</span><span class="s1">&#39;airquality.parquet&#39;</span><span class="o">&gt;</span>
+<span class="o">===</span> <span class="n">Schema</span> <span class="o">===</span>
+<span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+<span class="o">==============</span>
+</pre></div>
+</div>
+</div>
+<p>And get the data back:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightStreamReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">stream</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoGet</span><span class="p">(</span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">endpoints</span><span class="p">()[</span><span class="mi">0</span><span class="p">].</span><span class="n">ticket</span><span class="p">));</span>
+<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Table</span><span class="o">&gt;</span><span class="w"> </span><span class="n">table</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">stream</span><span class="o">-&gt;</span><span class="n">ToTable</span><span class="p">());</span>
+<span class="n">arrow</span><span class="o">::</span><span class="n">PrettyPrintOptions</span><span class="w"> </span><span class="nf">print_options</span><span class="p">(</span><span class="cm">/*indent=*/</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="cm">/*window=*/</span><span class="mi">2</span><span class="p">);</span>
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">arrow</span><span class="o">::</span><span class="n">PrettyPrint</span><span class="p">(</span><span class="o">*</span><span class="n">table</span><span class="p">,</span><span class="w"> </span><span class="n">print_options</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">rout</span><span class="p">));</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id6">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id6" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Ozone</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Wind</span><span class="p">:</span> <span class="n">double</span>
+<span class="n">Temp</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Month</span><span class="p">:</span> <span class="n">int32</span>
+<span class="n">Day</span><span class="p">:</span> <span class="n">int32</span>
+<span class="o">----</span>
+<span class="n">Ozone</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">41</span><span class="p">,</span>
+      <span class="mi">36</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">18</span><span class="p">,</span>
+      <span class="mi">20</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Solar</span><span class="o">.</span><span class="n">R</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">190</span><span class="p">,</span>
+      <span class="mi">118</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">131</span><span class="p">,</span>
+      <span class="mi">223</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Wind</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mf">7.4</span><span class="p">,</span>
+      <span class="mi">8</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">8</span><span class="p">,</span>
+      <span class="mf">11.5</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Temp</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">67</span><span class="p">,</span>
+      <span class="mi">72</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">76</span><span class="p">,</span>
+      <span class="mi">68</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Month</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">5</span><span class="p">,</span>
+      <span class="mi">5</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">9</span><span class="p">,</span>
+      <span class="mi">9</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+<span class="n">Day</span><span class="p">:</span>
+  <span class="p">[</span>
+    <span class="p">[</span>
+      <span class="mi">1</span><span class="p">,</span>
+      <span class="mi">2</span><span class="p">,</span>
+      <span class="o">...</span>
+      <span class="mi">29</span><span class="p">,</span>
+      <span class="mi">30</span>
+    <span class="p">]</span>
+  <span class="p">]</span>
+</pre></div>
+</div>
+</div>
+<p>Then, we’ll delete the dataset:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">{</span><span class="s">&quot;drop_dataset&quot;</span><span class="p">,</span>
+<span class="w">                             </span><span class="n">arrow</span><span class="o">::</span><span class="n">Buffer</span><span class="o">::</span><span class="n">FromString</span><span class="p">(</span><span class="s">&quot;airquality.parquet&quot;</span><span class="p">)};</span>
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">ResultStream</span><span class="o">&gt;</span><span class="w"> </span><span class="n">results</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">results</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">DoAction</span><span class="p">(</span><span class="n">action</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Deleted dataset&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id7">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id7" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Deleted</span> <span class="n">dataset</span>
+</pre></div>
+</div>
+</div>
+<p>And confirm that it’s been deleted:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightListing</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listing</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">listing</span><span class="p">,</span><span class="w"> </span><span class="n">client</span><span class="o">-&gt;</span><span class="n">ListFlights</span><span class="p">());</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="nb">true</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flight_info</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">flight_info</span><span class="p">,</span><span class="w"> </span><span class="n">listing</span><span class="o">-&gt;</span><span class="n">Next</span><span class="p">());</span>
+<span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">flight_info</span><span class="p">)</span><span class="w"> </span><span class="k">break</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">descriptor</span><span class="p">().</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;=== Schema ===&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">Schema</span><span class="o">&gt;</span><span class="w"> </span><span class="n">info_schema</span><span class="p">;</span>
+<span class="w">  </span><span class="n">arrow</span><span class="o">::</span><span class="n">ipc</span><span class="o">::</span><span class="n">DictionaryMemo</span><span class="w"> </span><span class="n">dictionary_memo</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">info_schema</span><span class="p">,</span><span class="w"> </span><span class="n">flight_info</span><span class="o">-&gt;</span><span class="n">GetSchema</span><span class="p">(</span><span class="o">&amp;</span><span class="n">dictionary_memo</span><span class="p">));</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">info_schema</span><span class="o">-&gt;</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="w">  </span><span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;==============&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+<span class="p">}</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;End of listing&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id8">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id8" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">End</span> <span class="n">of</span> <span class="n">listing</span>
+</pre></div>
+</div>
+</div>
+<p>Finally, we’ll stop our server:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Shutdown</span><span class="p">());</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Server shut down successfully&quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id9">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id9" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Server</span> <span class="n">shut</span> <span class="n">down</span> <span class="n">successfully</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="setting-grpc-client-options">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Setting gRPC client options</a><a class="headerlink" href="#setting-grpc-client-options" title="Link to this heading">¶</a></h2>
+<p>Options for gRPC clients can be passed in using the <code class="docutils literal notranslate"><span class="pre">generic_options</span></code> field of
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/api/flight.html#_CPPv4N5arrow6flight19FlightClientOptionsE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::flight::FlightClientOptions</span></code></a>. There is a list of available
+client options in the <a class="reference external" href="https://grpc.github.io/grpc/cpp/group__grpc__arg__keys.html">gRPC API documentation</a>.</p>
+<p>For example, you can change the maximum message length sent with:</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">client_options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClientOptions</span><span class="o">::</span><span class="n">Defaults</span><span class="p">();</span>
+<span class="c1">// Set a very low limit at the gRPC layer to fail all calls</span>
+<span class="n">client_options</span><span class="p">.</span><span class="n">generic_options</span><span class="p">.</span><span class="n">emplace_back</span><span class="p">(</span><span class="n">GRPC_ARG_MAX_SEND_MESSAGE_LENGTH</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;localhost&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()));</span>
+
+<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">&gt;</span><span class="w"> </span><span class="n">client</span><span class="p">;</span>
+<span class="c1">// pass client_options into Connect()</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">client</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightClient</span><span class="o">::</span><span class="n">Connect</span><span class="p">(</span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">client_options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Connected to &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="n">ToString</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id10">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id10" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Connected</span> <span class="n">to</span> <span class="n">grpc</span><span class="o">+</span><span class="n">tcp</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span><span class="p">:</span><span class="mi">41083</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="flight-service-with-other-grpc-endpoints">
+<h2><a class="toc-backref" href="#id18" role="doc-backlink">Flight Service with other gRPC endpoints</a><a class="headerlink" href="#flight-service-with-other-grpc-endpoints" title="Link to this heading">¶</a></h2>
+<p>If you are using the gRPC backend, you can add other gRPC endpoints to the
+Flight server. While Flight clients won’t recognize these endpoints, general
+gRPC clients will be able to.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>If statically linking Arrow Flight, Protobuf and gRPC must also be statically
+linked, and the same goes for dynamic linking. Read more at
+<a class="reference external" href="https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking">https://arrow.apache.org/docs/cpp/build_system.html#a-note-on-linking</a></p>
+</div>
+<section id="creating-the-server">
+<h3><a class="toc-backref" href="#id19" role="doc-backlink">Creating the server</a><a class="headerlink" href="#creating-the-server" title="Link to this heading">¶</a></h3>
+<p>To create a gRPC service, first define a service using protobuf.</p>
+<div class="literal-block-wrapper docutils container" id="id11">
+<div class="code-block-caption"><span class="caption-text">Hello world protobuf specification</span><a class="headerlink" href="#id11" title="Link to this code">¶</a></div>
+<div class="highlight-protobuf notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">syntax</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;proto3&quot;</span><span class="p">;</span>
+<span class="linenos"> 2</span>
+<span class="linenos"> 3</span><span class="kd">service</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 4</span><span class="w">  </span><span class="k">rpc</span><span class="w"> </span><span class="n">SayHello</span><span class="p">(</span><span class="n">HelloRequest</span><span class="p">)</span><span class="w"> </span><span class="k">returns</span><span class="w"> </span><span class="p">(</span><span class="n">HelloResponse</span><span class="p">);</span>
+<span class="linenos"> 5</span><span class="p">}</span>
+<span class="linenos"> 6</span>
+<span class="linenos"> 7</span><span class="kd">message</span><span class="w"> </span><span class="nc">HelloRequest</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 8</span><span class="w">  </span><span class="kt">string</span><span class="w"> </span><span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="linenos"> 9</span><span class="p">}</span>
+<span class="linenos">10</span>
+<span class="linenos">11</span><span class="kd">message</span><span class="w"> </span><span class="nc">HelloResponse</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos">12</span><span class="w">  </span><span class="kt">string</span><span class="w"> </span><span class="na">reply</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="linenos">13</span><span class="p">}</span>
+</pre></div>
+</div>
+</div>
+<p>Next, you’ll need to compile that to provide the protobuf and gRPC generated
+files. See gRPC’s <a class="reference external" href="https://grpc.io/docs/languages/cpp/basics/#generating-client-and-server-code">generating client and server code</a>
+docs for details.</p>
+<p>Then write an implementation for the gRPC service:</p>
+<div class="literal-block-wrapper docutils container" id="id12">
+<div class="code-block-caption"><span class="caption-text">Hello world gRPC service implementation</span><a class="headerlink" href="#id12" title="Link to this code">¶</a></div>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="linenos"> 1</span><span class="k">class</span><span class="w"> </span><span class="nc">HelloWorldServiceImpl</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="o">::</span><span class="n">Service</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 2</span><span class="w">  </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="nf">SayHello</span><span class="p">(</span><span class="n">grpc</span><span class="o">::</span><span class="n">ServerContext</span><span class="o">*</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">HelloRequest</span><span class="o">*</span><span class="w"> </span><span class="n">request</span><span class="p">,</span>
+<span class="linenos"> 3</span><span class="w">                        </span><span class="n">HelloResponse</span><span class="o">*</span><span class="w"> </span><span class="n">reply</span><span class="p">)</span><span class="w"> </span><span class="k">override</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 4</span><span class="w">    </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">request</span><span class="o">-&gt;</span><span class="n">name</span><span class="p">();</span>
+<span class="linenos"> 5</span><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">name</span><span class="p">.</span><span class="n">empty</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="linenos"> 6</span><span class="w">      </span><span class="k">return</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="p">(</span><span class="n">grpc</span><span class="o">::</span><span class="n">StatusCode</span><span class="o">::</span><span class="n">INVALID_ARGUMENT</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Must provide a name!&quot;</span><span class="p">);</span>
+<span class="linenos"> 7</span><span class="w">    </span><span class="p">}</span>
+<span class="linenos"> 8</span><span class="w">    </span><span class="n">reply</span><span class="o">-&gt;</span><span class="n">set_reply</span><span class="p">(</span><span class="s">&quot;Hello, &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">name</span><span class="p">);</span>
+<span class="linenos"> 9</span><span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">OK</span><span class="p">;</span>
+<span class="linenos">10</span><span class="w">  </span><span class="p">}</span>
+<span class="linenos">11</span><span class="p">};</span><span class="w">  </span><span class="c1">// end HelloWorldServiceImpl</span>
+</pre></div>
+</div>
+</div>
+<p>Finally, use the <code class="docutils literal notranslate"><span class="pre">builder_hook</span></code> hook on <a class="reference external" href="https://arrow.apache.org/docs/cpp/api/flight.html#_CPPv4N5arrow6flight19FlightServerOptionsE" title="(in Apache Arrow v15.0.1)"><code class="xref cpp cpp-class docutils literal notranslate"><span class="pre">arrow::flight::FlightServerOptions</span></code></a>
+to register the additional gRPC service.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="w"> </span><span class="n">server_location</span><span class="p">;</span>
+<span class="n">ARROW_ASSIGN_OR_RAISE</span><span class="p">(</span><span class="n">server_location</span><span class="p">,</span>
+<span class="w">    </span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">Location</span><span class="o">::</span><span class="n">ForGrpcTcp</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">5000</span><span class="p">));</span>
+
+<span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerOptions</span><span class="w"> </span><span class="nf">options</span><span class="p">(</span><span class="n">server_location</span><span class="p">);</span>
+<span class="k">auto</span><span class="w"> </span><span class="n">server</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">arrow</span><span class="o">::</span><span class="n">flight</span><span class="o">::</span><span class="n">FlightServerBase</span><span class="o">&gt;</span><span class="p">(</span>
+<span class="w">    </span><span class="k">new</span><span class="w"> </span><span class="n">ParquetStorageService</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">move</span><span class="p">(</span><span class="n">root</span><span class="p">)));</span>
+
+<span class="c1">// Create hello world service</span>
+<span class="n">HelloWorldServiceImpl</span><span class="w"> </span><span class="n">grpc_service</span><span class="p">;</span>
+
+<span class="c1">// Use builder_hook to register grpc service</span>
+<span class="n">options</span><span class="p">.</span><span class="n">builder_hook</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="o">&amp;</span><span class="p">](</span><span class="kt">void</span><span class="o">*</span><span class="w"> </span><span class="n">raw_builder</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">auto</span><span class="o">*</span><span class="w"> </span><span class="n">builder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">reinterpret_cast</span><span class="o">&lt;</span><span class="n">grpc</span><span class="o">::</span><span class="n">ServerBuilder</span><span class="o">*&gt;</span><span class="p">(</span><span class="n">raw_builder</span><span class="p">);</span>
+<span class="w">  </span><span class="n">builder</span><span class="o">-&gt;</span><span class="n">RegisterService</span><span class="p">(</span><span class="o">&amp;</span><span class="n">grpc_service</span><span class="p">);</span>
+<span class="p">};</span>
+
+<span class="n">ARROW_RETURN_NOT_OK</span><span class="p">(</span><span class="n">server</span><span class="o">-&gt;</span><span class="n">Init</span><span class="p">(</span><span class="n">options</span><span class="p">));</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">&quot;Listening on port &quot;</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">server</span><span class="o">-&gt;</span><span class="n">port</span><span class="p">()</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id13">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id13" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Listening</span> <span class="n">on</span> <span class="n">port</span> <span class="mi">5000</span>
+</pre></div>
+</div>
+</div>
+</section>
+<section id="creating-the-client">
+<h3><a class="toc-backref" href="#id20" role="doc-backlink">Creating the client</a><a class="headerlink" href="#creating-the-client" title="Link to this heading">¶</a></h3>
+<p>The Flight client implementation doesn’t know about any custom gRPC services,
+so to call them you’ll need to create a normal gRPC client. For the Hello World
+service, we use the HelloWorldService stub, which is provided by the compiled
+gRPC definition.</p>
+<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="k">auto</span><span class="w"> </span><span class="n">client_channel</span><span class="w"> </span><span class="o">=</span>
+<span class="w">    </span><span class="n">grpc</span><span class="o">::</span><span class="n">CreateChannel</span><span class="p">(</span><span class="s">&quot;0.0.0.0:5000&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">grpc</span><span class="o">::</span><span class="n">InsecureChannelCredentials</span><span class="p">());</span>
+
+<span class="k">auto</span><span class="w"> </span><span class="n">stub</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">HelloWorldService</span><span class="o">::</span><span class="n">NewStub</span><span class="p">(</span><span class="n">client_channel</span><span class="p">);</span>
+
+<span class="n">grpc</span><span class="o">::</span><span class="n">ClientContext</span><span class="w"> </span><span class="n">context</span><span class="p">;</span>
+<span class="n">HelloRequest</span><span class="w"> </span><span class="n">request</span><span class="p">;</span>
+<span class="n">request</span><span class="p">.</span><span class="n">set_name</span><span class="p">(</span><span class="s">&quot;Arrow User&quot;</span><span class="p">);</span>
+<span class="n">HelloResponse</span><span class="w"> </span><span class="n">response</span><span class="p">;</span>
+<span class="n">grpc</span><span class="o">::</span><span class="n">Status</span><span class="w"> </span><span class="n">status</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">stub</span><span class="o">-&gt;</span><span class="n">SayHello</span><span class="p">(</span><span class="o">&amp;</span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">request</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">response</span><span class="p">);</span>
+<span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">status</span><span class="p">.</span><span class="n">ok</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">arrow</span><span class="o">::</span><span class="n">Status</span><span class="o">::</span><span class="n">IOError</span><span class="p">(</span><span class="n">status</span><span class="p">.</span><span class="n">error_message</span><span class="p">());</span>
+<span class="p">}</span>
+<span class="n">rout</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">response</span><span class="p">.</span><span class="n">reply</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="literal-block-wrapper docutils container" id="id14">
+<div class="code-block-caption"><span class="caption-text">Code Output</span><a class="headerlink" href="#id14" title="Link to this code">¶</a></div>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Hello</span><span class="p">,</span> <span class="n">Arrow</span> <span class="n">User</span>
+</pre></div>
+</div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#setting-grpc-client-options">Setting gRPC client options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#flight-service-with-other-grpc-endpoints">Flight Service with other gRPC endpoints</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="datasets.html" title="previous chapter">Reading and Writing Datasets</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/genindex.html b/dev/cpp/genindex.html
new file mode 100644
index 0000000..5405d50
--- /dev/null
+++ b/dev/cpp/genindex.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/index.html b/dev/cpp/index.html
new file mode 100644
index 0000000..b950edb
--- /dev/null
+++ b/dev/cpp/index.html
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow C++ Cookbook &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with the C++ Implementation" href="basic.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-c-cookbook">
+<h1>Apache Arrow C++ Cookbook<a class="headerlink" href="#apache-arrow-c-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="basic.html#working-with-status-and-result">Working with Status and Result</a></li>
+<li class="toctree-l2"><a class="reference internal" href="basic.html#using-the-visitor-pattern">Using the Visitor Pattern</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#create-arrays-from-standard-c">Create Arrays from Standard C++</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#generate-random-data-for-a-given-schema">Generate Random Data for a Given Schema</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="datasets.html#read-a-partitioned-dataset">Read a Partitioned Dataset</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#setting-grpc-client-options">Setting gRPC client options</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#flight-service-with-other-grpc-endpoints">Flight Service with other gRPC endpoints</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="basic.html" title="next chapter">Working with the C++ Implementation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/objects.inv b/dev/cpp/objects.inv
new file mode 100644
index 0000000..02133e6
--- /dev/null
+++ b/dev/cpp/objects.inv
Binary files differ
diff --git a/dev/cpp/search.html b/dev/cpp/search.html
new file mode 100644
index 0000000..49ed520
--- /dev/null
+++ b/dev/cpp/search.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow C++ Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="basic.html">Working with the C++ Implementation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="datasets.html">Reading and Writing Datasets</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/cpp/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/cpp/searchindex.js b/dev/cpp/searchindex.js
new file mode 100644
index 0000000..2e78d26
--- /dev/null
+++ b/dev/cpp/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["basic", "create", "datasets", "flight", "index"], "filenames": ["basic.rst", "create.rst", "datasets.rst", "flight.rst", "index.rst"], "titles": ["Working with the C++ Implementation", "Creating Arrow Objects", "Reading and Writing Datasets", "Arrow Flight", "Apache Arrow C++ Cookbook"], "terms": {"thi": [0, 1, 2, 3, 4], "section": [0, 2, 3], "cookbook": 0, "goe": [0, 3], "over": 0, "basic": [0, 2], "concept": 0, "need": [0, 1, 2, 3, 4], "regardless": 0, "how": [0, 2, 4], "you": [0, 1, 2, 3], "intend": 0, "librari": [0, 3], "often": [0, 2], "have": [0, 1, 2], "choos": 0, "between": 0, "throw": 0, "except": 0, "return": [0, 1, 3], "error": 0, "code": [0, 1, 2, 3], "object": [0, 2, 4], "middl": 0, "ground": 0, "make": [0, 1, 2, 3], "clear": 0, "when": [0, 3, 4], "function": [0, 3], "can": [0, 1, 2, 3], "fail": [0, 3], "i": [0, 1, 2, 3, 4], "easier": 0, "than": 0, "integ": 0, "It": 0, "import": 0, "alwai": 0, "check": [0, 1], "valu": [0, 1, 2, 3], "ensur": 0, "oper": 0, "succeed": 0, "howev": 0, "quickli": 0, "becom": [0, 1], "tediou": 0, "everi": 0, "manual": [0, 2], "std": [0, 1, 2, 3], "test_fn": 0, "nullbuild": 0, "builder": [0, 1, 3], "st": 0, "reserv": 0, "2": [0, 1, 3], "ok": [0, 1, 3], "appendnul": 0, "1": [0, 1, 3], "rout": [0, 1, 2, 3], "append": [0, 1], "null": 0, "endl": [0, 1, 2, 3], "output": [0, 1, 2, 3], "invalid": [0, 3], "length": [0, 1, 3], "must": [0, 3], "posit": 0, "The": [0, 1, 2, 3, 4], "macro": 0, "arrow_return_not_ok": [0, 1, 2, 3], "take": [0, 1], "care": 0, "some": [0, 2], "boilerpl": 0, "run": 0, "contain": [0, 1, 2, 3], "express": 0, "If": [0, 3], "failur": 0, "class": [0, 1, 3], "datatyp": [0, 1], "scalar": 0, "arrai": [0, 4], "special": [0, 3], "subclass": [0, 1], "each": 0, "In": 0, "order": [0, 2], "logic": 0, "provid": [0, 2, 3], "inlin": 0, "templat": 0, "allow": [0, 2], "call": [0, 2, 3], "effici": [0, 1], "visittypeinlin": [0, 1], "visitscalarinlin": 0, "visitarrayinlin": 0, "see": [0, 2, 3], "exampl": [0, 1, 3, 4], "given": [0, 4], "schema": [0, 2, 3, 4], "write": [0, 3, 4], "handl": [0, 3], "multipl": 0, "individu": [0, 2], "excess": 0, "verbos": 0, "fortun": 0, "trait": 0, "subset": 0, "below": 0, "demonstr": [0, 2, 4], "tabl": [0, 1, 2, 3], "sum": 0, "ani": [0, 1, 3], "float": 0, "point": 0, "onli": [0, 1], "singl": 0, "leverag": 0, "enable_if_numb": 0, "numer": 0, "tablesumm": 0, "doubl": [0, 1, 2, 3], "partial": [0, 2], "0": [0, 1, 2, 3], "public": [0, 1, 3], "shared_ptr": [0, 1, 2, 3], "recordbatch": [0, 1, 3], "batch": [0, 1, 3], "column": [0, 1, 2], "default": [0, 1, 3], "visit": [0, 1], "const": [0, 1, 2, 3], "notimpl": [0, 1, 3], "tostr": [0, 1, 2, 3], "typenam": 0, "arraytyp": 0, "t": [0, 3], "typeclass": 0, "option": [0, 2, 4], "c_type": 0, "has_valu": 0, "static_cast": 0, "field": [0, 1, 3], "int32": [0, 2, 3], "b": 0, "float64": [0, 1], "int32_t": [0, 1], "num_row": [0, 1, 2, 3], "3": [0, 1], "vector": [0, 1, 2, 3], "int32build": [0, 1], "a_build": 0, "a_val": 0, "appendvalu": [0, 1], "arrow_assign_or_rais": [0, 1, 2, 3], "auto": [0, 1, 2, 3], "a_arr": 0, "finish": [0, 1, 2], "push_back": [0, 1, 3], "doublebuild": [0, 1], "b_builder": 0, "b_val": 0, "4": [0, 1, 3], "5": [0, 1, 3], "6": [0, 1, 2], "b_arr": 0, "summat": 0, "total": 0, "21": 0, "recip": [1, 2, 3, 4], "relat": 1, "creation": 1, "tensor": 1, "all": [1, 2, 3], "other": [1, 2, 4], "entiti": 1, "type": [1, 3], "arraybuild": 1, "easi": 1, "exist": 1, "an": [1, 2, 3], "primit": 1, "arr": 1, "alloc": 1, "insert": 1, "should": 1, "constant": 1, "amort": 1, "time": 1, "also": [1, 2, 3, 4], "consum": 1, "raw": 1, "pointer": 1, "int64build": 1, "long_build": 1, "int64_t": [1, 3], "size": [1, 2, 3], "stringbuild": 1, "str_builder": 1, "string": [1, 2, 3], "strval": 1, "x": 1, "y": 1, "z": 1, "iter": 1, "dbl_builder": 1, "set": [1, 4], "dblval": 1, "begin": [1, 3], "end": [1, 3], "ownership": 1, "copi": 1, "underli": [1, 3], "To": [1, 2, 3], "implement": [1, 3, 4], "visitor": [1, 4], "good": 1, "idea": 1, "follow": [1, 2], "list": [1, 2, 3], "could": [1, 2], "easili": 1, "extend": 1, "us": [1, 2, 3, 4], "pattern": [1, 4], "record": 1, "randombatchgener": 1, "result": [1, 3, 4], "num_rows_": 1, "arrays_": 1, "statu": [1, 3, 4], "doubletyp": 1, "normal_distribut": 1, "d": 1, "mean": 1, "stddev": 1, "gen_": 1, "listtyp": 1, "offset": 1, "first": [1, 2, 3], "which": [1, 2, 3, 4], "determin": [1, 2], "number": [1, 2, 3], "sub": 1, "poisson_distribut": 1, "last_val": 1, "sinc": 1, "children": 1, "ha": 1, "new": [1, 3], "value_gen": 1, "value_typ": 1, "last": 1, "index": [1, 4], "inner_batch": 1, "listarrai": 1, "fromarrai": 1, "get": [1, 3], "protect": 1, "random_devic": 1, "rd_": 1, "mt19937": 1, "test": 1, "support": 1, "n": 1, "consid": 1, "validateful": 1, "correct": 1, "7749457054407385": 1, "0933840401667188": 1, "151061032305716": 1, "2743626615405068": 1, "7": [1, 2, 3], "807288980357406": 1, "7501724590028584": 1, "190815426035369": 1, "712751957042635": 1, "0996700439976563": 1, "932978908317865": 1, "524595732842056": 1, "27851996441237": 1, "939813825113755": 1, "246285518812158": 1, "758513888797805": 1, "715064898757889": 1, "41303825595227": 1, "037590810191184": 1, "897252934113762": 1, "ar": [2, 3], "collect": [2, 4], "one": [2, 3], "more": [2, 3], "file": [2, 3], "tabular": [2, 3], "data": [2, 3, 4], "up": 2, "distribut": 2, "across": 2, "sever": 2, "differ": 2, "directori": 2, "accord": 2, "kind": 2, "scheme": 2, "simplifi": 2, "manag": 2, "inspect": 2, "path": [2, 3], "util": 2, "guarante": 2, "let": 2, "u": 2, "our": [2, 3], "A": 2, "directory_bas": 2, "airquality_basedir": 2, "creat": [2, 4], "filesystem": [2, 3], "arrow": 2, "f": [2, 3], "localfilesystem": [2, 3], "make_shar": [2, 3], "selector": [2, 3], "describ": 2, "part": 2, "perform": [2, 4], "recurs": 2, "search": [2, 4], "base": 2, "typic": 2, "from": [2, 4], "fileselector": [2, 3], "base_dir": [2, 3], "true": [2, 3], "out": 2, "so": [2, 3], "we": [2, 3], "step": 2, "necessari": 2, "fileinfo": [2, 3], "file_info": [2, 3], "getfileinfo": [2, 3], "int": [2, 3], "num_print": 2, "isfil": [2, 3], "substr": 2, "10": 2, "break": [2, 3], "month": [2, 3], "9": [2, 3], "dai": [2, 3], "11": [2, 3], "chunk": 2, "parquet": [2, 4], "19": 2, "23": 2, "18": [2, 3], "26": 2, "28": 2, "27": 2, "kei": [2, 3], "refer": [2, 3], "hive": 2, "within": 2, "now": 2, "go": 2, "ahead": 2, "do": [2, 3], "pick": 2, "format": [2, 3], "onc": [2, 3], "piec": 2, "instanc": 2, "here": 2, "specifi": 2, "ipc": [2, 3], "csv": 2, "custom": [2, 3], "addit": [2, 3], "pars": 2, "parquetfileformat": 2, "factori": 2, "infer": 2, "filenam": 2, "flavor": 2, "case": 2, "altern": 2, "work": [2, 3, 4], "well": [2, 4], "partitioningfactori": 2, "partitioning_factori": 2, "hivepartit": 2, "makefactori": 2, "filesystemfactoryopt": 2, "datasetfactori": 2, "dataset_factori": 2, "filesystemdatasetfactori": 2, "scan": 2, "find": 2, "mai": 2, "metadata": [2, 3], "discov": 2, "ozon": [2, 3], "solar": [2, 3], "r": [2, 3], "wind": [2, 3], "temp": [2, 3], "sometim": 2, "scanner": 2, "snippet": 2, "show": 2, "entir": 2, "memori": 2, "scannerbuild": 2, "scanner_build": 2, "usethread": 2, "There": [2, 3], "varieti": 2, "method": 2, "avail": [2, 3], "totabl": [2, 3], "row": 2, "num_column": 2, "153": 2, "rpc": 3, "dataset": [3, 4], "For": 3, "about": 3, "ll": 3, "store": 3, "upload": 3, "request": 3, "actual": 3, "itself": 3, "simplic": 3, "won": 3, "api": 3, "favor": 3, "just": 3, "directli": 3, "parquetstorageservic": 3, "flightserverbas": 3, "actiontyp": 3, "kactiondropdataset": 3, "drop_dataset": 3, "delet": 3, "explicit": 3, "root": 3, "root_": 3, "move": 3, "listflight": 3, "servercallcontext": 3, "criteria": 3, "unique_ptr": 3, "flightlist": 3, "overrid": 3, "flightinfo": 3, "extens": 3, "continu": 3, "info": 3, "makeflightinfo": 3, "simpleflightlist": 3, "getflightinfo": 3, "flightdescriptor": 3, "descriptor": 3, "fileinfofromdescriptor": 3, "flight_info": 3, "doput": 3, "flightmessageread": 3, "reader": 3, "flightmetadatawrit": 3, "sink": 3, "openoutputstream": 3, "writet": 3, "default_memory_pool": 3, "chunk_siz": 3, "65536": 3, "doget": 3, "ticket": 3, "flightdatastream": 3, "stream": 3, "input": 3, "openinputfil": 3, "fileread": 3, "openfil": 3, "readtabl": 3, "note": 3, "pass": 3, "tablebatchread": 3, "recordbatchstream": 3, "becaus": 3, "keep": 3, "non": 3, "own": 3, "would": 3, "freed": 3, "exit": 3, "batch_read": 3, "torecordbatch": 3, "owning_read": 3, "recordbatchread": 3, "listact": 3, "action": 3, "doaction": 3, "resultstream": 3, "simpleresultstream": 3, "doactiondropdataset": 3, "bodi": 3, "unknown": 3, "privat": 3, "getschema": 3, "base_nam": 3, "flightendpoint": 3, "locat": 3, "forgrpctcp": 3, "localhost": 3, "port": 3, "total_record": 3, "parquet_read": 3, "total_byt": 3, "els": 3, "compon": 3, "deletefil": 3, "start": 3, "createdir": 3, "flight_dataset": 3, "deletedircont": 3, "subtreefilesystem": 3, "server_loc": 3, "flightserveropt": 3, "init": 3, "listen": 3, "37117": 3, "connect": 3, "flightclient": 3, "tcp": 3, "open": 3, "airquality_path": 3, "findtestdatafil": 3, "airqual": 3, "io": 3, "randomaccessfil": 3, "flightstreamwrit": 3, "writer": 3, "flightmetadataread": 3, "metadata_read": 3, "put_stream": 3, "row_group": 3, "num_row_group": 3, "iota": 3, "getrecordbatchread": 3, "while": 3, "next": 3, "writerecordbatch": 3, "close": 3, "wrote": 3, "retriev": 3, "info_schema": 3, "dictionarymemo": 3, "dictionary_memo": 3, "And": 3, "back": 3, "flightstreamread": 3, "prettyprintopt": 3, "print_opt": 3, "indent": 3, "window": 3, "prettyprint": 3, "41": 3, "36": 3, "20": 3, "190": 3, "118": 3, "131": 3, "223": 3, "8": 3, "67": 3, "72": 3, "76": 3, "68": 3, "29": 3, "30": 3, "Then": 3, "buffer": 3, "fromstr": 3, "confirm": 3, "": 3, "been": 3, "final": 3, "stop": 3, "shutdown": 3, "shut": 3, "down": 3, "successfulli": 3, "generic_opt": 3, "flightclientopt": 3, "document": 3, "chang": 3, "maximum": 3, "messag": 3, "sent": 3, "client_opt": 3, "veri": 3, "low": 3, "limit": 3, "layer": 3, "emplace_back": 3, "grpc_arg_max_send_message_length": 3, "41083": 3, "backend": 3, "add": 3, "recogn": 3, "gener": [3, 4], "abl": 3, "static": 3, "link": 3, "protobuf": 3, "same": 3, "dynam": 3, "read": [3, 4], "http": 3, "apach": 3, "org": 3, "doc": 3, "cpp": 3, "build_system": 3, "html": 3, "defin": 3, "hello": 3, "world": 3, "specif": 3, "syntax": 3, "proto3": 3, "helloworldservic": 3, "sayhello": 3, "hellorequest": 3, "hellorespons": 3, "name": 3, "repli": 3, "compil": 3, "detail": 3, "helloworldserviceimpl": 3, "servercontext": 3, "empti": 3, "statuscod": 3, "invalid_argu": 3, "set_repli": 3, "builder_hook": 3, "hook": 3, "regist": 3, "5000": 3, "grpc_servic": 3, "void": 3, "raw_build": 3, "reinterpret_cast": 3, "serverbuild": 3, "registerservic": 3, "doesn": 3, "know": 3, "them": 3, "normal": 3, "stub": 3, "definit": 3, "client_channel": 3, "createchannel": 3, "insecurechannelcredenti": 3, "newstub": 3, "clientcontext": 3, "context": 3, "set_nam": 3, "user": [3, 4], "respons": 3, "ioerror": 3, "error_messag": 3, "solv": 4, "mani": 4, "common": 4, "task": 4, "might": 4, "serv": 4, "robust": 4, "solut": 4, "those": 4, "standard": 4, "random": 4, "partit": 4, "flight": 4, "simpl": 4, "storag": 4, "servic": 4, "grpc": 4, "client": 4, "endpoint": 4, "modul": 4, "page": 4}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"work": 0, "c": [0, 1, 4], "implement": 0, "content": [0, 1, 2, 3, 4], "statu": 0, "result": 0, "us": 0, "visitor": 0, "pattern": 0, "gener": [0, 1], "random": [0, 1], "data": [0, 1], "comput": 0, "across": 0, "arrow": [0, 1, 3, 4], "type": 0, "creat": [1, 3], "object": 1, "arrai": 1, "from": 1, "standard": 1, "given": 1, "schema": 1, "read": 2, "write": 2, "dataset": 2, "partit": 2, "flight": 3, "simpl": 3, "parquet": 3, "storag": 3, "servic": 3, "set": 3, "grpc": 3, "client": 3, "option": 3, "other": 3, "endpoint": 3, "server": 3, "apach": 4, "cookbook": 4, "indic": 4, "tabl": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Working with the C++ Implementation": [[0, "working-with-the-c-implementation"]], "Contents": [[0, "contents"], [1, "contents"], [2, "contents"], [3, "contents"]], "Working with Status and Result": [[0, "working-with-status-and-result"]], "Using the Visitor Pattern": [[0, "using-the-visitor-pattern"]], "Generate Random Data": [[0, "generate-random-data"]], "Generalize Computations Across Arrow Types": [[0, "generalize-computations-across-arrow-types"]], "Creating Arrow Objects": [[1, "creating-arrow-objects"]], "Create Arrays from Standard C++": [[1, "create-arrays-from-standard-c"]], "Generate Random Data for a Given Schema": [[1, "generate-random-data-for-a-given-schema"]], "Reading and Writing Datasets": [[2, "reading-and-writing-datasets"]], "Read a Partitioned Dataset": [[2, "read-a-partitioned-dataset"]], "Arrow Flight": [[3, "arrow-flight"]], "Simple Parquet storage service with Arrow Flight": [[3, "simple-parquet-storage-service-with-arrow-flight"]], "Setting gRPC client options": [[3, "setting-grpc-client-options"]], "Flight Service with other gRPC endpoints": [[3, "flight-service-with-other-grpc-endpoints"]], "Creating the server": [[3, "creating-the-server"]], "Creating the client": [[3, "creating-the-client"]], "Apache Arrow C++ Cookbook": [[4, "apache-arrow-c-cookbook"]], "Contents:": [[4, null]], "Indices and tables": [[4, "indices-and-tables"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/dev/index.html b/dev/index.html
new file mode 100644
index 0000000..7b1c07c
--- /dev/null
+++ b/dev/index.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+
+<html>
+	<head>
+		<title>Apache Arrow Cookbook for Arrow Nightlies version</title>
+		<style>
+			body {
+				color: rgb(51, 51, 51);
+				font-family: sans-serif;
+				line-height: 1.65;
+				padding: 25px;
+				max-width: 900px;
+				margin-left: auto;
+				margin-right: auto;
+			}
+
+			a {
+				color: rgb(0, 91, 129);
+			}
+
+			#logo {
+				width: 50%;
+				margin-left: auto;
+				margin-right: auto;
+			}
+
+			#logo > img {
+				width: 100%;
+			}
+		</style>
+		<!-- Matomo -->
+		<script>
+			var _paq = window._paq = window._paq || [];
+			/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+			/* We explicitly disable cookie tracking to avoid privacy issues */
+			_paq.push(['disableCookies']);
+			_paq.push(['trackPageView']);
+			_paq.push(['enableLinkTracking']);
+			(function() {
+				var u="https://analytics.apache.org/";
+				_paq.push(['setTrackerUrl', u+'matomo.php']);
+				_paq.push(['setSiteId', '20']);
+				var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+				g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+			})();
+		</script>
+		<!-- End Matomo Code -->
+	</head>
+	<body>
+		<div id="logo"><img src="arrow.png"/></div>
+		<h1>Apache Arrow Cookbook for Arrow Nightlies</h1>
+		<p>The cookbook is a collection of Apache Arrow recipes for
+		   the languages and platforms supported by Arrow.<br/>
+		   Most recipes will be common to all platforms, 
+		   but some are specific to the language and environment in use.<br/>
+		   This uses the Apache Arrow nightlies version. Click on the link
+		   if you want to use the latest
+		   <a href="../index.html">stable Apache Arrow Cookbook</a>.
+		</p>
+		<ul>
+			<li><a href="cpp/index.html">C++ Cookbook</a></li>
+			<li><a href="java/index.html">Java Cookbook</a></li>
+			<li><a href="py/index.html">Python Cookbook</a></li>
+			<li><a href="r/index.html">R Cookbook</a></li>
+			<li><a href="https://github.com/apache/arrow-rs/tree/master/arrow/examples">Rust Examples</a></li>
+		</ul>
+		<p>If you are looking for the Apache Arrow Documentation itself
+		   or the API reference, those are available at
+		   <a href="https://arrow.apache.org/docs/">https://arrow.apache.org/docs/</a>
+		</p>
+	</body>
+</html>
diff --git a/dev/java/_sources/avro.rst.txt b/dev/java/_sources/avro.rst.txt
new file mode 100644
index 0000000..146a309
--- /dev/null
+++ b/dev/java/_sources/avro.rst.txt
@@ -0,0 +1,72 @@
+.. 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.
+
+.. _arrow-avro:
+
+====
+Avro
+====
+
+Avro encoded data can be converted into Arrow format.
+
+.. contents::
+
+Avro to Arrow
+=============
+
+The example assumes that the Avro schema is stored separately from the Avro data itself.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.avro.AvroToArrow;
+   import org.apache.arrow.adapter.avro.AvroToArrowConfig;
+   import org.apache.arrow.adapter.avro.AvroToArrowConfigBuilder;
+   import org.apache.arrow.adapter.avro.AvroToArrowVectorIterator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.avro.Schema;
+   import org.apache.avro.io.BinaryDecoder;
+   import org.apache.avro.io.DecoderFactory;
+
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.FileNotFoundException;
+   import java.io.IOException;
+
+   try {
+       BinaryDecoder decoder = new DecoderFactory().binaryDecoder(new FileInputStream("./thirdpartydeps/avro/users.avro"), null);
+       Schema schema = new Schema.Parser().parse(new File("./thirdpartydeps/avro/user.avsc"));
+       try (BufferAllocator allocator = new RootAllocator()) {
+           AvroToArrowConfig config = new AvroToArrowConfigBuilder(allocator).build();
+           try (AvroToArrowVectorIterator avroToArrowVectorIterator = AvroToArrow.avroToArrowIterator(schema, decoder, config)) {
+               while(avroToArrowVectorIterator.hasNext()) {
+                   try (VectorSchemaRoot root = avroToArrowVectorIterator.next()) {
+                       System.out.print(root.contentToTSVString());
+                   }
+               }
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    favorite_number    favorite_color
+   Alyssa    256    null
+   Ben    7    red
diff --git a/dev/java/_sources/create.rst.txt b/dev/java/_sources/create.rst.txt
new file mode 100644
index 0000000..570b0b8
--- /dev/null
+++ b/dev/java/_sources/create.rst.txt
@@ -0,0 +1,234 @@
+.. 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.
+
+.. _arrow-create:
+
+======================
+Creating Arrow Objects
+======================
+
+A vector is the basic unit in the Arrow Java library. Data types
+describe the types of values; ValueVectors are sequences of typed
+values. Vectors represent a one-dimensional sequence of values of
+the same type. They are mutable containers.
+
+Vectors implement the interface `ValueVector`_. The Arrow libraries provide
+implementations of vectors for various data types.
+
+.. contents::
+
+Creating Vectors (arrays)
+=========================
+
+Array of Int
+------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.IntVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVector = new IntVector("intVector", allocator)
+   ) {
+       intVector.allocateNew(3);
+       intVector.set(0, 1);
+       intVector.set(1, 2);
+       intVector.set(2, 3);
+       intVector.setValueCount(3);
+
+       System.out.print(intVector);
+   }
+
+.. testoutput::
+
+   [1, 2, 3]
+
+
+Array of Varchar
+----------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VarCharVector varCharVector = new VarCharVector("varCharVector", allocator);
+   ) {
+       varCharVector.allocateNew(3);
+       varCharVector.set(0, "one".getBytes());
+       varCharVector.set(1, "two".getBytes());
+       varCharVector.set(2, "three".getBytes());
+       varCharVector.setValueCount(3);
+
+       System.out.print(varCharVector);
+   }
+
+.. testoutput::
+
+   [one, two, three]
+
+Dictionary-Encoded Array of Varchar
+-----------------------------------
+
+In some scenarios `dictionary-encoding`_ a column is useful to save memory.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.FieldVector;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.dictionary.Dictionary;
+   import org.apache.arrow.vector.dictionary.DictionaryEncoder;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
+
+   import java.nio.charset.StandardCharsets;
+
+   try (BufferAllocator root = new RootAllocator();
+        VarCharVector countries = new VarCharVector("country-dict", root);
+        VarCharVector appUserCountriesUnencoded = new VarCharVector("app-use-country-dict", root)
+   ) {
+       countries.allocateNew(10);
+       countries.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       countries.set(1, "Cuba".getBytes(StandardCharsets.UTF_8));
+       countries.set(2, "Grecia".getBytes(StandardCharsets.UTF_8));
+       countries.set(3, "Guinea".getBytes(StandardCharsets.UTF_8));
+       countries.set(4, "Islandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(5, "Malta".getBytes(StandardCharsets.UTF_8));
+       countries.set(6, "Tailandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(7, "Uganda".getBytes(StandardCharsets.UTF_8));
+       countries.set(8, "Yemen".getBytes(StandardCharsets.UTF_8));
+       countries.set(9, "Zambia".getBytes(StandardCharsets.UTF_8));
+       countries.setValueCount(10);
+
+       Dictionary countriesDictionary = new Dictionary(countries,
+               new DictionaryEncoding(/*id=*/1L, /*ordered=*/false, /*indexType=*/new ArrowType.Int(8, true)));
+       System.out.println("Dictionary: " + countriesDictionary);
+
+       appUserCountriesUnencoded.allocateNew(5);
+       appUserCountriesUnencoded.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(1, "Guinea".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(2, "Islandia".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(3, "Malta".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(4, "Uganda".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.setValueCount(5);
+       System.out.println("Unencoded data: " + appUserCountriesUnencoded);
+
+       try (FieldVector appUserCountriesDictionaryEncoded = (FieldVector) DictionaryEncoder
+               .encode(appUserCountriesUnencoded, countriesDictionary)) {
+           System.out.println("Dictionary-encoded data: " + appUserCountriesDictionaryEncoded);
+       }
+   }
+
+.. testoutput::
+
+   Dictionary: Dictionary DictionaryEncoding[id=1,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+   Dictionary-encoded data: [0, 3, 4, 5, 7]
+
+Array of List
+-------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.complex.impl.UnionListWriter;
+   import org.apache.arrow.vector.complex.ListVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       ListVector listVector = ListVector.empty("listVector", allocator);
+       UnionListWriter listWriter = listVector.getWriter()
+   ) {
+       int[] data = new int[] { 1, 2, 3, 10, 20, 30, 100, 200, 300, 1000, 2000, 3000 };
+       int tmp_index = 0;
+       for(int i = 0; i < 4; i++) {
+           listWriter.setPosition(i);
+           listWriter.startList();
+           for(int j = 0; j < 3; j++) {
+               listWriter.writeInt(data[tmp_index]);
+               tmp_index = tmp_index + 1;
+           }
+           listWriter.setValueCount(3);
+           listWriter.endList();
+       }
+       listVector.setValueCount(4);
+
+       System.out.print(listVector);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   [[1,2,3], [10,20,30], [100,200,300], [1000,2000,3000]]
+
+
+Slicing
+=======
+
+Slicing provides a way of copying a range of rows between two vectors of the same type.
+
+Slicing IntVector
+-----------------
+
+In this example, we copy a portion of the input IntVector to a new IntVector.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.util.TransferPair;
+
+   try (BufferAllocator allocator = new RootAllocator();
+       IntVector vector = new IntVector("intVector", allocator)) {
+       for (int i = 0; i < 10; i++) {
+           vector.setSafe(i, i);
+        }
+       vector.setValueCount(10);
+
+       TransferPair tp = vector.getTransferPair(allocator);
+       tp.splitAndTransfer(0, 5);
+       try (IntVector sliced = (IntVector) tp.getTo()) {
+           System.out.println(sliced);
+       }
+
+       tp = vector.getTransferPair(allocator);
+       // copy 6 elements from index 2
+       tp.splitAndTransfer(2, 6);
+       try (IntVector sliced = (IntVector) tp.getTo()) {
+           System.out.print(sliced);
+       }
+   }
+
+.. testoutput::
+
+   [0, 1, 2, 3, 4]
+   [2, 3, 4, 5, 6, 7]
+
+.. _`FieldVector`: https://arrow.apache.org/docs/java/reference/org/apache/arrow/vector/FieldVector.html
+.. _`ValueVector`: https://arrow.apache.org/docs/java/vector.html
+.. _`dictionary-encoding`: https://arrow.apache.org/docs/format/Columnar.html#dictionary-encoded-layout
diff --git a/dev/java/_sources/data.rst.txt b/dev/java/_sources/data.rst.txt
new file mode 100644
index 0000000..a8bc386
--- /dev/null
+++ b/dev/java/_sources/data.rst.txt
@@ -0,0 +1,375 @@
+.. 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.
+
+=================
+Data manipulation
+=================
+
+Recipes related to compare, filtering or transforming data.
+
+.. contents::
+
+Concatenate VectorSchemaRoots
+=============================
+
+In some cases, VectorSchemaRoot needs to be modeled as a container. To accomplish
+this, you can use ``VectorSchemaRootAppender.append``. The following code
+creates two roots, then concatenates them together:
+
+.. testcode::
+
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.IntVector;
+    import org.apache.arrow.vector.VectorSchemaRoot;
+    import org.apache.arrow.vector.types.pojo.ArrowType;
+    import org.apache.arrow.vector.types.pojo.Field;
+    import org.apache.arrow.vector.types.pojo.FieldType;
+    import org.apache.arrow.vector.types.pojo.Schema;
+    import org.apache.arrow.vector.util.VectorSchemaRootAppender;
+
+    import static java.util.Arrays.asList;
+
+    Field column_one = new Field("column-one", FieldType.nullable(new ArrowType.Int(32, true)), null);
+    Schema schema = new Schema(asList(column_one));
+    try (
+        BufferAllocator allocator = new RootAllocator();
+        VectorSchemaRoot rootOne = VectorSchemaRoot.create(schema, allocator);
+        VectorSchemaRoot rootTwo = VectorSchemaRoot.create(schema, allocator);
+        VectorSchemaRoot result = VectorSchemaRoot.create(schema, allocator);
+    ) {
+        IntVector appenderOne = (IntVector) rootOne.getVector(0);
+        rootOne.allocateNew();
+        appenderOne.set(0, 100);
+        appenderOne.set(1, 20);
+        rootOne.setRowCount(2);
+        IntVector appenderTwo = (IntVector) rootTwo.getVector(0);
+        rootTwo.allocateNew();
+        appenderTwo.set(0, 34);
+        appenderTwo.set(1, 75);
+        rootTwo.setRowCount(2);
+        result.allocateNew();
+        VectorSchemaRootAppender.append(result, rootOne, rootTwo);
+        System.out.print(result.contentToTSVString());
+    }
+
+.. testoutput::
+
+    column-one
+    100
+    20
+    34
+    75
+
+Concatenate Value Vectors
+=========================
+
+In some cases, we need to concatenate two value vectors into one. To accomplish
+this, we can use `VectorAppender`_. This mutates the initial ValueVector.
+
+.. testcode::
+
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.IntVector;
+    import org.apache.arrow.vector.ValueVector;
+    import org.apache.arrow.vector.util.VectorAppender;
+
+    try (
+        BufferAllocator allocator = new RootAllocator();
+        IntVector initialValues = new IntVector("initialValues", allocator);
+        IntVector toAppend = new IntVector("toAppend", allocator);
+    ) {
+        initialValues.allocateNew(2);
+        initialValues.set(0, 1);
+        initialValues.set(1, 2);
+        initialValues.setValueCount(2);
+        System.out.println("Initial IntVector: " + initialValues);
+        toAppend.allocateNew(4);
+        toAppend.set(1, 4);
+        toAppend.set(3, 6);
+        toAppend.setValueCount(4);
+        System.out.println("IntVector to Append: " + toAppend);
+        VectorAppender appenderUtil = new VectorAppender(initialValues);
+        toAppend.accept(appenderUtil, null);
+        System.out.println("IntVector Result: " + initialValues);
+    }
+
+.. testoutput::
+
+    Initial IntVector: [1, 2]
+    IntVector to Append: [null, 4, null, 6]
+    IntVector Result: [1, 2, null, 4, null, 6]
+
+Compare Vectors for Field Equality
+==================================
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.compare.TypeEqualsVisitor;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector right = new IntVector("int", allocator);
+   ) {
+       right.allocateNew(3);
+       right.set(0, 10);
+       right.set(1, 20);
+       right.set(2, 30);
+       right.setValueCount(3);
+       IntVector left1 = new IntVector("int", allocator);
+       IntVector left2 = new IntVector("int2", allocator);
+       TypeEqualsVisitor visitor = new TypeEqualsVisitor(right);
+
+       System.out.println(visitor.equals(left1));
+       System.out.println(visitor.equals(left2));
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Compare Vectors Equality
+========================
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.compare.VectorEqualsVisitor;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector vector1 = new IntVector("vector1", allocator);
+       IntVector vector2 = new IntVector("vector1", allocator);
+       IntVector vector3 = new IntVector("vector1", allocator)
+   ) {
+       vector1.allocateNew(1);
+       vector1.set(0, 10);
+       vector1.setValueCount(1);
+
+       vector2.allocateNew(1);
+       vector2.set(0, 10);
+       vector2.setValueCount(1);
+
+       vector3.allocateNew(1);
+       vector3.set(0, 20);
+       vector3.setValueCount(1);
+       VectorEqualsVisitor visitor = new VectorEqualsVisitor();
+
+       System.out.println(visitor.vectorEquals(vector1, vector2));
+       System.out.println(visitor.vectorEquals(vector1, vector3));
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Compare Values on the Array
+===========================
+
+Comparing two values at the given indices in the vectors:
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VarCharVector vec = new VarCharVector("valueindexcomparator", allocator);
+   ) {
+       vec.allocateNew(3);
+       vec.setValueCount(3);
+       vec.set(0, "ba".getBytes());
+       vec.set(1, "abc".getBytes());
+       vec.set(2, "aa".getBytes());
+       VectorValueComparator<VarCharVector> valueComparator = DefaultVectorComparators.createDefaultComparator(vec);
+       valueComparator.attachVector(vec);
+
+       System.out.println(valueComparator.compare(0, 1) > 0);
+       System.out.println(valueComparator.compare(1, 2) < 0);
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Consider that if we need our own comparator we could extend VectorValueComparator
+and override compareNotNull method as needed
+
+Search Values on the Array
+==========================
+
+Linear Search - O(n)
+********************
+
+Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#linearSearch - O(n)
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.search.VectorSearcher;
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector linearSearchVector = new IntVector("linearSearchVector", allocator);
+   ) {
+       linearSearchVector.allocateNew(10);
+       linearSearchVector.setValueCount(10);
+       for (int i = 0; i < 10; i++) {
+           linearSearchVector.set(i, i);
+       }
+       VectorValueComparator<IntVector> comparatorInt = DefaultVectorComparators.createDefaultComparator(linearSearchVector);
+       int result = VectorSearcher.linearSearch(linearSearchVector, comparatorInt, linearSearchVector, 3);
+
+       System.out.println(result);
+   }
+
+.. testoutput::
+
+   3
+
+Binary Search - O(log(n))
+*************************
+
+Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#binarySearch - O(log(n))
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.search.VectorSearcher;
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector binarySearchVector = new IntVector("", allocator);
+   ) {
+       binarySearchVector.allocateNew(10);
+       binarySearchVector.setValueCount(10);
+       for (int i = 0; i < 10; i++) {
+           binarySearchVector.set(i, i);
+       }
+       VectorValueComparator<IntVector> comparatorInt = DefaultVectorComparators.createDefaultComparator(binarySearchVector);
+       int result = VectorSearcher.binarySearch(binarySearchVector, comparatorInt, binarySearchVector, 3);
+
+       System.out.println(result);
+   }
+
+.. testoutput::
+
+   3
+
+Sort Values on the Array
+========================
+
+In-place Sorter - O(nlog(n))
+****************************
+
+Sorting by manipulating the original vector.
+Algorithm: org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter - O(nlog(n))
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVectorNotSorted = new IntVector("intvectornotsorted", allocator);
+   ) {
+       intVectorNotSorted.allocateNew(3);
+       intVectorNotSorted.setValueCount(3);
+       intVectorNotSorted.set(0, 10);
+       intVectorNotSorted.set(1, 8);
+       intVectorNotSorted.setNull(2);
+       FixedWidthInPlaceVectorSorter<IntVector> sorter = new FixedWidthInPlaceVectorSorter<IntVector>();
+       VectorValueComparator<IntVector> comparator = DefaultVectorComparators.createDefaultComparator(intVectorNotSorted);
+       sorter.sortInPlace(intVectorNotSorted, comparator);
+
+       System.out.println(intVectorNotSorted);
+   }
+
+.. testoutput::
+
+   [null, 8, 10]
+
+Out-place Sorter - O(nlog(n))
+*****************************
+
+Sorting by copies vector elements to a new vector in sorted order - O(nlog(n))
+Algorithm: : org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter.
+FixedWidthOutOfPlaceVectorSorter & VariableWidthOutOfPlaceVectorSor
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.FixedWidthOutOfPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.OutOfPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVectorNotSorted = new IntVector("intvectornotsorted", allocator);
+       IntVector intVectorSorted = (IntVector) intVectorNotSorted.getField()
+               .getFieldType().createNewSingleVector("new-out-of-place-sorter",
+                       allocator, null);
+
+   ) {
+       intVectorNotSorted.allocateNew(3);
+       intVectorNotSorted.setValueCount(3);
+       intVectorNotSorted.set(0, 10);
+       intVectorNotSorted.set(1, 8);
+       intVectorNotSorted.setNull(2);
+       OutOfPlaceVectorSorter<IntVector> sorterOutOfPlaceSorter = new FixedWidthOutOfPlaceVectorSorter<>();
+       VectorValueComparator<IntVector> comparatorOutOfPlaceSorter = DefaultVectorComparators.createDefaultComparator(intVectorNotSorted);
+       intVectorSorted.allocateNew(intVectorNotSorted.getValueCount());
+       intVectorSorted.setValueCount(intVectorNotSorted.getValueCount());
+       sorterOutOfPlaceSorter.sortOutOfPlace(intVectorNotSorted, intVectorSorted, comparatorOutOfPlaceSorter);
+
+       System.out.println(intVectorSorted);
+   }
+
+.. testoutput::
+
+   [null, 8, 10]
+
+.. _`VectorAppender`: https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/util/VectorAppender.java
diff --git a/dev/java/_sources/dataset.rst.txt b/dev/java/_sources/dataset.rst.txt
new file mode 100644
index 0000000..f7ee556
--- /dev/null
+++ b/dev/java/_sources/dataset.rst.txt
@@ -0,0 +1,536 @@
+.. 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.
+
+.. _arrow-dataset:
+
+=======
+Dataset
+=======
+
+* `Arrow Java Dataset`_: Java implementation of Arrow Datasets library. Implement Dataset Java API by JNI to C++.
+
+.. contents::
+
+Constructing Datasets
+=====================
+
+We can construct a dataset with an auto-inferred schema.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import java.util.stream.StreamSupport;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       System.out.println(StreamSupport.stream(scanner.scan().spliterator(), false).count());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   1
+
+Let construct our dataset with predefined schema.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import java.util.stream.StreamSupport;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish(datasetFactory.inspect());
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       System.out.println(StreamSupport.stream(scanner.scan().spliterator(), false).count());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   1
+
+Getting the Schema
+==================
+
+During Dataset Construction
+***************************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri)
+   ) {
+       Schema schema = datasetFactory.inspect();
+
+       System.out.println(schema);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Schema<id: Int(32, true), name: Utf8>(metadata: {parquet.avro.schema={"type":"record","name":"User","namespace":"org.apache.arrow.dataset","fields":[{"name":"id","type":["int","null"]},{"name":"name","type":["string","null"]}]}, writer.model.name=avro})
+
+From a Dataset
+**************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       Schema schema = scanner.schema();
+
+       System.out.println(schema);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Schema<id: Int(32, true), name: Utf8>(metadata: {parquet.avro.schema={"type":"record","name":"User","namespace":"org.apache.arrow.dataset","fields":[{"name":"id","type":["int","null"]},{"name":"name","type":["string","null"]}]}, writer.model.name=avro})
+
+Query Parquet File
+==================
+
+Let query information for a parquet file.
+
+Query Data Content For File
+***************************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.print(root.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   id    name
+   1    David
+   2    Gladis
+   3    Juan
+
+Let's try to read a Parquet file with gzip compression and 3 row groups:
+
+.. code-block::
+
+   $ parquet-tools meta data4_3rg_gzip.parquet
+
+   file schema: schema
+   age:         OPTIONAL INT64 R:0 D:1
+   name:        OPTIONAL BINARY L:STRING R:0 D:1
+   row group 1: RC:4 TS:182 OFFSET:4
+   row group 2: RC:4 TS:190 OFFSET:420
+   row group 3: RC:3 TS:179 OFFSET:838
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data4_3rg_gzip.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+               System.out.println("Number of rows per batch["+ count++ +"]: " + root.getRowCount());
+               System.out.print(root.contentToTSVString());
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Number of rows per batch[1]: 4
+   age    name
+   10    Jean
+   10    Lu
+   10    Kei
+   10    Sophia
+   Number of rows per batch[2]: 4
+   age    name
+   10    Mara
+   20    Arit
+   20    Neil
+   20    Jason
+   Number of rows per batch[3]: 3
+   age    name
+   20    John
+   20    Peter
+   20    Ismael
+   Total batch size: 11
+
+Query Data Content For Directory
+********************************
+
+Consider that we have these files: data1: 3 rows, data2: 3 rows and data3: 250 rows.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 100);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.println("Batch: " + count++ + ", RowCount: " + root.getRowCount());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Batch: 1, RowCount: 3
+   Batch: 2, RowCount: 3
+   Batch: 3, RowCount: 100
+   Batch: 4, RowCount: 100
+   Batch: 5, RowCount: 50
+   Batch: 6, RowCount: 4
+   Batch: 7, RowCount: 4
+   Batch: 8, RowCount: 3
+
+Query Data Content with Projection
+**********************************
+
+In case we need to project only certain columns we could configure ScanOptions with projections needed.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   String[] projection = new String[] {"name"};
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768, Optional.of(projection));
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.print(root.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name
+   David
+   Gladis
+   Juan
+
+Query Arrow Files
+=================
+
+
+Query Data Content For File
+***************************
+
+Let's read an Arrow file with 3 record batches, each with 3 rows.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   import java.io.IOException;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/arrowfiles/random_access.arrow";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.ARROW_IPC, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.println("Number of rows per batch["+ count++ +"]: " + root.getRowCount());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Number of rows per batch[1]: 3
+   Number of rows per batch[2]: 3
+   Number of rows per batch[3]: 3
+
+Query ORC File
+==============
+
+Query Data Content For File
+***************************
+
+Let's read an ORC file with zlib compression 385 stripes, each with 5000 rows.
+
+.. code-block::
+
+   $ orc-metadata demo-11-zlib.orc | more
+
+   { "name": "demo-11-zlib.orc",
+     "type": "struct<_col0:int,_col1:string,_col2:string,_col3:string,_col4:int,_col5:string,_col6:int,_col7:int,_col8:int>",
+     "stripe count": 385,
+     "compression": "zlib", "compression block": 262144,
+     "stripes": [
+       { "stripe": 0, "rows": 5000,
+         "offset": 3, "length": 1031,
+         "index": 266, "data": 636, "footer": 129
+       },
+   ...
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/orc/data1-zlib.orc";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.ORC, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Total batch size: 1920800
+
+Query CSV File
+==============
+
+Query Data Content For File
+***************************
+
+Let's read a CSV file.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/csv/tech_acquisitions.csv";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.CSV, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+               System.out.print(root.contentToTSVString());
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Acquirer    Acquiree    Amount in billions (USD)    Date of acquisition
+   NVIDIA    Mellanox    6.9    04/05/2020
+   AMD    Xilinx    35.0    27/10/2020
+   Salesforce    Slack    27.7    01/12/2020
+   Total batch size: 3
+
+.. _Arrow Java Dataset: https://arrow.apache.org/docs/dev/java/dataset.html
\ No newline at end of file
diff --git a/dev/java/_sources/flight.rst.txt b/dev/java/_sources/flight.rst.txt
new file mode 100644
index 0000000..6c5c57b
--- /dev/null
+++ b/dev/java/_sources/flight.rst.txt
@@ -0,0 +1,554 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+This section contains a number of recipes for working with Arrow Flight.
+For more detail about Flight please take a look at `Arrow Flight RPC`_.
+
+.. contents::
+
+Simple Key-Value Storage Service with Arrow Flight
+==================================================
+
+We'll implement a service that provides a key-value store for data, using Flight to handle uploads/requests
+and data in memory to store the actual data.
+
+Flight Client and Server
+************************
+
+.. testcode::
+
+   import org.apache.arrow.flight.Action;
+   import org.apache.arrow.flight.AsyncPutListener;
+   import org.apache.arrow.flight.CallStatus;
+   import org.apache.arrow.flight.Criteria;
+   import org.apache.arrow.flight.FlightClient;
+   import org.apache.arrow.flight.FlightDescriptor;
+   import org.apache.arrow.flight.FlightEndpoint;
+   import org.apache.arrow.flight.FlightInfo;
+   import org.apache.arrow.flight.FlightServer;
+   import org.apache.arrow.flight.FlightStream;
+   import org.apache.arrow.flight.Location;
+   import org.apache.arrow.flight.NoOpFlightProducer;
+   import org.apache.arrow.flight.PutResult;
+   import org.apache.arrow.flight.Result;
+   import org.apache.arrow.flight.Ticket;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.util.AutoCloseables;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorLoader;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.VectorUnloader;
+   import org.apache.arrow.vector.ipc.message.ArrowRecordBatch;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   import java.io.IOException;
+   import java.nio.charset.StandardCharsets;
+   import java.util.ArrayList;
+   import java.util.Arrays;
+   import java.util.Collections;
+   import java.util.Iterator;
+   import java.util.List;
+   import java.util.concurrent.ConcurrentHashMap;
+
+   class Dataset implements AutoCloseable {
+       private final List<ArrowRecordBatch> batches;
+       private final Schema schema;
+       private final long rows;
+       public Dataset(List<ArrowRecordBatch> batches, Schema schema, long rows) {
+           this.batches = batches;
+           this.schema = schema;
+           this.rows = rows;
+       }
+       public List<ArrowRecordBatch> getBatches() {
+           return batches;
+       }
+       public Schema getSchema() {
+           return schema;
+       }
+       public long getRows() {
+           return rows;
+       }
+       @Override
+       public void close() throws Exception {
+           AutoCloseables.close(batches);
+       }
+   }
+   class CookbookProducer extends NoOpFlightProducer implements AutoCloseable {
+       private final BufferAllocator allocator;
+       private final Location location;
+       private final ConcurrentMap<FlightDescriptor, Dataset> datasets;
+       public CookbookProducer(BufferAllocator allocator, Location location) {
+           this.allocator = allocator;
+           this.location = location;
+           this.datasets = new ConcurrentHashMap<>();
+       }
+       @Override
+       public Runnable acceptPut(CallContext context, FlightStream flightStream, StreamListener<PutResult> ackStream) {
+           List<ArrowRecordBatch> batches = new ArrayList<>();
+           return () -> {
+               long rows = 0;
+               VectorUnloader unloader;
+               while (flightStream.next()) {
+                   unloader = new VectorUnloader(flightStream.getRoot());
+                   final ArrowRecordBatch arb = unloader.getRecordBatch();
+                   batches.add(arb);
+                   rows += flightStream.getRoot().getRowCount();
+               }
+               Dataset dataset = new Dataset(batches, flightStream.getSchema(), rows);
+               datasets.put(flightStream.getDescriptor(), dataset);
+               ackStream.onCompleted();
+           };
+       }
+
+       @Override
+       public void getStream(CallContext context, Ticket ticket, ServerStreamListener listener) {
+           FlightDescriptor flightDescriptor = FlightDescriptor.path(
+                   new String(ticket.getBytes(), StandardCharsets.UTF_8));
+           Dataset dataset = this.datasets.get(flightDescriptor);
+           if (dataset == null) {
+               throw CallStatus.NOT_FOUND.withDescription("Unknown descriptor").toRuntimeException();
+           }
+           try (VectorSchemaRoot root = VectorSchemaRoot.create(
+                    this.datasets.get(flightDescriptor).getSchema(), allocator)) {
+               VectorLoader loader = new VectorLoader(root);
+               listener.start(root);
+               for (ArrowRecordBatch arrowRecordBatch : this.datasets.get(flightDescriptor).getBatches()) {
+                   loader.load(arrowRecordBatch);
+                   listener.putNext();
+               }
+               listener.completed();
+           }
+       }
+
+       @Override
+       public void doAction(CallContext context, Action action, StreamListener<Result> listener) {
+           FlightDescriptor flightDescriptor = FlightDescriptor.path(
+                   new String(action.getBody(), StandardCharsets.UTF_8));
+           switch (action.getType()) {
+               case "DELETE": {
+                   Dataset removed = datasets.remove(flightDescriptor);
+                   if (removed != null) {
+                       try {
+                           removed.close();
+                       } catch (Exception e) {
+                           listener.onError(CallStatus.INTERNAL
+                               .withDescription(e.toString())
+                               .toRuntimeException());
+                           return;
+                       }
+                       Result result = new Result("Delete completed".getBytes(StandardCharsets.UTF_8));
+                       listener.onNext(result);
+                   } else {
+                       Result result = new Result("Delete not completed. Reason: Key did not exist."
+                               .getBytes(StandardCharsets.UTF_8));
+                       listener.onNext(result);
+                   }
+                   listener.onCompleted();
+               }
+           }
+       }
+
+       @Override
+       public FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor) {
+           FlightEndpoint flightEndpoint = new FlightEndpoint(
+                   new Ticket(descriptor.getPath().get(0).getBytes(StandardCharsets.UTF_8)), location);
+           return new FlightInfo(
+                   datasets.get(descriptor).getSchema(),
+                   descriptor,
+                   Collections.singletonList(flightEndpoint),
+                   /*bytes=*/-1,
+                   datasets.get(descriptor).getRows()
+           );
+       }
+
+       @Override
+       public void listFlights(CallContext context, Criteria criteria, StreamListener<FlightInfo> listener) {
+           datasets.forEach((k, v) -> { listener.onNext(getFlightInfo(null, k)); });
+           listener.onCompleted();
+       }
+
+       @Override
+       public void close() throws Exception {
+           AutoCloseables.close(datasets.values());
+       }
+   }
+   Location location = Location.forGrpcInsecure("0.0.0.0", 33333);
+   try (BufferAllocator allocator = new RootAllocator()){
+       // Server
+       try(final CookbookProducer producer = new CookbookProducer(allocator, location);
+           final FlightServer flightServer = FlightServer.builder(allocator, location, producer).build()) {
+           try {
+               flightServer.start();
+               System.out.println("S1: Server (Location): Listening on port " + flightServer.getPort());
+           } catch (IOException e) {
+               throw new RuntimeException(e);
+           }
+
+           // Client
+           try (FlightClient flightClient = FlightClient.builder(allocator, location).build()) {
+               System.out.println("C1: Client (Location): Connected to " + location.getUri());
+
+               // Populate data
+               Schema schema = new Schema(Arrays.asList(
+                       new Field("name", FieldType.nullable(new ArrowType.Utf8()), null)));
+               try(VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema, allocator);
+                   VarCharVector varCharVector = (VarCharVector) vectorSchemaRoot.getVector("name")) {
+                   varCharVector.allocateNew(3);
+                   varCharVector.set(0, "Ronald".getBytes());
+                   varCharVector.set(1, "David".getBytes());
+                   varCharVector.set(2, "Francisco".getBytes());
+                   vectorSchemaRoot.setRowCount(3);
+                   FlightClient.ClientStreamListener listener = flightClient.startPut(
+                           FlightDescriptor.path("profiles"),
+                           vectorSchemaRoot, new AsyncPutListener());
+                   listener.putNext();
+                   varCharVector.set(0, "Manuel".getBytes());
+                   varCharVector.set(1, "Felipe".getBytes());
+                   varCharVector.set(2, "JJ".getBytes());
+                   vectorSchemaRoot.setRowCount(3);
+                   listener.putNext();
+                   listener.completed();
+                   listener.getResult();
+                   System.out.println("C2: Client (Populate Data): Wrote 2 batches with 3 rows each");
+               }
+
+               // Get metadata information
+               FlightInfo flightInfo = flightClient.getInfo(FlightDescriptor.path("profiles"));
+               System.out.println("C3: Client (Get Metadata): " + flightInfo);
+
+               // Get data information
+               try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
+                   int batch = 0;
+                   try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
+                       System.out.println("C4: Client (Get Stream):");
+                       while (flightStream.next()) {
+                           batch++;
+                           System.out.println("Client Received batch #" + batch + ", Data:");
+                           System.out.print(vectorSchemaRootReceived.contentToTSVString());
+                       }
+                   }
+               } catch (Exception e) {
+                   e.printStackTrace();
+               }
+
+               // Get all metadata information
+               Iterable<FlightInfo> flightInfosBefore = flightClient.listFlights(Criteria.ALL);
+               System.out.print("C5: Client (List Flights Info): ");
+               flightInfosBefore.forEach(t -> System.out.println(t));
+
+               // Do delete action
+               Iterator<Result> deleteActionResult = flightClient.doAction(new Action("DELETE",
+                       FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)));
+               while (deleteActionResult.hasNext()) {
+                   Result result = deleteActionResult.next();
+                   System.out.println("C6: Client (Do Delete Action): " +
+                           new String(result.getBody(), StandardCharsets.UTF_8));
+               }
+
+               // Get all metadata information (to validate detele action)
+               Iterable<FlightInfo> flightInfos = flightClient.listFlights(Criteria.ALL);
+               flightInfos.forEach(t -> System.out.println(t));
+               System.out.println("C7: Client (List Flights Info): After delete - No records");
+
+               // Server shut down
+               flightServer.shutdown();
+               System.out.println("C8: Server shut down successfully");
+           }
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
+   }
+
+.. testoutput::
+
+   S1: Server (Location): Listening on port 33333
+   C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+   C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+   C3: Client (Get Metadata): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none), appMetadata=(none)}], bytes=-1, records=6, ordered=false, appMetadata=(none)}
+   C4: Client (Get Stream):
+   Client Received batch #1, Data:
+   name
+   Ronald
+   David
+   Francisco
+   Client Received batch #2, Data:
+   name
+   Manuel
+   Felipe
+   JJ
+   C5: Client (List Flights Info): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none), appMetadata=(none)}], bytes=-1, records=6, ordered=false, appMetadata=(none)}
+   C6: Client (Do Delete Action): Delete completed
+   C7: Client (List Flights Info): After delete - No records
+   C8: Server shut down successfully
+
+Let explain our code in more detail.
+
+Start Flight Server
+*******************
+
+First, we'll start our server:
+
+.. code-block:: java
+
+   try(FlightServer flightServer = FlightServer.builder(allocator, location,
+           new CookbookProducer(allocator, location)).build()) {
+       try {
+           flightServer.start();
+           System.out.println("S1: Server (Location): Listening on port " + flightServer.getPort());
+       } catch (IOException e) {
+           e.printStackTrace();
+       }
+
+.. code-block:: shell
+
+   S1: Server (Location): Listening on port 33333
+
+Connect to Flight Server
+************************
+
+We can then create a client and connect to the server:
+
+.. code-block:: java
+
+   try (FlightClient flightClient = FlightClient.builder(allocator, location).build()) {
+       System.out.println("C1: Client (Location): Connected to " + location.getUri());
+
+.. code-block:: shell
+
+   C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+
+Put Data
+********
+
+First, we'll create and upload a vector schema root, which will get stored in a
+memory by the server.
+
+.. code-block:: java
+
+   // Server
+   public Runnable acceptPut(CallContext context, FlightStream flightStream, StreamListener<PutResult> ackStream) {
+       List<ArrowRecordBatch> batches = new ArrayList<>();
+       return () -> {
+           long rows = 0;
+           VectorUnloader unloader;
+           while (flightStream.next()) {
+               unloader = new VectorUnloader(flightStream.getRoot());
+               try (final ArrowRecordBatch arb = unloader.getRecordBatch()) {
+                   batches.add(arb);
+                   rows += flightStream.getRoot().getRowCount();
+               }
+           }
+           Dataset dataset = new Dataset(batches, flightStream.getSchema(), rows);
+           datasets.put(flightStream.getDescriptor(), dataset);
+           ackStream.onCompleted();
+       };
+   }
+
+   // Client
+   Schema schema = new Schema(Arrays.asList(
+           new Field("name", FieldType.nullable(new ArrowType.Utf8()), null)));
+   try(VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema, allocator);
+       VarCharVector varCharVector = (VarCharVector) vectorSchemaRoot.getVector("name")) {
+       varCharVector.allocateNew(3);
+       varCharVector.set(0, "Ronald".getBytes());
+       varCharVector.set(1, "David".getBytes());
+       varCharVector.set(2, "Francisco".getBytes());
+       vectorSchemaRoot.setRowCount(3);
+       FlightClient.ClientStreamListener listener = flightClient.startPut(
+               FlightDescriptor.path("profiles"),
+               vectorSchemaRoot, new AsyncPutListener());
+       listener.putNext();
+       varCharVector.set(0, "Manuel".getBytes());
+       varCharVector.set(1, "Felipe".getBytes());
+       varCharVector.set(2, "JJ".getBytes());
+       vectorSchemaRoot.setRowCount(3);
+       listener.putNext();
+       listener.completed();
+       listener.getResult();
+       System.out.println("C2: Client (Populate Data): Wrote 2 batches with 3 rows each");
+   }
+
+.. code-block:: shell
+
+   C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+
+Get Metadata
+************
+
+Once we do so, we can retrieve the metadata for that dataset.
+
+.. code-block:: java
+
+   // Server
+   public FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor) {
+       FlightEndpoint flightEndpoint = new FlightEndpoint(
+               new Ticket(descriptor.getPath().get(0).getBytes(StandardCharsets.UTF_8)), location);
+       return new FlightInfo(
+               datasets.get(descriptor).getSchema(),
+               descriptor,
+               Collections.singletonList(flightEndpoint),
+               /*bytes=*/-1,
+               datasets.get(descriptor).getRows()
+       );
+   }
+
+   // Client
+   FlightInfo flightInfo = flightClient.getInfo(FlightDescriptor.path("profiles"));
+   System.out.println("C3: Client (Get Metadata): " + flightInfo);
+
+.. code-block:: shell
+
+   C3: Client (Get Metadata): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6}
+
+Get Data
+********
+
+And get the data back:
+
+.. code-block:: java
+
+   // Server
+   public void getStream(CallContext context, Ticket ticket, ServerStreamListener listener) {
+       FlightDescriptor flightDescriptor = FlightDescriptor.path(
+               new String(ticket.getBytes(), StandardCharsets.UTF_8));
+       Dataset dataset = this.datasets.get(flightDescriptor);
+       if (dataset == null) {
+           throw CallStatus.NOT_FOUND.withDescription("Unknown descriptor").toRuntimeException();
+       } else {
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(
+                   this.datasets.get(flightDescriptor).getSchema(), allocator);
+           listener.start(vectorSchemaRoot);
+           for (ArrowRecordBatch arrowRecordBatch : this.datasets.get(flightDescriptor).getBatches()) {
+               VectorLoader loader = new VectorLoader(vectorSchemaRoot);
+               loader.load(arrowRecordBatch.cloneWithTransfer(allocator));
+               listener.putNext();
+           }
+           listener.completed();
+       }
+   }
+
+   // Client
+   try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
+       int batch = 0;
+       try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
+           System.out.println("C4: Client (Get Stream):");
+           while (flightStream.next()) {
+               batch++;
+               System.out.println("Client Received batch #" + batch + ", Data:");
+               System.out.print(vectorSchemaRootReceived.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. code-block:: shell
+
+   C4: Client (Get Stream):
+   Client Received batch #1, Data:
+   name
+   Ronald
+   David
+   Francisco
+   Client Received batch #2, Data:
+   name
+   Manuel
+   Felipe
+   JJ
+
+Delete data
+***********
+
+Then, we'll delete the dataset:
+
+.. code-block:: java
+
+   // Server
+   public void doAction(CallContext context, Action action, StreamListener<Result> listener) {
+       FlightDescriptor flightDescriptor = FlightDescriptor.path(
+               new String(action.getBody(), StandardCharsets.UTF_8));
+       switch (action.getType()) {
+           case "DELETE":
+               if (datasets.remove(flightDescriptor) != null) {
+                   Result result = new Result("Delete completed".getBytes(StandardCharsets.UTF_8));
+                   listener.onNext(result);
+               } else {
+                   Result result = new Result("Delete not completed. Reason: Key did not exist."
+                           .getBytes(StandardCharsets.UTF_8));
+                   listener.onNext(result);
+               }
+               listener.onCompleted();
+       }
+   }
+
+   // Client
+   Iterator<Result> deleteActionResult = flightClient.doAction(new Action("DELETE",
+           FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)));
+   while (deleteActionResult.hasNext()) {
+       Result result = deleteActionResult.next();
+       System.out.println("C6: Client (Do Delete Action): " +
+               new String(result.getBody(), StandardCharsets.UTF_8));
+   }
+
+.. code-block:: shell
+
+   C6: Client (Do Delete Action): Delete completed
+
+Validate Delete Data
+********************
+
+And confirm that it's been deleted:
+
+.. code-block:: java
+
+   // Server
+   public void listFlights(CallContext context, Criteria criteria, StreamListener<FlightInfo> listener) {
+       datasets.forEach((k, v) -> { listener.onNext(getFlightInfo(null, k)); });
+       listener.onCompleted();
+   }
+
+   // Client
+   Iterable<FlightInfo> flightInfos = flightClient.listFlights(Criteria.ALL);
+   flightInfos.forEach(t -> System.out.println(t));
+   System.out.println("C7: Client (List Flights Info): After delete - No records");
+
+.. code-block:: shell
+
+   C7: Client (List Flights Info): After delete - No records
+
+Stop Flight Server
+******************
+
+.. code-block:: java
+
+   // Server
+   flightServer.shutdown();
+   System.out.println("C8: Server shut down successfully");
+
+.. code-block:: shell
+
+   C8: Server shut down successfully
+
+_`Arrow Flight RPC`: https://arrow.apache.org/docs/format/Flight.html
diff --git a/dev/java/_sources/index.rst.txt b/dev/java/_sources/index.rst.txt
new file mode 100644
index 0000000..63f94c0
--- /dev/null
+++ b/dev/java/_sources/index.rst.txt
@@ -0,0 +1,52 @@
+.. 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.
+
+.. java arrow documentation master file, created by
+   sphinx-quickstart on Wed Jan 19 08:34:06 2022.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Apache Arrow Java Cookbook
+==========================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate how to solve many common tasks that users might need to perform when working with Arrow data. The examples in this cookbook will also serve as robust and well performing solutions to those tasks.
+
+To get started with Apache Arrow in Java, see the
+`Installation Instructions <https://arrow.apache.org/docs/java/install.html>`_.
+
+This cookbook is tested with Apache Arrow |version|.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   create
+   schema
+   io
+   flight
+   dataset
+   substrait
+   data
+   avro
+   jdbc
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/dev/java/_sources/io.rst.txt b/dev/java/_sources/io.rst.txt
new file mode 100644
index 0000000..74f74d1
--- /dev/null
+++ b/dev/java/_sources/io.rst.txt
@@ -0,0 +1,581 @@
+.. 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.
+
+.. _arrow-io:
+
+========================
+Reading and writing data
+========================
+
+The `Arrow IPC format <https://arrow.apache.org/docs/java/ipc.html>`_ defines two types of binary formats
+for serializing Arrow data: the streaming format and the file format (or random access format). Such files can
+be directly memory-mapped when read.
+
+.. contents::
+
+Writing
+=======
+
+Both writing file and streaming formats use the same API.
+
+Writing Random Access Files
+***************************
+
+Write - Out to File
+-------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import java.io.File;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+
+   try (BufferAllocator allocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, allocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           File file = new File("randon_access_to_file.arrow");
+           try (
+               FileOutputStream fileOutputStream = new FileOutputStream(file);
+               ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, null, fileOutputStream.getChannel())
+           ) {
+               writer.start();
+               writer.writeBatch();
+               writer.end();
+               System.out.println("Record batches written: " + writer.getRecordBlocks().size() + ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Record batches written: 1. Number of rows written: 3
+
+Write - Out to Buffer
+---------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import java.io.ByteArrayOutputStream;
+   import java.io.IOException;
+   import java.nio.channels.Channels;
+
+   try (BufferAllocator allocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, allocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           try (
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+                ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, null, Channels.newChannel(out))
+           ) {
+               writer.start();
+               writer.writeBatch();
+
+               System.out.println("Record batches written: " + writer.getRecordBlocks().size() +
+                       ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Record batches written: 1. Number of rows written: 3
+
+Writing Streaming Format
+************************
+
+Write - Out to File
+-------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.ipc.ArrowStreamWriter;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import java.io.File;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+
+   try (BufferAllocator rootAllocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, rootAllocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           File file = new File("streaming_to_file.arrow");
+           try (
+               FileOutputStream fileOutputStream = new FileOutputStream(file);
+               ArrowStreamWriter writer = new ArrowStreamWriter(vectorSchemaRoot, null, fileOutputStream.getChannel())
+           ){
+               writer.start();
+               writer.writeBatch();
+               System.out.println("Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Number of rows written: 3
+
+Write - Out to Buffer
+---------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.ipc.ArrowStreamWriter;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import java.io.ByteArrayOutputStream;
+   import java.io.IOException;
+   import java.nio.channels.Channels;
+
+   try (BufferAllocator rootAllocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, rootAllocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           try (
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               ArrowStreamWriter writer = new ArrowStreamWriter(vectorSchemaRoot, null, Channels.newChannel(out))
+           ){
+               writer.start();
+               writer.writeBatch();
+               System.out.println("Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Number of rows written: 3
+
+Reading
+=======
+
+Reading the random access format and streaming format both offer the same API,
+with the difference that random access files also offer access to any record batch by index.
+
+Reading Random Access Files
+***************************
+
+Read - From File
+----------------
+
+We are providing a path with auto generated arrow files for testing purposes, change that at your convenience.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.IOException;
+
+   File file = new File("./thirdpartydeps/arrowfiles/random_access.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       FileInputStream fileInputStream = new FileInputStream(file);
+       ArrowFileReader reader = new ArrowFileReader(fileInputStream.getChannel(), rootAllocator)
+   ){
+       System.out.println("Record batches in file: " + reader.getRecordBlocks().size());
+       for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+           reader.loadRecordBatch(arrowBlock);
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Record batches in file: 3
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Read - From Buffer
+------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.SeekableReadChannel;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.util.ByteArrayReadableSeekableByteChannel;
+   import java.io.IOException;
+   import java.nio.file.Files;
+   import java.nio.file.Path;
+   import java.nio.file.Paths;
+
+   Path path = Paths.get("./thirdpartydeps/arrowfiles/random_access.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       ArrowFileReader reader = new ArrowFileReader(new SeekableReadChannel(new ByteArrayReadableSeekableByteChannel(
+                                           Files.readAllBytes(path))), rootAllocator)
+   ) {
+       System.out.println("Record batches in file: " + reader.getRecordBlocks().size());
+       for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+           reader.loadRecordBatch(arrowBlock);
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Record batches in file: 3
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Reading Streaming Format
+************************
+
+Read - From File
+----------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowStreamReader;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.IOException;
+
+   File file = new File("./thirdpartydeps/arrowfiles/streaming.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       FileInputStream fileInputStreamForStream = new FileInputStream(file);
+       ArrowStreamReader reader = new ArrowStreamReader(fileInputStreamForStream, rootAllocator)
+   ) {
+       while (reader.loadNextBatch()) {
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Read - From Buffer
+------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowStreamReader;
+   import java.io.ByteArrayInputStream;
+   import java.io.IOException;
+   import java.nio.file.Files;
+   import java.nio.file.Path;
+   import java.nio.file.Paths;
+
+   Path path = Paths.get("./thirdpartydeps/arrowfiles/streaming.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       ArrowStreamReader reader = new ArrowStreamReader(new ByteArrayInputStream(
+                                       Files.readAllBytes(path)), rootAllocator)
+   ) {
+       while(reader.loadNextBatch()){
+           System.out.print(reader.getVectorSchemaRoot().contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Reading Parquet File
+********************
+
+Please check :doc:`Dataset <./dataset>`
+
+Handling Data with Dictionaries
+*******************************
+
+Reading and writing dictionary-encoded data requires separately tracking the dictionaries.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.FieldVector;
+   import org.apache.arrow.vector.ValueVector;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.dictionary.Dictionary;
+   import org.apache.arrow.vector.dictionary.DictionaryEncoder;
+   import org.apache.arrow.vector.dictionary.DictionaryProvider;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.types.Types;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.FileNotFoundException;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+   import java.nio.charset.StandardCharsets;
+
+   DictionaryEncoding dictionaryEncoding = new DictionaryEncoding(
+           /*id=*/666L, /*ordered=*/false, /*indexType=*/
+           new ArrowType.Int(8, true)
+   );
+   try (BufferAllocator root = new RootAllocator();
+        VarCharVector countries = new VarCharVector("country-dict", root);
+        VarCharVector appUserCountriesUnencoded = new VarCharVector(
+                "app-use-country-dict",
+                new FieldType(true, Types.MinorType.VARCHAR.getType(), dictionaryEncoding),
+                root)
+   ) {
+       countries.allocateNew(10);
+       countries.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       countries.set(1, "Cuba".getBytes(StandardCharsets.UTF_8));
+       countries.set(2, "Grecia".getBytes(StandardCharsets.UTF_8));
+       countries.set(3, "Guinea".getBytes(StandardCharsets.UTF_8));
+       countries.set(4, "Islandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(5, "Malta".getBytes(StandardCharsets.UTF_8));
+       countries.set(6, "Tailandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(7, "Uganda".getBytes(StandardCharsets.UTF_8));
+       countries.set(8, "Yemen".getBytes(StandardCharsets.UTF_8));
+       countries.set(9, "Zambia".getBytes(StandardCharsets.UTF_8));
+       countries.setValueCount(10);
+
+       Dictionary countriesDictionary = new Dictionary(countries, dictionaryEncoding);
+       System.out.println("Dictionary: " + countriesDictionary);
+
+       appUserCountriesUnencoded.allocateNew(5);
+       appUserCountriesUnencoded.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(1, "Guinea".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(2, "Islandia".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(3, "Malta".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(4, "Uganda".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.setValueCount(5);
+       System.out.println("Unencoded data: " + appUserCountriesUnencoded);
+
+       File file = new File("random_access_file_with_dictionary.arrow");
+       DictionaryProvider.MapDictionaryProvider provider = new DictionaryProvider.MapDictionaryProvider();
+       provider.put(countriesDictionary);
+       try (FieldVector appUseCountryDictionaryEncoded = (FieldVector) DictionaryEncoder
+               .encode(appUserCountriesUnencoded, countriesDictionary);
+            VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.of(appUseCountryDictionaryEncoded);
+            FileOutputStream fileOutputStream = new FileOutputStream(file);
+            ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, provider, fileOutputStream.getChannel())
+       ) {
+           System.out.println("Dictionary-encoded data: " +appUseCountryDictionaryEncoded);
+           System.out.println("Dictionary-encoded ID: " +appUseCountryDictionaryEncoded.getField().getDictionary().getId());
+           writer.start();
+           writer.writeBatch();
+           writer.end();
+           System.out.println("Record batches written: " + writer.getRecordBlocks().size() + ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           try(
+               BufferAllocator rootAllocator = new RootAllocator();
+               FileInputStream fileInputStream = new FileInputStream(file);
+               ArrowFileReader reader = new ArrowFileReader(fileInputStream.getChannel(), rootAllocator)
+           ){
+               for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+                   reader.loadRecordBatch(arrowBlock);
+                   FieldVector appUseCountryDictionaryEncodedRead = reader.getVectorSchemaRoot().getVector("app-use-country-dict");
+                   DictionaryEncoding dictionaryEncodingRead = appUseCountryDictionaryEncodedRead.getField().getDictionary();
+                   System.out.println("Dictionary-encoded ID recovered: " + dictionaryEncodingRead.getId());
+                   Dictionary appUseCountryDictionaryRead = reader.getDictionaryVectors().get(dictionaryEncodingRead.getId());
+                   System.out.println("Dictionary-encoded data recovered: " + appUseCountryDictionaryEncodedRead);
+                   System.out.println("Dictionary recovered: " + appUseCountryDictionaryRead);
+                   try (ValueVector readVector = DictionaryEncoder.decode(appUseCountryDictionaryEncodedRead, appUseCountryDictionaryRead)) {
+                       System.out.println("Decoded data: " + readVector);
+                   }
+               }
+           }
+       } catch (FileNotFoundException e) {
+           e.printStackTrace();
+       } catch (IOException e) {
+           e.printStackTrace();
+       }
+   }
+
+.. testoutput::
+
+   Dictionary: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+   Dictionary-encoded data: [0, 3, 4, 5, 7]
+   Dictionary-encoded ID: 666
+   Record batches written: 1. Number of rows written: 5
+   Dictionary-encoded ID recovered: 666
+   Dictionary-encoded data recovered: [0, 3, 4, 5, 7]
+   Dictionary recovered: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Decoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
diff --git a/dev/java/_sources/jdbc.rst.txt b/dev/java/_sources/jdbc.rst.txt
new file mode 100644
index 0000000..78f78f2
--- /dev/null
+++ b/dev/java/_sources/jdbc.rst.txt
@@ -0,0 +1,309 @@
+.. 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.
+
+.. _arrow-jdbc:
+
+==================
+Arrow JDBC Adapter
+==================
+
+The `Arrow Java JDBC module <https://arrow.apache.org/docs/java/jdbc.html>`_
+converts JDBC ResultSets into Arrow VectorSchemaRoots.
+
+.. contents::
+
+ResultSet to VectorSchemaRoot Conversion
+========================================
+
+The main class to help us to convert ResultSet to VectorSchemaRoot is
+`JdbcToArrow <https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrow.html>`_
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, allocator)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5
+   101    true    1000000000300
+   102    true    100000000030
+   103    true    10000000003
+
+Configuring Array subtypes
+==========================
+
+JdbcToArrow accepts configuration through `JdbcToArrowConfig
+<https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrowConfig.html>`_.
+For example, the type of the elements of array columns can be specified by
+``setArraySubTypeByColumnNameMap``.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300    some char text      [1,2,3]
+   102    true    100000000030    some char text      [1,2]
+   103    true    10000000003    some char text      [1]
+
+Configuring batch size
+======================
+
+By default, the adapter will read up to 1024 rows in a batch. This
+can be customized via ``setTargetBatchSize``.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setTargetBatchSize(2)
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300    some char text      [1,2,3]
+   102    true    100000000030    some char text      [1,2]
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   103    true    10000000003    some char text      [1]
+
+Configuring numeric (decimal) precision and scale
+=================================================
+
+By default, the scale of any decimal values must exactly match the defined
+scale of the Arrow type of the column, or else an UnsupportedOperationException
+will be thrown with a message like ``BigDecimal scale must equal that in the Arrow
+vector``.
+
+This can happen because Arrow infers the type from the ResultSet metadata, which
+is not accurate for all database drivers. The JDBC adapter lets you avoid this
+by either overriding the decimal scale, or by providing a RoundingMode via
+``setBigDecimalRoundingMode`` to convert values to the expected scale.
+
+In this example, we have a BigInt column. By default, the inferred scale
+is 0. We override the scale to 7 and then set a RoundingMode to convert
+values to the given scale.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.math.RoundingMode;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setTargetBatchSize(2)
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .setExplicitTypesByColumnName(
+                       new HashMap<>() {{
+                           put("BIGINT_FIELD5",
+                                   new JdbcFieldInfo(Types.DECIMAL, 20, 7));
+                       }}
+               )
+               .setBigDecimalRoundingMode(RoundingMode.UNNECESSARY)
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300.0000000    some char text      [1,2,3]
+   102    true    100000000030.0000000    some char text      [1,2]
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   103    true    10000000003.0000000    some char text      [1]
diff --git a/dev/java/_sources/schema.rst.txt b/dev/java/_sources/schema.rst.txt
new file mode 100644
index 0000000..f5c33f3
--- /dev/null
+++ b/dev/java/_sources/schema.rst.txt
@@ -0,0 +1,245 @@
+.. 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.
+
+===================
+Working with Schema
+===================
+
+Let's start talking about tabular data. Data often comes in the form of two-dimensional
+sets of heterogeneous data (such as database tables, CSV files...). Arrow provides
+several abstractions to handle such data conveniently and efficiently.
+
+.. contents::
+
+Creating Fields
+===============
+
+Fields are used to denote the particular columns of tabular data.
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   System.out.print(name);
+
+.. testoutput::
+
+   name: Utf8
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   System.out.print(age);
+
+.. testoutput::
+
+   age: Int(32, true)
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+
+   System.out.print(points);
+
+.. testoutput::
+
+   points: List<intCol: Int(32, true)>
+
+Creating the Schema
+===================
+
+A schema describes a sequence of columns in tabular data, and consists
+of a list of fields.
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.List;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), /*dictionary=*/null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), /*dictionary=*/null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Schema schemaPerson = new Schema(asList(name, document, age, points));
+
+   System.out.print(schemaPerson);
+
+.. testoutput::
+
+   Schema<name: Utf8, document: Utf8, age: Int(32, true), points: List<intCol: Int(32, true)>>
+
+Adding Metadata to Fields and Schemas
+=====================================
+
+In case we need to add metadata to our Field we could use:
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Map<String, String> metadata = new HashMap<>();
+   metadata.put("A", "Id card");
+   metadata.put("B", "Passport");
+   metadata.put("C", "Visa");
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null, metadata), null);
+
+   System.out.print(document.getMetadata());
+
+.. testoutput::
+
+   {A=Id card, B=Passport, C=Visa}
+
+In case we need to add metadata to our Schema we could use:
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.HashMap;
+   import java.util.List;
+   import java.util.Map;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), /*dictionary=*/null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), /*dictionary=*/null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Map<String, String> metadataSchema = new HashMap<>();
+   metadataSchema.put("Key-1", "Value-1");
+   Schema schemaPerson = new Schema(asList(name, document, age, points), metadataSchema);
+
+   System.out.print(schemaPerson);
+
+.. testoutput::
+
+   Schema<name: Utf8, document: Utf8, age: Int(32, true), points: List<intCol: Int(32, true)>>(metadata: {Key-1=Value-1})
+
+Creating VectorSchemaRoot
+=========================
+
+``VectorSchemaRoot`` is somewhat analogous to tables and record batches in the
+other Arrow implementations in that they all are 2D datasets, but the usage is different.
+
+Let's populate a ``VectorSchemaRoot`` with a small batch of records:
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.complex.ListVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.complex.impl.UnionListWriter;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.List;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Schema schema = new Schema(asList(name, age, points));
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VectorSchemaRoot root = VectorSchemaRoot.create(schema, allocator)
+   ){
+       VarCharVector nameVector = (VarCharVector) root.getVector("name");
+       nameVector.allocateNew(3);
+       nameVector.set(0, "David".getBytes());
+       nameVector.set(1, "Gladis".getBytes());
+       nameVector.set(2, "Juan".getBytes());
+       nameVector.setValueCount(3);
+       IntVector ageVector = (IntVector) root.getVector("age");
+       ageVector.allocateNew(3);
+       ageVector.set(0, 10);
+       ageVector.set(1, 20);
+       ageVector.set(2, 30);
+       ageVector.setValueCount(3);
+       ListVector listVector = (ListVector) root.getVector("points");
+       UnionListWriter listWriter = listVector.getWriter();
+       int[] data = new int[] { 4, 8, 12, 10, 20, 30, 5, 10, 15 };
+       int tmp_index = 0;
+       for(int i = 0; i < 3; i++) {
+           listWriter.setPosition(i);
+           listWriter.startList();
+           for(int j = 0; j < 3; j++) {
+               listWriter.writeInt(data[tmp_index]);
+               tmp_index = tmp_index + 1;
+           }
+           listWriter.setValueCount(2);
+           listWriter.endList();
+       }
+       listVector.setValueCount(3);
+       root.setRowCount(3);
+
+       System.out.print(root.contentToTSVString());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age    points
+   David    10    [4,8,12]
+   Gladis    20    [10,20,30]
+   Juan    30    [5,10,15]
\ No newline at end of file
diff --git a/dev/java/_sources/substrait.rst.txt b/dev/java/_sources/substrait.rst.txt
new file mode 100644
index 0000000..8fd9d4f
--- /dev/null
+++ b/dev/java/_sources/substrait.rst.txt
@@ -0,0 +1,381 @@
+.. 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.
+
+.. _arrow-substrait:
+
+=========
+Substrait
+=========
+
+Arrow can use `Substrait`_ to integrate with other languages.
+
+.. contents::
+
+The Substrait support in Arrow combines :doc:`Dataset <dataset>` and
+`substrait-java`_ to query datasets using `Acero`_ as a backend.
+
+Acero currently supports:
+
+- Reading Arrow, CSV, ORC, and Parquet files
+- Filters
+- Projections
+- Joins
+- Aggregates
+
+Querying Datasets
+=================
+
+Here is an example of a Java program that queries a Parquet file:
+
+.. testcode::
+
+    import io.substrait.isthmus.SqlToSubstrait;
+    import io.substrait.proto.Plan;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.dataset.substrait.AceroSubstraitConsumer;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    import java.nio.ByteBuffer;
+    import java.util.HashMap;
+    import java.util.Map;
+
+    Plan queryTableNation() throws SqlParseException {
+       String sql = "SELECT * FROM NATION WHERE N_NATIONKEY = 17";
+       String nation = "CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, N_NAME CHAR(25), " +
+               "N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))";
+       SqlToSubstrait sqlToSubstrait = new SqlToSubstrait();
+       Plan plan = sqlToSubstrait.execute(sql, Collections.singletonList(nation));
+       return plan;
+    }
+
+    void queryDatasetThruSubstraitPlanDefinition() {
+       String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+       ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+       try (
+           BufferAllocator allocator = new RootAllocator();
+           DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(),
+                   FileFormat.PARQUET, uri);
+           Dataset dataset = datasetFactory.finish();
+           Scanner scanner = dataset.newScan(options);
+           ArrowReader reader = scanner.scanBatches()
+       ) {
+           Map<String, ArrowReader> mapTableToArrowReader = new HashMap<>();
+           mapTableToArrowReader.put("NATION", reader);
+           // get binary plan
+           Plan plan = queryTableNation();
+           ByteBuffer substraitPlan = ByteBuffer.allocateDirect(plan.toByteArray().length);
+           substraitPlan.put(plan.toByteArray());
+           // run query
+           try (ArrowReader arrowReader = new AceroSubstraitConsumer(allocator).runQuery(
+               substraitPlan,
+               mapTableToArrowReader
+           )) {
+               while (arrowReader.loadNextBatch()) {
+                   System.out.print(arrowReader.getVectorSchemaRoot().contentToTSVString());
+               }
+           }
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
+    }
+
+    queryDatasetThruSubstraitPlanDefinition();
+
+.. testoutput::
+
+    N_NATIONKEY    N_NAME    N_REGIONKEY    N_COMMENT
+    17    PERU    1    platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+
+It is also possible to query multiple datasets and join them based on some criteria.
+For example, we can join the nation and customer tables from the TPC-H benchmark:
+
+.. testcode::
+
+    import io.substrait.isthmus.SqlToSubstrait;
+    import io.substrait.proto.Plan;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.dataset.substrait.AceroSubstraitConsumer;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    import java.nio.ByteBuffer;
+    import java.util.Arrays;
+    import java.util.HashMap;
+    import java.util.Map;
+
+    Plan queryTableNationJoinCustomer() throws SqlParseException {
+        String sql = "SELECT n.n_name, COUNT(*) AS NUMBER_CUSTOMER FROM NATION n JOIN CUSTOMER c " +
+            "ON n.n_nationkey = c.c_nationkey WHERE n.n_nationkey = 17 " +
+            "GROUP BY n.n_name";
+        String nation = "CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, " +
+            "N_NAME CHAR(25), N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))";
+        String customer = "CREATE TABLE CUSTOMER (C_CUSTKEY BIGINT NOT NULL, " +
+            "C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY BIGINT NOT NULL, " +
+            "C_PHONE CHAR(15), C_ACCTBAL DECIMAL, C_MKTSEGMENT CHAR(10), " +
+            "C_COMMENT VARCHAR(117) )";
+        SqlToSubstrait sqlToSubstrait = new SqlToSubstrait();
+        Plan plan = sqlToSubstrait.execute(sql,
+            Arrays.asList(nation, customer));
+        return plan;
+    }
+
+    void queryTwoDatasetsThruSubstraitPlanDefinition() {
+        String uriNation = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+        String uriCustomer = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/customer.parquet";
+        ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+        try (
+            BufferAllocator allocator = new RootAllocator();
+            DatasetFactory datasetFactory = new FileSystemDatasetFactory(
+                allocator, NativeMemoryPool.getDefault(),
+                FileFormat.PARQUET, uriNation);
+            Dataset dataset = datasetFactory.finish();
+            Scanner scanner = dataset.newScan(options);
+            ArrowReader readerNation = scanner.scanBatches();
+            DatasetFactory datasetFactoryCustomer = new FileSystemDatasetFactory(
+                allocator, NativeMemoryPool.getDefault(),
+                FileFormat.PARQUET, uriCustomer);
+            Dataset datasetCustomer = datasetFactoryCustomer.finish();
+            Scanner scannerCustomer = datasetCustomer.newScan(options);
+            ArrowReader readerCustomer = scannerCustomer.scanBatches()
+        ) {
+            // map table to reader
+            Map<String, ArrowReader> mapTableToArrowReader = new HashMap<>();
+            mapTableToArrowReader.put("NATION", readerNation);
+            mapTableToArrowReader.put("CUSTOMER", readerCustomer);
+            // get binary plan
+            Plan plan = queryTableNationJoinCustomer();
+            ByteBuffer substraitPlan = ByteBuffer.allocateDirect(
+                plan.toByteArray().length);
+            substraitPlan.put(plan.toByteArray());
+            // run query
+            try (ArrowReader arrowReader = new AceroSubstraitConsumer(
+                allocator).runQuery(
+                substraitPlan,
+                mapTableToArrowReader
+            )) {
+                while (arrowReader.loadNextBatch()) {
+                    System.out.print(arrowReader.getVectorSchemaRoot().contentToTSVString());
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    queryTwoDatasetsThruSubstraitPlanDefinition();
+
+.. testoutput::
+
+    N_NAME    NUMBER_CUSTOMER
+    PERU    573
+
+Filtering and Projecting Datasets
+=================================
+
+Arrow Dataset supports filters and projections with Substrait’s
+`Extended Expression`_. The substrait-java library is required to construct
+these expressions.
+
+Filtering a Dataset
+-------------------
+
+Here is an example of a Java program that filters a Parquet file:
+
+- Loads a Parquet file containing the “nation” table from the TPC-H benchmark.
+- Applies a filter:
+    - ``N_NATIONKEY > 10, AND``
+    - ``N_NATIONKEY < 15```
+
+.. testcode::
+
+    import io.substrait.isthmus.SqlExpressionToSubstrait;
+    import io.substrait.proto.ExtendedExpression;
+    import java.nio.ByteBuffer;
+    import java.util.Optional;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    ByteBuffer getFilterExpression() throws SqlParseException {
+      String sqlExpression = "N_NATIONKEY > 10 AND N_NATIONKEY < 15";
+      String nation =
+          "CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), "
+              + "N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)";
+      SqlExpressionToSubstrait expressionToSubstrait = new SqlExpressionToSubstrait();
+      ExtendedExpression expression =
+          expressionToSubstrait.convert(sqlExpression, Collections.singletonList(nation));
+      byte[] expressionToByte = expression.toByteArray();
+      ByteBuffer byteBuffer = ByteBuffer.allocateDirect(expressionToByte.length);
+      byteBuffer.put(expressionToByte);
+      return byteBuffer;
+    }
+
+    void filterDataset() throws SqlParseException {
+      String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+      ScanOptions options =
+          new ScanOptions.Builder(/*batchSize*/ 32768)
+              .columns(Optional.empty())
+              .substraitFilter(getFilterExpression())
+              .build();
+      try (BufferAllocator allocator = new RootAllocator();
+          DatasetFactory datasetFactory =
+              new FileSystemDatasetFactory(
+                  allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+          Dataset dataset = datasetFactory.finish();
+          Scanner scanner = dataset.newScan(options);
+          ArrowReader reader = scanner.scanBatches()) {
+        while (reader.loadNextBatch()) {
+          System.out.print(reader.getVectorSchemaRoot().contentToTSVString());
+        }
+      } catch (Exception e) {
+        throw new RuntimeException(e);
+      }
+    }
+
+    filterDataset();
+
+.. testoutput::
+
+    n_nationkey    n_name    n_regionkey    n_comment
+    11    IRAQ    4    nic deposits boost atop the quickly final requests? quickly regula
+    12    JAPAN    2    ously. final, express gifts cajole a
+    13    JORDAN    4    ic deposits are blithely about the carefully regular pa
+    14    KENYA    0     pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+
+Projecting a Dataset
+--------------------
+
+The following Java program projects new columns after applying a filter to
+a Parquet file:
+
+- Loads a Parquet file containing the “nation” table from the TPC-H benchmark.
+- Applies a filter:
+ - ``N_NATIONKEY > 10, AND``
+ - ``N_NATIONKEY < 15``
+- Projects three new columns:
+ - ``N_NAME``
+ - ``N_NATIONKEY > 12``
+ - ``N_NATIONKEY + 31``
+
+.. testcode::
+
+    import io.substrait.isthmus.SqlExpressionToSubstrait;
+    import io.substrait.proto.ExtendedExpression;
+    import java.nio.ByteBuffer;
+    import java.util.Optional;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    ByteBuffer getProjectExpression() throws SqlParseException {
+      String[] sqlExpression = new String[]{"N_NAME", "N_NATIONKEY > 12", "N_NATIONKEY + 31"};
+      String nation =
+          "CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), "
+              + "N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)";
+      SqlExpressionToSubstrait expressionToSubstrait = new SqlExpressionToSubstrait();
+      ExtendedExpression expression =
+          expressionToSubstrait.convert(sqlExpression, Collections.singletonList(nation));
+      byte[] expressionToByte = expression.toByteArray();
+      ByteBuffer byteBuffer = ByteBuffer.allocateDirect(expressionToByte.length);
+      byteBuffer.put(expressionToByte);
+      return byteBuffer;
+    }
+
+    ByteBuffer getFilterExpression() throws SqlParseException {
+      String sqlExpression = "N_NATIONKEY > 10 AND N_NATIONKEY < 15";
+      String nation =
+          "CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), "
+              + "N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)";
+      SqlExpressionToSubstrait expressionToSubstrait = new SqlExpressionToSubstrait();
+      ExtendedExpression expression =
+          expressionToSubstrait.convert(sqlExpression, Collections.singletonList(nation));
+      byte[] expressionToByte = expression.toByteArray();
+      ByteBuffer byteBuffer = ByteBuffer.allocateDirect(expressionToByte.length);
+      byteBuffer.put(expressionToByte);
+      return byteBuffer;
+    }
+
+    void filterAndProjectDataset() throws SqlParseException {
+      String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+      ScanOptions options =
+          new ScanOptions.Builder(/*batchSize*/ 32768)
+              .columns(Optional.empty())
+              .substraitFilter(getFilterExpression())
+              .substraitProjection(getProjectExpression())
+              .build();
+      try (BufferAllocator allocator = new RootAllocator();
+          DatasetFactory datasetFactory =
+              new FileSystemDatasetFactory(
+                  allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+          Dataset dataset = datasetFactory.finish();
+          Scanner scanner = dataset.newScan(options);
+          ArrowReader reader = scanner.scanBatches()) {
+        while (reader.loadNextBatch()) {
+          System.out.print(reader.getVectorSchemaRoot().contentToTSVString());
+        }
+      } catch (Exception e) {
+        throw new RuntimeException(e);
+      }
+    }
+
+    filterAndProjectDataset();
+
+.. testoutput::
+
+    column-1    column-2    column-3
+    IRAQ    false    42
+    JAPAN    false    43
+    JORDAN    true    44
+    KENYA    true    45
+
+.. _`Substrait`: https://substrait.io/
+.. _`substrait-java`: https://github.com/substrait-io/substrait-java
+.. _`Acero`: https://arrow.apache.org/docs/cpp/streaming_execution.html
+.. _`Extended Expression`: https://github.com/substrait-io/substrait/blob/main/site/docs/expressions/extended_expression.md
diff --git a/dev/java/_static/alabaster.css b/dev/java/_static/alabaster.css
new file mode 100644
index 0000000..d377d9c
--- /dev/null
+++ b/dev/java/_static/alabaster.css
@@ -0,0 +1,708 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar {
+    max-height: 100%;
+    overflow-y: auto;
+}
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 160px;
+}
+
+div.sphinxsidebar .search > div {
+    display: table-cell;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Hide ugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/dev/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/dev/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/dev/java/_static/basic.css b/dev/java/_static/basic.css
new file mode 100644
index 0000000..4157edf
--- /dev/null
+++ b/dev/java/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: inherit;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/java/_static/custom.css b/dev/java/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/dev/java/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/dev/java/_static/doctools.js b/dev/java/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/dev/java/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/dev/java/_static/documentation_options.js b/dev/java/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/dev/java/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/dev/java/_static/favicon.ico b/dev/java/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/dev/java/_static/favicon.ico
Binary files differ
diff --git a/dev/java/_static/file.png b/dev/java/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/dev/java/_static/file.png
Binary files differ
diff --git a/dev/java/_static/language_data.js b/dev/java/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/dev/java/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/dev/java/_static/minus.png b/dev/java/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/dev/java/_static/minus.png
Binary files differ
diff --git a/dev/java/_static/plus.png b/dev/java/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/dev/java/_static/plus.png
Binary files differ
diff --git a/dev/java/_static/pygments.css b/dev/java/_static/pygments.css
new file mode 100644
index 0000000..04a4174
--- /dev/null
+++ b/dev/java/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/dev/java/_static/searchtools.js b/dev/java/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/dev/java/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/dev/java/_static/sphinx_highlight.js b/dev/java/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/dev/java/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/dev/java/avro.html b/dev/java/avro.html
new file mode 100644
index 0000000..dc65686
--- /dev/null
+++ b/dev/java/avro.html
@@ -0,0 +1,213 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Avro &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow JDBC Adapter" href="jdbc.html" />
+    <link rel="prev" title="Data manipulation" href="data.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="avro">
+<span id="arrow-avro"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Avro</a><a class="headerlink" href="#avro" title="Link to this heading">¶</a></h1>
+<p>Avro encoded data can be converted into Arrow format.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#avro" id="id1">Avro</a></p>
+<ul>
+<li><p><a class="reference internal" href="#avro-to-arrow" id="id2">Avro to Arrow</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="avro-to-arrow">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Avro to Arrow</a><a class="headerlink" href="#avro-to-arrow" title="Link to this heading">¶</a></h2>
+<p>The example assumes that the Avro schema is stored separately from the Avro data itself.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.avro.AvroToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.avro.AvroToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.avro.AvroToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.avro.AvroToArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.io.BinaryDecoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.io.DecoderFactory</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileNotFoundException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">BinaryDecoder</span><span class="w"> </span><span class="n">decoder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DecoderFactory</span><span class="p">().</span><span class="na">binaryDecoder</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/avro/users.avro&quot;</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">.</span><span class="na">Parser</span><span class="p">().</span><span class="na">parse</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/avro/user.avsc&quot;</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AvroToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AvroToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">).</span><span class="na">build</span><span class="p">();</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">AvroToArrowVectorIterator</span><span class="w"> </span><span class="n">avroToArrowVectorIterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AvroToArrow</span><span class="p">.</span><span class="na">avroToArrowIterator</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">decoder</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">while</span><span class="p">(</span><span class="n">avroToArrowVectorIterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">avroToArrowVectorIterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    favorite_number    favorite_color
+Alyssa    256    null
+Ben    7    red
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Avro</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#avro-to-arrow">Avro to Arrow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="data.html" title="previous chapter">Data manipulation</a></li>
+      <li>Next: <a href="jdbc.html" title="next chapter">Arrow JDBC Adapter</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/avro.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/create.html b/dev/java/create.html
new file mode 100644
index 0000000..06e436e
--- /dev/null
+++ b/dev/java/create.html
@@ -0,0 +1,371 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with Schema" href="schema.html" />
+    <link rel="prev" title="Apache Arrow Java Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<span id="arrow-create"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>A vector is the basic unit in the Arrow Java library. Data types
+describe the types of values; ValueVectors are sequences of typed
+values. Vectors represent a one-dimensional sequence of values of
+the same type. They are mutable containers.</p>
+<p>Vectors implement the interface <a class="reference external" href="https://arrow.apache.org/docs/java/vector.html">ValueVector</a>. The Arrow libraries provide
+implementations of vectors for various data types.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id1">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-vectors-arrays" id="id2">Creating Vectors (arrays)</a></p>
+<ul>
+<li><p><a class="reference internal" href="#array-of-int" id="id3">Array of Int</a></p></li>
+<li><p><a class="reference internal" href="#array-of-varchar" id="id4">Array of Varchar</a></p></li>
+<li><p><a class="reference internal" href="#dictionary-encoded-array-of-varchar" id="id5">Dictionary-Encoded Array of Varchar</a></p></li>
+<li><p><a class="reference internal" href="#array-of-list" id="id6">Array of List</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#slicing" id="id7">Slicing</a></p>
+<ul>
+<li><p><a class="reference internal" href="#slicing-intvector" id="id8">Slicing IntVector</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-vectors-arrays">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Vectors (arrays)</a><a class="headerlink" href="#creating-vectors-arrays" title="Link to this heading">¶</a></h2>
+<section id="array-of-int">
+<h3><a class="toc-backref" href="#id3" role="doc-backlink">Array of Int</a><a class="headerlink" href="#array-of-int" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">intVector</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[1, 2, 3]
+</pre></div>
+</div>
+</section>
+<section id="array-of-varchar">
+<h3><a class="toc-backref" href="#id4" role="doc-backlink">Array of Varchar</a><a class="headerlink" href="#array-of-varchar" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;varCharVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;three&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">varCharVector</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[one, two, three]
+</pre></div>
+</div>
+</section>
+<section id="dictionary-encoded-array-of-varchar">
+<h3><a class="toc-backref" href="#id5" role="doc-backlink">Dictionary-Encoded Array of Varchar</a><a class="headerlink" href="#dictionary-encoded-array-of-varchar" title="Link to this heading">¶</a></h3>
+<p>In some scenarios <a class="reference external" href="https://arrow.apache.org/docs/format/Columnar.html#dictionary-encoded-layout">dictionary-encoding</a> a column is useful to save memory.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.FieldVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.Dictionary</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryEncoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.DictionaryEncoding</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">countries</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Cuba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Grecia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Tailandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Yemen&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Zambia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dictionary</span><span class="p">(</span><span class="n">countries</span><span class="p">,</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryEncoding</span><span class="p">(</span><span class="cm">/*id=*/</span><span class="mi">1L</span><span class="p">,</span><span class="w"> </span><span class="cm">/*ordered=*/</span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="cm">/*indexType=*/</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Unencoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="p">);</span>
+
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUserCountriesDictionaryEncoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="p">)</span><span class="w"> </span><span class="n">DictionaryEncoder</span>
+<span class="w">            </span><span class="p">.</span><span class="na">encode</span><span class="p">(</span><span class="n">appUserCountriesUnencoded</span><span class="p">,</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesDictionaryEncoded</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Dictionary: Dictionary DictionaryEncoding[id=1,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+Dictionary-encoded data: [0, 3, 4, 5, 7]
+</pre></div>
+</div>
+</section>
+<section id="array-of-list">
+<h3><a class="toc-backref" href="#id6" role="doc-backlink">Array of List</a><a class="headerlink" href="#array-of-list" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.impl.UnionListWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.ListVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ListVector</span><span class="w"> </span><span class="n">listVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ListVector</span><span class="p">.</span><span class="na">empty</span><span class="p">(</span><span class="s">&quot;listVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">UnionListWriter</span><span class="w"> </span><span class="n">listWriter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listVector</span><span class="p">.</span><span class="na">getWriter</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w"> </span><span class="mi">300</span><span class="p">,</span><span class="w"> </span><span class="mi">1000</span><span class="p">,</span><span class="w"> </span><span class="mi">2000</span><span class="p">,</span><span class="w"> </span><span class="mi">3000</span><span class="w"> </span><span class="p">};</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setPosition</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">startList</span><span class="p">();</span>
+<span class="w">        </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">listWriter</span><span class="p">.</span><span class="na">writeInt</span><span class="p">(</span><span class="n">data</span><span class="o">[</span><span class="n">tmp_index</span><span class="o">]</span><span class="p">);</span>
+<span class="w">            </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">endList</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">listVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">listVector</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[[1,2,3], [10,20,30], [100,200,300], [1000,2000,3000]]
+</pre></div>
+</div>
+</section>
+</section>
+<section id="slicing">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Slicing</a><a class="headerlink" href="#slicing" title="Link to this heading">¶</a></h2>
+<p>Slicing provides a way of copying a range of rows between two vectors of the same type.</p>
+<section id="slicing-intvector">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Slicing IntVector</a><a class="headerlink" href="#slicing-intvector" title="Link to this heading">¶</a></h3>
+<p>In this example, we copy a portion of the input IntVector to a new IntVector.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.TransferPair</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">vector</span><span class="p">.</span><span class="na">setSafe</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">     </span><span class="p">}</span>
+<span class="w">    </span><span class="n">vector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">TransferPair</span><span class="w"> </span><span class="n">tp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vector</span><span class="p">.</span><span class="na">getTransferPair</span><span class="p">(</span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">tp</span><span class="p">.</span><span class="na">splitAndTransfer</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="w"> </span><span class="n">sliced</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">tp</span><span class="p">.</span><span class="na">getTo</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">sliced</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="n">tp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vector</span><span class="p">.</span><span class="na">getTransferPair</span><span class="p">(</span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="c1">// copy 6 elements from index 2</span>
+<span class="w">    </span><span class="n">tp</span><span class="p">.</span><span class="na">splitAndTransfer</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="w"> </span><span class="n">sliced</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">tp</span><span class="p">.</span><span class="na">getTo</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">sliced</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[0, 1, 2, 3, 4]
+[2, 3, 4, 5, 6, 7]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-vectors-arrays">Creating Vectors (arrays)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#slicing">Slicing</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow Java Cookbook</a></li>
+      <li>Next: <a href="schema.html" title="next chapter">Working with Schema</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/data.html b/dev/java/data.html
new file mode 100644
index 0000000..1f6301d
--- /dev/null
+++ b/dev/java/data.html
@@ -0,0 +1,515 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Data manipulation &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Avro" href="avro.html" />
+    <link rel="prev" title="Substrait" href="substrait.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="data-manipulation">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Data manipulation</a><a class="headerlink" href="#data-manipulation" title="Link to this heading">¶</a></h1>
+<p>Recipes related to compare, filtering or transforming data.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#data-manipulation" id="id1">Data manipulation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#concatenate-vectorschemaroots" id="id2">Concatenate VectorSchemaRoots</a></p></li>
+<li><p><a class="reference internal" href="#concatenate-value-vectors" id="id3">Concatenate Value Vectors</a></p></li>
+<li><p><a class="reference internal" href="#compare-vectors-for-field-equality" id="id4">Compare Vectors for Field Equality</a></p></li>
+<li><p><a class="reference internal" href="#compare-vectors-equality" id="id5">Compare Vectors Equality</a></p></li>
+<li><p><a class="reference internal" href="#compare-values-on-the-array" id="id6">Compare Values on the Array</a></p></li>
+<li><p><a class="reference internal" href="#search-values-on-the-array" id="id7">Search Values on the Array</a></p>
+<ul>
+<li><p><a class="reference internal" href="#linear-search-o-n" id="id8">Linear Search - O(n)</a></p></li>
+<li><p><a class="reference internal" href="#binary-search-o-log-n" id="id9">Binary Search - O(log(n))</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#sort-values-on-the-array" id="id10">Sort Values on the Array</a></p>
+<ul>
+<li><p><a class="reference internal" href="#in-place-sorter-o-nlog-n" id="id11">In-place Sorter - O(nlog(n))</a></p></li>
+<li><p><a class="reference internal" href="#out-place-sorter-o-nlog-n" id="id12">Out-place Sorter - O(nlog(n))</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="concatenate-vectorschemaroots">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Concatenate VectorSchemaRoots</a><a class="headerlink" href="#concatenate-vectorschemaroots" title="Link to this heading">¶</a></h2>
+<p>In some cases, VectorSchemaRoot needs to be modeled as a container. To accomplish
+this, you can use <code class="docutils literal notranslate"><span class="pre">VectorSchemaRootAppender.append</span></code>. The following code
+creates two roots, then concatenates them together:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.VectorSchemaRootAppender</span><span class="p">;</span>
+
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">column_one</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;column-one&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">column_one</span><span class="p">));</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">rootOne</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">rootTwo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">appenderOne</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">rootOne</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootOne</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">appenderOne</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appenderOne</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootOne</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">appenderTwo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">appenderTwo</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">34</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appenderTwo</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">75</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">result</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRootAppender</span><span class="p">.</span><span class="na">append</span><span class="p">(</span><span class="n">result</span><span class="p">,</span><span class="w"> </span><span class="n">rootOne</span><span class="p">,</span><span class="w"> </span><span class="n">rootTwo</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>column-one
+100
+20
+34
+75
+</pre></div>
+</div>
+</section>
+<section id="concatenate-value-vectors">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Concatenate Value Vectors</a><a class="headerlink" href="#concatenate-value-vectors" title="Link to this heading">¶</a></h2>
+<p>In some cases, we need to concatenate two value vectors into one. To accomplish
+this, we can use <a class="reference external" href="https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/util/VectorAppender.java">VectorAppender</a>. This mutates the initial ValueVector.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ValueVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.VectorAppender</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">initialValues</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;initialValues&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">toAppend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;toAppend&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Initial IntVector: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">initialValues</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;IntVector to Append: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">toAppend</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorAppender</span><span class="w"> </span><span class="n">appenderUtil</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorAppender</span><span class="p">(</span><span class="n">initialValues</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">accept</span><span class="p">(</span><span class="n">appenderUtil</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;IntVector Result: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">initialValues</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Initial IntVector: [1, 2]
+IntVector to Append: [null, 4, null, 6]
+IntVector Result: [1, 2, null, 4, null, 6]
+</pre></div>
+</div>
+</section>
+<section id="compare-vectors-for-field-equality">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Compare Vectors for Field Equality</a><a class="headerlink" href="#compare-vectors-for-field-equality" title="Link to this heading">¶</a></h2>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.compare.TypeEqualsVisitor</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">right</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">left1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">left2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int2&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">TypeEqualsVisitor</span><span class="w"> </span><span class="n">visitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">TypeEqualsVisitor</span><span class="p">(</span><span class="n">right</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">equals</span><span class="p">(</span><span class="n">left1</span><span class="p">));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">equals</span><span class="p">(</span><span class="n">left2</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+</section>
+<section id="compare-vectors-equality">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Compare Vectors Equality</a><a class="headerlink" href="#compare-vectors-equality" title="Link to this heading">¶</a></h2>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.compare.VectorEqualsVisitor</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorEqualsVisitor</span><span class="w"> </span><span class="n">visitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorEqualsVisitor</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">vectorEquals</span><span class="p">(</span><span class="n">vector1</span><span class="p">,</span><span class="w"> </span><span class="n">vector2</span><span class="p">));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">vectorEquals</span><span class="p">(</span><span class="n">vector1</span><span class="p">,</span><span class="w"> </span><span class="n">vector3</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+</section>
+<section id="compare-values-on-the-array">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Compare Values on the Array</a><a class="headerlink" href="#compare-values-on-the-array" title="Link to this heading">¶</a></h2>
+<p>Comparing two values at the given indices in the vectors:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">vec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;valueindexcomparator&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;abc&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;aa&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">VarCharVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">valueComparator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">vec</span><span class="p">);</span>
+<span class="w">    </span><span class="n">valueComparator</span><span class="p">.</span><span class="na">attachVector</span><span class="p">(</span><span class="n">vec</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">valueComparator</span><span class="p">.</span><span class="na">compare</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">valueComparator</span><span class="p">.</span><span class="na">compare</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+<p>Consider that if we need our own comparator we could extend VectorValueComparator
+and override compareNotNull method as needed</p>
+</section>
+<section id="search-values-on-the-array">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Search Values on the Array</a><a class="headerlink" href="#search-values-on-the-array" title="Link to this heading">¶</a></h2>
+<section id="linear-search-o-n">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Linear Search - O(n)</a><a class="headerlink" href="#linear-search-o-n" title="Link to this heading">¶</a></h3>
+<p>Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#linearSearch - O(n)</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.search.VectorSearcher</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">linearSearchVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;linearSearchVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorInt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">linearSearchVector</span><span class="p">);</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSearcher</span><span class="p">.</span><span class="na">linearSearch</span><span class="p">(</span><span class="n">linearSearchVector</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorInt</span><span class="p">,</span><span class="w"> </span><span class="n">linearSearchVector</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>3
+</pre></div>
+</div>
+</section>
+<section id="binary-search-o-log-n">
+<h3><a class="toc-backref" href="#id9" role="doc-backlink">Binary Search - O(log(n))</a><a class="headerlink" href="#binary-search-o-log-n" title="Link to this heading">¶</a></h3>
+<p>Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#binarySearch - O(log(n))</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.search.VectorSearcher</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">binarySearchVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorInt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">binarySearchVector</span><span class="p">);</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSearcher</span><span class="p">.</span><span class="na">binarySearch</span><span class="p">(</span><span class="n">binarySearchVector</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorInt</span><span class="p">,</span><span class="w"> </span><span class="n">binarySearchVector</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="sort-values-on-the-array">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Sort Values on the Array</a><a class="headerlink" href="#sort-values-on-the-array" title="Link to this heading">¶</a></h2>
+<section id="in-place-sorter-o-nlog-n">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">In-place Sorter - O(nlog(n))</a><a class="headerlink" href="#in-place-sorter-o-nlog-n" title="Link to this heading">¶</a></h3>
+<p>Sorting by manipulating the original vector.
+Algorithm: org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter - O(nlog(n))</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intvectornotsorted&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setNull</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">FixedWidthInPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">sorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FixedWidthInPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="w">    </span><span class="n">sorter</span><span class="p">.</span><span class="na">sortInPlace</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">,</span><span class="w"> </span><span class="n">comparator</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[null, 8, 10]
+</pre></div>
+</div>
+</section>
+<section id="out-place-sorter-o-nlog-n">
+<h3><a class="toc-backref" href="#id12" role="doc-backlink">Out-place Sorter - O(nlog(n))</a><a class="headerlink" href="#out-place-sorter-o-nlog-n" title="Link to this heading">¶</a></h3>
+<p>Sorting by copies vector elements to a new vector in sorted order - O(nlog(n))
+Algorithm: : org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter.
+FixedWidthOutOfPlaceVectorSorter &amp; VariableWidthOutOfPlaceVectorSor</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.FixedWidthOutOfPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.OutOfPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intvectornotsorted&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getField</span><span class="p">()</span>
+<span class="w">            </span><span class="p">.</span><span class="na">getFieldType</span><span class="p">().</span><span class="na">createNewSingleVector</span><span class="p">(</span><span class="s">&quot;new-out-of-place-sorter&quot;</span><span class="p">,</span>
+<span class="w">                    </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setNull</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">OutOfPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">sorterOutOfPlaceSorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FixedWidthOutOfPlaceVectorSorter</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorOutOfPlaceSorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getValueCount</span><span class="p">());</span>
+<span class="w">    </span><span class="n">intVectorSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getValueCount</span><span class="p">());</span>
+<span class="w">    </span><span class="n">sorterOutOfPlaceSorter</span><span class="p">.</span><span class="na">sortOutOfPlace</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">,</span><span class="w"> </span><span class="n">intVectorSorted</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorOutOfPlaceSorter</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">intVectorSorted</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[null, 8, 10]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Data manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#concatenate-vectorschemaroots">Concatenate VectorSchemaRoots</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#concatenate-value-vectors">Concatenate Value Vectors</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-vectors-for-field-equality">Compare Vectors for Field Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-vectors-equality">Compare Vectors Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-values-on-the-array">Compare Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#search-values-on-the-array">Search Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#sort-values-on-the-array">Sort Values on the Array</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="substrait.html" title="previous chapter">Substrait</a></li>
+      <li>Next: <a href="avro.html" title="next chapter">Avro</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/data.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/dataset.html b/dev/java/dataset.html
new file mode 100644
index 0000000..e828f5b
--- /dev/null
+++ b/dev/java/dataset.html
@@ -0,0 +1,679 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Dataset &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Substrait" href="substrait.html" />
+    <link rel="prev" title="Arrow Flight" href="flight.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="dataset">
+<span id="arrow-dataset"></span><h1><a class="toc-backref" href="#id4" role="doc-backlink">Dataset</a><a class="headerlink" href="#dataset" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/dev/java/dataset.html">Arrow Java Dataset</a>: Java implementation of Arrow Datasets library. Implement Dataset Java API by JNI to C++.</p></li>
+</ul>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#dataset" id="id4">Dataset</a></p>
+<ul>
+<li><p><a class="reference internal" href="#constructing-datasets" id="id5">Constructing Datasets</a></p></li>
+<li><p><a class="reference internal" href="#getting-the-schema" id="id6">Getting the Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#during-dataset-construction" id="id7">During Dataset Construction</a></p></li>
+<li><p><a class="reference internal" href="#from-a-dataset" id="id8">From a Dataset</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-parquet-file" id="id9">Query Parquet File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#query-data-content-for-file" id="id10">Query Data Content For File</a></p></li>
+<li><p><a class="reference internal" href="#query-data-content-for-directory" id="id11">Query Data Content For Directory</a></p></li>
+<li><p><a class="reference internal" href="#query-data-content-with-projection" id="id12">Query Data Content with Projection</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-arrow-files" id="id13">Query Arrow Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id1" id="id14">Query Data Content For File</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-orc-file" id="id15">Query ORC File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id2" id="id16">Query Data Content For File</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-csv-file" id="id17">Query CSV File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id3" id="id18">Query Data Content For File</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="constructing-datasets">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Constructing Datasets</a><a class="headerlink" href="#constructing-datasets" title="Link to this heading">¶</a></h2>
+<p>We can construct a dataset with an auto-inferred schema.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.stream.StreamSupport</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">StreamSupport</span><span class="p">.</span><span class="na">stream</span><span class="p">(</span><span class="n">scanner</span><span class="p">.</span><span class="na">scan</span><span class="p">().</span><span class="na">spliterator</span><span class="p">(),</span><span class="w"> </span><span class="kc">false</span><span class="p">).</span><span class="na">count</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>1
+</pre></div>
+</div>
+<p>Let construct our dataset with predefined schema.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.stream.StreamSupport</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">(</span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">inspect</span><span class="p">());</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">StreamSupport</span><span class="p">.</span><span class="na">stream</span><span class="p">(</span><span class="n">scanner</span><span class="p">.</span><span class="na">scan</span><span class="p">().</span><span class="na">spliterator</span><span class="p">(),</span><span class="w"> </span><span class="kc">false</span><span class="p">).</span><span class="na">count</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>1
+</pre></div>
+</div>
+</section>
+<section id="getting-the-schema">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Getting the Schema</a><a class="headerlink" href="#getting-the-schema" title="Link to this heading">¶</a></h2>
+<section id="during-dataset-construction">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">During Dataset Construction</a><a class="headerlink" href="#during-dataset-construction" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">inspect</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;id: Int(32, true), name: Utf8&gt;(metadata: {parquet.avro.schema={&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;User&quot;,&quot;namespace&quot;:&quot;org.apache.arrow.dataset&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;id&quot;,&quot;type&quot;:[&quot;int&quot;,&quot;null&quot;]},{&quot;name&quot;:&quot;name&quot;,&quot;type&quot;:[&quot;string&quot;,&quot;null&quot;]}]}, writer.model.name=avro})
+</pre></div>
+</div>
+</section>
+<section id="from-a-dataset">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">From a Dataset</a><a class="headerlink" href="#from-a-dataset" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">schema</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;id: Int(32, true), name: Utf8&gt;(metadata: {parquet.avro.schema={&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;User&quot;,&quot;namespace&quot;:&quot;org.apache.arrow.dataset&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;id&quot;,&quot;type&quot;:[&quot;int&quot;,&quot;null&quot;]},{&quot;name&quot;:&quot;name&quot;,&quot;type&quot;:[&quot;string&quot;,&quot;null&quot;]}]}, writer.model.name=avro})
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-parquet-file">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Query Parquet File</a><a class="headerlink" href="#query-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Let query information for a parquet file.</p>
+<section id="query-data-content-for-file">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#query-data-content-for-file" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>id    name
+1    David
+2    Gladis
+3    Juan
+</pre></div>
+</div>
+<p>Let’s try to read a Parquet file with gzip compression and 3 row groups:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ parquet-tools meta data4_3rg_gzip.parquet
+
+file schema: schema
+age:         OPTIONAL INT64 R:0 D:1
+name:        OPTIONAL BINARY L:STRING R:0 D:1
+row group 1: RC:4 TS:182 OFFSET:4
+row group 2: RC:4 TS:190 OFFSET:420
+row group 3: RC:3 TS:179 OFFSET:838
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data4_3rg_gzip.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows per batch[&quot;</span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="s">&quot;]: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows per batch[1]: 4
+age    name
+10    Jean
+10    Lu
+10    Kei
+10    Sophia
+Number of rows per batch[2]: 4
+age    name
+10    Mara
+20    Arit
+20    Neil
+20    Jason
+Number of rows per batch[3]: 3
+age    name
+20    John
+20    Peter
+20    Ismael
+Total batch size: 11
+</pre></div>
+</div>
+</section>
+<section id="query-data-content-for-directory">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Query Data Content For Directory</a><a class="headerlink" href="#query-data-content-for-directory" title="Link to this heading">¶</a></h3>
+<p>Consider that we have these files: data1: 3 rows, data2: 3 rows and data3: 250 rows.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">100</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Batch: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, RowCount: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Batch: 1, RowCount: 3
+Batch: 2, RowCount: 3
+Batch: 3, RowCount: 100
+Batch: 4, RowCount: 100
+Batch: 5, RowCount: 50
+Batch: 6, RowCount: 4
+Batch: 7, RowCount: 4
+Batch: 8, RowCount: 3
+</pre></div>
+</div>
+</section>
+<section id="query-data-content-with-projection">
+<h3><a class="toc-backref" href="#id12" role="doc-backlink">Query Data Content with Projection</a><a class="headerlink" href="#query-data-content-with-projection" title="Link to this heading">¶</a></h3>
+<p>In case we need to project only certain columns we could configure ScanOptions with projections needed.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="n">projection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;name&quot;</span><span class="p">};</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">,</span><span class="w"> </span><span class="n">Optional</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">projection</span><span class="p">));</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name
+David
+Gladis
+Juan
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-arrow-files">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Query Arrow Files</a><a class="headerlink" href="#query-arrow-files" title="Link to this heading">¶</a></h2>
+<section id="id1">
+<h3><a class="toc-backref" href="#id14" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
+<p>Let’s read an Arrow file with 3 record batches, each with 3 rows.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">ARROW_IPC</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows per batch[&quot;</span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="s">&quot;]: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows per batch[1]: 3
+Number of rows per batch[2]: 3
+Number of rows per batch[3]: 3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-orc-file">
+<h2><a class="toc-backref" href="#id15" role="doc-backlink">Query ORC File</a><a class="headerlink" href="#query-orc-file" title="Link to this heading">¶</a></h2>
+<section id="id2">
+<h3><a class="toc-backref" href="#id16" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h3>
+<p>Let’s read an ORC file with zlib compression 385 stripes, each with 5000 rows.</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ orc-metadata demo-11-zlib.orc | more
+
+{ &quot;name&quot;: &quot;demo-11-zlib.orc&quot;,
+  &quot;type&quot;: &quot;struct&lt;_col0:int,_col1:string,_col2:string,_col3:string,_col4:int,_col5:string,_col6:int,_col7:int,_col8:int&gt;&quot;,
+  &quot;stripe count&quot;: 385,
+  &quot;compression&quot;: &quot;zlib&quot;, &quot;compression block&quot;: 262144,
+  &quot;stripes&quot;: [
+    { &quot;stripe&quot;: 0, &quot;rows&quot;: 5000,
+      &quot;offset&quot;: 3, &quot;length&quot;: 1031,
+      &quot;index&quot;: 266, &quot;data&quot;: 636, &quot;footer&quot;: 129
+    },
+...
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/orc/data1-zlib.orc&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">ORC</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Total batch size: 1920800
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-csv-file">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Query CSV File</a><a class="headerlink" href="#query-csv-file" title="Link to this heading">¶</a></h2>
+<section id="id3">
+<h3><a class="toc-backref" href="#id18" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3>
+<p>Let’s read a CSV file.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/csv/tech_acquisitions.csv&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">CSV</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Acquirer    Acquiree    Amount in billions (USD)    Date of acquisition
+NVIDIA    Mellanox    6.9    04/05/2020
+AMD    Xilinx    35.0    27/10/2020
+Salesforce    Slack    27.7    01/12/2020
+Total batch size: 3
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Dataset</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#constructing-datasets">Constructing Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#getting-the-schema">Getting the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-parquet-file">Query Parquet File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-arrow-files">Query Arrow Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-orc-file">Query ORC File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-csv-file">Query CSV File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="flight.html" title="previous chapter">Arrow Flight</a></li>
+      <li>Next: <a href="substrait.html" title="next chapter">Substrait</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/dataset.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/flight.html b/dev/java/flight.html
new file mode 100644
index 0000000..ef4a1b9
--- /dev/null
+++ b/dev/java/flight.html
@@ -0,0 +1,684 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Dataset" href="dataset.html" />
+    <link rel="prev" title="Reading and writing data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for working with Arrow Flight.
+For more detail about Flight please take a look at <a class="reference internal" href="#arrow-flight-rpc">Arrow Flight RPC</a>.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id1">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-key-value-storage-service-with-arrow-flight" id="id2">Simple Key-Value Storage Service with Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#flight-client-and-server" id="id3">Flight Client and Server</a></p></li>
+<li><p><a class="reference internal" href="#start-flight-server" id="id4">Start Flight Server</a></p></li>
+<li><p><a class="reference internal" href="#connect-to-flight-server" id="id5">Connect to Flight Server</a></p></li>
+<li><p><a class="reference internal" href="#put-data" id="id6">Put Data</a></p></li>
+<li><p><a class="reference internal" href="#get-metadata" id="id7">Get Metadata</a></p></li>
+<li><p><a class="reference internal" href="#get-data" id="id8">Get Data</a></p></li>
+<li><p><a class="reference internal" href="#delete-data" id="id9">Delete data</a></p></li>
+<li><p><a class="reference internal" href="#validate-delete-data" id="id10">Validate Delete Data</a></p></li>
+<li><p><a class="reference internal" href="#stop-flight-server" id="id11">Stop Flight Server</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-key-value-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Simple Key-Value Storage Service with Arrow Flight</a><a class="headerlink" href="#simple-key-value-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>We’ll implement a service that provides a key-value store for data, using Flight to handle uploads/requests
+and data in memory to store the actual data.</p>
+<section id="flight-client-and-server">
+<h3><a class="toc-backref" href="#id3" role="doc-backlink">Flight Client and Server</a><a class="headerlink" href="#flight-client-and-server" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Action</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.AsyncPutListener</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.CallStatus</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Criteria</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightClient</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightDescriptor</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightEndpoint</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightServer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Location</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.NoOpFlightProducer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.PutResult</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Result</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Ticket</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.util.AutoCloseables</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorLoader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorUnloader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowRecordBatch</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Arrays</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Collections</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Iterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.concurrent.ConcurrentHashMap</span><span class="p">;</span>
+
+<span class="kd">class</span> <span class="nc">Dataset</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">AutoCloseable</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="nf">Dataset</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">getBatches</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="nf">getSchema</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="nf">getRows</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">close</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">Exception</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AutoCloseables</span><span class="p">.</span><span class="na">close</span><span class="p">(</span><span class="n">batches</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+<span class="kd">class</span> <span class="nc">CookbookProducer</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="n">NoOpFlightProducer</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">AutoCloseable</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">ConcurrentMap</span><span class="o">&lt;</span><span class="n">FlightDescriptor</span><span class="p">,</span><span class="w"> </span><span class="n">Dataset</span><span class="o">&gt;</span><span class="w"> </span><span class="n">datasets</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="nf">CookbookProducer</span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocator</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ConcurrentHashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">Runnable</span><span class="w"> </span><span class="nf">acceptPut</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">PutResult</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ackStream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">            </span><span class="n">VectorUnloader</span><span class="w"> </span><span class="n">unloader</span><span class="p">;</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">unloader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorUnloader</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">());</span>
+<span class="w">                </span><span class="kd">final</span><span class="w"> </span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unloader</span><span class="p">.</span><span class="na">getRecordBatch</span><span class="p">();</span>
+<span class="w">                </span><span class="n">batches</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">arb</span><span class="p">);</span>
+<span class="w">                </span><span class="n">rows</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">().</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dataset</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">rows</span><span class="p">);</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getDescriptor</span><span class="p">(),</span><span class="w"> </span><span class="n">dataset</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ackStream</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">        </span><span class="p">};</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">getStream</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Ticket</span><span class="w"> </span><span class="n">ticket</span><span class="p">,</span><span class="w"> </span><span class="n">ServerStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">ticket</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dataset</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">throw</span><span class="w"> </span><span class="n">CallStatus</span><span class="p">.</span><span class="na">NOT_FOUND</span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="s">&quot;Unknown descriptor&quot;</span><span class="p">).</span><span class="na">toRuntimeException</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span>
+<span class="w">                 </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">VectorLoader</span><span class="w"> </span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorLoader</span><span class="p">(</span><span class="n">root</span><span class="p">);</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">start</span><span class="p">(</span><span class="n">root</span><span class="p">);</span>
+<span class="w">            </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arrowRecordBatch</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">loader</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">arrowRecordBatch</span><span class="p">);</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">doAction</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">        </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getType</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">case</span><span class="w"> </span><span class="s">&quot;DELETE&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Dataset</span><span class="w"> </span><span class="n">removed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasets</span><span class="p">.</span><span class="na">remove</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">removed</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">removed</span><span class="p">.</span><span class="na">close</span><span class="p">();</span>
+<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">listener</span><span class="p">.</span><span class="na">onError</span><span class="p">(</span><span class="n">CallStatus</span><span class="p">.</span><span class="na">INTERNAL</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="na">toString</span><span class="p">())</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">toRuntimeException</span><span class="p">());</span>
+<span class="w">                        </span><span class="k">return</span><span class="p">;</span>
+<span class="w">                    </span><span class="p">}</span>
+<span class="w">                    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete completed&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                    </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete not completed. Reason: Key did not exist.&quot;</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                    </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">FlightInfo</span><span class="w"> </span><span class="nf">getFlightInfo</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">flightEndpoint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightEndpoint</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">Ticket</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)),</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightInfo</span><span class="p">(</span>
+<span class="w">                </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span>
+<span class="w">                </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="w">                </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">flightEndpoint</span><span class="p">),</span>
+<span class="w">                </span><span class="cm">/*bytes=*/</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+<span class="w">                </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getRows</span><span class="p">()</span>
+<span class="w">        </span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">listFlights</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Criteria</span><span class="w"> </span><span class="n">criteria</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">datasets</span><span class="p">.</span><span class="na">forEach</span><span class="p">((</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">getFlightInfo</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">));</span><span class="w"> </span><span class="p">});</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">close</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">Exception</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AutoCloseables</span><span class="p">.</span><span class="na">close</span><span class="p">(</span><span class="n">datasets</span><span class="p">.</span><span class="na">values</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+<span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Location</span><span class="p">.</span><span class="na">forGrpcInsecure</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">33333</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">()){</span>
+<span class="w">    </span><span class="c1">// Server</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="w"> </span><span class="n">producer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">        </span><span class="kd">final</span><span class="w"> </span><span class="n">FlightServer</span><span class="w"> </span><span class="n">flightServer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightServer</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">producer</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">flightServer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;S1: Server (Location): Listening on port &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightServer</span><span class="p">.</span><span class="na">getPort</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">throw</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RuntimeException</span><span class="p">(</span><span class="n">e</span><span class="p">);</span>
+<span class="w">        </span><span class="p">}</span>
+
+<span class="w">        </span><span class="c1">// Client</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FlightClient</span><span class="w"> </span><span class="n">flightClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C1: Client (Location): Connected to &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="na">getUri</span><span class="p">());</span>
+
+<span class="w">            </span><span class="c1">// Populate data</span>
+<span class="w">            </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">Arrays</span><span class="p">.</span><span class="na">asList</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">)));</span>
+<span class="w">            </span><span class="k">try</span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">                </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Ronald&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Francisco&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">ClientStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">startPut</span><span class="p">(</span>
+<span class="w">                        </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">),</span>
+<span class="w">                        </span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AsyncPutListener</span><span class="p">());</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Manuel&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Felipe&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;JJ&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">getResult</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C2: Client (Populate Data): Wrote 2 batches with 3 rows each&quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get metadata information</span>
+<span class="w">            </span><span class="n">FlightInfo</span><span class="w"> </span><span class="n">flightInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getInfo</span><span class="p">(</span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">));</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C3: Client (Get Metadata): &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightInfo</span><span class="p">);</span>
+
+<span class="w">            </span><span class="c1">// Get data information</span>
+<span class="w">            </span><span class="k">try</span><span class="p">(</span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getStream</span><span class="p">(</span><span class="n">flightInfo</span><span class="p">.</span><span class="na">getEndpoints</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getTicket</span><span class="p">()))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="kt">int</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootReceived</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C4: Client (Get Stream):&quot;</span><span class="p">);</span>
+<span class="w">                    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">batch</span><span class="o">++</span><span class="p">;</span>
+<span class="w">                        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Client Received batch #&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, Data:&quot;</span><span class="p">);</span>
+<span class="w">                        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootReceived</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">                    </span><span class="p">}</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get all metadata information</span>
+<span class="w">            </span><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfosBefore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="s">&quot;C5: Client (List Flights Info): &quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="n">flightInfosBefore</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+
+<span class="w">            </span><span class="c1">// Do delete action</span>
+<span class="w">            </span><span class="n">Iterator</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">doAction</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">Action</span><span class="p">(</span><span class="s">&quot;DELETE&quot;</span><span class="p">,</span>
+<span class="w">                    </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">).</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)));</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">next</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C6: Client (Do Delete Action): &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">                        </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get all metadata information (to validate detele action)</span>
+<span class="w">            </span><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="w">            </span><span class="n">flightInfos</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C7: Client (List Flights Info): After delete - No records&quot;</span><span class="p">);</span>
+
+<span class="w">            </span><span class="c1">// Server shut down</span>
+<span class="w">            </span><span class="n">flightServer</span><span class="p">.</span><span class="na">shutdown</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C8: Server shut down successfully&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>S1: Server (Location): Listening on port 33333
+C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+C3: Client (Get Metadata): FlightInfo{schema=Schema&lt;name: Utf8&gt;, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none), appMetadata=(none)}], bytes=-1, records=6, ordered=false, appMetadata=(none)}
+C4: Client (Get Stream):
+Client Received batch #1, Data:
+name
+Ronald
+David
+Francisco
+Client Received batch #2, Data:
+name
+Manuel
+Felipe
+JJ
+C5: Client (List Flights Info): FlightInfo{schema=Schema&lt;name: Utf8&gt;, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none), appMetadata=(none)}], bytes=-1, records=6, ordered=false, appMetadata=(none)}
+C6: Client (Do Delete Action): Delete completed
+C7: Client (List Flights Info): After delete - No records
+C8: Server shut down successfully
+</pre></div>
+</div>
+<p>Let explain our code in more detail.</p>
+</section>
+<section id="start-flight-server">
+<h3><a class="toc-backref" href="#id4" role="doc-backlink">Start Flight Server</a><a class="headerlink" href="#start-flight-server" title="Link to this heading">¶</a></h3>
+<p>First, we’ll start our server:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">(</span><span class="n">FlightServer</span><span class="w"> </span><span class="n">flightServer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightServer</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">,</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">)).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">flightServer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;S1: Server (Location): Listening on port &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightServer</span><span class="p">.</span><span class="na">getPort</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>S1:<span class="w"> </span>Server<span class="w"> </span><span class="o">(</span>Location<span class="o">)</span>:<span class="w"> </span>Listening<span class="w"> </span>on<span class="w"> </span>port<span class="w"> </span><span class="m">33333</span>
+</pre></div>
+</div>
+</section>
+<section id="connect-to-flight-server">
+<h3><a class="toc-backref" href="#id5" role="doc-backlink">Connect to Flight Server</a><a class="headerlink" href="#connect-to-flight-server" title="Link to this heading">¶</a></h3>
+<p>We can then create a client and connect to the server:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FlightClient</span><span class="w"> </span><span class="n">flightClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C1: Client (Location): Connected to &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="na">getUri</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C1:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Location<span class="o">)</span>:<span class="w"> </span>Connected<span class="w"> </span>to<span class="w"> </span>grpc+tcp://0.0.0.0:33333
+</pre></div>
+</div>
+</section>
+<section id="put-data">
+<h3><a class="toc-backref" href="#id6" role="doc-backlink">Put Data</a><a class="headerlink" href="#put-data" title="Link to this heading">¶</a></h3>
+<p>First, we’ll create and upload a vector schema root, which will get stored in a
+memory by the server.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="n">Runnable</span><span class="w"> </span><span class="nf">acceptPut</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">PutResult</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ackStream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">        </span><span class="n">VectorUnloader</span><span class="w"> </span><span class="n">unloader</span><span class="p">;</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">unloader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorUnloader</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">());</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unloader</span><span class="p">.</span><span class="na">getRecordBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">batches</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">arb</span><span class="p">);</span>
+<span class="w">                </span><span class="n">rows</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">().</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dataset</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">rows</span><span class="p">);</span>
+<span class="w">        </span><span class="n">datasets</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getDescriptor</span><span class="p">(),</span><span class="w"> </span><span class="n">dataset</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ackStream</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">};</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">Arrays</span><span class="p">.</span><span class="na">asList</span><span class="p">(</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">)));</span>
+<span class="k">try</span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Ronald&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Francisco&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">ClientStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">startPut</span><span class="p">(</span>
+<span class="w">            </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">),</span>
+<span class="w">            </span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AsyncPutListener</span><span class="p">());</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Manuel&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Felipe&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;JJ&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">getResult</span><span class="p">();</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C2: Client (Populate Data): Wrote 2 batches with 3 rows each&quot;</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C2:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Populate<span class="w"> </span>Data<span class="o">)</span>:<span class="w"> </span>Wrote<span class="w"> </span><span class="m">2</span><span class="w"> </span>batches<span class="w"> </span>with<span class="w"> </span><span class="m">3</span><span class="w"> </span>rows<span class="w"> </span>each
+</pre></div>
+</div>
+</section>
+<section id="get-metadata">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">Get Metadata</a><a class="headerlink" href="#get-metadata" title="Link to this heading">¶</a></h3>
+<p>Once we do so, we can retrieve the metadata for that dataset.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="n">FlightInfo</span><span class="w"> </span><span class="nf">getFlightInfo</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">flightEndpoint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightEndpoint</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">Ticket</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)),</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightInfo</span><span class="p">(</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="w">            </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">flightEndpoint</span><span class="p">),</span>
+<span class="w">            </span><span class="cm">/*bytes=*/</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getRows</span><span class="p">()</span>
+<span class="w">    </span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">FlightInfo</span><span class="w"> </span><span class="n">flightInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getInfo</span><span class="p">(</span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">));</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C3: Client (Get Metadata): &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightInfo</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C3:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Get<span class="w"> </span>Metadata<span class="o">)</span>:<span class="w"> </span>FlightInfo<span class="o">{</span><span class="nv">schema</span><span class="o">=</span>Schema&lt;name:<span class="w"> </span>Utf8&gt;,<span class="w"> </span><span class="nv">descriptor</span><span class="o">=</span>profiles,<span class="w"> </span><span class="nv">endpoints</span><span class="o">=[</span>FlightEndpoint<span class="o">{</span><span class="nv">locations</span><span class="o">=[</span>Location<span class="o">{</span><span class="nv">uri</span><span class="o">=</span>grpc+tcp://0.0.0.0:33333<span class="o">}]</span>,<span class="w"> </span><span class="nv">ticket</span><span class="o">=</span>org.apache.arrow.flight.Ticket@58871b0a,<span class="w"> </span><span class="nv">expirationTime</span><span class="o">=(</span>none<span class="o">)}]</span>,<span class="w"> </span><span class="nv">bytes</span><span class="o">=</span>-1,<span class="w"> </span><span class="nv">records</span><span class="o">=</span><span class="m">6</span><span class="o">}</span>
+</pre></div>
+</div>
+</section>
+<section id="get-data">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Get Data</a><a class="headerlink" href="#get-data" title="Link to this heading">¶</a></h3>
+<p>And get the data back:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">getStream</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Ticket</span><span class="w"> </span><span class="n">ticket</span><span class="p">,</span><span class="w"> </span><span class="n">ServerStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">ticket</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dataset</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">throw</span><span class="w"> </span><span class="n">CallStatus</span><span class="p">.</span><span class="na">NOT_FOUND</span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="s">&quot;Unknown descriptor&quot;</span><span class="p">).</span><span class="na">toRuntimeException</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span>
+<span class="w">                </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">start</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">);</span>
+<span class="w">        </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arrowRecordBatch</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">VectorLoader</span><span class="w"> </span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorLoader</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">);</span>
+<span class="w">            </span><span class="n">loader</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">arrowRecordBatch</span><span class="p">.</span><span class="na">cloneWithTransfer</span><span class="p">(</span><span class="n">allocator</span><span class="p">));</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="k">try</span><span class="p">(</span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getStream</span><span class="p">(</span><span class="n">flightInfo</span><span class="p">.</span><span class="na">getEndpoints</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getTicket</span><span class="p">()))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootReceived</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C4: Client (Get Stream):&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">batch</span><span class="o">++</span><span class="p">;</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Client Received batch #&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, Data:&quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootReceived</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C4:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Get<span class="w"> </span>Stream<span class="o">)</span>:
+Client<span class="w"> </span>Received<span class="w"> </span>batch<span class="w"> </span><span class="c1">#1, Data:</span>
+name
+Ronald
+David
+Francisco
+Client<span class="w"> </span>Received<span class="w"> </span>batch<span class="w"> </span><span class="c1">#2, Data:</span>
+name
+Manuel
+Felipe
+JJ
+</pre></div>
+</div>
+</section>
+<section id="delete-data">
+<h3><a class="toc-backref" href="#id9" role="doc-backlink">Delete data</a><a class="headerlink" href="#delete-data" title="Link to this heading">¶</a></h3>
+<p>Then, we’ll delete the dataset:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">doAction</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getType</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">case</span><span class="w"> </span><span class="s">&quot;DELETE&quot;</span><span class="p">:</span>
+<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">datasets</span><span class="p">.</span><span class="na">remove</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete completed&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete not completed. Reason: Key did not exist.&quot;</span>
+<span class="w">                        </span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Iterator</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">doAction</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">Action</span><span class="p">(</span><span class="s">&quot;DELETE&quot;</span><span class="p">,</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">).</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)));</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">next</span><span class="p">();</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C6: Client (Do Delete Action): &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C6:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Do<span class="w"> </span>Delete<span class="w"> </span>Action<span class="o">)</span>:<span class="w"> </span>Delete<span class="w"> </span>completed
+</pre></div>
+</div>
+</section>
+<section id="validate-delete-data">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Validate Delete Data</a><a class="headerlink" href="#validate-delete-data" title="Link to this heading">¶</a></h3>
+<p>And confirm that it’s been deleted:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">listFlights</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Criteria</span><span class="w"> </span><span class="n">criteria</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">datasets</span><span class="p">.</span><span class="na">forEach</span><span class="p">((</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">getFlightInfo</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">));</span><span class="w"> </span><span class="p">});</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="n">flightInfos</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C7: Client (List Flights Info): After delete - No records&quot;</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C7:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>List<span class="w"> </span>Flights<span class="w"> </span>Info<span class="o">)</span>:<span class="w"> </span>After<span class="w"> </span>delete<span class="w"> </span>-<span class="w"> </span>No<span class="w"> </span>records
+</pre></div>
+</div>
+</section>
+<section id="stop-flight-server">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Stop Flight Server</a><a class="headerlink" href="#stop-flight-server" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="n">flightServer</span><span class="p">.</span><span class="na">shutdown</span><span class="p">();</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C8: Server shut down successfully&quot;</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C8:<span class="w"> </span>Server<span class="w"> </span>shut<span class="w"> </span>down<span class="w"> </span>successfully
+</pre></div>
+</div>
+<p><span class="target" id="arrow-flight-rpc">Arrow Flight RPC</span>: <a class="reference external" href="https://arrow.apache.org/docs/format/Flight.html">https://arrow.apache.org/docs/format/Flight.html</a></p>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-key-value-storage-service-with-arrow-flight">Simple Key-Value Storage Service with Arrow Flight</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="io.html" title="previous chapter">Reading and writing data</a></li>
+      <li>Next: <a href="dataset.html" title="next chapter">Dataset</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/genindex.html b/dev/java/genindex.html
new file mode 100644
index 0000000..58c2475
--- /dev/null
+++ b/dev/java/genindex.html
@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/index.html b/dev/java/index.html
new file mode 100644
index 0000000..d78677f
--- /dev/null
+++ b/dev/java/index.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow Java Cookbook &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-java-cookbook">
+<h1>Apache Arrow Java Cookbook<a class="headerlink" href="#apache-arrow-java-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate how to solve many common tasks that users might need to perform when working with Arrow data. The examples in this cookbook will also serve as robust and well performing solutions to those tasks.</p>
+<p>To get started with Apache Arrow in Java, see the
+<a class="reference external" href="https://arrow.apache.org/docs/java/install.html">Installation Instructions</a>.</p>
+<p>This cookbook is tested with Apache Arrow 16.0.0-SNAPSHOT.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-vectors-arrays">Creating Vectors (arrays)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#slicing">Slicing</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-fields">Creating Fields</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-the-schema">Creating the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#adding-metadata-to-fields-and-schemas">Adding Metadata to Fields and Schemas</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-vectorschemaroot">Creating VectorSchemaRoot</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing">Writing</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading">Reading</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-key-value-storage-service-with-arrow-flight">Simple Key-Value Storage Service with Arrow Flight</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#constructing-datasets">Constructing Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#getting-the-schema">Getting the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-parquet-file">Query Parquet File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-arrow-files">Query Arrow Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-orc-file">Query ORC File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-csv-file">Query CSV File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="substrait.html#querying-datasets">Querying Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="substrait.html#filtering-and-projecting-datasets">Filtering and Projecting Datasets</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="data.html#concatenate-vectorschemaroots">Concatenate VectorSchemaRoots</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#concatenate-value-vectors">Concatenate Value Vectors</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-vectors-for-field-equality">Compare Vectors for Field Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-vectors-equality">Compare Vectors Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-values-on-the-array">Compare Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#search-values-on-the-array">Search Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#sort-values-on-the-array">Sort Values on the Array</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="avro.html#avro-to-arrow">Avro to Arrow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#resultset-to-vectorschemaroot-conversion">ResultSet to VectorSchemaRoot Conversion</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-array-subtypes">Configuring Array subtypes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-batch-size">Configuring batch size</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-numeric-decimal-precision-and-scale">Configuring numeric (decimal) precision and scale</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/io.html b/dev/java/io.html
new file mode 100644
index 0000000..6debbdf
--- /dev/null
+++ b/dev/java/io.html
@@ -0,0 +1,736 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and writing data &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Working with Schema" href="schema.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-data">
+<span id="arrow-io"></span><h1><a class="toc-backref" href="#id5" role="doc-backlink">Reading and writing data</a><a class="headerlink" href="#reading-and-writing-data" title="Link to this heading">¶</a></h1>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/java/ipc.html">Arrow IPC format</a> defines two types of binary formats
+for serializing Arrow data: the streaming format and the file format (or random access format). Such files can
+be directly memory-mapped when read.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-data" id="id5">Reading and writing data</a></p>
+<ul>
+<li><p><a class="reference internal" href="#writing" id="id6">Writing</a></p>
+<ul>
+<li><p><a class="reference internal" href="#writing-random-access-files" id="id7">Writing Random Access Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#write-out-to-file" id="id8">Write - Out to File</a></p></li>
+<li><p><a class="reference internal" href="#write-out-to-buffer" id="id9">Write - Out to Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#writing-streaming-format" id="id10">Writing Streaming Format</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id1" id="id11">Write - Out to File</a></p></li>
+<li><p><a class="reference internal" href="#id2" id="id12">Write - Out to Buffer</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading" id="id13">Reading</a></p>
+<ul>
+<li><p><a class="reference internal" href="#reading-random-access-files" id="id14">Reading Random Access Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#read-from-file" id="id15">Read - From File</a></p></li>
+<li><p><a class="reference internal" href="#read-from-buffer" id="id16">Read - From Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading-streaming-format" id="id17">Reading Streaming Format</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id3" id="id18">Read - From File</a></p></li>
+<li><p><a class="reference internal" href="#id4" id="id19">Read - From Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading-parquet-file" id="id20">Reading Parquet File</a></p></li>
+<li><p><a class="reference internal" href="#handling-data-with-dictionaries" id="id21">Handling Data with Dictionaries</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="writing">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Writing</a><a class="headerlink" href="#writing" title="Link to this heading">¶</a></h2>
+<p>Both writing file and streaming formats use the same API.</p>
+<section id="writing-random-access-files">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">Writing Random Access Files</a><a class="headerlink" href="#writing-random-access-files" title="Link to this heading">¶</a></h3>
+<section id="write-out-to-file">
+<h4><a class="toc-backref" href="#id8" role="doc-backlink">Write - Out to File</a><a class="headerlink" href="#write-out-to-file" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;randon_access_to_file.arrow&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">        </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">end</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches written: 1. Number of rows written: 3
+</pre></div>
+</div>
+</section>
+<section id="write-out-to-buffer">
+<h4><a class="toc-backref" href="#id9" role="doc-backlink">Write - Out to Buffer</a><a class="headerlink" href="#write-out-to-buffer" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.channels.Channels</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">ByteArrayOutputStream</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayOutputStream</span><span class="p">();</span>
+<span class="w">             </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">Channels</span><span class="p">.</span><span class="na">newChannel</span><span class="p">(</span><span class="n">out</span><span class="p">))</span>
+<span class="w">        </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span>
+<span class="w">                    </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches written: 1. Number of rows written: 3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="writing-streaming-format">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Writing Streaming Format</a><a class="headerlink" href="#writing-streaming-format" title="Link to this heading">¶</a></h3>
+<section id="id1">
+<h4><a class="toc-backref" href="#id11" role="doc-backlink">Write - Out to File</a><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;streaming_to_file.arrow&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowStreamWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows written: 3
+</pre></div>
+</div>
+</section>
+<section id="id2">
+<h4><a class="toc-backref" href="#id12" role="doc-backlink">Write - Out to Buffer</a><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.channels.Channels</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">ByteArrayOutputStream</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayOutputStream</span><span class="p">();</span>
+<span class="w">            </span><span class="n">ArrowStreamWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">Channels</span><span class="p">.</span><span class="na">newChannel</span><span class="p">(</span><span class="n">out</span><span class="p">))</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows written: 3
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+<section id="reading">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Reading</a><a class="headerlink" href="#reading" title="Link to this heading">¶</a></h2>
+<p>Reading the random access format and streaming format both offer the same API,
+with the difference that random access files also offer access to any record batch by index.</p>
+<section id="reading-random-access-files">
+<h3><a class="toc-backref" href="#id14" role="doc-backlink">Reading Random Access Files</a><a class="headerlink" href="#reading-random-access-files" title="Link to this heading">¶</a></h3>
+<section id="read-from-file">
+<h4><a class="toc-backref" href="#id15" role="doc-backlink">Read - From File</a><a class="headerlink" href="#read-from-file" title="Link to this heading">¶</a></h4>
+<p>We are providing a path with auto generated arrow files for testing purposes, change that at your convenience.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="n">fileInputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">(),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">){</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches in file: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">());</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches in file: 3
+name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+<section id="read-from-buffer">
+<h4><a class="toc-backref" href="#id16" role="doc-backlink">Read - From Buffer</a><a class="headerlink" href="#read-from-buffer" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.SeekableReadChannel</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.ByteArrayReadableSeekableByteChannel</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Files</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Path</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Paths</span><span class="p">;</span>
+
+<span class="n">Path</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Paths</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">SeekableReadChannel</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayReadableSeekableByteChannel</span><span class="p">(</span>
+<span class="w">                                        </span><span class="n">Files</span><span class="p">.</span><span class="na">readAllBytes</span><span class="p">(</span><span class="n">path</span><span class="p">))),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches in file: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">());</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches in file: 3
+name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+</section>
+<section id="reading-streaming-format">
+<h3><a class="toc-backref" href="#id17" role="doc-backlink">Reading Streaming Format</a><a class="headerlink" href="#reading-streaming-format" title="Link to this heading">¶</a></h3>
+<section id="id3">
+<h4><a class="toc-backref" href="#id18" role="doc-backlink">Read - From File</a><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/streaming.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStreamForStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowStreamReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamReader</span><span class="p">(</span><span class="n">fileInputStreamForStream</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+<section id="id4">
+<h4><a class="toc-backref" href="#id19" role="doc-backlink">Read - From Buffer</a><a class="headerlink" href="#id4" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Files</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Path</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Paths</span><span class="p">;</span>
+
+<span class="n">Path</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Paths</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/streaming.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ArrowStreamReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamReader</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayInputStream</span><span class="p">(</span>
+<span class="w">                                    </span><span class="n">Files</span><span class="p">.</span><span class="na">readAllBytes</span><span class="p">(</span><span class="n">path</span><span class="p">)),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">()){</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+</section>
+<section id="reading-parquet-file">
+<h3><a class="toc-backref" href="#id20" role="doc-backlink">Reading Parquet File</a><a class="headerlink" href="#reading-parquet-file" title="Link to this heading">¶</a></h3>
+<p>Please check <a class="reference internal" href="dataset.html"><span class="doc">Dataset</span></a></p>
+</section>
+<section id="handling-data-with-dictionaries">
+<h3><a class="toc-backref" href="#id21" role="doc-backlink">Handling Data with Dictionaries</a><a class="headerlink" href="#handling-data-with-dictionaries" title="Link to this heading">¶</a></h3>
+<p>Reading and writing dictionary-encoded data requires separately tracking the dictionaries.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.FieldVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ValueVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.Dictionary</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryEncoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryProvider</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.DictionaryEncoding</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileNotFoundException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+
+<span class="n">DictionaryEncoding</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryEncoding</span><span class="p">(</span>
+<span class="w">        </span><span class="cm">/*id=*/</span><span class="mi">666L</span><span class="p">,</span><span class="w"> </span><span class="cm">/*ordered=*/</span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="cm">/*indexType=*/</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)</span>
+<span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">countries</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">,</span>
+<span class="w">             </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="n">Types</span><span class="p">.</span><span class="na">MinorType</span><span class="p">.</span><span class="na">VARCHAR</span><span class="p">.</span><span class="na">getType</span><span class="p">(),</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="p">),</span>
+<span class="w">             </span><span class="n">root</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Cuba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Grecia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Tailandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Yemen&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Zambia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dictionary</span><span class="p">(</span><span class="n">countries</span><span class="p">,</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Unencoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;random_access_file_with_dictionary.arrow&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">DictionaryProvider</span><span class="p">.</span><span class="na">MapDictionaryProvider</span><span class="w"> </span><span class="n">provider</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryProvider</span><span class="p">.</span><span class="na">MapDictionaryProvider</span><span class="p">();</span>
+<span class="w">    </span><span class="n">provider</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">countriesDictionary</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="p">)</span><span class="w"> </span><span class="n">DictionaryEncoder</span>
+<span class="w">            </span><span class="p">.</span><span class="na">encode</span><span class="p">(</span><span class="n">appUserCountriesUnencoded</span><span class="p">,</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+<span class="w">         </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">);</span>
+<span class="w">         </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">    </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">);</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded ID: &quot;</span><span class="w"> </span><span class="o">+</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">.</span><span class="na">getField</span><span class="p">().</span><span class="na">getDictionary</span><span class="p">().</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">end</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="k">try</span><span class="p">(</span>
+<span class="w">            </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">            </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="n">fileInputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">(),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">                </span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">);</span>
+<span class="w">                </span><span class="n">DictionaryEncoding</span><span class="w"> </span><span class="n">dictionaryEncodingRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">.</span><span class="na">getField</span><span class="p">().</span><span class="na">getDictionary</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded ID recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">dictionaryEncodingRead</span><span class="p">.</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">                </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getDictionaryVectors</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="n">dictionaryEncodingRead</span><span class="p">.</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">);</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="p">);</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ValueVector</span><span class="w"> </span><span class="n">readVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DictionaryEncoder</span><span class="p">.</span><span class="na">decode</span><span class="p">(</span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">,</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Decoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">readVector</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">FileNotFoundException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Dictionary: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+Dictionary-encoded data: [0, 3, 4, 5, 7]
+Dictionary-encoded ID: 666
+Record batches written: 1. Number of rows written: 5
+Dictionary-encoded ID recovered: 666
+Dictionary-encoded data recovered: [0, 3, 4, 5, 7]
+Dictionary recovered: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Decoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and writing data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#writing">Writing</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading">Reading</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="schema.html" title="previous chapter">Working with Schema</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/io.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/jdbc.html b/dev/java/jdbc.html
new file mode 100644
index 0000000..1d1ff54
--- /dev/null
+++ b/dev/java/jdbc.html
@@ -0,0 +1,442 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow JDBC Adapter &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Avro" href="avro.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-jdbc-adapter">
+<span id="arrow-jdbc"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow JDBC Adapter</a><a class="headerlink" href="#arrow-jdbc-adapter" title="Link to this heading">¶</a></h1>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/java/jdbc.html">Arrow Java JDBC module</a>
+converts JDBC ResultSets into Arrow VectorSchemaRoots.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-jdbc-adapter" id="id1">Arrow JDBC Adapter</a></p>
+<ul>
+<li><p><a class="reference internal" href="#resultset-to-vectorschemaroot-conversion" id="id2">ResultSet to VectorSchemaRoot Conversion</a></p></li>
+<li><p><a class="reference internal" href="#configuring-array-subtypes" id="id3">Configuring Array subtypes</a></p></li>
+<li><p><a class="reference internal" href="#configuring-batch-size" id="id4">Configuring batch size</a></p></li>
+<li><p><a class="reference internal" href="#configuring-numeric-decimal-precision-and-scale" id="id5">Configuring numeric (decimal) precision and scale</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="resultset-to-vectorschemaroot-conversion">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">ResultSet to VectorSchemaRoot Conversion</a><a class="headerlink" href="#resultset-to-vectorschemaroot-conversion" title="Link to this heading">¶</a></h2>
+<p>The main class to help us to convert ResultSet to VectorSchemaRoot is
+<a class="reference external" href="https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrow.html">JdbcToArrow</a></p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5
+101    true    1000000000300
+102    true    100000000030
+103    true    10000000003
+</pre></div>
+</div>
+</section>
+<section id="configuring-array-subtypes">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Configuring Array subtypes</a><a class="headerlink" href="#configuring-array-subtypes" title="Link to this heading">¶</a></h2>
+<p>JdbcToArrow accepts configuration through <a class="reference external" href="https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrowConfig.html">JdbcToArrowConfig</a>.
+For example, the type of the elements of array columns can be specified by
+<code class="docutils literal notranslate"><span class="pre">setArraySubTypeByColumnNameMap</span></code>.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300    some char text      [1,2,3]
+102    true    100000000030    some char text      [1,2]
+103    true    10000000003    some char text      [1]
+</pre></div>
+</div>
+</section>
+<section id="configuring-batch-size">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Configuring batch size</a><a class="headerlink" href="#configuring-batch-size" title="Link to this heading">¶</a></h2>
+<p>By default, the adapter will read up to 1024 rows in a batch. This
+can be customized via <code class="docutils literal notranslate"><span class="pre">setTargetBatchSize</span></code>.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setTargetBatchSize</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300    some char text      [1,2,3]
+102    true    100000000030    some char text      [1,2]
+INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+103    true    10000000003    some char text      [1]
+</pre></div>
+</div>
+</section>
+<section id="configuring-numeric-decimal-precision-and-scale">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Configuring numeric (decimal) precision and scale</a><a class="headerlink" href="#configuring-numeric-decimal-precision-and-scale" title="Link to this heading">¶</a></h2>
+<p>By default, the scale of any decimal values must exactly match the defined
+scale of the Arrow type of the column, or else an UnsupportedOperationException
+will be thrown with a message like <code class="docutils literal notranslate"><span class="pre">BigDecimal</span> <span class="pre">scale</span> <span class="pre">must</span> <span class="pre">equal</span> <span class="pre">that</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">Arrow</span>
+<span class="pre">vector</span></code>.</p>
+<p>This can happen because Arrow infers the type from the ResultSet metadata, which
+is not accurate for all database drivers. The JDBC adapter lets you avoid this
+by either overriding the decimal scale, or by providing a RoundingMode via
+<code class="docutils literal notranslate"><span class="pre">setBigDecimalRoundingMode</span></code> to convert values to the expected scale.</p>
+<p>In this example, we have a BigInt column. By default, the inferred scale
+is 0. We override the scale to 7 and then set a RoundingMode to convert
+values to the given scale.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.math.RoundingMode</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setTargetBatchSize</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setExplicitTypesByColumnName</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;BIGINT_FIELD5&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">DECIMAL</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">7</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setBigDecimalRoundingMode</span><span class="p">(</span><span class="n">RoundingMode</span><span class="p">.</span><span class="na">UNNECESSARY</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300.0000000    some char text      [1,2,3]
+102    true    100000000030.0000000    some char text      [1,2]
+INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+103    true    10000000003.0000000    some char text      [1]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow JDBC Adapter</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#resultset-to-vectorschemaroot-conversion">ResultSet to VectorSchemaRoot Conversion</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-array-subtypes">Configuring Array subtypes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-batch-size">Configuring batch size</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-numeric-decimal-precision-and-scale">Configuring numeric (decimal) precision and scale</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="avro.html" title="previous chapter">Avro</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/jdbc.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/objects.inv b/dev/java/objects.inv
new file mode 100644
index 0000000..cc2224b
--- /dev/null
+++ b/dev/java/objects.inv
Binary files differ
diff --git a/dev/java/schema.html b/dev/java/schema.html
new file mode 100644
index 0000000..22e21b2
--- /dev/null
+++ b/dev/java/schema.html
@@ -0,0 +1,377 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with Schema &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and writing data" href="io.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-schema">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Working with Schema</a><a class="headerlink" href="#working-with-schema" title="Link to this heading">¶</a></h1>
+<p>Let’s start talking about tabular data. Data often comes in the form of two-dimensional
+sets of heterogeneous data (such as database tables, CSV files…). Arrow provides
+several abstractions to handle such data conveniently and efficiently.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-schema" id="id1">Working with Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-fields" id="id2">Creating Fields</a></p></li>
+<li><p><a class="reference internal" href="#creating-the-schema" id="id3">Creating the Schema</a></p></li>
+<li><p><a class="reference internal" href="#adding-metadata-to-fields-and-schemas" id="id4">Adding Metadata to Fields and Schemas</a></p></li>
+<li><p><a class="reference internal" href="#creating-vectorschemaroot" id="id5">Creating VectorSchemaRoot</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-fields">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Fields</a><a class="headerlink" href="#creating-fields" title="Link to this heading">¶</a></h2>
+<p>Fields are used to denote the particular columns of tabular data.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name: Utf8
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">age</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>age: Int(32, true)
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">points</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>points: List&lt;intCol: Int(32, true)&gt;
+</pre></div>
+</div>
+</section>
+<section id="creating-the-schema">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Creating the Schema</a><a class="headerlink" href="#creating-the-schema" title="Link to this heading">¶</a></h2>
+<p>A schema describes a sequence of columns in tabular data, and consists
+of a list of fields.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">));</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;name: Utf8, document: Utf8, age: Int(32, true), points: List&lt;intCol: Int(32, true)&gt;&gt;
+</pre></div>
+</div>
+</section>
+<section id="adding-metadata-to-fields-and-schemas">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Adding Metadata to Fields and Schemas</a><a class="headerlink" href="#adding-metadata-to-fields-and-schemas" title="Link to this heading">¶</a></h2>
+<p>In case we need to add metadata to our Field we could use:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadata</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;A&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Id card&quot;</span><span class="p">);</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Passport&quot;</span><span class="p">);</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Visa&quot;</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">metadata</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">document</span><span class="p">.</span><span class="na">getMetadata</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>{A=Id card, B=Passport, C=Visa}
+</pre></div>
+</div>
+<p>In case we need to add metadata to our Schema we could use:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadataSchema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">metadataSchema</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;Key-1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Value-1&quot;</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">),</span><span class="w"> </span><span class="n">metadataSchema</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;name: Utf8, document: Utf8, age: Int(32, true), points: List&lt;intCol: Int(32, true)&gt;&gt;(metadata: {Key-1=Value-1})
+</pre></div>
+</div>
+</section>
+<section id="creating-vectorschemaroot">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Creating VectorSchemaRoot</a><a class="headerlink" href="#creating-vectorschemaroot" title="Link to this heading">¶</a></h2>
+<p><code class="docutils literal notranslate"><span class="pre">VectorSchemaRoot</span></code> is somewhat analogous to tables and record batches in the
+other Arrow implementations in that they all are 2D datasets, but the usage is different.</p>
+<p>Let’s populate a <code class="docutils literal notranslate"><span class="pre">VectorSchemaRoot</span></code> with a small batch of records:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.ListVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.impl.UnionListWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">));</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">){</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ListVector</span><span class="w"> </span><span class="n">listVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">ListVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">UnionListWriter</span><span class="w"> </span><span class="n">listWriter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listVector</span><span class="p">.</span><span class="na">getWriter</span><span class="p">();</span>
+<span class="w">    </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">15</span><span class="w"> </span><span class="p">};</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setPosition</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">startList</span><span class="p">();</span>
+<span class="w">        </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">listWriter</span><span class="p">.</span><span class="na">writeInt</span><span class="p">(</span><span class="n">data</span><span class="o">[</span><span class="n">tmp_index</span><span class="o">]</span><span class="p">);</span>
+<span class="w">            </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">endList</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">listVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">root</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age    points
+David    10    [4,8,12]
+Gladis    20    [10,20,30]
+Juan    30    [5,10,15]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-fields">Creating Fields</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-the-schema">Creating the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#adding-metadata-to-fields-and-schemas">Adding Metadata to Fields and Schemas</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-vectorschemaroot">Creating VectorSchemaRoot</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="io.html" title="next chapter">Reading and writing data</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/schema.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/search.html b/dev/java/search.html
new file mode 100644
index 0000000..417ec0d
--- /dev/null
+++ b/dev/java/search.html
@@ -0,0 +1,170 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/java/searchindex.js b/dev/java/searchindex.js
new file mode 100644
index 0000000..253d730
--- /dev/null
+++ b/dev/java/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["avro", "create", "data", "dataset", "flight", "index", "io", "jdbc", "schema", "substrait"], "filenames": ["avro.rst", "create.rst", "data.rst", "dataset.rst", "flight.rst", "index.rst", "io.rst", "jdbc.rst", "schema.rst", "substrait.rst"], "titles": ["Avro", "Creating Arrow Objects", "Data manipulation", "Dataset", "Arrow Flight", "Apache Arrow Java Cookbook", "Reading and writing data", "Arrow JDBC Adapter", "Working with Schema", "Substrait"], "terms": {"encod": [0, 6], "data": [0, 1, 5, 8], "can": [0, 2, 3, 4, 6, 7, 9], "convert": [0, 7, 9], "format": [0, 4], "The": [0, 1, 2, 5, 6, 7, 9], "exampl": [0, 1, 5, 7, 9], "assum": 0, "schema": [0, 2, 4, 5, 6], "i": [0, 1, 2, 5, 7, 8, 9], "store": [0, 4], "separ": [0, 6], "from": [0, 1, 7, 9], "itself": 0, "import": [0, 1, 2, 3, 4, 6, 7, 8, 9], "org": [0, 1, 2, 3, 4, 6, 7, 8, 9], "apach": [0, 1, 2, 3, 4, 6, 7, 8, 9], "adapt": [0, 5], "avrotoarrow": 0, "avrotoarrowconfig": 0, "avrotoarrowconfigbuild": 0, "avrotoarrowvectoriter": 0, "memori": [0, 1, 2, 3, 4, 6, 7, 8, 9], "bufferalloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "rootalloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "vector": [0, 3, 4, 5, 6, 7, 8, 9], "vectorschemaroot": [0, 3, 4, 5, 6], "io": [0, 3, 4, 6, 7, 9], "binarydecod": 0, "decoderfactori": 0, "java": [0, 1, 2, 3, 4, 6, 7, 8, 9], "file": [0, 5, 8, 9], "fileinputstream": [0, 6], "filenotfoundexcept": [0, 6], "ioexcept": [0, 3, 4, 6, 7], "try": [0, 1, 2, 3, 4, 6, 7, 8, 9], "decod": [0, 6], "new": [0, 1, 2, 3, 4, 6, 7, 8, 9], "thirdpartydep": [0, 3, 6, 7, 9], "user": [0, 3, 5, 9], "null": [0, 2, 3, 4, 6, 7, 8, 9], "parser": [0, 9], "pars": 0, "avsc": 0, "alloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "config": [0, 7], "build": [0, 4, 7, 9], "avrotoarrowiter": 0, "while": [0, 3, 4, 6, 7, 9], "hasnext": [0, 4, 7], "root": [0, 1, 2, 3, 4, 6, 7, 8], "next": [0, 4, 7], "system": [0, 1, 2, 3, 4, 6, 7, 8, 9], "out": [0, 1, 3, 4, 7, 8, 9], "print": [0, 1, 2, 3, 4, 6, 7, 8, 9], "contenttotsvstr": [0, 2, 3, 4, 6, 7, 8, 9], "catch": [0, 1, 3, 4, 6, 7, 8, 9], "except": [0, 1, 3, 4, 8, 9], "e": [0, 1, 3, 4, 6, 7, 8, 9], "printstacktrac": [0, 1, 3, 4, 6, 7, 8, 9], "name": [0, 3, 4, 6, 8], "favorite_numb": 0, "favorite_color": 0, "alyssa": 0, "256": 0, "ben": 0, "7": [0, 1, 3, 6, 7], "red": 0, "A": [1, 8], "basic": 1, "unit": 1, "librari": [1, 3, 9], "type": [1, 2, 3, 4, 6, 7, 8], "describ": [1, 8], "valu": [1, 5, 7, 8], "valuevector": [1, 2, 6], "ar": [1, 6, 8, 9], "sequenc": [1, 8], "repres": 1, "one": [1, 2], "dimension": [1, 8], "same": [1, 6], "thei": [1, 8], "mutabl": 1, "contain": [1, 2, 4, 9], "implement": [1, 3, 4, 8], "interfac": 1, "provid": [1, 4, 6, 7, 8], "variou": 1, "allocatenew": [1, 2, 4, 6, 8], "3": [1, 2, 3, 4, 6, 7, 8, 9], "set": [1, 2, 4, 6, 7, 8], "0": [1, 2, 3, 4, 5, 6, 7, 8, 9], "1": [1, 2, 3, 4, 6, 7, 8, 9], "2": [1, 2, 3, 4, 6, 7, 8, 9], "setvaluecount": [1, 2, 6, 8], "varcharvector": [1, 2, 4, 6, 8], "getbyt": [1, 2, 4, 6, 8], "two": [1, 2, 6, 8], "three": [1, 9], "In": [1, 3, 7, 8], "some": [1, 2, 7, 9], "scenario": 1, "column": [1, 2, 3, 7, 8, 9], "us": [1, 2, 4, 6, 8, 9], "save": 1, "fieldvector": [1, 6], "dictionaryencod": [1, 6], "pojo": [1, 2, 3, 4, 6, 8], "arrowtyp": [1, 2, 4, 6, 8], "nio": [1, 4, 6, 9], "charset": [1, 4, 6], "standardcharset": [1, 4, 6], "countri": [1, 6], "dict": [1, 6], "appusercountriesunencod": [1, 6], "app": [1, 6], "10": [1, 2, 3, 6, 8, 9], "andorra": [1, 6], "utf_8": [1, 4, 6], "cuba": [1, 6], "grecia": [1, 6], "guinea": [1, 6], "4": [1, 2, 3, 6, 8, 9], "islandia": [1, 6], "5": [1, 3, 6, 8], "malta": [1, 6], "6": [1, 2, 3, 4, 6], "tailandia": [1, 6], "uganda": [1, 6], "8": [1, 2, 3, 6, 8], "yemen": [1, 6], "9": [1, 3, 6], "zambia": [1, 6], "countriesdictionari": [1, 6], "id": [1, 3, 6, 8], "1l": 1, "order": [1, 2, 4, 6], "fals": [1, 2, 3, 4, 6, 9], "indextyp": [1, 6], "true": [1, 2, 3, 6, 7, 8, 9], "println": [1, 2, 3, 4, 6], "unencod": [1, 6], "appusercountriesdictionaryencod": 1, "complex": [1, 8], "impl": [1, 8], "unionlistwrit": [1, 8], "listvector": [1, 8], "empti": [1, 9], "listwrit": [1, 8], "getwrit": [1, 8], "20": [1, 2, 3, 6, 7, 8], "30": [1, 2, 6, 8], "100": [1, 2, 3], "200": 1, "300": 1, "1000": 1, "2000": 1, "3000": 1, "tmp_index": [1, 8], "setposit": [1, 8], "startlist": [1, 8], "j": [1, 8], "writeint": [1, 8], "endlist": [1, 8], "wai": 1, "copi": [1, 2], "rang": 1, "row": [1, 3, 4, 6, 7], "between": 1, "thi": [1, 2, 4, 5, 7], "we": [1, 2, 3, 4, 6, 7, 8, 9], "portion": 1, "input": 1, "util": [1, 2, 3, 4, 6, 7, 8, 9], "transferpair": 1, "setsaf": 1, "tp": 1, "gettransferpair": 1, "splitandtransf": 1, "getto": 1, "element": [1, 2, 7], "index": [1, 3, 5, 6], "recip": [2, 4, 5], "relat": 2, "filter": [2, 5], "transform": 2, "case": [2, 3, 4, 8], "need": [2, 3, 5, 8], "model": [2, 3], "To": [2, 5], "accomplish": 2, "you": [2, 7], "vectorschemarootappend": 2, "append": 2, "follow": [2, 9], "code": [2, 4], "creat": [2, 4, 5, 6, 9], "them": [2, 9], "togeth": 2, "arrow": [2, 6, 8, 9], "intvector": [2, 6, 8], "fieldtyp": [2, 4, 6, 8], "static": [2, 6, 8], "aslist": [2, 4, 6, 8, 9], "column_on": 2, "nullabl": [2, 4, 6, 8], "int": [2, 3, 4, 6, 8, 9], "32": [2, 3, 6, 8], "rooton": 2, "roottwo": 2, "result": [2, 4], "appenderon": 2, "getvector": [2, 4, 6, 8], "setrowcount": [2, 4, 6, 8], "appendertwo": 2, "34": [2, 6], "75": 2, "vectorappend": 2, "mutat": 2, "initi": 2, "initialvalu": 2, "toappend": 2, "appenderutil": 2, "accept": [2, 7], "typeequalsvisitor": 2, "right": 2, "left1": 2, "left2": 2, "int2": 2, "visitor": 2, "vectorequalsvisitor": 2, "vector1": 2, "vector2": 2, "vector3": 2, "vectorequ": 2, "given": [2, 7], "indic": 2, "algorithm": 2, "defaultvectorcompar": 2, "vectorvaluecompar": 2, "vec": 2, "valueindexcompar": 2, "ba": 2, "abc": 2, "aa": 2, "valuecompar": 2, "createdefaultcompar": 2, "attachvector": 2, "consid": [2, 3], "our": [2, 3, 4, 8], "own": 2, "could": [2, 3, 8], "extend": [2, 4, 9], "overrid": [2, 4, 7], "comparenotnul": 2, "method": 2, "vectorsearch": 2, "linearsearch": 2, "linearsearchvector": 2, "comparatorint": 2, "binarysearch": 2, "binarysearchvector": 2, "origin": 2, "fixedwidthinplacevectorsort": 2, "intvectornotsort": 2, "setnul": 2, "sortinplac": 2, "fixedwidthoutofplacevectorsort": 2, "variablewidthoutofplacevectorsor": 2, "outofplacevectorsort": 2, "intvectorsort": 2, "getfield": [2, 6], "getfieldtyp": 2, "createnewsinglevector": 2, "sorteroutofplacesort": 2, "comparatoroutofplacesort": 2, "getvaluecount": 2, "sortoutofplac": 2, "api": [3, 6], "jni": [3, 9], "c": [3, 8, 9], "an": [3, 7, 9], "auto": [3, 6], "infer": [3, 7], "fileformat": [3, 9], "filesystemdatasetfactori": [3, 9], "nativememorypool": [3, 9], "scanner": [3, 9], "scanopt": [3, 9], "sourc": [3, 9], "datasetfactori": [3, 9], "stream": [3, 4], "streamsupport": 3, "string": [3, 4, 8, 9], "uri": [3, 4, 9], "getproperti": [3, 9], "dir": [3, 9], "parquetfil": 3, "data1": 3, "option": [3, 9], "batchsiz": [3, 9], "32768": [3, 9], "getdefault": [3, 9], "finish": [3, 9], "newscan": [3, 9], "scan": 3, "spliter": 3, "count": [3, 9], "let": [3, 4, 7, 8], "predefin": 3, "inspect": 3, "utf8": [3, 4, 6, 8], "metadata": [3, 5, 7], "avro": [3, 5], "record": [3, 4, 6, 8], "namespac": 3, "field": [3, 4, 5, 6], "writer": [3, 6], "inform": [3, 4], "ipc": [3, 4, 6, 9], "arrowread": [3, 9], "reader": [3, 6, 9], "scanbatch": [3, 9], "loadnextbatch": [3, 6, 9], "getvectorschemaroot": [3, 6, 9], "david": [3, 4, 6, 8], "gladi": [3, 6, 8], "juan": [3, 6, 8], "": [3, 4, 8, 9], "read": [3, 5, 7, 9], "gzip": 3, "compress": 3, "group": [3, 9], "tool": 3, "meta": 3, "data4_3rg_gzip": 3, "ag": [3, 6, 8], "int64": 3, "r": 3, "d": 3, "binari": [3, 6, 9], "l": 3, "rc": 3, "t": [3, 4, 9], "182": 3, "offset": 3, "190": 3, "420": 3, "179": 3, "838": 3, "totalbatchs": 3, "getrowcount": [3, 4, 6], "number": [3, 4, 6], "per": 3, "batch": [3, 4, 5, 6, 8], "total": 3, "size": [3, 5, 6], "jean": 3, "lu": 3, "kei": [3, 5, 8], "sophia": 3, "mara": [3, 6], "arit": 3, "neil": 3, "jason": 3, "john": 3, "peter": 3, "ismael": 3, "11": [3, 9], "have": [3, 7], "data2": 3, "data3": 3, "250": 3, "rowcount": 3, "50": 3, "onli": 3, "certain": 3, "configur": [3, 5], "each": [3, 4], "arrowfil": [3, 6], "random_access": [3, 6], "arrow_ipc": 3, "zlib": 3, "385": 3, "stripe": 3, "5000": 3, "demo": 3, "more": [3, 4], "struct": 3, "_col0": 3, "_col1": 3, "_col2": 3, "_col3": 3, "_col4": 3, "_col5": 3, "_col6": 3, "_col7": 3, "_col8": 3, "block": 3, "262144": 3, "length": [3, 9], "1031": 3, "266": 3, "636": 3, "footer": 3, "129": 3, "1920800": 3, "tech_acquisit": 3, "acquir": 3, "acquire": 3, "amount": 3, "billion": 3, "usd": 3, "date": 3, "acquisit": 3, "nvidia": 3, "mellanox": 3, "04": 3, "05": 3, "2020": 3, "amd": 3, "xilinx": 3, "35": 3, "27": 3, "salesforc": 3, "slack": 3, "01": 3, "12": [3, 8, 9], "section": 4, "work": [4, 5], "For": [4, 7, 9], "detail": 4, "about": [4, 8, 9], "pleas": [4, 6], "take": 4, "look": 4, "rpc": 4, "ll": 4, "handl": [4, 8], "upload": 4, "request": [4, 9], "actual": 4, "action": 4, "asyncputlisten": 4, "callstatu": 4, "criteria": [4, 9], "flightclient": 4, "flightdescriptor": 4, "flightendpoint": 4, "flightinfo": 4, "flightserv": 4, "flightstream": 4, "locat": 4, "noopflightproduc": 4, "putresult": 4, "ticket": 4, "autoclos": 4, "vectorload": 4, "vectorunload": 4, "messag": [4, 6, 7], "arrowrecordbatch": 4, "arraylist": [4, 8], "arrai": [4, 5, 6, 8, 9], "collect": [4, 5, 9], "iter": [4, 7], "list": [4, 8], "concurr": 4, "concurrenthashmap": 4, "class": [4, 7], "dataset": [4, 5, 6, 8], "privat": 4, "final": [4, 9], "long": 4, "public": 4, "getbatch": 4, "return": [4, 9], "getschema": 4, "getrow": 4, "void": [4, 9], "close": 4, "throw": [4, 9], "cookbookproduc": 4, "concurrentmap": 4, "runnabl": 4, "acceptput": 4, "callcontext": 4, "context": 4, "streamlisten": 4, "ackstream": 4, "unload": 4, "getroot": 4, "arb": 4, "getrecordbatch": 4, "add": [4, 8], "getdescriptor": 4, "oncomplet": 4, "getstream": 4, "serverstreamlisten": 4, "listen": 4, "path": [4, 6], "not_found": 4, "withdescript": 4, "unknown": 4, "descriptor": 4, "toruntimeexcept": 4, "loader": 4, "load": [4, 9], "putnext": 4, "complet": 4, "doaction": 4, "getbodi": 4, "switch": 4, "gettyp": [4, 6], "remov": 4, "onerror": 4, "intern": 4, "tostr": 4, "onnext": 4, "els": [4, 7], "reason": 4, "did": 4, "exist": 4, "getflightinfo": 4, "getpath": 4, "singletonlist": [4, 9], "byte": [4, 9], "listflight": 4, "foreach": 4, "k": 4, "v": 4, "forgrpcinsecur": 4, "33333": 4, "produc": 4, "builder": [4, 9], "s1": 4, "port": 4, "getport": 4, "runtimeexcept": [4, 9], "c1": 4, "geturi": 4, "popul": [4, 8], "ronald": 4, "francisco": 4, "clientstreamlisten": 4, "startput": 4, "profil": 4, "manuel": 4, "felip": 4, "jj": 4, "getresult": 4, "c2": 4, "wrote": 4, "getinfo": 4, "c3": 4, "getendpoint": 4, "getticket": 4, "vectorschemarootreceiv": 4, "c4": 4, "receiv": 4, "all": [4, 7, 8], "flightinfosbefor": 4, "c5": 4, "info": 4, "do": 4, "deleteactionresult": 4, "c6": 4, "detel": 4, "c7": 4, "after": [4, 9], "No": 4, "shut": 4, "down": 4, "shutdown": 4, "c8": 4, "successfulli": 4, "grpc": 4, "tcp": 4, "endpoint": 4, "58871b0a": 4, "expirationtim": 4, "none": 4, "appmetadata": 4, "explain": 4, "first": 4, "which": [4, 5, 7], "onc": 4, "so": 4, "retriev": 4, "And": 4, "back": 4, "clonewithtransf": 4, "Then": 4, "confirm": 4, "been": 4, "http": 4, "doc": 4, "html": 4, "demonstr": 5, "how": 5, "solv": 5, "mani": 5, "common": 5, "task": 5, "might": 5, "perform": 5, "when": [5, 6], "also": [5, 6, 9], "serv": 5, "robust": 5, "well": 5, "solut": 5, "those": 5, "get": [5, 6, 9], "start": [5, 6, 8], "see": 5, "instal": 5, "instruct": 5, "test": [5, 6], "16": 5, "snapshot": 5, "object": 5, "slice": 5, "ad": 5, "write": 5, "flight": 5, "simpl": 5, "storag": 5, "servic": 5, "construct": [5, 9], "queri": 5, "parquet": [5, 9], "orc": [5, 9], "csv": [5, 8, 9], "substrait": 5, "project": 5, "manipul": 5, "concaten": 5, "compar": 5, "equal": [5, 7], "search": 5, "sort": 5, "jdbc": 5, "resultset": 5, "convers": 5, "subtyp": 5, "numer": 5, "decim": [5, 9], "precis": 5, "scale": 5, "modul": [5, 7], "page": 5, "defin": [6, 7], "serial": 6, "Such": 6, "directli": 6, "map": [6, 8, 9], "both": 6, "arrowfilewrit": 6, "fileoutputstream": 6, "schemaperson": [6, 8], "namevector": [6, 8], "agevector": [6, 8], "randon_access_to_fil": 6, "getchannel": 6, "writebatch": 6, "end": 6, "written": 6, "getrecordblock": 6, "bytearrayoutputstream": 6, "channel": 6, "newchannel": 6, "arrowstreamwrit": 6, "streaming_to_fil": 6, "offer": 6, "differ": [6, 8], "ani": [6, 7], "gener": 6, "purpos": 6, "chang": 6, "your": 6, "conveni": [6, 8], "arrowfileread": 6, "arrowblock": 6, "loadrecordbatch": 6, "vectorschemarootrecov": 6, "nidia": 6, "15": [6, 8, 9], "alexa": 6, "raul": 6, "jhon": 6, "29": 6, "thomi": 6, "33": 6, "seekablereadchannel": 6, "bytearrayreadableseekablebytechannel": 6, "readallbyt": 6, "arrowstreamread": 6, "fileinputstreamforstream": 6, "bytearrayinputstream": 6, "check": 6, "requir": [6, 9], "track": 6, "dictionaryprovid": 6, "666l": 6, "minortyp": 6, "varchar": [6, 9], "random_access_file_with_dictionari": 6, "mapdictionaryprovid": 6, "put": [6, 7, 8, 9], "appusecountrydictionaryencod": 6, "getdictionari": 6, "getid": 6, "appusecountrydictionaryencodedread": 6, "dictionaryencodingread": 6, "recov": 6, "appusecountrydictionaryread": 6, "getdictionaryvector": 6, "readvector": 6, "666": 6, "main": 7, "help": 7, "u": 7, "jdbctoarrow": 7, "arrowvectoriter": 7, "ibati": 7, "scriptrunn": 7, "bufferedread": 7, "fileread": 7, "sql": [7, 9], "connect": 7, "drivermanag": 7, "sqlexcept": 7, "getconnect": 7, "h2": 7, "mem": 7, "runnerddldml": 7, "setlogwrit": 7, "runscript": 7, "ddl": 7, "dml": 7, "createstat": 7, "executequeri": 7, "select": [7, 9], "int_field1": 7, "bool_field2": 7, "bigint_field5": 7, "table1": 7, "sqltoarrowvectoriter": 7, "101": 7, "1000000000300": 7, "102": 7, "100000000030": 7, "103": 7, "10000000003": 7, "through": 7, "jdbctoarrowconfig": 7, "specifi": 7, "setarraysubtypebycolumnnamemap": 7, "jdbcfieldinfo": 7, "jdbctoarrowconfigbuild": 7, "jdbctoarrowutil": 7, "hashmap": [7, 8, 9], "getutccalendar": 7, "list_field19": 7, "integ": 7, "char_field16": 7, "char": [7, 9], "text": 7, "By": 7, "default": 7, "up": 7, "1024": 7, "custom": [7, 9], "via": 7, "settargetbatchs": 7, "must": 7, "exactli": 7, "match": 7, "unsupportedoperationexcept": 7, "thrown": 7, "like": 7, "bigdecim": 7, "happen": 7, "becaus": 7, "accur": 7, "databas": [7, 8], "driver": 7, "avoid": 7, "either": 7, "roundingmod": 7, "setbigdecimalroundingmod": 7, "expect": 7, "bigint": [7, 9], "math": 7, "setexplicittypesbycolumnnam": 7, "unnecessari": 7, "0000000": 7, "talk": 8, "tabular": 8, "often": 8, "come": 8, "form": 8, "heterogen": 8, "tabl": [8, 9], "sever": 8, "abstract": 8, "effici": 8, "denot": 8, "particular": 8, "inttyp": 8, "listtyp": 8, "childfield": 8, "intcol": 8, "point": 8, "consist": 8, "document": 8, "dictionari": 8, "card": 8, "b": 8, "passport": 8, "visa": 8, "getmetadata": 8, "metadataschema": 8, "somewhat": 8, "analog": 8, "other": [8, 9], "2d": 8, "usag": 8, "small": 8, "integr": 9, "languag": 9, "support": 9, "combin": 9, "acero": 9, "backend": 9, "current": 9, "join": 9, "aggreg": 9, "here": 9, "program": 9, "isthmu": 9, "sqltosubstrait": 9, "proto": 9, "plan": 9, "acerosubstraitconsum": 9, "calcit": 9, "sqlparseexcept": 9, "bytebuff": 9, "querytablen": 9, "nation": 9, "where": 9, "n_nationkei": 9, "17": 9, "NOT": 9, "n_name": 9, "25": 9, "n_regionkei": 9, "n_comment": 9, "152": 9, "execut": 9, "querydatasetthrusubstraitplandefinit": 9, "tpch": 9, "maptabletoarrowread": 9, "substraitplan": 9, "allocatedirect": 9, "tobytearrai": 9, "run": 9, "runqueri": 9, "peru": 9, "platelet": 9, "blith": 9, "pend": 9, "depend": 9, "fluffili": 9, "across": 9, "even": 9, "pinto": 9, "bean": 9, "carefulli": 9, "silent": 9, "accoun": 9, "It": 9, "possibl": 9, "multipl": 9, "base": 9, "tpc": 9, "h": 9, "benchmark": 9, "querytablenationjoincustom": 9, "n": 9, "AS": 9, "number_custom": 9, "ON": 9, "c_nationkei": 9, "BY": 9, "c_custkei": 9, "c_name": 9, "c_address": 9, "40": 9, "c_phone": 9, "c_acctbal": 9, "c_mktsegment": 9, "c_comment": 9, "117": 9, "querytwodatasetsthrusubstraitplandefinit": 9, "urin": 9, "uricustom": 9, "readern": 9, "datasetfactorycustom": 9, "datasetcustom": 9, "scannercustom": 9, "readercustom": 9, "573": 9, "express": 9, "appli": 9, "AND": 9, "sqlexpressiontosubstrait": 9, "extendedexpress": 9, "getfilterexpress": 9, "sqlexpress": 9, "expressiontosubstrait": 9, "expressiontobyt": 9, "filterdataset": 9, "substraitfilt": 9, "iraq": 9, "nic": 9, "deposit": 9, "boost": 9, "atop": 9, "quickli": 9, "regula": 9, "japan": 9, "ousli": 9, "gift": 9, "cajol": 9, "13": 9, "jordan": 9, "ic": 9, "regular": 9, "pa": 9, "14": 9, "kenya": 9, "excus": 9, "haggl": 9, "furious": 9, "wake": 9, "past": 9, "31": 9, "getprojectexpress": 9, "filterandprojectdataset": 9, "substraitproject": 9, "42": 9, "43": 9, "44": 9, "45": 9}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"avro": 0, "content": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "arrow": [0, 1, 3, 4, 5, 7], "creat": [1, 8], "object": 1, "vector": [1, 2], "arrai": [1, 2, 7], "int": 1, "varchar": 1, "dictionari": [1, 6], "encod": 1, "list": 1, "slice": 1, "intvector": 1, "data": [2, 3, 4, 6], "manipul": 2, "concaten": 2, "vectorschemaroot": [2, 7, 8], "valu": [2, 4], "compar": 2, "field": [2, 8], "equal": 2, "search": 2, "linear": 2, "o": 2, "n": 2, "binari": 2, "log": 2, "sort": 2, "In": 2, "place": 2, "sorter": 2, "nlog": 2, "out": [2, 6], "dataset": [3, 9], "construct": 3, "get": [3, 4], "schema": [3, 8], "dure": 3, "from": [3, 6], "queri": [3, 9], "parquet": [3, 6], "file": [3, 6], "For": 3, "directori": 3, "project": [3, 9], "orc": 3, "csv": 3, "flight": 4, "simpl": 4, "kei": 4, "storag": 4, "servic": 4, "client": 4, "server": 4, "start": 4, "connect": 4, "put": 4, "metadata": [4, 8], "delet": 4, "valid": 4, "stop": 4, "apach": 5, "java": 5, "cookbook": 5, "indic": 5, "tabl": 5, "read": 6, "write": 6, "random": 6, "access": 6, "buffer": 6, "stream": 6, "format": 6, "handl": 6, "jdbc": 7, "adapt": 7, "resultset": 7, "convers": 7, "configur": 7, "subtyp": 7, "batch": 7, "size": 7, "numer": 7, "decim": 7, "precis": 7, "scale": 7, "work": 8, "ad": 8, "substrait": 9, "filter": 9}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Avro": [[0, "avro"]], "Contents": [[0, "contents"], [1, "contents"], [2, "contents"], [3, "contents"], [4, "contents"], [6, "contents"], [7, "contents"], [8, "contents"], [9, "contents"]], "Avro to Arrow": [[0, "avro-to-arrow"]], "Creating Arrow Objects": [[1, "creating-arrow-objects"]], "Creating Vectors (arrays)": [[1, "creating-vectors-arrays"]], "Array of Int": [[1, "array-of-int"]], "Array of Varchar": [[1, "array-of-varchar"]], "Dictionary-Encoded Array of Varchar": [[1, "dictionary-encoded-array-of-varchar"]], "Array of List": [[1, "array-of-list"]], "Slicing": [[1, "slicing"]], "Slicing IntVector": [[1, "slicing-intvector"]], "Data manipulation": [[2, "data-manipulation"]], "Concatenate VectorSchemaRoots": [[2, "concatenate-vectorschemaroots"]], "Concatenate Value Vectors": [[2, "concatenate-value-vectors"]], "Compare Vectors for Field Equality": [[2, "compare-vectors-for-field-equality"]], "Compare Vectors Equality": [[2, "compare-vectors-equality"]], "Compare Values on the Array": [[2, "compare-values-on-the-array"]], "Search Values on the Array": [[2, "search-values-on-the-array"]], "Linear Search - O(n)": [[2, "linear-search-o-n"]], "Binary Search - O(log(n))": [[2, "binary-search-o-log-n"]], "Sort Values on the Array": [[2, "sort-values-on-the-array"]], "In-place Sorter - O(nlog(n))": [[2, "in-place-sorter-o-nlog-n"]], "Out-place Sorter - O(nlog(n))": [[2, "out-place-sorter-o-nlog-n"]], "Dataset": [[3, "dataset"]], "Constructing Datasets": [[3, "constructing-datasets"]], "Getting the Schema": [[3, "getting-the-schema"]], "During Dataset Construction": [[3, "during-dataset-construction"]], "From a Dataset": [[3, "from-a-dataset"]], "Query Parquet File": [[3, "query-parquet-file"]], "Query Data Content For File": [[3, "query-data-content-for-file"], [3, "id1"], [3, "id2"], [3, "id3"]], "Query Data Content For Directory": [[3, "query-data-content-for-directory"]], "Query Data Content with Projection": [[3, "query-data-content-with-projection"]], "Query Arrow Files": [[3, "query-arrow-files"]], "Query ORC File": [[3, "query-orc-file"]], "Query CSV File": [[3, "query-csv-file"]], "Arrow Flight": [[4, "arrow-flight"]], "Simple Key-Value Storage Service with Arrow Flight": [[4, "simple-key-value-storage-service-with-arrow-flight"]], "Flight Client and Server": [[4, "flight-client-and-server"]], "Start Flight Server": [[4, "start-flight-server"]], "Connect to Flight Server": [[4, "connect-to-flight-server"]], "Put Data": [[4, "put-data"]], "Get Metadata": [[4, "get-metadata"]], "Get Data": [[4, "get-data"]], "Delete data": [[4, "delete-data"]], "Validate Delete Data": [[4, "validate-delete-data"]], "Stop Flight Server": [[4, "stop-flight-server"]], "Apache Arrow Java Cookbook": [[5, "apache-arrow-java-cookbook"]], "Contents:": [[5, null]], "Indices and tables": [[5, "indices-and-tables"]], "Reading and writing data": [[6, "reading-and-writing-data"]], "Writing": [[6, "writing"]], "Writing Random Access Files": [[6, "writing-random-access-files"]], "Write - Out to File": [[6, "write-out-to-file"], [6, "id1"]], "Write - Out to Buffer": [[6, "write-out-to-buffer"], [6, "id2"]], "Writing Streaming Format": [[6, "writing-streaming-format"]], "Reading": [[6, "reading"]], "Reading Random Access Files": [[6, "reading-random-access-files"]], "Read - From File": [[6, "read-from-file"], [6, "id3"]], "Read - From Buffer": [[6, "read-from-buffer"], [6, "id4"]], "Reading Streaming Format": [[6, "reading-streaming-format"]], "Reading Parquet File": [[6, "reading-parquet-file"]], "Handling Data with Dictionaries": [[6, "handling-data-with-dictionaries"]], "Arrow JDBC Adapter": [[7, "arrow-jdbc-adapter"]], "ResultSet to VectorSchemaRoot Conversion": [[7, "resultset-to-vectorschemaroot-conversion"]], "Configuring Array subtypes": [[7, "configuring-array-subtypes"]], "Configuring batch size": [[7, "configuring-batch-size"]], "Configuring numeric (decimal) precision and scale": [[7, "configuring-numeric-decimal-precision-and-scale"]], "Working with Schema": [[8, "working-with-schema"]], "Creating Fields": [[8, "creating-fields"]], "Creating the Schema": [[8, "creating-the-schema"]], "Adding Metadata to Fields and Schemas": [[8, "adding-metadata-to-fields-and-schemas"]], "Creating VectorSchemaRoot": [[8, "creating-vectorschemaroot"]], "Substrait": [[9, "substrait"]], "Querying Datasets": [[9, "querying-datasets"]], "Filtering and Projecting Datasets": [[9, "filtering-and-projecting-datasets"]], "Filtering a Dataset": [[9, "filtering-a-dataset"]], "Projecting a Dataset": [[9, "projecting-a-dataset"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/dev/java/substrait.html b/dev/java/substrait.html
new file mode 100644
index 0000000..7b10251
--- /dev/null
+++ b/dev/java/substrait.html
@@ -0,0 +1,530 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Substrait &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Data manipulation" href="data.html" />
+    <link rel="prev" title="Dataset" href="dataset.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="substrait">
+<span id="arrow-substrait"></span><h1><a class="toc-backref" href="#id2" role="doc-backlink">Substrait</a><a class="headerlink" href="#substrait" title="Link to this heading">¶</a></h1>
+<p>Arrow can use <a class="reference external" href="https://substrait.io/">Substrait</a> to integrate with other languages.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#substrait" id="id2">Substrait</a></p>
+<ul>
+<li><p><a class="reference internal" href="#querying-datasets" id="id3">Querying Datasets</a></p></li>
+<li><p><a class="reference internal" href="#filtering-and-projecting-datasets" id="id4">Filtering and Projecting Datasets</a></p>
+<ul>
+<li><p><a class="reference internal" href="#filtering-a-dataset" id="id5">Filtering a Dataset</a></p></li>
+<li><p><a class="reference internal" href="#projecting-a-dataset" id="id6">Projecting a Dataset</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<p>The Substrait support in Arrow combines <a class="reference internal" href="dataset.html"><span class="doc">Dataset</span></a> and
+<a class="reference external" href="https://github.com/substrait-io/substrait-java">substrait-java</a> to query datasets using <a class="reference external" href="https://arrow.apache.org/docs/cpp/streaming_execution.html">Acero</a> as a backend.</p>
+<p>Acero currently supports:</p>
+<ul class="simple">
+<li><p>Reading Arrow, CSV, ORC, and Parquet files</p></li>
+<li><p>Filters</p></li>
+<li><p>Projections</p></li>
+<li><p>Joins</p></li>
+<li><p>Aggregates</p></li>
+</ul>
+<section id="querying-datasets">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Querying Datasets</a><a class="headerlink" href="#querying-datasets" title="Link to this heading">¶</a></h2>
+<p>Here is an example of a Java program that queries a Parquet file:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.Plan</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.substrait.AceroSubstraitConsumer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+
+<span class="n">Plan</span><span class="w"> </span><span class="nf">queryTableNation</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">sql</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;SELECT * FROM NATION WHERE N_NATIONKEY = 17&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, N_NAME CHAR(25), &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">           </span><span class="s">&quot;N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">SqlToSubstrait</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlToSubstrait</span><span class="p">();</span>
+<span class="w">   </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="p">.</span><span class="na">execute</span><span class="p">(</span><span class="n">sql</span><span class="p">,</span><span class="w"> </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">nation</span><span class="p">));</span>
+<span class="w">   </span><span class="k">return</span><span class="w"> </span><span class="n">plan</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">void</span><span class="w"> </span><span class="nf">queryDatasetThruSubstraitPlanDefinition</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="w">   </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">       </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">       </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">               </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">       </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">       </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">       </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="w">   </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">       </span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">ArrowReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">mapTableToArrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">       </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;NATION&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">reader</span><span class="p">);</span>
+<span class="w">       </span><span class="c1">// get binary plan</span>
+<span class="w">       </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queryTableNation</span><span class="p">();</span>
+<span class="w">       </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">substraitPlan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">().</span><span class="na">length</span><span class="p">);</span>
+<span class="w">       </span><span class="n">substraitPlan</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">());</span>
+<span class="w">       </span><span class="c1">// run query</span>
+<span class="w">       </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">arrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AceroSubstraitConsumer</span><span class="p">(</span><span class="n">allocator</span><span class="p">).</span><span class="na">runQuery</span><span class="p">(</span>
+<span class="w">           </span><span class="n">substraitPlan</span><span class="p">,</span>
+<span class="w">           </span><span class="n">mapTableToArrowReader</span>
+<span class="w">       </span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">           </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">               </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">           </span><span class="p">}</span>
+<span class="w">       </span><span class="p">}</span>
+<span class="w">   </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">       </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">   </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">queryDatasetThruSubstraitPlanDefinition</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>N_NATIONKEY    N_NAME    N_REGIONKEY    N_COMMENT
+17    PERU    1    platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+</pre></div>
+</div>
+<p>It is also possible to query multiple datasets and join them based on some criteria.
+For example, we can join the nation and customer tables from the TPC-H benchmark:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.Plan</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.substrait.AceroSubstraitConsumer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Arrays</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+
+<span class="n">Plan</span><span class="w"> </span><span class="nf">queryTableNationJoinCustomer</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">sql</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;SELECT n.n_name, COUNT(*) AS NUMBER_CUSTOMER FROM NATION n JOIN CUSTOMER c &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;ON n.n_nationkey = c.c_nationkey WHERE n.n_nationkey = 17 &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;GROUP BY n.n_name&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;N_NAME CHAR(25), N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">customer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE CUSTOMER (C_CUSTKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_PHONE CHAR(15), C_ACCTBAL DECIMAL, C_MKTSEGMENT CHAR(10), &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_COMMENT VARCHAR(117) )&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">SqlToSubstrait</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlToSubstrait</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="p">.</span><span class="na">execute</span><span class="p">(</span><span class="n">sql</span><span class="p">,</span>
+<span class="w">        </span><span class="n">Arrays</span><span class="p">.</span><span class="na">asList</span><span class="p">(</span><span class="n">nation</span><span class="p">,</span><span class="w"> </span><span class="n">customer</span><span class="p">));</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">plan</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">void</span><span class="w"> </span><span class="nf">queryTwoDatasetsThruSubstraitPlanDefinition</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">uriNation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">uriCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/customer.parquet&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">        </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">        </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uriNation</span><span class="p">);</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">        </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">readerNation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">();</span>
+<span class="w">        </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactoryCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uriCustomer</span><span class="p">);</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">datasetCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactoryCustomer</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">        </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scannerCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetCustomer</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">readerCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scannerCustomer</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="w">    </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="c1">// map table to reader</span>
+<span class="w">        </span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">ArrowReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">mapTableToArrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">        </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;NATION&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">readerNation</span><span class="p">);</span>
+<span class="w">        </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;CUSTOMER&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">readerCustomer</span><span class="p">);</span>
+<span class="w">        </span><span class="c1">// get binary plan</span>
+<span class="w">        </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queryTableNationJoinCustomer</span><span class="p">();</span>
+<span class="w">        </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">substraitPlan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span>
+<span class="w">            </span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">().</span><span class="na">length</span><span class="p">);</span>
+<span class="w">        </span><span class="n">substraitPlan</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">());</span>
+<span class="w">        </span><span class="c1">// run query</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">arrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AceroSubstraitConsumer</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">).</span><span class="na">runQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="n">substraitPlan</span><span class="p">,</span>
+<span class="w">            </span><span class="n">mapTableToArrowReader</span>
+<span class="w">        </span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">queryTwoDatasetsThruSubstraitPlanDefinition</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>N_NAME    NUMBER_CUSTOMER
+PERU    573
+</pre></div>
+</div>
+</section>
+<section id="filtering-and-projecting-datasets">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Filtering and Projecting Datasets</a><a class="headerlink" href="#filtering-and-projecting-datasets" title="Link to this heading">¶</a></h2>
+<p>Arrow Dataset supports filters and projections with Substrait’s
+<a class="reference external" href="https://github.com/substrait-io/substrait/blob/main/site/docs/expressions/extended_expression.md">Extended Expression</a>. The substrait-java library is required to construct
+these expressions.</p>
+<section id="filtering-a-dataset">
+<h3><a class="toc-backref" href="#id5" role="doc-backlink">Filtering a Dataset</a><a class="headerlink" href="#filtering-a-dataset" title="Link to this heading">¶</a></h3>
+<p>Here is an example of a Java program that filters a Parquet file:</p>
+<ul class="simple">
+<li><p>Loads a Parquet file containing the “nation” table from the TPC-H benchmark.</p></li>
+<li><dl class="simple">
+<dt>Applies a filter:</dt><dd><ul>
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">&gt;</span> <span class="pre">10,</span> <span class="pre">AND</span></code></p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">&lt;</span> <span class="pre">15`</span></code></p></li>
+</ul>
+</dd>
+</dl>
+</li>
+</ul>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlExpressionToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.ExtendedExpression</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Optional</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="n">ByteBuffer</span><span class="w"> </span><span class="nf">getFilterExpression</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">sqlExpression</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;N_NATIONKEY &gt; 10 AND N_NATIONKEY &lt; 15&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), &quot;</span>
+<span class="w">          </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">SqlExpressionToSubstrait</span><span class="w"> </span><span class="n">expressionToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlExpressionToSubstrait</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ExtendedExpression</span><span class="w"> </span><span class="n">expression</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="n">expressionToSubstrait</span><span class="p">.</span><span class="na">convert</span><span class="p">(</span><span class="n">sqlExpression</span><span class="p">,</span><span class="w"> </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">nation</span><span class="p">));</span>
+<span class="w">  </span><span class="kt">byte</span><span class="o">[]</span><span class="w"> </span><span class="n">expressionToByte</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">expression</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">byteBuffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">.</span><span class="na">length</span><span class="p">);</span>
+<span class="w">  </span><span class="n">byteBuffer</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">);</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">byteBuffer</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">void</span><span class="w"> </span><span class="nf">filterDataset</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">.</span><span class="na">Builder</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">)</span>
+<span class="w">          </span><span class="p">.</span><span class="na">columns</span><span class="p">(</span><span class="n">Optional</span><span class="p">.</span><span class="na">empty</span><span class="p">())</span>
+<span class="w">          </span><span class="p">.</span><span class="na">substraitFilter</span><span class="p">(</span><span class="n">getFilterExpression</span><span class="p">())</span>
+<span class="w">          </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">  </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">      </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span>
+<span class="w">          </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">              </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">      </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">      </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">      </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">      </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">  </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">throw</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RuntimeException</span><span class="p">(</span><span class="n">e</span><span class="p">);</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">filterDataset</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>n_nationkey    n_name    n_regionkey    n_comment
+11    IRAQ    4    nic deposits boost atop the quickly final requests? quickly regula
+12    JAPAN    2    ously. final, express gifts cajole a
+13    JORDAN    4    ic deposits are blithely about the carefully regular pa
+14    KENYA    0     pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+</pre></div>
+</div>
+</section>
+<section id="projecting-a-dataset">
+<h3><a class="toc-backref" href="#id6" role="doc-backlink">Projecting a Dataset</a><a class="headerlink" href="#projecting-a-dataset" title="Link to this heading">¶</a></h3>
+<p>The following Java program projects new columns after applying a filter to
+a Parquet file:</p>
+<ul class="simple">
+<li><p>Loads a Parquet file containing the “nation” table from the TPC-H benchmark.</p></li>
+<li><p>Applies a filter:</p></li>
+</ul>
+<blockquote>
+<div><ul class="simple">
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">&gt;</span> <span class="pre">10,</span> <span class="pre">AND</span></code></p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">&lt;</span> <span class="pre">15</span></code></p></li>
+</ul>
+</div></blockquote>
+<ul class="simple">
+<li><p>Projects three new columns:</p></li>
+</ul>
+<blockquote>
+<div><ul class="simple">
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NAME</span></code></p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">&gt;</span> <span class="pre">12</span></code></p></li>
+<li><p><code class="docutils literal notranslate"><span class="pre">N_NATIONKEY</span> <span class="pre">+</span> <span class="pre">31</span></code></p></li>
+</ul>
+</div></blockquote>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlExpressionToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.ExtendedExpression</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Optional</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="n">ByteBuffer</span><span class="w"> </span><span class="nf">getProjectExpression</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="n">sqlExpression</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="o">[]</span><span class="p">{</span><span class="s">&quot;N_NAME&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;N_NATIONKEY &gt; 12&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;N_NATIONKEY + 31&quot;</span><span class="p">};</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), &quot;</span>
+<span class="w">          </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">SqlExpressionToSubstrait</span><span class="w"> </span><span class="n">expressionToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlExpressionToSubstrait</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ExtendedExpression</span><span class="w"> </span><span class="n">expression</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="n">expressionToSubstrait</span><span class="p">.</span><span class="na">convert</span><span class="p">(</span><span class="n">sqlExpression</span><span class="p">,</span><span class="w"> </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">nation</span><span class="p">));</span>
+<span class="w">  </span><span class="kt">byte</span><span class="o">[]</span><span class="w"> </span><span class="n">expressionToByte</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">expression</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">byteBuffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">.</span><span class="na">length</span><span class="p">);</span>
+<span class="w">  </span><span class="n">byteBuffer</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">);</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">byteBuffer</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="n">ByteBuffer</span><span class="w"> </span><span class="nf">getFilterExpression</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">sqlExpression</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;N_NATIONKEY &gt; 10 AND N_NATIONKEY &lt; 15&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY INT NOT NULL, N_NAME CHAR(25), &quot;</span>
+<span class="w">          </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;N_REGIONKEY INT NOT NULL, N_COMMENT VARCHAR)&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">SqlExpressionToSubstrait</span><span class="w"> </span><span class="n">expressionToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlExpressionToSubstrait</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ExtendedExpression</span><span class="w"> </span><span class="n">expression</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="n">expressionToSubstrait</span><span class="p">.</span><span class="na">convert</span><span class="p">(</span><span class="n">sqlExpression</span><span class="p">,</span><span class="w"> </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">nation</span><span class="p">));</span>
+<span class="w">  </span><span class="kt">byte</span><span class="o">[]</span><span class="w"> </span><span class="n">expressionToByte</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">expression</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">();</span>
+<span class="w">  </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">byteBuffer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">.</span><span class="na">length</span><span class="p">);</span>
+<span class="w">  </span><span class="n">byteBuffer</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">expressionToByte</span><span class="p">);</span>
+<span class="w">  </span><span class="k">return</span><span class="w"> </span><span class="n">byteBuffer</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kt">void</span><span class="w"> </span><span class="nf">filterAndProjectDataset</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">  </span><span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">  </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span>
+<span class="w">      </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">.</span><span class="na">Builder</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">)</span>
+<span class="w">          </span><span class="p">.</span><span class="na">columns</span><span class="p">(</span><span class="n">Optional</span><span class="p">.</span><span class="na">empty</span><span class="p">())</span>
+<span class="w">          </span><span class="p">.</span><span class="na">substraitFilter</span><span class="p">(</span><span class="n">getFilterExpression</span><span class="p">())</span>
+<span class="w">          </span><span class="p">.</span><span class="na">substraitProjection</span><span class="p">(</span><span class="n">getProjectExpression</span><span class="p">())</span>
+<span class="w">          </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">  </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">      </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span>
+<span class="w">          </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">              </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">      </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">      </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">      </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">      </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">  </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">throw</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RuntimeException</span><span class="p">(</span><span class="n">e</span><span class="p">);</span>
+<span class="w">  </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">filterAndProjectDataset</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>column-1    column-2    column-3
+IRAQ    false    42
+JAPAN    false    43
+JORDAN    true    44
+KENYA    true    45
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Substrait</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#querying-datasets">Querying Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#filtering-and-projecting-datasets">Filtering and Projecting Datasets</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="dataset.html" title="previous chapter">Dataset</a></li>
+      <li>Next: <a href="data.html" title="next chapter">Data manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/substrait.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/_sources/create.rst.txt b/dev/py/_sources/create.rst.txt
new file mode 100644
index 0000000..f41e748
--- /dev/null
+++ b/dev/py/_sources/create.rst.txt
@@ -0,0 +1,305 @@
+.. 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.
+
+======================
+Creating Arrow Objects
+======================
+
+Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.
+
+.. contents::
+
+Creating Arrays
+===============
+
+Arrow keeps data in continuous arrays optimised for memory footprint
+and SIMD analyses. In Python it's possible to build :class:`pyarrow.Array`
+starting from Python ``lists`` (or sequence types in general),
+``numpy`` arrays and ``pandas`` Series.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    array = pa.array([1, 2, 3, 4, 5])
+
+.. testcode::
+
+    print(array)
+
+.. testoutput::
+
+    [
+      1,
+      2,
+      3,
+      4,
+      5
+    ]
+
+Arrays can also provide a ``mask`` to specify which values should
+be considered nulls
+
+.. testcode::
+
+    import numpy as np
+
+    array = pa.array([1, 2, 3, 4, 5],
+                     mask=np.array([True, False, True, False, True]))
+
+    print(array)
+
+.. testoutput::
+
+    [
+      null,
+      2,
+      null,
+      4,
+      null
+    ]
+
+When building arrays from ``numpy`` or ``pandas``, Arrow will leverage
+optimized code paths that rely on the internal in-memory representation
+of the data by ``numpy`` and ``pandas``
+
+.. testcode::
+
+    import numpy as np
+    import pandas as pd
+
+    array_from_numpy = pa.array(np.arange(5))
+    array_from_pandas = pa.array(pd.Series([1, 2, 3, 4, 5]))
+
+Creating Tables
+===============
+
+Arrow supports tabular data in :class:`pyarrow.Table`: each column
+is represented by a :class:`pyarrow.ChunkedArray` and tables can be created
+by pairing multiple arrays with names for their columns
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.table([
+        pa.array([1, 2, 3, 4, 5]),
+        pa.array(["a", "b", "c", "d", "e"]),
+        pa.array([1.0, 2.0, 3.0, 4.0, 5.0])
+    ], names=["col1", "col2", "col3"])
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Create Table from Plain Types
+=============================
+
+Arrow allows fast zero copy creation of arrow arrays
+from numpy and pandas arrays and series, but it's also
+possible to create Arrow Arrays and Tables from
+plain Python structures.
+
+The :func:`pyarrow.table` function allows creation of Tables
+from a variety of inputs, including plain python objects
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.table({
+        "col1": [1, 2, 3, 4, 5],
+        "col2": ["a", "b", "c", "d", "e"]
+    })
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+
+.. note::
+
+    All values provided in the dictionary will be passed to
+    :func:`pyarrow.array` for conversion to Arrow arrays,
+    and will benefit from zero copy behaviour when possible.
+
+The :meth:`pyarrow.Table.from_pylist` method allows the creation
+of Tables from python lists of row dicts. Types are inferred if a
+schema is not explicitly passed.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.Table.from_pylist([
+        {"col1": 1, "col2": "a"},
+        {"col1": 2, "col2": "b"},
+        {"col1": 3, "col2": "c"},
+        {"col1": 4, "col2": "d"},
+        {"col1": 5, "col2": "e"}
+    ])
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+
+Creating Record Batches
+=======================
+
+Most I/O operations in Arrow happen when shipping batches of data
+to their destination.  :class:`pyarrow.RecordBatch` is the way
+Arrow represents batches of data.  A RecordBatch can be seen as a slice
+of a table.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    batch = pa.RecordBatch.from_arrays([
+        pa.array([1, 3, 5, 7, 9]),
+        pa.array([2, 4, 6, 8, 10])
+    ], names=["odd", "even"])
+
+Multiple batches can be combined into a table using
+:meth:`pyarrow.Table.from_batches`
+
+.. testcode::
+
+    second_batch = pa.RecordBatch.from_arrays([
+        pa.array([11, 13, 15, 17, 19]),
+        pa.array([12, 14, 16, 18, 20])
+    ], names=["odd", "even"])
+
+    table = pa.Table.from_batches([batch, second_batch])
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    odd: int64
+    even: int64
+    ----
+    odd: [[1,3,5,7,9],[11,13,15,17,19]]
+    even: [[2,4,6,8,10],[12,14,16,18,20]]
+
+Equally, :class:`pyarrow.Table` can be converted to a list of
+:class:`pyarrow.RecordBatch` using the :meth:`pyarrow.Table.to_batches`
+method
+
+.. testcode::
+
+    record_batches = table.to_batches(max_chunksize=5)
+    print(len(record_batches))
+
+.. testoutput::
+
+    2
+
+Store Categorical Data
+======================
+
+Arrow provides the :class:`pyarrow.DictionaryArray` type
+to represent categorical data without the cost of
+storing and repeating the categories over and over.  This can reduce memory use
+when columns might have large values (such as text).
+
+If you have an array containing repeated categorical data,
+it is possible to convert it to a :class:`pyarrow.DictionaryArray`
+using :meth:`pyarrow.Array.dictionary_encode`
+
+.. testcode::
+
+    arr = pa.array(["red", "green", "blue", "blue", "green", "red"])
+
+    categorical = arr.dictionary_encode()
+    print(categorical)
+
+.. testoutput::
+
+    ...
+    -- dictionary:
+      [
+        "red",
+        "green",
+        "blue"
+      ]
+    -- indices:
+      [
+        0,
+        1,
+        2,
+        2,
+        1,
+        0
+      ]
+
+If you already know the categories and indices then you can skip the encode
+step and directly create the ``DictionaryArray`` using
+:meth:`pyarrow.DictionaryArray.from_arrays`
+
+.. testcode::
+
+    categorical = pa.DictionaryArray.from_arrays(
+        indices=[0, 1, 2, 2, 1, 0],
+        dictionary=["red", "green", "blue"]
+    )
+    print(categorical)
+
+.. testoutput::
+
+    ...
+    -- dictionary:
+      [
+        "red",
+        "green",
+        "blue"
+      ]
+    -- indices:
+      [
+        0,
+        1,
+        2,
+        2,
+        1,
+        0
+      ]
diff --git a/dev/py/_sources/data.rst.txt b/dev/py/_sources/data.rst.txt
new file mode 100644
index 0000000..e31593a
--- /dev/null
+++ b/dev/py/_sources/data.rst.txt
@@ -0,0 +1,574 @@
+.. 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.
+
+=================
+Data Manipulation
+=================
+
+Recipes related to filtering or transforming data in
+arrays and tables.
+
+.. contents::
+
+See :ref:`compute` for a complete list of all available compute functions
+
+Computing Mean/Min/Max values of an array
+=========================================
+
+Arrow provides compute functions that can be applied to arrays.
+Those compute functions are exposed through the :mod:`pyarrow.compute`
+module.
+
+.. testsetup::
+
+  import numpy as np
+  import pyarrow as pa
+
+  arr = pa.array(np.arange(100))
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+  print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+  0 .. 99
+
+We can compute the ``mean`` using the :func:`pyarrow.compute.mean`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  mean = pc.mean(arr)
+  print(mean)
+
+.. testoutput::
+
+  49.5
+
+And the ``min`` and ``max`` using the :func:`pyarrow.compute.min_max`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  min_max = pc.min_max(arr)
+  print(min_max)
+
+.. testoutput::
+
+  [('min', 0), ('max', 99)]
+
+Counting Occurrences of Elements
+================================
+
+Arrow provides compute functions that can be applied to arrays,
+those compute functions are exposed through the :mod:`pyarrow.compute`
+module.
+
+.. testsetup::
+
+  import pyarrow as pa
+
+  nums_arr = pa.array(list(range(10))*10)
+
+Given an array with all numbers from 0 to 9 repeated 10 times
+
+.. testcode::
+
+  print(f"LEN: {len(nums_arr)}, MIN/MAX: {nums_arr[0]} .. {nums_arr[-1]}")
+
+.. testoutput::
+
+  LEN: 100, MIN/MAX: 0 .. 9
+
+We can count occurrences of all entries in the array using the
+:func:`pyarrow.compute.value_counts` function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  counts = pc.value_counts(nums_arr)
+  for pair in counts:
+      print(pair)
+
+.. testoutput::
+
+  [('values', 0), ('counts', 10)]
+  [('values', 1), ('counts', 10)]
+  [('values', 2), ('counts', 10)]
+  [('values', 3), ('counts', 10)]
+  [('values', 4), ('counts', 10)]
+  [('values', 5), ('counts', 10)]
+  [('values', 6), ('counts', 10)]
+  [('values', 7), ('counts', 10)]
+  [('values', 8), ('counts', 10)]
+  [('values', 9), ('counts', 10)]
+
+Applying arithmetic functions to arrays.
+=========================================
+
+The compute functions in :mod:`pyarrow.compute` also include
+common transformations such as arithmetic functions.
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+  print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+  0 .. 99
+
+We can multiply all values by 2 using the :func:`pyarrow.compute.multiply`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  doubles = pc.multiply(arr, 2)
+  print(f"{doubles[0]} .. {doubles[-1]}")
+
+.. testoutput::
+
+  0 .. 198
+
+Appending tables to an existing table
+=====================================
+
+If you have data split across two different tables, it is possible
+to concatenate their rows into a single table.
+
+If we have the list of Oscar nominations divided between two different tables:
+
+.. testcode::
+
+  import pyarrow as pa
+
+  oscar_nominations_1 = pa.table([
+    ["Meryl Streep", "Katharine Hepburn"],
+    [21, 12]
+  ], names=["actor", "nominations"])
+
+  oscar_nominations_2 = pa.table([
+    ["Jack Nicholson", "Bette Davis"],
+    [12, 10]
+  ], names=["actor", "nominations"])
+
+We can combine them into a single table using :func:`pyarrow.concat_tables`:
+
+.. testcode::
+
+  oscar_nominations = pa.concat_tables([oscar_nominations_1, 
+                                        oscar_nominations_2])
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"],["Jack Nicholson","Bette Davis"]]
+    nominations: [[21,12],[12,10]]
+
+.. note::
+
+  By default, appending two tables is a zero-copy operation that doesn't need to
+  copy or rewrite data. As tables are made of :class:`pyarrow.ChunkedArray`,
+  the result will be a table with multiple chunks, each pointing to the original 
+  data that has been appended. Under some conditions, Arrow might have to 
+  cast data from one type to another (if `promote=True`).  In such cases the data 
+  will need to be copied and an extra cost will occur.
+
+Adding a column to an existing Table
+====================================
+
+If you have a table it is possible to extend its columns using
+:meth:`pyarrow.Table.append_column`
+
+Suppose we have a table with oscar nominations for each actress
+
+.. testcode::
+
+  import pyarrow as pa
+
+  oscar_nominations = pa.table([
+    ["Meryl Streep", "Katharine Hepburn"],
+    [21, 12]
+  ], names=["actor", "nominations"])
+
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"]]
+    nominations: [[21,12]]
+
+it's possible to append an additional column to track the years the
+nomination was won using :meth:`pyarrow.Table.append_column`
+
+.. testcode::
+
+  oscar_nominations = oscar_nominations.append_column(
+    "wonyears", 
+    pa.array([
+      [1980, 1983, 2012],
+      [1934, 1968, 1969, 1982]
+    ])
+  )
+
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    wonyears: list<item: int64>
+      child 0, item: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"]]
+    nominations: [[21,12]]
+    wonyears: [[[1980,1983,2012],[1934,1968,1969,1982]]]
+
+
+Replacing a column in an existing Table
+=======================================
+
+If you have a table it is possible to replace an existing column using
+:meth:`pyarrow.Table.set_column`
+
+Suppose we have a table with information about items sold at a supermarket
+on a particular day.
+
+.. testcode::
+
+  import pyarrow as pa
+
+  sales_data = pa.table([
+    ["Potato", "Bean", "Cucumber", "Eggs"],
+    [21, 12, 10, 30]
+  ], names=["item", "amount"])
+
+  print(sales_data)
+
+.. testoutput::
+
+    pyarrow.Table
+    item: string
+    amount: int64
+    ----
+    item: [["Potato","Bean","Cucumber","Eggs"]]
+    amount: [[21,12,10,30]]
+
+it's possible to replace the existing column `amount`
+in index `1` to update the sales 
+using :meth:`pyarrow.Table.set_column`
+
+.. testcode::
+
+  new_sales_data = sales_data.set_column(
+    1, 
+    "new_amount",
+    pa.array([30, 20, 15, 40])
+  )
+
+  print(new_sales_data)
+
+.. testoutput::
+
+    pyarrow.Table
+    item: string
+    new_amount: int64
+    ----
+    item: [["Potato","Bean","Cucumber","Eggs"]]
+    new_amount: [[30,20,15,40]]
+
+.. data_group_a_table:
+
+Group a Table
+================
+
+If you have a table which needs to be grouped by a particular key, 
+you can use :meth:`pyarrow.Table.group_by` followed by an aggregation
+operation :meth:`pyarrow.TableGroupBy.aggregate`. Learn more about
+groupby operations `here <https://arrow.apache.org/docs/python/compute.html#grouped-aggregations>`_.
+
+For example, let’s say we have some data with a particular set of keys
+and values associated with that key. And we want to group the data by 
+those keys and apply an aggregate function like sum to evaluate
+how many items are for each unique key. 
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+       pa.array(["a", "a", "b", "b", "c", "d", "e", "c"]),
+       pa.array([11, 20, 3, 4, 5, 1, 4, 10]),
+      ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","c","d","e","c"]]
+    values: [[11,20,3,4,5,1,4,10]]
+
+Now we let's apply a groupby operation. The table will be grouped
+by the field ``key`` and an aggregation operation, ``sum`` is applied
+on the column ``values``. Note that, an aggregation operation pairs with a column name. 
+
+.. testcode::
+
+  aggregated_table = table.group_by("keys").aggregate([("values", "sum")])
+
+  print(aggregated_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values_sum: int64
+    ----
+    keys: [["a","b","c","d","e"]]
+    values_sum: [[31,7,15,1,4]]
+
+If you observe carefully, the new table returns the aggregated column
+as ``values_sum`` which is formed by the column name and aggregation operation name. 
+
+Aggregation operations can be applied with options. Let's take a case where
+we have null values included in our dataset, but we want to take the 
+count of the unique groups excluding the null values. 
+
+A sample dataset can be formed as follows. 
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+        pa.array(["a", "a", "b", "b", "b", "c", "d", "d", "e", "c"]),
+        pa.array([None, 20, 3, 4, 5, 6, 10, 1, 4, None]),
+        ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","b","c","d","d","e","c"]]
+    values: [[null,20,3,4,5,6,10,1,4,null]]
+
+Let's apply an aggregation operation ``count`` with the option to exclude
+null values. 
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  grouped_table = table.group_by("keys").aggregate(
+    [("values", 
+    "count",
+    pc.CountOptions(mode="only_valid"))]
+  )
+
+  print(grouped_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values_count: int64
+    ----
+    keys: [["a","b","c","d","e"]]
+    values_count: [[1,3,1,2,1]]
+
+
+Sort a Table
+============
+
+Let's discusse how to sort a table. We can sort a table, 
+based on values of a given column. Data can be either sorted ``ascending`` 
+or ``descending``. 
+
+Prepare data;
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+        pa.array(["a", "a", "b", "b", "b", "c", "d", "d", "e", "c"]),
+        pa.array([15, 20, 3, 4, 5, 6, 10, 1, 14, 123]),
+        ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","b","c","d","d","e","c"]]
+    values: [[15,20,3,4,5,6,10,1,14,123]]
+
+Then applying sort with :meth:`pyarrow.Table.sort_by`;
+
+.. testcode::
+
+  sorted_table = table.sort_by([("values", "ascending")])
+
+  print(sorted_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["d","b","b","b","c","d","e","a","a","c"]]
+    values: [[1,3,4,5,6,10,14,15,20,123]]
+
+
+Searching for values matching a predicate in Arrays
+===================================================
+
+If you have to look for values matching a predicate in Arrow arrays
+the :mod:`pyarrow.compute` module provides several methods that
+can be used to find the values you are looking for.
+
+For example, given an array with numbers from 0 to 9, if we
+want to look only for those greater than 5 we could use the
+:func:`pyarrow.compute.greater` method and get back the elements
+that fit our predicate
+
+.. testcode::
+
+  import pyarrow as pa
+  import pyarrow.compute as pc
+
+  arr = pa.array(range(10))
+  gtfive = pc.greater(arr, 5)
+
+  print(gtfive.to_string())
+
+.. testoutput::
+
+  [
+    false,
+    false,
+    false,
+    false,
+    false,
+    false,
+    true,
+    true,
+    true,
+    true
+  ]
+
+Furthermore we can filter the array to get only the entries
+that match our predicate with :func:`pyarrow.compute.filter`
+
+.. testcode::
+
+  filtered_array = pc.filter(arr, gtfive)
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    6,
+    7,
+    8,
+    9
+  ]
+
+Filtering Arrays using a mask
+=============================
+
+In many cases, when you are searching for something in an array
+you will end up with a mask that tells you the positions at which
+your search matched the values.
+
+For example in an array of four items, we might have a mask that
+matches the first and the last items only:
+
+.. testcode::
+
+  import pyarrow as pa
+
+  array = pa.array([1, 2, 3, 4])
+  mask = pa.array([True, False, False, True])
+
+We can then filter the array according to the mask using
+:meth:`pyarrow.Array.filter` to get back a new array with
+only the values matching the mask:
+
+.. testcode::
+
+  filtered_array = array.filter(mask)
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    1,
+    4
+  ]
+
+Most search functions in :mod:`pyarrow.compute` will produce
+a mask as the output, so you can use them to filter your arrays
+for the values that have been found by the function.
+
+For example we might filter our arrays for the values equal to ``2``
+using :func:`pyarrow.compute.equal`:
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  filtered_array = array.filter(pc.equal(array, 2))
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    2
+  ]
diff --git a/dev/py/_sources/flight.rst.txt b/dev/py/_sources/flight.rst.txt
new file mode 100644
index 0000000..67c359c
--- /dev/null
+++ b/dev/py/_sources/flight.rst.txt
@@ -0,0 +1,970 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+Recipes related to leveraging Arrow Flight protocol
+
+.. contents::
+
+Simple Parquet storage service with Arrow Flight
+================================================
+
+Suppose you want to implement a service that can store, send and receive
+Parquet files using the Arrow Flight protocol,
+``pyarrow`` provides an implementation framework in :mod:`pyarrow.flight`
+and particularly through the :class:`pyarrow.flight.FlightServerBase` class.
+
+.. testcode::
+
+    import pathlib
+
+    import pyarrow as pa
+    import pyarrow.flight
+    import pyarrow.parquet
+
+
+    class FlightServer(pa.flight.FlightServerBase):
+
+        def __init__(self, location="grpc://0.0.0.0:8815",
+                    repo=pathlib.Path("./datasets"), **kwargs):
+            super(FlightServer, self).__init__(location, **kwargs)
+            self._location = location
+            self._repo = repo
+
+        def _make_flight_info(self, dataset):
+            dataset_path = self._repo / dataset
+            schema = pa.parquet.read_schema(dataset_path)
+            metadata = pa.parquet.read_metadata(dataset_path)
+            descriptor = pa.flight.FlightDescriptor.for_path(
+                dataset.encode('utf-8')
+            )
+            endpoints = [pa.flight.FlightEndpoint(dataset, [self._location])]
+            return pyarrow.flight.FlightInfo(schema,
+                                            descriptor,
+                                            endpoints,
+                                            metadata.num_rows,
+                                            metadata.serialized_size)
+
+        def list_flights(self, context, criteria):
+            for dataset in self._repo.iterdir():
+                yield self._make_flight_info(dataset.name)
+
+        def get_flight_info(self, context, descriptor):
+            return self._make_flight_info(descriptor.path[0].decode('utf-8'))
+
+        def do_put(self, context, descriptor, reader, writer):
+            dataset = descriptor.path[0].decode('utf-8')
+            dataset_path = self._repo / dataset
+            data_table = reader.read_all()
+            pa.parquet.write_table(data_table, dataset_path)
+
+        def do_get(self, context, ticket):
+            dataset = ticket.ticket.decode('utf-8')
+            dataset_path = self._repo / dataset
+            return pa.flight.RecordBatchStream(pa.parquet.read_table(dataset_path))
+
+        def list_actions(self, context):
+            return [
+                ("drop_dataset", "Delete a dataset."),
+            ]
+
+        def do_action(self, context, action):
+            if action.type == "drop_dataset":
+                self.do_drop_dataset(action.body.to_pybytes().decode('utf-8'))
+            else:
+                raise NotImplementedError
+
+        def do_drop_dataset(self, dataset):
+            dataset_path = self._repo / dataset
+            dataset_path.unlink()
+
+The example server exposes :meth:`pyarrow.flight.FlightServerBase.list_flights`
+which is the method in charge of returning the list of data streams available
+for fetching.
+
+Likewise, :meth:`pyarrow.flight.FlightServerBase.get_flight_info` provides
+the information regarding a single specific data stream.
+
+Then we expose :meth:`pyarrow.flight.FlightServerBase.do_get` which is in charge
+of actually fetching the exposed data streams and sending them to the client.
+
+Allowing to list and download data streams would be pretty useless if we didn't
+expose a way to create them, this is the responsibility of
+:meth:`pyarrow.flight.FlightServerBase.do_put` which is in charge of receiving
+new data from the client and dealing with it (in this case saving it
+into a parquet file)
+
+This are the most common Arrow Flight requests, if we need to add more
+functionalities, we can do so using custom actions.
+
+In the previous example a ``drop_dataset`` custom action is added.
+All custom actions are executed through the
+:meth:`pyarrow.flight.FlightServerBase.do_action` method, thus it's up to
+the server subclass to dispatch them properly. In this case we invoke
+the `do_drop_dataset` method when the `action.type` is the one we expect.
+
+Our server can then be started with
+:meth:`pyarrow.flight.FlightServerBase.serve`
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = FlightServer()
+        server._repo.mkdir(exist_ok=True)
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import tempfile
+    repo = tempfile.TemporaryDirectory(prefix="arrow-cookbook-flight")
+    server = FlightServer(repo=pathlib.Path(repo.name))
+
+    pa.flight.connect("grpc://0.0.0.0:8815").wait_for_available()
+
+Once the server is started we can build a client to perform
+requests to it
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.flight
+
+    client = pa.flight.connect("grpc://0.0.0.0:8815")
+
+We can create a new table and upload it so that it gets stored
+in a new parquet file:
+
+.. testcode::
+
+    # Upload a new dataset
+    data_table = pa.table(
+        [["Mario", "Luigi", "Peach"]],
+        names=["Character"]
+    )
+    upload_descriptor = pa.flight.FlightDescriptor.for_path("uploaded.parquet")
+    writer, _ = client.do_put(upload_descriptor, data_table.schema)
+    writer.write_table(data_table)
+    writer.close()
+
+Once uploaded we should be able to retrieve the metadata for our
+newly uploaded table:
+
+.. testcode::
+
+    # Retrieve metadata of newly uploaded dataset
+    flight = client.get_flight_info(upload_descriptor)
+    descriptor = flight.descriptor
+    print("Path:", descriptor.path[0].decode('utf-8'), "Rows:", flight.total_records, "Size:", flight.total_bytes)
+    print("=== Schema ===")
+    print(flight.schema)
+    print("==============")
+
+.. testoutput::
+
+    Path: uploaded.parquet Rows: 3 Size: ...
+    === Schema ===
+    Character: string
+    ==============
+
+And we can fetch the content of the dataset:
+
+.. testcode::
+
+    # Read content of the dataset
+    reader = client.do_get(flight.endpoints[0].ticket)
+    read_table = reader.read_all()
+    print(read_table.to_pandas().head())
+
+.. testoutput::
+
+      Character
+    0     Mario
+    1     Luigi
+    2     Peach
+
+Once we finished we can invoke our custom action to delete the
+dataset we newly uploaded:
+
+.. testcode::
+
+    # Drop the newly uploaded dataset
+    client.do_action(pa.flight.Action("drop_dataset", "uploaded.parquet".encode('utf-8')))
+
+.. testcode::
+    :hide:
+
+    # Deal with a bug in do_action, see ARROW-14255
+    # can be removed once 6.0.0 is released.
+    try:
+        list(client.do_action(pa.flight.Action("drop_dataset", "uploaded.parquet".encode('utf-8'))))
+    except:
+        pass
+
+To confirm our dataset was deleted,
+we might list all parquet files that are currently stored by the server:
+
+.. testcode::
+
+    # List existing datasets.
+    for flight in client.list_flights():
+        descriptor = flight.descriptor
+        print("Path:", descriptor.path[0].decode('utf-8'), "Rows:", flight.total_records, "Size:", flight.total_bytes)
+        print("=== Schema ===")
+        print(flight.schema)
+        print("==============")
+        print("")
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+    repo.cleanup()
+
+Streaming Parquet Storage Service
+=================================
+
+We can improve the Parquet storage service and avoid holding entire datasets in
+memory by streaming data. Flight readers and writers, like others in PyArrow,
+can be iterated through, so let's update the server from before to take
+advantage of this:
+
+.. testcode::
+
+   import pathlib
+
+   import pyarrow as pa
+   import pyarrow.flight
+   import pyarrow.parquet
+
+
+   class FlightServer(pa.flight.FlightServerBase):
+
+       def __init__(self, location="grpc://0.0.0.0:8815",
+                   repo=pathlib.Path("./datasets"), **kwargs):
+           super(FlightServer, self).__init__(location, **kwargs)
+           self._location = location
+           self._repo = repo
+
+       def _make_flight_info(self, dataset):
+           dataset_path = self._repo / dataset
+           schema = pa.parquet.read_schema(dataset_path)
+           metadata = pa.parquet.read_metadata(dataset_path)
+           descriptor = pa.flight.FlightDescriptor.for_path(
+               dataset.encode('utf-8')
+           )
+           endpoints = [pa.flight.FlightEndpoint(dataset, [self._location])]
+           return pyarrow.flight.FlightInfo(schema,
+                                           descriptor,
+                                           endpoints,
+                                           metadata.num_rows,
+                                           metadata.serialized_size)
+
+       def list_flights(self, context, criteria):
+           for dataset in self._repo.iterdir():
+               yield self._make_flight_info(dataset.name)
+
+       def get_flight_info(self, context, descriptor):
+           return self._make_flight_info(descriptor.path[0].decode('utf-8'))
+
+       def do_put(self, context, descriptor, reader, writer):
+           dataset = descriptor.path[0].decode('utf-8')
+           dataset_path = self._repo / dataset
+           # Read the uploaded data and write to Parquet incrementally
+           with dataset_path.open("wb") as sink:
+               with pa.parquet.ParquetWriter(sink, reader.schema) as writer:
+                   for chunk in reader:
+                       writer.write_table(pa.Table.from_batches([chunk.data]))
+
+       def do_get(self, context, ticket):
+           dataset = ticket.ticket.decode('utf-8')
+           # Stream data from a file
+           dataset_path = self._repo / dataset
+           reader = pa.parquet.ParquetFile(dataset_path)
+           return pa.flight.GeneratorStream(
+               reader.schema_arrow, reader.iter_batches())
+
+       def list_actions(self, context):
+           return [
+               ("drop_dataset", "Delete a dataset."),
+           ]
+
+       def do_action(self, context, action):
+           if action.type == "drop_dataset":
+               self.do_drop_dataset(action.body.to_pybytes().decode('utf-8'))
+           else:
+               raise NotImplementedError
+
+       def do_drop_dataset(self, dataset):
+           dataset_path = self._repo / dataset
+           dataset_path.unlink()
+
+First, we've modified :meth:`pyarrow.flight.FlightServerBase.do_put`. Instead
+of reading all the uploaded data into a :class:`pyarrow.Table` before writing,
+we instead iterate through each batch as it comes and add it to a Parquet file.
+
+Then, we've modified :meth:`pyarrow.flight.FlightServerBase.do_get` to stream
+data to the client. This uses :class:`pyarrow.flight.GeneratorStream`, which
+takes a schema and any iterable or iterator. Flight then iterates through and
+sends each record batch to the client, allowing us to handle even large Parquet
+files that don't fit into memory.
+
+While GeneratorStream has the advantage that it can stream data, that means
+Flight must call back into Python for each record batch to send. In contrast,
+RecordBatchStream requires that all data is in-memory up front, but once
+created, all data transfer is handled purely in C++, without needing to call
+Python code.
+
+Let's give the server a spin. As before, we'll start the server:
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = FlightServer()
+        server._repo.mkdir(exist_ok=True)
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import tempfile
+    repo = tempfile.TemporaryDirectory(prefix="arrow-cookbook-flight")
+    server = FlightServer(repo=pathlib.Path(repo.name))
+
+    pa.flight.connect("grpc://0.0.0.0:8815").wait_for_available()
+
+We create a client, and this time, we'll write batches to the writer, as if we
+had a stream of data instead of a table in memory:
+
+.. testcode::
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+   client = pa.flight.connect("grpc://0.0.0.0:8815")
+
+   # Upload a new dataset
+   NUM_BATCHES = 1024
+   ROWS_PER_BATCH = 4096
+   upload_descriptor = pa.flight.FlightDescriptor.for_path("streamed.parquet")
+   batch = pa.record_batch([
+       pa.array(range(ROWS_PER_BATCH)),
+   ], names=["ints"])
+   writer, _ = client.do_put(upload_descriptor, batch.schema)
+   with writer:
+       for _ in range(NUM_BATCHES):
+           writer.write_batch(batch)
+
+As before, we can then read it back. Again, we'll read each batch from the
+stream as it arrives, instead of reading them all into a table:
+
+.. testcode::
+
+   # Read content of the dataset
+   flight = client.get_flight_info(upload_descriptor)
+   reader = client.do_get(flight.endpoints[0].ticket)
+   total_rows = 0
+   for chunk in reader:
+       total_rows += chunk.data.num_rows
+   print("Got", total_rows, "rows total, expected", NUM_BATCHES * ROWS_PER_BATCH)
+
+.. testoutput::
+
+   Got 4194304 rows total, expected 4194304
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+    repo.cleanup()
+
+Authentication with user/password
+=================================
+
+Often, services need a way to authenticate the user and identify who
+they are. Flight provides :doc:`several ways to implement
+authentication <pyarrow:format/Flight>`; the simplest uses a
+user-password scheme. At startup, the client authenticates itself with
+the server using a username and password. The server returns an
+authorization token to include on future requests.
+
+.. warning:: Authentication should only be used over a secure encrypted
+             channel, i.e. TLS should be enabled.
+
+.. note:: While the scheme is described as "`(HTTP) basic
+          authentication`_", it does not actually implement HTTP
+          authentication (RFC 7325) per se.
+
+While Flight provides some interfaces to implement such a scheme, the
+server must provide the actual implementation, as demonstrated
+below. **The implementation here is not secure and is provided as a
+minimal example only.**
+
+.. testcode::
+
+   import base64
+   import secrets
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+
+   class EchoServer(pa.flight.FlightServerBase):
+       """A simple server that just echoes any requests from DoAction."""
+
+       def do_action(self, context, action):
+           return [action.type.encode("utf-8"), action.body]
+
+
+   class BasicAuthServerMiddlewareFactory(pa.flight.ServerMiddlewareFactory):
+       """
+       Middleware that implements username-password authentication.
+
+       Parameters
+       ----------
+       creds: Dict[str, str]
+           A dictionary of username-password values to accept.
+       """
+
+       def __init__(self, creds):
+           self.creds = creds
+           # Map generated bearer tokens to users
+           self.tokens = {}
+
+       def start_call(self, info, headers):
+           """Validate credentials at the start of every call."""
+           # Search for the authentication header (case-insensitive)
+           auth_header = None
+           for header in headers:
+               if header.lower() == "authorization":
+                   auth_header = headers[header][0]
+                   break
+
+           if not auth_header:
+               raise pa.flight.FlightUnauthenticatedError("No credentials supplied")
+
+           # The header has the structure "AuthType TokenValue", e.g.
+           # "Basic <encoded username+password>" or "Bearer <random token>".
+           auth_type, _, value = auth_header.partition(" ")
+
+           if auth_type == "Basic":
+               # Initial "login". The user provided a username/password
+               # combination encoded in the same way as HTTP Basic Auth.
+               decoded = base64.b64decode(value).decode("utf-8")
+               username, _, password = decoded.partition(':')
+               if not password or password != self.creds.get(username):
+                   raise pa.flight.FlightUnauthenticatedError("Unknown user or invalid password")
+               # Generate a secret, random bearer token for future calls.
+               token = secrets.token_urlsafe(32)
+               self.tokens[token] = username
+               return BasicAuthServerMiddleware(token)
+           elif auth_type == "Bearer":
+               # An actual call. Validate the bearer token.
+               username = self.tokens.get(value)
+               if username is None:
+                   raise pa.flight.FlightUnauthenticatedError("Invalid token")
+               return BasicAuthServerMiddleware(value)
+
+           raise pa.flight.FlightUnauthenticatedError("No credentials supplied")
+
+
+   class BasicAuthServerMiddleware(pa.flight.ServerMiddleware):
+       """Middleware that implements username-password authentication."""
+
+       def __init__(self, token):
+           self.token = token
+
+       def sending_headers(self):
+           """Return the authentication token to the client."""
+           return {"authorization": f"Bearer {self.token}"}
+
+
+   class NoOpAuthHandler(pa.flight.ServerAuthHandler):
+       """
+       A handler that implements username-password authentication.
+
+       This is required only so that the server will respond to the internal
+       Handshake RPC call, which the client calls when authenticate_basic_token
+       is called. Otherwise, it should be a no-op as the actual authentication is
+       implemented in middleware.
+       """
+
+       def authenticate(self, outgoing, incoming):
+           pass
+
+       def is_valid(self, token):
+           return ""
+
+We can then start the server:
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = EchoServer(
+            auth_handler=NoOpAuthHandler(),
+            location="grpc://0.0.0.0:8816",
+            middleware={
+                "basic": BasicAuthServerMiddlewareFactory({
+                    "test": "password",
+                })
+            },
+        )
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import threading
+    server = EchoServer(
+        auth_handler=NoOpAuthHandler(),
+        location="grpc://0.0.0.0:8816",
+        middleware={
+            "basic": BasicAuthServerMiddlewareFactory({
+                "test": "password",
+            })
+        },
+    )
+    t = threading.Thread(target=server.serve)
+    t.start()
+
+Then, we can make a client and log in:
+
+.. testcode::
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+   client = pa.flight.connect("grpc://0.0.0.0:8816")
+
+   token_pair = client.authenticate_basic_token(b'test', b'password')
+   print(token_pair)
+
+.. testoutput::
+
+   (b'authorization', b'Bearer ...')
+
+For future calls, we include the authentication token with the call:
+
+.. testcode::
+
+   action = pa.flight.Action("echo", b"Hello, world!")
+   options = pa.flight.FlightCallOptions(headers=[token_pair])
+   for response in client.do_action(action=action, options=options):
+       print(response.body.to_pybytes())
+
+.. testoutput::
+
+   b'echo'
+   b'Hello, world!'
+
+If we fail to do so, we get an authentication error:
+
+.. testcode::
+
+   try:
+       list(client.do_action(action=action))
+   except pa.flight.FlightUnauthenticatedError as e:
+       print("Unauthenticated:", e)
+   else:
+       raise RuntimeError("Expected call to fail")
+
+.. testoutput::
+
+   Unauthenticated: No credentials supplied. Detail: Unauthenticated
+
+Or if we use the wrong credentials on login, we also get an error:
+
+.. testcode::
+
+   try:
+       client.authenticate_basic_token(b'invalid', b'password')
+   except pa.flight.FlightUnauthenticatedError as e:
+       print("Unauthenticated:", e)
+   else:
+       raise RuntimeError("Expected call to fail")
+
+.. testoutput::
+
+   Unauthenticated: Unknown user or invalid password. Detail: Unauthenticated
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+
+.. _(HTTP) basic authentication: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
+
+Securing connections with TLS
+=================================
+
+Following on from the previous scenario where traffic to the server is managed via a username and password, 
+HTTPS (more specifically TLS) communication allows an additional layer of security by encrypting messages
+between the client and server. This is achieved using certificates. During development, the easiest 
+approach is developing with self-signed certificates. At startup, the server loads the public and private 
+key and the client authenticates the server with the TLS root certificate.
+
+.. note:: In production environments it is recommended to make use of a certificate signed by a certificate authority.
+
+**Step 1 - Generating the Self Signed Certificate**  
+
+Generate a self-signed certificate by using dotnet on `Windows`_, or `openssl`_ on Linux or MacOS. 
+Alternatively, the self-signed certificate from the `Arrow testing data repository`_ can be used. 
+Depending on the file generated, you may need to convert it to a .crt and .key file as required for the Arrow server. 
+One method to achieve this is openssl, please visit this `IBM article`_ for more info. 
+
+
+**Step 2 - Running a server with TLS enabled**
+
+The code below is a minimal working example of an Arrow server used to receive data with TLS.
+
+.. testcode::
+    
+    import argparse
+    import pyarrow
+    import pyarrow.flight
+    
+    
+    class FlightServer(pyarrow.flight.FlightServerBase):
+        def __init__(self, host="localhost", location=None,
+                     tls_certificates=None, verify_client=False,
+                     root_certificates=None, auth_handler=None):
+            super(FlightServer, self).__init__(
+                location, auth_handler, tls_certificates, verify_client,
+                root_certificates)
+            self.flights = {}
+    
+        @classmethod
+        def descriptor_to_key(self, descriptor):
+            return (descriptor.descriptor_type.value, descriptor.command,
+                    tuple(descriptor.path or tuple()))
+    
+        def do_put(self, context, descriptor, reader, writer):
+            key = FlightServer.descriptor_to_key(descriptor)
+            print(key)
+            self.flights[key] = reader.read_all()
+            print(self.flights[key])
+    
+    
+    def main():
+        parser = argparse.ArgumentParser()
+        parser.add_argument("--tls", nargs=2, default=None, metavar=('CERTFILE', 'KEYFILE'))
+        args = parser.parse_args()                                
+        tls_certificates = []
+    
+        scheme = "grpc+tls"
+        host = "localhost"
+        port = "5005"
+        
+        with open(args.tls[0], "rb") as cert_file:
+            tls_cert_chain = cert_file.read()
+        with open(args.tls[1], "rb") as key_file:
+            tls_private_key = key_file.read()
+    
+        tls_certificates.append((tls_cert_chain, tls_private_key))
+        
+        location = "{}://{}:{}".format(scheme, host, port)
+    
+        server = FlightServer(host, location,
+                              tls_certificates=tls_certificates)
+        print("Serving on", location)
+        server.serve()
+    
+    
+    if __name__ == '__main__':
+        main()
+
+Running the server, you should see ``Serving on grpc+tls://localhost:5005``.
+
+**Step 3 - Securely Connecting to the Server**
+Suppose we want to connect to the client and push some data to it. The following code securely sends information to the server using TLS encryption.
+
+.. testcode::
+    
+    import argparse
+    import pyarrow
+    import pyarrow.flight
+    import pandas as pd
+    
+    # Assumes incoming data object is a Pandas Dataframe
+    def push_to_server(name, data, client):
+        object_to_send = pyarrow.Table.from_pandas(data)
+        writer, _ = client.do_put(pyarrow.flight.FlightDescriptor.for_path(name), object_to_send.schema)
+        writer.write_table(object_to_send)
+        writer.close()
+    
+    def main():
+        parser = argparse.ArgumentParser()
+    
+        parser.add_argument('--tls-roots', default=None,
+                            help='Path to trusted TLS certificate(s)')
+        parser.add_argument('--host', default="localhost",
+                            help='Host endpoint')
+        parser.add_argument('--port', default=5005,
+                            help='Host port')
+        args = parser.parse_args()
+        kwargs = {}
+    
+        with open(args.tls_roots, "rb") as root_certs:
+            kwargs["tls_root_certs"] = root_certs.read()
+    
+        client = pyarrow.flight.FlightClient(f"grpc+tls://{args.host}:{args.port}", **kwargs)
+        data = {'Animal': ['Dog', 'Cat', 'Mouse'], 'Size': ['Big', 'Small', 'Tiny']}
+        df = pd.DataFrame(data, columns=['Animal', 'Size'])
+        push_to_server("AnimalData", df, client)
+    
+    if __name__ == '__main__':
+        try:
+            main()
+        except Exception as e:
+            print(e) 
+            
+Running the client script, you should see the server printing out information about the data it just received.
+
+.. _IBM article: https://www.ibm.com/docs/en/arl/9.7?topic=certification-extracting-certificate-keys-from-pfx-file
+.. _Windows: https://docs.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide
+.. _Arrow testing data repository: https://github.com/apache/arrow-testing/tree/master/data/flight
+.. _openssl: https://www.ibm.com/docs/en/api-connect/2018.x?topic=overview-generating-self-signed-certificate-using-openssl
+
+Propagating OpenTelemetry Traces
+================================
+
+Distributed tracing with OpenTelemetry_ allows collecting call-level performance
+measurements across a Flight service. In order to correlate spans across a Flight
+client and server, trace context must be passed between the two. This can be passed
+manually through headers in :class:`pyarrow.flight.FlightCallOptions`, or can 
+be automatically propagated using middleware.
+
+This example shows how to accomplish trace propagation through middleware.
+The client middleware needs to inject the trace context into the call headers.
+The server middleware needs to extract the trace context from the headers and
+pass the context into a new span. Optionally, the client middleware can also
+create a new span to time the client-side call.
+
+.. _OpenTelemetry: https://opentelemetry.io/docs/instrumentation/python/getting-started/
+
+**Step 1: define the client middleware:**
+
+.. testcode::
+
+    import pyarrow.flight as flight
+    from opentelemetry import trace
+    from opentelemetry.propagate import inject
+    from opentelemetry.trace.status import StatusCode
+
+    class ClientTracingMiddlewareFactory(flight.ClientMiddlewareFactory):
+        def __init__(self):
+            self._tracer = trace.get_tracer(__name__)
+
+        def start_call(self, info):
+            span = self._tracer.start_span(f"client.{info.method}")
+            return ClientTracingMiddleware(span)
+
+    class ClientTracingMiddleware(flight.ClientMiddleware):
+        def __init__(self, span):
+            self._span = span
+
+        def sending_headers(self):
+            ctx = trace.set_span_in_context(self._span)
+            carrier = {}
+            inject(carrier=carrier, context=ctx)
+            return carrier
+
+        def call_completed(self, exception):
+            if exception:
+                self._span.record_exception(exception)
+                self._span.set_status(StatusCode.ERROR)
+                print(exception)
+            else:
+                self._span.set_status(StatusCode.OK)
+            self._span.end()
+
+**Step 2: define the server middleware:**
+
+.. testcode::
+
+    import pyarrow.flight as flight
+    from opentelemetry import trace
+    from opentelemetry.propagate import extract
+    from opentelemetry.trace.status import StatusCode
+
+    class ServerTracingMiddlewareFactory(flight.ServerMiddlewareFactory):
+        def __init__(self):
+            self._tracer = trace.get_tracer(__name__)
+        
+        def start_call(self, info, headers):
+            context = extract(headers)
+            span = self._tracer.start_span(f"server.{info.method}", context=context)
+            return ServerTracingMiddleware(span)
+    
+    class ServerTracingMiddleware(flight.ServerMiddleware):
+        def __init__(self, span):
+            self._span = span
+        
+        def call_completed(self, exception):
+            if exception:
+                self._span.record_exception(exception)
+                self._span.set_status(StatusCode.ERROR)
+                print(exception)
+            else:
+                self._span.set_status(StatusCode.OK)
+            self._span.end()
+
+**Step 3: configure the trace exporter, processor, and provider:**
+
+Both the server and client will need to be configured with the OpenTelemetry SDK
+to record spans and export them somewhere. For the sake of the example, we'll 
+collect the spans into a Python list, but this is normally where you would set
+them up to be exported to some service like `Jaeger`_. See other examples of 
+exporters at `OpenTelemetry Exporters`_.
+
+As part of this, you will need to define the resource where spans are running.
+At a minimum this is the service name, but it could include other information like
+a hostname, process id, service version, and operating system.
+
+.. _Jaeger: https://www.jaegertracing.io/
+.. _`OpenTelemetry Exporters`: https://opentelemetry.io/docs/instrumentation/python/exporters/
+
+.. testcode::
+
+    from opentelemetry import trace
+    from opentelemetry.sdk.trace import TracerProvider
+    from opentelemetry.sdk.trace.export import SimpleSpanProcessor
+    from opentelemetry.sdk.resources import SERVICE_NAME, Resource
+    from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
+
+    class TestSpanExporter(SpanExporter):
+        def __init__(self):
+            self.spans = []
+    
+        def export(self, spans):
+            self.spans.extend(spans)
+            return SpanExportResult.SUCCESS
+
+    def configure_tracing():
+        # Service name is required for most backends,
+        # and although it's not necessary for console export,
+        # it's good to set service name anyways.
+        resource = Resource(attributes={
+            SERVICE_NAME: "my-service"
+        })
+        exporter = TestSpanExporter()
+        provider = TracerProvider(resource=resource)
+        processor = SimpleSpanProcessor(exporter)
+        provider.add_span_processor(processor)
+        trace.set_tracer_provider(provider)
+        return exporter
+
+**Step 4: add the middleware to the server:**
+
+We can use the middleware now in our EchoServer from earlier. 
+
+.. code-block::
+
+    if __name__ == '__main__':
+        exporter = configure_tracing()
+        server = EchoServer(
+            location="grpc://0.0.0.0:8816",
+            middleware={
+                "tracing": ServerTracingMiddlewareFactory()
+            },
+        )
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import threading
+    exporter = configure_tracing()
+    server = EchoServer(
+        location="grpc://0.0.0.0:8816",
+        middleware={
+            "tracing": ServerTracingMiddlewareFactory()
+        },
+    )
+    t = threading.Thread(target=server.serve)
+    t.start()
+
+**Step 5: add the middleware to the client:**
+
+.. testcode::
+
+   client = pa.flight.connect(
+       "grpc://0.0.0.0:8816",
+       middleware=[ClientTracingMiddlewareFactory()],
+   )
+
+**Step 6: use the client within active spans:**
+
+When we make a call with our client within an OpenTelemetry span, our client 
+middleware will create a child span for the client-side Flight call and then 
+propagate the span context to the server. Our server middleware will pick up 
+that trace context and create another child span.
+
+.. testcode::
+
+   from opentelemetry import trace
+
+   # Client would normally also need to configure tracing, but for this example
+   # the client and server are running in the same Python process.
+   # exporter = configure_tracing()
+
+   tracer = trace.get_tracer(__name__)
+
+   with tracer.start_as_current_span("hello_world") as span:
+       action = pa.flight.Action("echo", b"Hello, world!")
+       # Call list() on do_action to drain all results.
+       list(client.do_action(action=action))
+    
+   print(f"There are {len(exporter.spans)} spans.")
+   print(f"The span names are:\n  {list(span.name for span in exporter.spans)}.")
+   print(f"The span status codes are:\n  "
+         f"{list(span.status.status_code for span in exporter.spans)}.")
+
+.. testoutput::
+
+   There are 3 spans.
+   The span names are:
+     ['server.FlightMethod.DO_ACTION', 'client.FlightMethod.DO_ACTION', 'hello_world'].
+   The span status codes are:
+     [<StatusCode.OK: 1>, <StatusCode.OK: 1>, <StatusCode.UNSET: 0>].
+
+As expected, we have three spans: one in our client code, one in the client
+middleware, and one in the server middleware.
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
\ No newline at end of file
diff --git a/dev/py/_sources/index.rst.txt b/dev/py/_sources/index.rst.txt
new file mode 100644
index 0000000..06aa495
--- /dev/null
+++ b/dev/py/_sources/index.rst.txt
@@ -0,0 +1,48 @@
+.. 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.
+
+.. Apache Arrow Cookbook documentation master file, created by
+   sphinx-quickstart on Wed Jun 16 10:33:09 2021.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Apache Arrow Python Cookbook
+============================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.
+
+This cookbook is tested with pyarrow |version|.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   io
+   create
+   schema
+   data
+   flight
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/dev/py/_sources/io.rst.txt b/dev/py/_sources/io.rst.txt
new file mode 100644
index 0000000..4a38853
--- /dev/null
+++ b/dev/py/_sources/io.rst.txt
@@ -0,0 +1,712 @@
+.. 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.
+
+========================
+Reading and Writing Data
+========================
+
+Recipes related to reading and writing data from disk using
+Apache Arrow.
+
+.. contents::
+
+.. testsetup::
+
+    import pyarrow as pa
+
+Write a Parquet file
+====================
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+To write it to a Parquet file, 
+as Parquet is a format that contains multiple named columns,
+we must create a :class:`pyarrow.Table` out of it,
+so that we get a table of a single column which can then be
+written to a Parquet file. 
+
+.. testcode::
+
+    table = pa.Table.from_arrays([arr], names=["col1"])
+
+Once we have a table, it can be written to a Parquet File 
+using the functions provided by the ``pyarrow.parquet`` module
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    pq.write_table(table, "example.parquet", compression=None)
+
+Reading a Parquet file
+======================
+
+Given a Parquet file, it can be read back to a :class:`pyarrow.Table`
+by using :func:`pyarrow.parquet.read_table` function
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    table = pq.read_table("example.parquet")
+
+The resulting table will contain the same columns that existed in
+the parquet file as :class:`ChunkedArray`
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Reading a subset of Parquet data
+================================
+
+When reading a Parquet file with :func:`pyarrow.parquet.read_table` 
+it is possible to restrict which Columns and Rows will be read
+into memory by using the ``filters`` and ``columns`` arguments
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    table = pq.read_table("example.parquet", 
+                          columns=["col1"],
+                          filters=[
+                              ("col1", ">", 5),
+                              ("col1", "<", 10),
+                          ])
+
+The resulting table will contain only the projected columns
+and filtered rows. Refer to :func:`pyarrow.parquet.read_table`
+documentation for details about the syntax for filters.
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[6,7,8,9]]
+
+Saving Arrow Arrays to disk
+===========================
+
+Apart from using arrow to read and save common file formats like Parquet,
+it is possible to dump data in the raw arrow format which allows 
+direct memory mapping of data from disk. This format is called
+the Arrow IPC format.
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+We can save the array by making a :class:`pyarrow.RecordBatch` out
+of it and writing the record batch to disk.
+
+.. testcode::
+
+    schema = pa.schema([
+        pa.field('nums', arr.type)
+    ])
+
+    with pa.OSFile('arraydata.arrow', 'wb') as sink:
+        with pa.ipc.new_file(sink, schema=schema) as writer:
+            batch = pa.record_batch([arr], schema=schema)
+            writer.write(batch)
+
+If we were to save multiple arrays into the same file,
+we would just have to adapt the ``schema`` accordingly and add
+them all to the ``record_batch`` call.
+
+Memory Mapping Arrow Arrays from disk
+=====================================
+
+Arrow arrays that have been written to disk in the Arrow IPC
+format can be memory mapped back directly from the disk.
+
+.. testcode::
+
+    with pa.memory_map('arraydata.arrow', 'r') as source:
+        loaded_arrays = pa.ipc.open_file(source).read_all()
+
+.. testcode::
+
+    arr = loaded_arrays[0]
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+Writing CSV files
+=================
+
+It is possible to write an Arrow :class:`pyarrow.Table` to
+a CSV file using the :func:`pyarrow.csv.write_csv` function
+
+.. testcode::
+
+    arr = pa.array(range(100))
+    table = pa.Table.from_arrays([arr], names=["col1"])
+    
+    import pyarrow.csv
+    pa.csv.write_csv(table, "table.csv",
+                     write_options=pa.csv.WriteOptions(include_header=True))
+
+Writing CSV files incrementally
+===============================
+
+If you need to write data to a CSV file incrementally
+as you generate or retrieve the data and you don't want to keep
+in memory the whole table to write it at once, it's possible to use
+:class:`pyarrow.csv.CSVWriter` to write data incrementally
+
+.. testcode::
+
+    schema = pa.schema([("col1", pa.int32())])
+    with pa.csv.CSVWriter("table.csv", schema=schema) as writer:
+        for chunk in range(10):
+            datachunk = range(chunk*10, (chunk+1)*10)
+            table = pa.Table.from_arrays([pa.array(datachunk)], schema=schema)
+            writer.write(table)
+
+It's equally possible to write :class:`pyarrow.RecordBatch`
+by passing them as you would for tables.
+
+Reading CSV files
+=================
+
+Arrow can read :class:`pyarrow.Table` entities from CSV using an
+optimized codepath that can leverage multiple threads.
+
+.. testcode::
+
+    import pyarrow.csv
+
+    table = pa.csv.read_csv("table.csv")
+
+Arrow will do its best to infer data types.  Further options can be
+provided to :func:`pyarrow.csv.read_csv` to drive
+:class:`pyarrow.csv.ConvertOptions`.
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Writing Partitioned Datasets 
+============================
+
+When your dataset is big it usually makes sense to split it into
+multiple separate files. You can do this manually or use 
+:func:`pyarrow.dataset.write_dataset` to let Arrow do the effort
+of splitting the data in chunks for you.
+
+The ``partitioning`` argument allows to tell :func:`pyarrow.dataset.write_dataset`
+for which columns the data should be split. 
+
+For example given 100 birthdays, within 2000 and 2009
+
+.. testcode::
+
+    import numpy.random
+    data = pa.table({"day": numpy.random.randint(1, 31, size=100), 
+                     "month": numpy.random.randint(1, 12, size=100),
+                     "year": [2000 + x // 10 for x in range(100)]})
+
+Then we could partition the data by the year column so that it
+gets saved in 10 different files:
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.dataset as ds
+
+    ds.write_dataset(data, "./partitioned", format="parquet",
+                     partitioning=ds.partitioning(pa.schema([("year", pa.int16())])))
+
+Arrow will partition datasets in subdirectories by default, which will
+result in 10 different directories named with the value of the partitioning
+column each with a file containing the subset of the data for that partition:
+
+.. testcode::
+
+    from pyarrow import fs
+
+    localfs = fs.LocalFileSystem()
+    partitioned_dir_content = localfs.get_file_info(fs.FileSelector("./partitioned", recursive=True))
+    files = sorted((f.path for f in partitioned_dir_content if f.type == fs.FileType.File))
+
+    for file in files:
+        print(file)
+
+.. testoutput::
+
+    ./partitioned/2000/part-0.parquet
+    ./partitioned/2001/part-0.parquet
+    ./partitioned/2002/part-0.parquet
+    ./partitioned/2003/part-0.parquet
+    ./partitioned/2004/part-0.parquet
+    ./partitioned/2005/part-0.parquet
+    ./partitioned/2006/part-0.parquet
+    ./partitioned/2007/part-0.parquet
+    ./partitioned/2008/part-0.parquet
+    ./partitioned/2009/part-0.parquet
+
+Reading Partitioned data
+========================
+
+In some cases, your dataset might be composed by multiple separate
+files each containing a piece of the data. 
+
+.. testsetup::
+
+    import pathlib
+    import pyarrow.parquet as pq
+
+    examples = pathlib.Path("examples")
+    examples.mkdir(exist_ok=True)
+
+    pq.write_table(pa.table({"col1": range(10)}), 
+                   examples / "dataset1.parquet", compression=None)
+    pq.write_table(pa.table({"col1": range(10, 20)}), 
+                   examples / "dataset2.parquet", compression=None)
+    pq.write_table(pa.table({"col1": range(20, 30)}), 
+                   examples / "dataset3.parquet", compression=None)
+
+In this case the :func:`pyarrow.dataset.dataset` function provides
+an interface to discover and read all those files as a single big dataset.
+
+For example if we have a structure like:
+
+.. code-block::
+
+    examples/
+    ├── dataset1.parquet
+    ├── dataset2.parquet
+    └── dataset3.parquet
+
+Then, pointing the :func:`pyarrow.dataset.dataset` function to the ``examples`` directory
+will discover those parquet files and will expose them all as a single
+:class:`pyarrow.dataset.Dataset`:
+
+.. testcode::
+
+    import pyarrow.dataset as ds
+
+    dataset = ds.dataset("./examples", format="parquet")
+    print(dataset.files)
+
+.. testoutput::
+
+    ['./examples/dataset1.parquet', './examples/dataset2.parquet', './examples/dataset3.parquet']
+
+The whole dataset can be viewed as a single big table using
+:meth:`pyarrow.dataset.Dataset.to_table`. While each parquet file
+contains only 10 rows, converting the dataset to a table will
+expose them as a single Table.
+
+.. testcode::
+
+    table = dataset.to_table()
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29]]
+
+Notice that converting to a table will force all data to be loaded 
+in memory.  For big datasets is usually not what you want.
+
+For this reason, it might be better to rely on the 
+:meth:`pyarrow.dataset.Dataset.to_batches` method, which will
+iteratively load the dataset one chunk of data at the time returning a 
+:class:`pyarrow.RecordBatch` for each one of them.
+
+.. testcode::
+
+    for record_batch in dataset.to_batches():
+        col1 = record_batch.column("col1")
+        print(f"{col1._name} = {col1[0]} .. {col1[-1]}")
+
+.. testoutput::
+
+    col1 = 0 .. 9
+    col1 = 10 .. 19
+    col1 = 20 .. 29
+
+Reading Partitioned Data from S3
+================================
+
+The :class:`pyarrow.dataset.Dataset` is also able to abstract
+partitioned data coming from remote sources like S3 or HDFS.
+
+.. testcode::
+
+    from pyarrow import fs
+
+    # List content of s3://ursa-labs-taxi-data/2011
+    s3 = fs.SubTreeFileSystem(
+        "ursa-labs-taxi-data", 
+        fs.S3FileSystem(region="us-east-2", anonymous=True)
+    )
+    for entry in s3.get_file_info(fs.FileSelector("2011", recursive=True)):
+        if entry.type == fs.FileType.File:
+            print(entry.path)
+
+.. testoutput::
+
+    2011/01/data.parquet
+    2011/02/data.parquet
+    2011/03/data.parquet
+    2011/04/data.parquet
+    2011/05/data.parquet
+    2011/06/data.parquet
+    2011/07/data.parquet
+    2011/08/data.parquet
+    2011/09/data.parquet
+    2011/10/data.parquet
+    2011/11/data.parquet
+    2011/12/data.parquet
+
+The data in the bucket can be loaded as a single big dataset partitioned
+by ``month`` using
+
+.. testcode::
+
+    dataset = ds.dataset("s3://ursa-labs-taxi-data/2011",
+                         partitioning=["month"])
+    for f in dataset.files[:10]:
+        print(f)
+    print("...")
+
+.. testoutput::
+
+    ursa-labs-taxi-data/2011/01/data.parquet
+    ursa-labs-taxi-data/2011/02/data.parquet
+    ursa-labs-taxi-data/2011/03/data.parquet
+    ursa-labs-taxi-data/2011/04/data.parquet
+    ursa-labs-taxi-data/2011/05/data.parquet
+    ursa-labs-taxi-data/2011/06/data.parquet
+    ursa-labs-taxi-data/2011/07/data.parquet
+    ursa-labs-taxi-data/2011/08/data.parquet
+    ursa-labs-taxi-data/2011/09/data.parquet
+    ursa-labs-taxi-data/2011/10/data.parquet
+    ...
+
+The dataset can then be used with :meth:`pyarrow.dataset.Dataset.to_table`
+or :meth:`pyarrow.dataset.Dataset.to_batches` like you would for a local one.
+
+.. note::
+
+    It is possible to load partitioned data also in the ipc arrow
+    format or in feather format.
+
+.. warning::
+
+    If the above code throws an error most likely the reason is your
+    AWS credentials are not set. Follow these instructions to get
+    ``AWS Access Key Id`` and ``AWS Secret Access Key``: 
+    `AWS Credentials <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html>`_.
+
+    The credentials are normally stored in ``~/.aws/credentials`` (on Mac or Linux)
+    or in ``C:\Users\<USERNAME>\.aws\credentials`` (on Windows) file. 
+    You will need to either create or update this file in the appropriate location.
+
+    The contents of the file should look like this:
+
+    .. code-block:: bash 
+
+        [default]
+        aws_access_key_id=<YOUR_AWS_ACCESS_KEY_ID>
+        aws_secret_access_key=<YOUR_AWS_SECRET_ACCESS_KEY>
+
+
+
+Write a Feather file
+====================
+
+.. testsetup::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+To write it to a Feather file, as Feather stores multiple columns,
+we must create a :class:`pyarrow.Table` out of it,
+so that we get a table of a single column which can then be
+written to a Feather file. 
+
+.. testcode::
+
+    table = pa.Table.from_arrays([arr], names=["col1"])
+
+Once we have a table, it can be written to a Feather File 
+using the functions provided by the ``pyarrow.feather`` module
+
+.. testcode::
+
+    import pyarrow.feather as ft
+    
+    ft.write_feather(table, 'example.feather')
+
+Reading a Feather file
+======================
+
+Given a Feather file, it can be read back to a :class:`pyarrow.Table`
+by using :func:`pyarrow.feather.read_table` function
+
+.. testcode::
+
+    import pyarrow.feather as ft
+
+    table = ft.read_table("example.feather")
+
+The resulting table will contain the same columns that existed in
+the parquet file as :class:`ChunkedArray`
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Reading Line Delimited JSON
+===========================
+
+Arrow has builtin support for line-delimited JSON.
+Each line represents a row of data as a JSON object.
+
+Given some data in a file where each line is a JSON object
+containing a row of data:
+
+.. testcode::
+
+    import tempfile
+
+    with tempfile.NamedTemporaryFile(delete=False, mode="w+") as f:
+        f.write('{"a": 1, "b": 2.0, "c": 1}\n')
+        f.write('{"a": 3, "b": 3.0, "c": 2}\n')
+        f.write('{"a": 5, "b": 4.0, "c": 3}\n')
+        f.write('{"a": 7, "b": 5.0, "c": 4}\n')
+
+The content of the file can be read back to a :class:`pyarrow.Table` using
+:func:`pyarrow.json.read_json`:
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.json
+
+    table = pa.json.read_json(f.name)
+
+.. testcode::
+
+    print(table.to_pydict())
+
+.. testoutput::
+
+    {'a': [1, 3, 5, 7], 'b': [2.0, 3.0, 4.0, 5.0], 'c': [1, 2, 3, 4]}
+
+Writing Compressed Data
+=======================
+
+Arrow provides support for writing files in compressed formats,
+both for formats that provide compression natively like Parquet or Feather,
+and for formats that don't support compression out of the box like CSV.
+
+Given a table:
+
+.. testcode::
+
+    table = pa.table([
+        pa.array([1, 2, 3, 4, 5])
+    ], names=["numbers"])
+
+Writing compressed Parquet or Feather data is driven by the
+``compression`` argument to the :func:`pyarrow.feather.write_feather` and
+:func:`pyarrow.parquet.write_table` functions:
+
+.. testcode::
+
+    pa.feather.write_feather(table, "compressed.feather",
+                             compression="lz4")
+    pa.parquet.write_table(table, "compressed.parquet",
+                           compression="lz4")
+
+You can refer to each of those functions' documentation for a complete
+list of supported compression formats.
+
+.. note::
+
+    Arrow actually uses compression by default when writing
+    Parquet or Feather files. Feather is compressed using ``lz4``
+    by default and Parquet uses ``snappy`` by default.
+
+For formats that don't support compression natively, like CSV,
+it's possible to save compressed data using
+:class:`pyarrow.CompressedOutputStream`:
+
+.. testcode::
+
+    with pa.CompressedOutputStream("compressed.csv.gz", "gzip") as out:
+        pa.csv.write_csv(table, out)
+
+This requires decompressing the file when reading it back,
+which can be done using :class:`pyarrow.CompressedInputStream`
+as explained in the next recipe.
+
+Reading Compressed Data
+=======================
+
+Arrow provides support for reading compressed files,
+both for formats that provide it natively like Parquet or Feather,
+and for files in formats that don't support compression natively,
+like CSV, but have been compressed by an application.
+
+Reading compressed formats that have native support for compression
+doesn't require any special handling. We can for example read back
+the Parquet and Feather files we wrote in the previous recipe
+by simply invoking :meth:`pyarrow.feather.read_table` and
+:meth:`pyarrow.parquet.read_table`:
+
+.. testcode::
+
+    table_feather = pa.feather.read_table("compressed.feather")
+    print(table_feather)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+.. testcode::
+
+    table_parquet = pa.parquet.read_table("compressed.parquet")
+    print(table_parquet)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+Reading data from formats that don't have native support for
+compression instead involves decompressing them before decoding them.
+This can be done using the :class:`pyarrow.CompressedInputStream` class
+which wraps files with a decompress operation before the result is
+provided to the actual read function.
+
+For example to read a compressed CSV file:
+
+.. testcode::
+
+    with pa.CompressedInputStream(pa.OSFile("compressed.csv.gz"), "gzip") as input:
+        table_csv = pa.csv.read_csv(input)
+        print(table_csv)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+.. note::
+
+    In the case of CSV, arrow is actually smart enough to try detecting
+    compressed files using the file extension. So if your file is named
+    ``*.gz`` or ``*.bz2`` the :meth:`pyarrow.csv.read_csv` function will
+    try to decompress it accordingly
+
+.. testcode::
+
+    table_csv2 = pa.csv.read_csv("compressed.csv.gz")
+    print(table_csv2)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
diff --git a/dev/py/_sources/schema.rst.txt b/dev/py/_sources/schema.rst.txt
new file mode 100644
index 0000000..561c3ff
--- /dev/null
+++ b/dev/py/_sources/schema.rst.txt
@@ -0,0 +1,219 @@
+.. 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.
+
+===================
+Working with Schema
+===================
+
+Arrow automatically infers the most appropriate data type when reading in data
+or converting Python objects to Arrow objects.  
+
+However, you might want to manually tell Arrow which data types to 
+use, for example, to ensure interoperability with databases and data warehouse 
+systems.  This chapter includes recipes for dealing with schemas.
+
+.. contents::
+
+Setting the data type of an Arrow Array
+=======================================
+
+If you have an existing array and want to change its data type,
+that can be done through the ``cast`` function:
+
+.. testcode::
+
+    import pyarrow as pa
+
+    arr = pa.array([1, 2, 3, 4, 5])
+    print(arr.type)
+
+.. testoutput::
+
+    int64
+
+.. testcode::
+
+    arr = arr.cast(pa.int8())
+    print(arr.type)
+
+.. testoutput::
+
+    int8
+
+You can also create an array of the requested type by providing
+the type at array creation
+
+.. testcode::
+
+    import pyarrow as pa
+
+    arr = pa.array([1, 2, 3, 4, 5], type=pa.int8())
+    print(arr.type)
+
+.. testoutput::
+
+    int8
+
+Setting the schema of a Table
+=============================
+
+Tables detain multiple columns, each with its own name
+and type. The union of types and names is what defines a schema.
+
+A schema in Arrow can be defined using :meth:`pyarrow.schema`
+
+.. testcode::
+
+    import pyarrow as pa
+
+    schema = pa.schema([
+        ("col1", pa.int8()),
+        ("col2", pa.string()),
+        ("col3", pa.float64())
+    ])
+
+The schema can then be provided to a table when created:
+
+.. testcode::
+
+    table = pa.table([
+        [1, 2, 3, 4, 5],
+        ["a", "b", "c", "d", "e"],
+        [1.0, 2.0, 3.0, 4.0, 5.0]
+    ], schema=schema)
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int8
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Like for arrays, it's possible to cast tables to different schemas
+as far as they are compatible
+
+.. testcode::
+
+    schema_int32 = pa.schema([
+        ("col1", pa.int32()),
+        ("col2", pa.string()),
+        ("col3", pa.float64())
+    ])
+
+    table = table.cast(schema_int32)
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int32
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Merging multiple schemas
+========================
+
+When you have multiple separate groups of data that you want to combine
+it might be necessary to unify their schemas to create a superset of them
+that applies to all data sources.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    first_schema = pa.schema([
+        ("country", pa.string()),
+        ("population", pa.int32())
+    ])
+
+    second_schema = pa.schema([
+        ("country_code", pa.string()),
+        ("language", pa.string())
+    ])
+
+:func:`unify_schemas` can be used to combine multiple schemas into
+a single one:
+
+.. testcode::
+
+    union_schema = pa.unify_schemas([first_schema, second_schema])
+
+    print(union_schema)
+
+.. testoutput::
+
+    country: string
+    population: int32
+    country_code: string
+    language: string
+
+If the combined schemas have overlapping columns, they can still be combined
+as far as the colliding columns retain the same type (``country_code``):
+
+.. testcode::
+
+    third_schema = pa.schema([
+        ("country_code", pa.string()),
+        ("lat", pa.float32()),
+        ("long", pa.float32()),
+    ])
+
+    union_schema =  pa.unify_schemas([first_schema, second_schema, third_schema])
+
+    print(union_schema)
+
+.. testoutput::
+
+    country: string
+    population: int32
+    country_code: string
+    language: string
+    lat: float
+    long: float
+
+If a merged field has instead diverging types in the combined schemas
+then trying to merge the schemas will fail. For example if ``country_code``
+was a numeric instead of a string we would be unable to unify the schemas
+because in ``second_schema`` it was already declared as a ``pa.string()``
+
+.. testcode::
+
+    third_schema = pa.schema([
+        ("country_code", pa.int32()),
+        ("lat", pa.float32()),
+        ("long", pa.float32()),
+    ])
+
+    try:
+        union_schema =  pa.unify_schemas([first_schema, second_schema, third_schema])
+    except (pa.ArrowInvalid, pa.ArrowTypeError) as e:
+        print(e)
+
+.. testoutput::
+
+    Unable to merge: Field country_code has incompatible types: string vs int32
\ No newline at end of file
diff --git a/dev/py/_static/alabaster.css b/dev/py/_static/alabaster.css
new file mode 100644
index 0000000..d377d9c
--- /dev/null
+++ b/dev/py/_static/alabaster.css
@@ -0,0 +1,708 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar {
+    max-height: 100%;
+    overflow-y: auto;
+}
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 160px;
+}
+
+div.sphinxsidebar .search > div {
+    display: table-cell;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Hide ugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/dev/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/dev/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/dev/py/_static/basic.css b/dev/py/_static/basic.css
new file mode 100644
index 0000000..4157edf
--- /dev/null
+++ b/dev/py/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: inherit;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/dev/py/_static/custom.css b/dev/py/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/dev/py/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/dev/py/_static/doctools.js b/dev/py/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/dev/py/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/dev/py/_static/documentation_options.js b/dev/py/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/dev/py/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/dev/py/_static/favicon.ico b/dev/py/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/dev/py/_static/favicon.ico
Binary files differ
diff --git a/dev/py/_static/file.png b/dev/py/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/dev/py/_static/file.png
Binary files differ
diff --git a/dev/py/_static/language_data.js b/dev/py/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/dev/py/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/dev/py/_static/minus.png b/dev/py/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/dev/py/_static/minus.png
Binary files differ
diff --git a/dev/py/_static/plus.png b/dev/py/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/dev/py/_static/plus.png
Binary files differ
diff --git a/dev/py/_static/pygments.css b/dev/py/_static/pygments.css
new file mode 100644
index 0000000..04a4174
--- /dev/null
+++ b/dev/py/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/dev/py/_static/searchtools.js b/dev/py/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/dev/py/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/dev/py/_static/sphinx_highlight.js b/dev/py/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/dev/py/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/dev/py/create.html b/dev/py/create.html
new file mode 100644
index 0000000..493ecb6
--- /dev/null
+++ b/dev/py/create.html
@@ -0,0 +1,420 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with Schema" href="schema.html" />
+    <link rel="prev" title="Reading and Writing Data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id1">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-arrays" id="id2">Creating Arrays</a></p></li>
+<li><p><a class="reference internal" href="#creating-tables" id="id3">Creating Tables</a></p></li>
+<li><p><a class="reference internal" href="#create-table-from-plain-types" id="id4">Create Table from Plain Types</a></p></li>
+<li><p><a class="reference internal" href="#creating-record-batches" id="id5">Creating Record Batches</a></p></li>
+<li><p><a class="reference internal" href="#store-categorical-data" id="id6">Store Categorical Data</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-arrays">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Arrays</a><a class="headerlink" href="#creating-arrays" title="Link to this heading">¶</a></h2>
+<p>Arrow keeps data in continuous arrays optimised for memory footprint
+and SIMD analyses. In Python it’s possible to build <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Array</span></code></a>
+starting from Python <code class="docutils literal notranslate"><span class="pre">lists</span></code> (or sequence types in general),
+<code class="docutils literal notranslate"><span class="pre">numpy</span></code> arrays and <code class="docutils literal notranslate"><span class="pre">pandas</span></code> Series.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  1,
+  2,
+  3,
+  4,
+  5
+]
+</pre></div>
+</div>
+<p>Arrays can also provide a <code class="docutils literal notranslate"><span class="pre">mask</span></code> to specify which values should
+be considered nulls</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+                 <span class="n">mask</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">]))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  null,
+  2,
+  null,
+  4,
+  null
+]
+</pre></div>
+</div>
+<p>When building arrays from <code class="docutils literal notranslate"><span class="pre">numpy</span></code> or <code class="docutils literal notranslate"><span class="pre">pandas</span></code>, Arrow will leverage
+optimized code paths that rely on the internal in-memory representation
+of the data by <code class="docutils literal notranslate"><span class="pre">numpy</span></code> and <code class="docutils literal notranslate"><span class="pre">pandas</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
+
+<span class="n">array_from_numpy</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">5</span><span class="p">))</span>
+<span class="n">array_from_pandas</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]))</span>
+</pre></div>
+</div>
+</section>
+<section id="creating-tables">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Creating Tables</a><a class="headerlink" href="#creating-tables" title="Link to this heading">¶</a></h2>
+<p>Arrow supports tabular data in <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>: each column
+is represented by a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.ChunkedArray.html#pyarrow.ChunkedArray" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.ChunkedArray</span></code></a> and tables can be created
+by pairing multiple arrays with names for their columns</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="s2">&quot;col3&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+<section id="create-table-from-plain-types">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Create Table from Plain Types</a><a class="headerlink" href="#create-table-from-plain-types" title="Link to this heading">¶</a></h2>
+<p>Arrow allows fast zero copy creation of arrow arrays
+from numpy and pandas arrays and series, but it’s also
+possible to create Arrow Arrays and Tables from
+plain Python structures.</p>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.table.html#pyarrow.table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.table()</span></code></a> function allows creation of Tables
+from a variety of inputs, including plain python objects</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">({</span>
+    <span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+    <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">]</span>
+<span class="p">})</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>All values provided in the dictionary will be passed to
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.array.html#pyarrow.array" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.array()</span></code></a> for conversion to Arrow arrays,
+and will benefit from zero copy behaviour when possible.</p>
+</div>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.from_pylist" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.from_pylist()</span></code></a> method allows the creation
+of Tables from python lists of row dicts. Types are inferred if a
+schema is not explicitly passed.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_pylist</span><span class="p">([</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;a&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;b&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;c&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;d&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;e&quot;</span><span class="p">}</span>
+<span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+</pre></div>
+</div>
+</section>
+<section id="creating-record-batches">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Creating Record Batches</a><a class="headerlink" href="#creating-record-batches" title="Link to this heading">¶</a></h2>
+<p>Most I/O operations in Arrow happen when shipping batches of data
+to their destination.  <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> is the way
+Arrow represents batches of data.  A RecordBatch can be seen as a slice
+of a table.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">RecordBatch</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">9</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">10</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;odd&quot;</span><span class="p">,</span> <span class="s2">&quot;even&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Multiple batches can be combined into a table using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.from_batches" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.from_batches()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">second_batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">RecordBatch</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">11</span><span class="p">,</span> <span class="mi">13</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="mi">19</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">12</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">18</span><span class="p">,</span> <span class="mi">20</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;odd&quot;</span><span class="p">,</span> <span class="s2">&quot;even&quot;</span><span class="p">])</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_batches</span><span class="p">([</span><span class="n">batch</span><span class="p">,</span> <span class="n">second_batch</span><span class="p">])</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+odd: int64
+even: int64
+----
+odd: [[1,3,5,7,9],[11,13,15,17,19]]
+even: [[2,4,6,8,10],[12,14,16,18,20]]
+</pre></div>
+</div>
+<p>Equally, <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> can be converted to a list of
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_batches" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.to_batches()</span></code></a>
+method</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">record_batches</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">to_batches</span><span class="p">(</span><span class="n">max_chunksize</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">record_batches</span><span class="p">))</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>2
+</pre></div>
+</div>
+</section>
+<section id="store-categorical-data">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Store Categorical Data</a><a class="headerlink" href="#store-categorical-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray</span></code></a> type
+to represent categorical data without the cost of
+storing and repeating the categories over and over.  This can reduce memory use
+when columns might have large values (such as text).</p>
+<p>If you have an array containing repeated categorical data,
+it is possible to convert it to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray</span></code></a>
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.dictionary_encode" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Array.dictionary_encode()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;red&quot;</span><span class="p">])</span>
+
+<span class="n">categorical</span> <span class="o">=</span> <span class="n">arr</span><span class="o">.</span><span class="n">dictionary_encode</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">categorical</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>...
+-- dictionary:
+  [
+    &quot;red&quot;,
+    &quot;green&quot;,
+    &quot;blue&quot;
+  ]
+-- indices:
+  [
+    0,
+    1,
+    2,
+    2,
+    1,
+    0
+  ]
+</pre></div>
+</div>
+<p>If you already know the categories and indices then you can skip the encode
+step and directly create the <code class="docutils literal notranslate"><span class="pre">DictionaryArray</span></code> using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray.from_arrays" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray.from_arrays()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">categorical</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">DictionaryArray</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">(</span>
+    <span class="n">indices</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
+    <span class="n">dictionary</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">]</span>
+<span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">categorical</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>...
+-- dictionary:
+  [
+    &quot;red&quot;,
+    &quot;green&quot;,
+    &quot;blue&quot;
+  ]
+-- indices:
+  [
+    0,
+    1,
+    2,
+    2,
+    1,
+    0
+  ]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-arrays">Creating Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-tables">Creating Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#create-table-from-plain-types">Create Table from Plain Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-record-batches">Creating Record Batches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#store-categorical-data">Store Categorical Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="io.html" title="previous chapter">Reading and Writing Data</a></li>
+      <li>Next: <a href="schema.html" title="next chapter">Working with Schema</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/data.html b/dev/py/data.html
new file mode 100644
index 0000000..a29399d
--- /dev/null
+++ b/dev/py/data.html
@@ -0,0 +1,632 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Data Manipulation &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Working with Schema" href="schema.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="data-manipulation">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Data Manipulation</a><a class="headerlink" href="#data-manipulation" title="Link to this heading">¶</a></h1>
+<p>Recipes related to filtering or transforming data in
+arrays and tables.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#data-manipulation" id="id1">Data Manipulation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#computing-mean-min-max-values-of-an-array" id="id2">Computing Mean/Min/Max values of an array</a></p></li>
+<li><p><a class="reference internal" href="#counting-occurrences-of-elements" id="id3">Counting Occurrences of Elements</a></p></li>
+<li><p><a class="reference internal" href="#applying-arithmetic-functions-to-arrays" id="id4">Applying arithmetic functions to arrays.</a></p></li>
+<li><p><a class="reference internal" href="#appending-tables-to-an-existing-table" id="id5">Appending tables to an existing table</a></p></li>
+<li><p><a class="reference internal" href="#adding-a-column-to-an-existing-table" id="id6">Adding a column to an existing Table</a></p></li>
+<li><p><a class="reference internal" href="#replacing-a-column-in-an-existing-table" id="id7">Replacing a column in an existing Table</a></p></li>
+<li><p><a class="reference internal" href="#group-a-table" id="id8">Group a Table</a></p></li>
+<li><p><a class="reference internal" href="#sort-a-table" id="id9">Sort a Table</a></p></li>
+<li><p><a class="reference internal" href="#searching-for-values-matching-a-predicate-in-arrays" id="id10">Searching for values matching a predicate in Arrays</a></p></li>
+<li><p><a class="reference internal" href="#filtering-arrays-using-a-mask" id="id11">Filtering Arrays using a mask</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<p>See <a class="reference external" href="https://arrow.apache.org/docs/python/compute.html#compute" title="(in Apache Arrow v15.0.1)"><span>Compute Functions</span></a> for a complete list of all available compute functions</p>
+<section id="computing-mean-min-max-values-of-an-array">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Computing Mean/Min/Max values of an array</a><a class="headerlink" href="#computing-mean-min-max-values-of-an-array" title="Link to this heading">¶</a></h2>
+<p>Arrow provides compute functions that can be applied to arrays.
+Those compute functions are exposed through the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code>
+module.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can compute the <code class="docutils literal notranslate"><span class="pre">mean</span></code> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.mean.html#pyarrow.compute.mean" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.mean()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">mean</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">mean</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">mean</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>49.5
+</pre></div>
+</div>
+<p>And the <code class="docutils literal notranslate"><span class="pre">min</span></code> and <code class="docutils literal notranslate"><span class="pre">max</span></code> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.min_max.html#pyarrow.compute.min_max" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.min_max()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">min_max</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">min_max</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">min_max</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[(&#39;min&#39;, 0), (&#39;max&#39;, 99)]
+</pre></div>
+</div>
+</section>
+<section id="counting-occurrences-of-elements">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Counting Occurrences of Elements</a><a class="headerlink" href="#counting-occurrences-of-elements" title="Link to this heading">¶</a></h2>
+<p>Arrow provides compute functions that can be applied to arrays,
+those compute functions are exposed through the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code>
+module.</p>
+<p>Given an array with all numbers from 0 to 9 repeated 10 times</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;LEN: </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">nums_arr</span><span class="p">)</span><span class="si">}</span><span class="s2">, MIN/MAX: </span><span class="si">{</span><span class="n">nums_arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">nums_arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>LEN: 100, MIN/MAX: 0 .. 9
+</pre></div>
+</div>
+<p>We can count occurrences of all entries in the array using the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.value_counts.html#pyarrow.compute.value_counts" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.value_counts()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">counts</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">value_counts</span><span class="p">(</span><span class="n">nums_arr</span><span class="p">)</span>
+<span class="k">for</span> <span class="n">pair</span> <span class="ow">in</span> <span class="n">counts</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">pair</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[(&#39;values&#39;, 0), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 1), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 2), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 3), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 4), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 5), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 6), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 7), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 8), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 9), (&#39;counts&#39;, 10)]
+</pre></div>
+</div>
+</section>
+<section id="applying-arithmetic-functions-to-arrays">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Applying arithmetic functions to arrays.</a><a class="headerlink" href="#applying-arithmetic-functions-to-arrays" title="Link to this heading">¶</a></h2>
+<p>The compute functions in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> also include
+common transformations such as arithmetic functions.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can multiply all values by 2 using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.multiply.html#pyarrow.compute.multiply" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.multiply()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">doubles</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">multiply</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">doubles</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">doubles</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 198
+</pre></div>
+</div>
+</section>
+<section id="appending-tables-to-an-existing-table">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Appending tables to an existing table</a><a class="headerlink" href="#appending-tables-to-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have data split across two different tables, it is possible
+to concatenate their rows into a single table.</p>
+<p>If we have the list of Oscar nominations divided between two different tables:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">oscar_nominations_1</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Meryl Streep&quot;</span><span class="p">,</span> <span class="s2">&quot;Katharine Hepburn&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+
+<span class="n">oscar_nominations_2</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Jack Nicholson&quot;</span><span class="p">,</span> <span class="s2">&quot;Bette Davis&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>We can combine them into a single table using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.concat_tables.html#pyarrow.concat_tables" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.concat_tables()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">concat_tables</span><span class="p">([</span><span class="n">oscar_nominations_1</span><span class="p">,</span>
+                                      <span class="n">oscar_nominations_2</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;],[&quot;Jack Nicholson&quot;,&quot;Bette Davis&quot;]]
+nominations: [[21,12],[12,10]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>By default, appending two tables is a zero-copy operation that doesn’t need to
+copy or rewrite data. As tables are made of <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.ChunkedArray.html#pyarrow.ChunkedArray" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.ChunkedArray</span></code></a>,
+the result will be a table with multiple chunks, each pointing to the original
+data that has been appended. Under some conditions, Arrow might have to
+cast data from one type to another (if <cite>promote=True</cite>).  In such cases the data
+will need to be copied and an extra cost will occur.</p>
+</div>
+</section>
+<section id="adding-a-column-to-an-existing-table">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Adding a column to an existing Table</a><a class="headerlink" href="#adding-a-column-to-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table it is possible to extend its columns using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.append_column" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.append_column()</span></code></a></p>
+<p>Suppose we have a table with oscar nominations for each actress</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Meryl Streep&quot;</span><span class="p">,</span> <span class="s2">&quot;Katharine Hepburn&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;]]
+nominations: [[21,12]]
+</pre></div>
+</div>
+<p>it’s possible to append an additional column to track the years the
+nomination was won using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.append_column" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.append_column()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">oscar_nominations</span><span class="o">.</span><span class="n">append_column</span><span class="p">(</span>
+  <span class="s2">&quot;wonyears&quot;</span><span class="p">,</span>
+  <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span>
+    <span class="p">[</span><span class="mi">1980</span><span class="p">,</span> <span class="mi">1983</span><span class="p">,</span> <span class="mi">2012</span><span class="p">],</span>
+    <span class="p">[</span><span class="mi">1934</span><span class="p">,</span> <span class="mi">1968</span><span class="p">,</span> <span class="mi">1969</span><span class="p">,</span> <span class="mi">1982</span><span class="p">]</span>
+  <span class="p">])</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+wonyears: list&lt;item: int64&gt;
+  child 0, item: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;]]
+nominations: [[21,12]]
+wonyears: [[[1980,1983,2012],[1934,1968,1969,1982]]]
+</pre></div>
+</div>
+</section>
+<section id="replacing-a-column-in-an-existing-table">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Replacing a column in an existing Table</a><a class="headerlink" href="#replacing-a-column-in-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table it is possible to replace an existing column using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.set_column" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.set_column()</span></code></a></p>
+<p>Suppose we have a table with information about items sold at a supermarket
+on a particular day.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">sales_data</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Potato&quot;</span><span class="p">,</span> <span class="s2">&quot;Bean&quot;</span><span class="p">,</span> <span class="s2">&quot;Cucumber&quot;</span><span class="p">,</span> <span class="s2">&quot;Eggs&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">30</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;item&quot;</span><span class="p">,</span> <span class="s2">&quot;amount&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">sales_data</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+item: string
+amount: int64
+----
+item: [[&quot;Potato&quot;,&quot;Bean&quot;,&quot;Cucumber&quot;,&quot;Eggs&quot;]]
+amount: [[21,12,10,30]]
+</pre></div>
+</div>
+<p>it’s possible to replace the existing column <cite>amount</cite>
+in index <cite>1</cite> to update the sales
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.set_column" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.set_column()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">new_sales_data</span> <span class="o">=</span> <span class="n">sales_data</span><span class="o">.</span><span class="n">set_column</span><span class="p">(</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="s2">&quot;new_amount&quot;</span><span class="p">,</span>
+  <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">30</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">40</span><span class="p">])</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">new_sales_data</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+item: string
+new_amount: int64
+----
+item: [[&quot;Potato&quot;,&quot;Bean&quot;,&quot;Cucumber&quot;,&quot;Eggs&quot;]]
+new_amount: [[30,20,15,40]]
+</pre></div>
+</div>
+</section>
+<section id="group-a-table">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Group a Table</a><a class="headerlink" href="#group-a-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table which needs to be grouped by a particular key,
+you can use <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.group_by" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.group_by()</span></code></a> followed by an aggregation
+operation <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.TableGroupBy.html#pyarrow.TableGroupBy.aggregate" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.TableGroupBy.aggregate()</span></code></a>. Learn more about
+groupby operations <a class="reference external" href="https://arrow.apache.org/docs/python/compute.html#grouped-aggregations">here</a>.</p>
+<p>For example, let’s say we have some data with a particular set of keys
+and values associated with that key. And we want to group the data by
+those keys and apply an aggregate function like sum to evaluate
+how many items are for each unique key.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+     <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+     <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">11</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">10</span><span class="p">]),</span>
+    <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[11,20,3,4,5,1,4,10]]
+</pre></div>
+</div>
+<p>Now we let’s apply a groupby operation. The table will be grouped
+by the field <code class="docutils literal notranslate"><span class="pre">key</span></code> and an aggregation operation, <code class="docutils literal notranslate"><span class="pre">sum</span></code> is applied
+on the column <code class="docutils literal notranslate"><span class="pre">values</span></code>. Note that, an aggregation operation pairs with a column name.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">aggregated_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">group_by</span><span class="p">(</span><span class="s2">&quot;keys&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">aggregate</span><span class="p">([(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span> <span class="s2">&quot;sum&quot;</span><span class="p">)])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">aggregated_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values_sum: int64
+----
+keys: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+values_sum: [[31,7,15,1,4]]
+</pre></div>
+</div>
+<p>If you observe carefully, the new table returns the aggregated column
+as <code class="docutils literal notranslate"><span class="pre">values_sum</span></code> which is formed by the column name and aggregation operation name.</p>
+<p>Aggregation operations can be applied with options. Let’s take a case where
+we have null values included in our dataset, but we want to take the
+count of the unique groups excluding the null values.</p>
+<p>A sample dataset can be formed as follows.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">None</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="kc">None</span><span class="p">]),</span>
+      <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[null,20,3,4,5,6,10,1,4,null]]
+</pre></div>
+</div>
+<p>Let’s apply an aggregation operation <code class="docutils literal notranslate"><span class="pre">count</span></code> with the option to exclude
+null values.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">grouped_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">group_by</span><span class="p">(</span><span class="s2">&quot;keys&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">aggregate</span><span class="p">(</span>
+  <span class="p">[(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;count&quot;</span><span class="p">,</span>
+  <span class="n">pc</span><span class="o">.</span><span class="n">CountOptions</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s2">&quot;only_valid&quot;</span><span class="p">))]</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">grouped_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values_count: int64
+----
+keys: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+values_count: [[1,3,1,2,1]]
+</pre></div>
+</div>
+</section>
+<section id="sort-a-table">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Sort a Table</a><a class="headerlink" href="#sort-a-table" title="Link to this heading">¶</a></h2>
+<p>Let’s discusse how to sort a table. We can sort a table,
+based on values of a given column. Data can be either sorted <code class="docutils literal notranslate"><span class="pre">ascending</span></code>
+or <code class="docutils literal notranslate"><span class="pre">descending</span></code>.</p>
+<p>Prepare data;</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">15</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">123</span><span class="p">]),</span>
+      <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[15,20,3,4,5,6,10,1,14,123]]
+</pre></div>
+</div>
+<p>Then applying sort with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.sort_by" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.sort_by()</span></code></a>;</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sorted_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">sort_by</span><span class="p">([(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span> <span class="s2">&quot;ascending&quot;</span><span class="p">)])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">sorted_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;d&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;a&quot;,&quot;a&quot;,&quot;c&quot;]]
+values: [[1,3,4,5,6,10,14,15,20,123]]
+</pre></div>
+</div>
+</section>
+<section id="searching-for-values-matching-a-predicate-in-arrays">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Searching for values matching a predicate in Arrays</a><a class="headerlink" href="#searching-for-values-matching-a-predicate-in-arrays" title="Link to this heading">¶</a></h2>
+<p>If you have to look for values matching a predicate in Arrow arrays
+the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> module provides several methods that
+can be used to find the values you are looking for.</p>
+<p>For example, given an array with numbers from 0 to 9, if we
+want to look only for those greater than 5 we could use the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.greater.html#pyarrow.compute.greater" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.greater()</span></code></a> method and get back the elements
+that fit our predicate</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span>
+<span class="n">gtfive</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">greater</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">gtfive</span><span class="o">.</span><span class="n">to_string</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  false,
+  false,
+  false,
+  false,
+  false,
+  false,
+  true,
+  true,
+  true,
+  true
+]
+</pre></div>
+</div>
+<p>Furthermore we can filter the array to get only the entries
+that match our predicate with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.filter.html#pyarrow.compute.filter" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.filter()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">filtered_array</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="n">gtfive</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  6,
+  7,
+  8,
+  9
+]
+</pre></div>
+</div>
+</section>
+<section id="filtering-arrays-using-a-mask">
+<h2><a class="toc-backref" href="#id11" role="doc-backlink">Filtering Arrays using a mask</a><a class="headerlink" href="#filtering-arrays-using-a-mask" title="Link to this heading">¶</a></h2>
+<p>In many cases, when you are searching for something in an array
+you will end up with a mask that tells you the positions at which
+your search matched the values.</p>
+<p>For example in an array of four items, we might have a mask that
+matches the first and the last items only:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">])</span>
+<span class="n">mask</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>We can then filter the array according to the mask using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.filter" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Array.filter()</span></code></a> to get back a new array with
+only the values matching the mask:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">filtered_array</span> <span class="o">=</span> <span class="n">array</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">mask</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  1,
+  4
+]
+</pre></div>
+</div>
+<p>Most search functions in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> will produce
+a mask as the output, so you can use them to filter your arrays
+for the values that have been found by the function.</p>
+<p>For example we might filter our arrays for the values equal to <code class="docutils literal notranslate"><span class="pre">2</span></code>
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.equal.html#pyarrow.compute.equal" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.equal()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">filtered_array</span> <span class="o">=</span> <span class="n">array</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pc</span><span class="o">.</span><span class="n">equal</span><span class="p">(</span><span class="n">array</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  2
+]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Data Manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#computing-mean-min-max-values-of-an-array">Computing Mean/Min/Max values of an array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#counting-occurrences-of-elements">Counting Occurrences of Elements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#applying-arithmetic-functions-to-arrays">Applying arithmetic functions to arrays.</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#appending-tables-to-an-existing-table">Appending tables to an existing table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#adding-a-column-to-an-existing-table">Adding a column to an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#replacing-a-column-in-an-existing-table">Replacing a column in an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#group-a-table">Group a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#sort-a-table">Sort a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#searching-for-values-matching-a-predicate-in-arrays">Searching for values matching a predicate in Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#filtering-arrays-using-a-mask">Filtering Arrays using a mask</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="schema.html" title="previous chapter">Working with Schema</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/data.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/flight.html b/dev/py/flight.html
new file mode 100644
index 0000000..758185e
--- /dev/null
+++ b/dev/py/flight.html
@@ -0,0 +1,932 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Data Manipulation" href="data.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>Recipes related to leveraging Arrow Flight protocol</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id1">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight" id="id2">Simple Parquet storage service with Arrow Flight</a></p></li>
+<li><p><a class="reference internal" href="#streaming-parquet-storage-service" id="id3">Streaming Parquet Storage Service</a></p></li>
+<li><p><a class="reference internal" href="#authentication-with-user-password" id="id4">Authentication with user/password</a></p></li>
+<li><p><a class="reference internal" href="#securing-connections-with-tls" id="id5">Securing connections with TLS</a></p></li>
+<li><p><a class="reference internal" href="#propagating-opentelemetry-traces" id="id6">Propagating OpenTelemetry Traces</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-parquet-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Simple Parquet storage service with Arrow Flight</a><a class="headerlink" href="#simple-parquet-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>Suppose you want to implement a service that can store, send and receive
+Parquet files using the Arrow Flight protocol,
+<code class="docutils literal notranslate"><span class="pre">pyarrow</span></code> provides an implementation framework in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.flight</span></code>
+and particularly through the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase</span></code></a> class.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pathlib</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pyarrow.parquet</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">,</span>
+                <span class="n">repo</span><span class="o">=</span><span class="n">pathlib</span><span class="o">.</span><span class="n">Path</span><span class="p">(</span><span class="s2">&quot;./datasets&quot;</span><span class="p">),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_location</span> <span class="o">=</span> <span class="n">location</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">=</span> <span class="n">repo</span>
+
+    <span class="k">def</span> <span class="nf">_make_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_schema</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">metadata</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_metadata</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span>
+            <span class="n">dataset</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="p">)</span>
+        <span class="n">endpoints</span> <span class="o">=</span> <span class="p">[</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightEndpoint</span><span class="p">(</span><span class="n">dataset</span><span class="p">,</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_location</span><span class="p">])]</span>
+        <span class="k">return</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span>
+                                        <span class="n">descriptor</span><span class="p">,</span>
+                                        <span class="n">endpoints</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">num_rows</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">serialized_size</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">list_flights</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">criteria</span><span class="p">):</span>
+        <span class="k">for</span> <span class="n">dataset</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">iterdir</span><span class="p">():</span>
+            <span class="k">yield</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">get_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">data_table</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+        <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">data_table</span><span class="p">,</span> <span class="n">dataset_path</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">do_get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">ticket</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">ticket</span><span class="o">.</span><span class="n">ticket</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="k">return</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">RecordBatchStream</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">list_actions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span>
+            <span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;Delete a dataset.&quot;</span><span class="p">),</span>
+        <span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">action</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s2">&quot;drop_dataset&quot;</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_drop_dataset</span><span class="p">(</span><span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="ne">NotImplementedError</span>
+
+    <span class="k">def</span> <span class="nf">do_drop_dataset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">dataset_path</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>The example server exposes <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.list_flights" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.list_flights()</span></code></a>
+which is the method in charge of returning the list of data streams available
+for fetching.</p>
+<p>Likewise, <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.get_flight_info" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.get_flight_info()</span></code></a> provides
+the information regarding a single specific data stream.</p>
+<p>Then we expose <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_get" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_get()</span></code></a> which is in charge
+of actually fetching the exposed data streams and sending them to the client.</p>
+<p>Allowing to list and download data streams would be pretty useless if we didn’t
+expose a way to create them, this is the responsibility of
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_put" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_put()</span></code></a> which is in charge of receiving
+new data from the client and dealing with it (in this case saving it
+into a parquet file)</p>
+<p>This are the most common Arrow Flight requests, if we need to add more
+functionalities, we can do so using custom actions.</p>
+<p>In the previous example a <code class="docutils literal notranslate"><span class="pre">drop_dataset</span></code> custom action is added.
+All custom actions are executed through the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_action" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_action()</span></code></a> method, thus it’s up to
+the server subclass to dispatch them properly. In this case we invoke
+the <cite>do_drop_dataset</cite> method when the <cite>action.type</cite> is the one we expect.</p>
+<p>Our server can then be started with
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.serve" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.serve()</span></code></a></p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">()</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Once the server is started we can build a client to perform
+requests to it</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>We can create a new table and upload it so that it gets stored
+in a new parquet file:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Upload a new dataset</span>
+<span class="n">data_table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">(</span>
+    <span class="p">[[</span><span class="s2">&quot;Mario&quot;</span><span class="p">,</span> <span class="s2">&quot;Luigi&quot;</span><span class="p">,</span> <span class="s2">&quot;Peach&quot;</span><span class="p">]],</span>
+    <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;Character&quot;</span><span class="p">]</span>
+<span class="p">)</span>
+<span class="n">upload_descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="s2">&quot;uploaded.parquet&quot;</span><span class="p">)</span>
+<span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">,</span> <span class="n">data_table</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">data_table</span><span class="p">)</span>
+<span class="n">writer</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Once uploaded we should be able to retrieve the metadata for our
+newly uploaded table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Retrieve metadata of newly uploaded dataset</span>
+<span class="n">flight</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_flight_info</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">)</span>
+<span class="n">descriptor</span> <span class="o">=</span> <span class="n">flight</span><span class="o">.</span><span class="n">descriptor</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Path:&quot;</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">),</span> <span class="s2">&quot;Rows:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_records</span><span class="p">,</span> <span class="s2">&quot;Size:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_bytes</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;=== Schema ===&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;==============&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Path: uploaded.parquet Rows: 3 Size: ...
+=== Schema ===
+Character: string
+==============
+</pre></div>
+</div>
+<p>And we can fetch the content of the dataset:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Read content of the dataset</span>
+<span class="n">reader</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_get</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">endpoints</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ticket</span><span class="p">)</span>
+<span class="n">read_table</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">read_table</span><span class="o">.</span><span class="n">to_pandas</span><span class="p">()</span><span class="o">.</span><span class="n">head</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>  Character
+0     Mario
+1     Luigi
+2     Peach
+</pre></div>
+</div>
+<p>Once we finished we can invoke our custom action to delete the
+dataset we newly uploaded:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Drop the newly uploaded dataset</span>
+<span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;uploaded.parquet&quot;</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)))</span>
+</pre></div>
+</div>
+<p>To confirm our dataset was deleted,
+we might list all parquet files that are currently stored by the server:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># List existing datasets.</span>
+<span class="k">for</span> <span class="n">flight</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">list_flights</span><span class="p">():</span>
+    <span class="n">descriptor</span> <span class="o">=</span> <span class="n">flight</span><span class="o">.</span><span class="n">descriptor</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Path:&quot;</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">),</span> <span class="s2">&quot;Rows:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_records</span><span class="p">,</span> <span class="s2">&quot;Size:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_bytes</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;=== Schema ===&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;==============&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="streaming-parquet-storage-service">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Streaming Parquet Storage Service</a><a class="headerlink" href="#streaming-parquet-storage-service" title="Link to this heading">¶</a></h2>
+<p>We can improve the Parquet storage service and avoid holding entire datasets in
+memory by streaming data. Flight readers and writers, like others in PyArrow,
+can be iterated through, so let’s update the server from before to take
+advantage of this:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pathlib</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pyarrow.parquet</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">,</span>
+                <span class="n">repo</span><span class="o">=</span><span class="n">pathlib</span><span class="o">.</span><span class="n">Path</span><span class="p">(</span><span class="s2">&quot;./datasets&quot;</span><span class="p">),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_location</span> <span class="o">=</span> <span class="n">location</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">=</span> <span class="n">repo</span>
+
+    <span class="k">def</span> <span class="nf">_make_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_schema</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">metadata</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_metadata</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span>
+            <span class="n">dataset</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="p">)</span>
+        <span class="n">endpoints</span> <span class="o">=</span> <span class="p">[</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightEndpoint</span><span class="p">(</span><span class="n">dataset</span><span class="p">,</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_location</span><span class="p">])]</span>
+        <span class="k">return</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span>
+                                        <span class="n">descriptor</span><span class="p">,</span>
+                                        <span class="n">endpoints</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">num_rows</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">serialized_size</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">list_flights</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">criteria</span><span class="p">):</span>
+        <span class="k">for</span> <span class="n">dataset</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">iterdir</span><span class="p">():</span>
+            <span class="k">yield</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">get_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="c1"># Read the uploaded data and write to Parquet incrementally</span>
+        <span class="k">with</span> <span class="n">dataset_path</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s2">&quot;wb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">sink</span><span class="p">:</span>
+            <span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">ParquetWriter</span><span class="p">(</span><span class="n">sink</span><span class="p">,</span> <span class="n">reader</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+                <span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="n">reader</span><span class="p">:</span>
+                    <span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_batches</span><span class="p">([</span><span class="n">chunk</span><span class="o">.</span><span class="n">data</span><span class="p">]))</span>
+
+    <span class="k">def</span> <span class="nf">do_get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">ticket</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">ticket</span><span class="o">.</span><span class="n">ticket</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="c1"># Stream data from a file</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">reader</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">ParquetFile</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">GeneratorStream</span><span class="p">(</span>
+            <span class="n">reader</span><span class="o">.</span><span class="n">schema_arrow</span><span class="p">,</span> <span class="n">reader</span><span class="o">.</span><span class="n">iter_batches</span><span class="p">())</span>
+
+    <span class="k">def</span> <span class="nf">list_actions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span>
+            <span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;Delete a dataset.&quot;</span><span class="p">),</span>
+        <span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">action</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s2">&quot;drop_dataset&quot;</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_drop_dataset</span><span class="p">(</span><span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="ne">NotImplementedError</span>
+
+    <span class="k">def</span> <span class="nf">do_drop_dataset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">dataset_path</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>First, we’ve modified <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_put" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_put()</span></code></a>. Instead
+of reading all the uploaded data into a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> before writing,
+we instead iterate through each batch as it comes and add it to a Parquet file.</p>
+<p>Then, we’ve modified <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_get" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_get()</span></code></a> to stream
+data to the client. This uses <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.GeneratorStream.html#pyarrow.flight.GeneratorStream" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.GeneratorStream</span></code></a>, which
+takes a schema and any iterable or iterator. Flight then iterates through and
+sends each record batch to the client, allowing us to handle even large Parquet
+files that don’t fit into memory.</p>
+<p>While GeneratorStream has the advantage that it can stream data, that means
+Flight must call back into Python for each record batch to send. In contrast,
+RecordBatchStream requires that all data is in-memory up front, but once
+created, all data transfer is handled purely in C++, without needing to call
+Python code.</p>
+<p>Let’s give the server a spin. As before, we’ll start the server:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">()</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>We create a client, and this time, we’ll write batches to the writer, as if we
+had a stream of data instead of a table in memory:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">)</span>
+
+<span class="c1"># Upload a new dataset</span>
+<span class="n">NUM_BATCHES</span> <span class="o">=</span> <span class="mi">1024</span>
+<span class="n">ROWS_PER_BATCH</span> <span class="o">=</span> <span class="mi">4096</span>
+<span class="n">upload_descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="s2">&quot;streamed.parquet&quot;</span><span class="p">)</span>
+<span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">record_batch</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="n">ROWS_PER_BATCH</span><span class="p">)),</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;ints&quot;</span><span class="p">])</span>
+<span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">,</span> <span class="n">batch</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="k">with</span> <span class="n">writer</span><span class="p">:</span>
+    <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">NUM_BATCHES</span><span class="p">):</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write_batch</span><span class="p">(</span><span class="n">batch</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>As before, we can then read it back. Again, we’ll read each batch from the
+stream as it arrives, instead of reading them all into a table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Read content of the dataset</span>
+<span class="n">flight</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_flight_info</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">)</span>
+<span class="n">reader</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_get</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">endpoints</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ticket</span><span class="p">)</span>
+<span class="n">total_rows</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="n">reader</span><span class="p">:</span>
+    <span class="n">total_rows</span> <span class="o">+=</span> <span class="n">chunk</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">num_rows</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Got&quot;</span><span class="p">,</span> <span class="n">total_rows</span><span class="p">,</span> <span class="s2">&quot;rows total, expected&quot;</span><span class="p">,</span> <span class="n">NUM_BATCHES</span> <span class="o">*</span> <span class="n">ROWS_PER_BATCH</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Got 4194304 rows total, expected 4194304
+</pre></div>
+</div>
+</section>
+<section id="authentication-with-user-password">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Authentication with user/password</a><a class="headerlink" href="#authentication-with-user-password" title="Link to this heading">¶</a></h2>
+<p>Often, services need a way to authenticate the user and identify who
+they are. Flight provides <a class="reference external" href="https://arrow.apache.org/docs/format/Flight.html" title="(in Apache Arrow v15.0.1)"><span class="xref std std-doc">several ways to implement
+authentication</span></a>; the simplest uses a
+user-password scheme. At startup, the client authenticates itself with
+the server using a username and password. The server returns an
+authorization token to include on future requests.</p>
+<div class="admonition warning">
+<p class="admonition-title">Warning</p>
+<p>Authentication should only be used over a secure encrypted
+channel, i.e. TLS should be enabled.</p>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>While the scheme is described as “<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme">(HTTP) basic
+authentication</a>”, it does not actually implement HTTP
+authentication (RFC 7325) per se.</p>
+</div>
+<p>While Flight provides some interfaces to implement such a scheme, the
+server must provide the actual implementation, as demonstrated
+below. <strong>The implementation here is not secure and is provided as a
+minimal example only.</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">base64</span>
+<span class="kn">import</span> <span class="nn">secrets</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+
+<span class="k">class</span> <span class="nc">EchoServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;A simple server that just echoes any requests from DoAction.&quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span><span class="n">action</span><span class="o">.</span><span class="n">type</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">),</span> <span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="p">]</span>
+
+
+<span class="k">class</span> <span class="nc">BasicAuthServerMiddlewareFactory</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddlewareFactory</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Middleware that implements username-password authentication.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    creds: Dict[str, str]</span>
+<span class="sd">        A dictionary of username-password values to accept.</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">creds</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">creds</span> <span class="o">=</span> <span class="n">creds</span>
+        <span class="c1"># Map generated bearer tokens to users</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">,</span> <span class="n">headers</span><span class="p">):</span>
+<span class="w">        </span><span class="sd">&quot;&quot;&quot;Validate credentials at the start of every call.&quot;&quot;&quot;</span>
+        <span class="c1"># Search for the authentication header (case-insensitive)</span>
+        <span class="n">auth_header</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="k">for</span> <span class="n">header</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span>
+            <span class="k">if</span> <span class="n">header</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s2">&quot;authorization&quot;</span><span class="p">:</span>
+                <span class="n">auth_header</span> <span class="o">=</span> <span class="n">headers</span><span class="p">[</span><span class="n">header</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
+                <span class="k">break</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">auth_header</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;No credentials supplied&quot;</span><span class="p">)</span>
+
+        <span class="c1"># The header has the structure &quot;AuthType TokenValue&quot;, e.g.</span>
+        <span class="c1"># &quot;Basic &lt;encoded username+password&gt;&quot; or &quot;Bearer &lt;random token&gt;&quot;.</span>
+        <span class="n">auth_type</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">auth_header</span><span class="o">.</span><span class="n">partition</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">auth_type</span> <span class="o">==</span> <span class="s2">&quot;Basic&quot;</span><span class="p">:</span>
+            <span class="c1"># Initial &quot;login&quot;. The user provided a username/password</span>
+            <span class="c1"># combination encoded in the same way as HTTP Basic Auth.</span>
+            <span class="n">decoded</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+            <span class="n">username</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">password</span> <span class="o">=</span> <span class="n">decoded</span><span class="o">.</span><span class="n">partition</span><span class="p">(</span><span class="s1">&#39;:&#39;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">password</span> <span class="ow">or</span> <span class="n">password</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">creds</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">username</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;Unknown user or invalid password&quot;</span><span class="p">)</span>
+            <span class="c1"># Generate a secret, random bearer token for future calls.</span>
+            <span class="n">token</span> <span class="o">=</span> <span class="n">secrets</span><span class="o">.</span><span class="n">token_urlsafe</span><span class="p">(</span><span class="mi">32</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="n">token</span><span class="p">]</span> <span class="o">=</span> <span class="n">username</span>
+            <span class="k">return</span> <span class="n">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">token</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="n">auth_type</span> <span class="o">==</span> <span class="s2">&quot;Bearer&quot;</span><span class="p">:</span>
+            <span class="c1"># An actual call. Validate the bearer token.</span>
+            <span class="n">username</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;Invalid token&quot;</span><span class="p">)</span>
+            <span class="k">return</span> <span class="n">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+
+        <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;No credentials supplied&quot;</span><span class="p">)</span>
+
+
+<span class="k">class</span> <span class="nc">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddleware</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;Middleware that implements username-password authentication.&quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">token</span> <span class="o">=</span> <span class="n">token</span>
+
+    <span class="k">def</span> <span class="nf">sending_headers</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="w">        </span><span class="sd">&quot;&quot;&quot;Return the authentication token to the client.&quot;&quot;&quot;</span>
+        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;authorization&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;Bearer </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">token</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">}</span>
+
+
+<span class="k">class</span> <span class="nc">NoOpAuthHandler</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerAuthHandler</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    A handler that implements username-password authentication.</span>
+
+<span class="sd">    This is required only so that the server will respond to the internal</span>
+<span class="sd">    Handshake RPC call, which the client calls when authenticate_basic_token</span>
+<span class="sd">    is called. Otherwise, it should be a no-op as the actual authentication is</span>
+<span class="sd">    implemented in middleware.</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="nf">authenticate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">outgoing</span><span class="p">,</span> <span class="n">incoming</span><span class="p">):</span>
+        <span class="k">pass</span>
+
+    <span class="k">def</span> <span class="nf">is_valid</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token</span><span class="p">):</span>
+        <span class="k">return</span> <span class="s2">&quot;&quot;</span>
+</pre></div>
+</div>
+<p>We can then start the server:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">EchoServer</span><span class="p">(</span>
+        <span class="n">auth_handler</span><span class="o">=</span><span class="n">NoOpAuthHandler</span><span class="p">(),</span>
+        <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+        <span class="n">middleware</span><span class="o">=</span><span class="p">{</span>
+            <span class="s2">&quot;basic&quot;</span><span class="p">:</span> <span class="n">BasicAuthServerMiddlewareFactory</span><span class="p">({</span>
+                <span class="s2">&quot;test&quot;</span><span class="p">:</span> <span class="s2">&quot;password&quot;</span><span class="p">,</span>
+            <span class="p">})</span>
+        <span class="p">},</span>
+    <span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Then, we can make a client and log in:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">)</span>
+
+<span class="n">token_pair</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">authenticate_basic_token</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;test&#39;</span><span class="p">,</span> <span class="sa">b</span><span class="s1">&#39;password&#39;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">token_pair</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>(b&#39;authorization&#39;, b&#39;Bearer ...&#39;)
+</pre></div>
+</div>
+<p>For future calls, we include the authentication token with the call:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">action</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;echo&quot;</span><span class="p">,</span> <span class="sa">b</span><span class="s2">&quot;Hello, world!&quot;</span><span class="p">)</span>
+<span class="n">options</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightCallOptions</span><span class="p">(</span><span class="n">headers</span><span class="o">=</span><span class="p">[</span><span class="n">token_pair</span><span class="p">])</span>
+<span class="k">for</span> <span class="n">response</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">):</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>b&#39;echo&#39;
+b&#39;Hello, world!&#39;
+</pre></div>
+</div>
+<p>If we fail to do so, we get an authentication error:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span>
+    <span class="nb">list</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">))</span>
+<span class="k">except</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Unauthenticated:&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+<span class="k">else</span><span class="p">:</span>
+    <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Expected call to fail&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unauthenticated: No credentials supplied. Detail: Unauthenticated
+</pre></div>
+</div>
+<p>Or if we use the wrong credentials on login, we also get an error:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span>
+    <span class="n">client</span><span class="o">.</span><span class="n">authenticate_basic_token</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;invalid&#39;</span><span class="p">,</span> <span class="sa">b</span><span class="s1">&#39;password&#39;</span><span class="p">)</span>
+<span class="k">except</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Unauthenticated:&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+<span class="k">else</span><span class="p">:</span>
+    <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Expected call to fail&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unauthenticated: Unknown user or invalid password. Detail: Unauthenticated
+</pre></div>
+</div>
+</section>
+<section id="securing-connections-with-tls">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Securing connections with TLS</a><a class="headerlink" href="#securing-connections-with-tls" title="Link to this heading">¶</a></h2>
+<p>Following on from the previous scenario where traffic to the server is managed via a username and password,
+HTTPS (more specifically TLS) communication allows an additional layer of security by encrypting messages
+between the client and server. This is achieved using certificates. During development, the easiest
+approach is developing with self-signed certificates. At startup, the server loads the public and private
+key and the client authenticates the server with the TLS root certificate.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>In production environments it is recommended to make use of a certificate signed by a certificate authority.</p>
+</div>
+<p><strong>Step 1 - Generating the Self Signed Certificate</strong></p>
+<p>Generate a self-signed certificate by using dotnet on <a class="reference external" href="https://docs.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide">Windows</a>, or <a class="reference external" href="https://www.ibm.com/docs/en/api-connect/2018.x?topic=overview-generating-self-signed-certificate-using-openssl">openssl</a> on Linux or MacOS.
+Alternatively, the self-signed certificate from the <a class="reference external" href="https://github.com/apache/arrow-testing/tree/master/data/flight">Arrow testing data repository</a> can be used.
+Depending on the file generated, you may need to convert it to a .crt and .key file as required for the Arrow server.
+One method to achieve this is openssl, please visit this <a class="reference external" href="https://www.ibm.com/docs/en/arl/9.7?topic=certification-extracting-certificate-keys-from-pfx-file">IBM article</a> for more info.</p>
+<p><strong>Step 2 - Running a server with TLS enabled</strong></p>
+<p>The code below is a minimal working example of an Arrow server used to receive data with TLS.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">argparse</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">host</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                 <span class="n">tls_certificates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">verify_client</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+                 <span class="n">root_certificates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">auth_handler</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span>
+            <span class="n">location</span><span class="p">,</span> <span class="n">auth_handler</span><span class="p">,</span> <span class="n">tls_certificates</span><span class="p">,</span> <span class="n">verify_client</span><span class="p">,</span>
+            <span class="n">root_certificates</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">flights</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="nd">@classmethod</span>
+    <span class="k">def</span> <span class="nf">descriptor_to_key</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">descriptor_type</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">command</span><span class="p">,</span>
+                <span class="nb">tuple</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span> <span class="ow">or</span> <span class="nb">tuple</span><span class="p">()))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">key</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="o">.</span><span class="n">descriptor_to_key</span><span class="p">(</span><span class="n">descriptor</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">flights</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+        <span class="nb">print</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">flights</span><span class="p">[</span><span class="n">key</span><span class="p">])</span>
+
+
+<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">()</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--tls&quot;</span><span class="p">,</span> <span class="n">nargs</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s1">&#39;CERTFILE&#39;</span><span class="p">,</span> <span class="s1">&#39;KEYFILE&#39;</span><span class="p">))</span>
+    <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+    <span class="n">tls_certificates</span> <span class="o">=</span> <span class="p">[]</span>
+
+    <span class="n">scheme</span> <span class="o">=</span> <span class="s2">&quot;grpc+tls&quot;</span>
+    <span class="n">host</span> <span class="o">=</span> <span class="s2">&quot;localhost&quot;</span>
+    <span class="n">port</span> <span class="o">=</span> <span class="s2">&quot;5005&quot;</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">cert_file</span><span class="p">:</span>
+        <span class="n">tls_cert_chain</span> <span class="o">=</span> <span class="n">cert_file</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">key_file</span><span class="p">:</span>
+        <span class="n">tls_private_key</span> <span class="o">=</span> <span class="n">key_file</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+
+    <span class="n">tls_certificates</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">tls_cert_chain</span><span class="p">,</span> <span class="n">tls_private_key</span><span class="p">))</span>
+
+    <span class="n">location</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{}</span><span class="s2">://</span><span class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">scheme</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span>
+
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">location</span><span class="p">,</span>
+                          <span class="n">tls_certificates</span><span class="o">=</span><span class="n">tls_certificates</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Serving on&quot;</span><span class="p">,</span> <span class="n">location</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Running the server, you should see <code class="docutils literal notranslate"><span class="pre">Serving</span> <span class="pre">on</span> <span class="pre">grpc+tls://localhost:5005</span></code>.</p>
+<p><strong>Step 3 - Securely Connecting to the Server</strong>
+Suppose we want to connect to the client and push some data to it. The following code securely sends information to the server using TLS encryption.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">argparse</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
+
+<span class="c1"># Assumes incoming data object is a Pandas Dataframe</span>
+<span class="k">def</span> <span class="nf">push_to_server</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">client</span><span class="p">):</span>
+    <span class="n">object_to_send</span> <span class="o">=</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_pandas</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
+    <span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">object_to_send</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+    <span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">object_to_send</span><span class="p">)</span>
+    <span class="n">writer</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">()</span>
+
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--tls-roots&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Path to trusted TLS certificate(s)&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--host&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Host endpoint&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--port&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="mi">5005</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Host port&#39;</span><span class="p">)</span>
+    <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+    <span class="n">kwargs</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls_roots</span><span class="p">,</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">root_certs</span><span class="p">:</span>
+        <span class="n">kwargs</span><span class="p">[</span><span class="s2">&quot;tls_root_certs&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">root_certs</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+
+    <span class="n">client</span> <span class="o">=</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightClient</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;grpc+tls://</span><span class="si">{</span><span class="n">args</span><span class="o">.</span><span class="n">host</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">args</span><span class="o">.</span><span class="n">port</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+    <span class="n">data</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;Animal&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;Dog&#39;</span><span class="p">,</span> <span class="s1">&#39;Cat&#39;</span><span class="p">,</span> <span class="s1">&#39;Mouse&#39;</span><span class="p">],</span> <span class="s1">&#39;Size&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;Big&#39;</span><span class="p">,</span> <span class="s1">&#39;Small&#39;</span><span class="p">,</span> <span class="s1">&#39;Tiny&#39;</span><span class="p">]}</span>
+    <span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;Animal&#39;</span><span class="p">,</span> <span class="s1">&#39;Size&#39;</span><span class="p">])</span>
+    <span class="n">push_to_server</span><span class="p">(</span><span class="s2">&quot;AnimalData&quot;</span><span class="p">,</span> <span class="n">df</span><span class="p">,</span> <span class="n">client</span><span class="p">)</span>
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">main</span><span class="p">()</span>
+    <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Running the client script, you should see the server printing out information about the data it just received.</p>
+</section>
+<section id="propagating-opentelemetry-traces">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Propagating OpenTelemetry Traces</a><a class="headerlink" href="#propagating-opentelemetry-traces" title="Link to this heading">¶</a></h2>
+<p>Distributed tracing with <a class="reference external" href="https://opentelemetry.io/docs/instrumentation/python/getting-started/">OpenTelemetry</a> allows collecting call-level performance
+measurements across a Flight service. In order to correlate spans across a Flight
+client and server, trace context must be passed between the two. This can be passed
+manually through headers in <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightCallOptions.html#pyarrow.flight.FlightCallOptions" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.FlightCallOptions</span></code></a>, or can
+be automatically propagated using middleware.</p>
+<p>This example shows how to accomplish trace propagation through middleware.
+The client middleware needs to inject the trace context into the call headers.
+The server middleware needs to extract the trace context from the headers and
+pass the context into a new span. Optionally, the client middleware can also
+create a new span to time the client-side call.</p>
+<p><strong>Step 1: define the client middleware:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.flight</span> <span class="k">as</span> <span class="nn">flight</span>
+<span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.propagate</span> <span class="kn">import</span> <span class="n">inject</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.trace.status</span> <span class="kn">import</span> <span class="n">StatusCode</span>
+
+<span class="k">class</span> <span class="nc">ClientTracingMiddlewareFactory</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ClientMiddlewareFactory</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">):</span>
+        <span class="n">span</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span><span class="o">.</span><span class="n">start_span</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;client.</span><span class="si">{</span><span class="n">info</span><span class="o">.</span><span class="n">method</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">ClientTracingMiddleware</span><span class="p">(</span><span class="n">span</span><span class="p">)</span>
+
+<span class="k">class</span> <span class="nc">ClientTracingMiddleware</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ClientMiddleware</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">span</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span> <span class="o">=</span> <span class="n">span</span>
+
+    <span class="k">def</span> <span class="nf">sending_headers</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="n">ctx</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">set_span_in_context</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="p">)</span>
+        <span class="n">carrier</span> <span class="o">=</span> <span class="p">{}</span>
+        <span class="n">inject</span><span class="p">(</span><span class="n">carrier</span><span class="o">=</span><span class="n">carrier</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">ctx</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">carrier</span>
+
+    <span class="k">def</span> <span class="nf">call_completed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exception</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">exception</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">record_exception</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">OK</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 2: define the server middleware:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.flight</span> <span class="k">as</span> <span class="nn">flight</span>
+<span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.propagate</span> <span class="kn">import</span> <span class="n">extract</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.trace.status</span> <span class="kn">import</span> <span class="n">StatusCode</span>
+
+<span class="k">class</span> <span class="nc">ServerTracingMiddlewareFactory</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddlewareFactory</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">,</span> <span class="n">headers</span><span class="p">):</span>
+        <span class="n">context</span> <span class="o">=</span> <span class="n">extract</span><span class="p">(</span><span class="n">headers</span><span class="p">)</span>
+        <span class="n">span</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span><span class="o">.</span><span class="n">start_span</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;server.</span><span class="si">{</span><span class="n">info</span><span class="o">.</span><span class="n">method</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">context</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">ServerTracingMiddleware</span><span class="p">(</span><span class="n">span</span><span class="p">)</span>
+
+<span class="k">class</span> <span class="nc">ServerTracingMiddleware</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddleware</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">span</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span> <span class="o">=</span> <span class="n">span</span>
+
+    <span class="k">def</span> <span class="nf">call_completed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exception</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">exception</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">record_exception</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">OK</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 3: configure the trace exporter, processor, and provider:</strong></p>
+<p>Both the server and client will need to be configured with the OpenTelemetry SDK
+to record spans and export them somewhere. For the sake of the example, we’ll
+collect the spans into a Python list, but this is normally where you would set
+them up to be exported to some service like <a class="reference external" href="https://www.jaegertracing.io/">Jaeger</a>. See other examples of
+exporters at <a class="reference external" href="https://opentelemetry.io/docs/instrumentation/python/exporters/">OpenTelemetry Exporters</a>.</p>
+<p>As part of this, you will need to define the resource where spans are running.
+At a minimum this is the service name, but it could include other information like
+a hostname, process id, service version, and operating system.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace</span> <span class="kn">import</span> <span class="n">TracerProvider</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace.export</span> <span class="kn">import</span> <span class="n">SimpleSpanProcessor</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.resources</span> <span class="kn">import</span> <span class="n">SERVICE_NAME</span><span class="p">,</span> <span class="n">Resource</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace.export</span> <span class="kn">import</span> <span class="n">SpanExporter</span><span class="p">,</span> <span class="n">SpanExportResult</span>
+
+<span class="k">class</span> <span class="nc">TestSpanExporter</span><span class="p">(</span><span class="n">SpanExporter</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">spans</span> <span class="o">=</span> <span class="p">[]</span>
+
+    <span class="k">def</span> <span class="nf">export</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">spans</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">spans</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">spans</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">SpanExportResult</span><span class="o">.</span><span class="n">SUCCESS</span>
+
+<span class="k">def</span> <span class="nf">configure_tracing</span><span class="p">():</span>
+    <span class="c1"># Service name is required for most backends,</span>
+    <span class="c1"># and although it&#39;s not necessary for console export,</span>
+    <span class="c1"># it&#39;s good to set service name anyways.</span>
+    <span class="n">resource</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="n">attributes</span><span class="o">=</span><span class="p">{</span>
+        <span class="n">SERVICE_NAME</span><span class="p">:</span> <span class="s2">&quot;my-service&quot;</span>
+    <span class="p">})</span>
+    <span class="n">exporter</span> <span class="o">=</span> <span class="n">TestSpanExporter</span><span class="p">()</span>
+    <span class="n">provider</span> <span class="o">=</span> <span class="n">TracerProvider</span><span class="p">(</span><span class="n">resource</span><span class="o">=</span><span class="n">resource</span><span class="p">)</span>
+    <span class="n">processor</span> <span class="o">=</span> <span class="n">SimpleSpanProcessor</span><span class="p">(</span><span class="n">exporter</span><span class="p">)</span>
+    <span class="n">provider</span><span class="o">.</span><span class="n">add_span_processor</span><span class="p">(</span><span class="n">processor</span><span class="p">)</span>
+    <span class="n">trace</span><span class="o">.</span><span class="n">set_tracer_provider</span><span class="p">(</span><span class="n">provider</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">exporter</span>
+</pre></div>
+</div>
+<p><strong>Step 4: add the middleware to the server:</strong></p>
+<p>We can use the middleware now in our EchoServer from earlier.</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">exporter</span> <span class="o">=</span> <span class="n">configure_tracing</span><span class="p">()</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">EchoServer</span><span class="p">(</span>
+        <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+        <span class="n">middleware</span><span class="o">=</span><span class="p">{</span>
+            <span class="s2">&quot;tracing&quot;</span><span class="p">:</span> <span class="n">ServerTracingMiddlewareFactory</span><span class="p">()</span>
+        <span class="p">},</span>
+    <span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 5: add the middleware to the client:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span>
+    <span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+    <span class="n">middleware</span><span class="o">=</span><span class="p">[</span><span class="n">ClientTracingMiddlewareFactory</span><span class="p">()],</span>
+<span class="p">)</span>
+</pre></div>
+</div>
+<p><strong>Step 6: use the client within active spans:</strong></p>
+<p>When we make a call with our client within an OpenTelemetry span, our client
+middleware will create a child span for the client-side Flight call and then
+propagate the span context to the server. Our server middleware will pick up
+that trace context and create another child span.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+
+<span class="c1"># Client would normally also need to configure tracing, but for this example</span>
+<span class="c1"># the client and server are running in the same Python process.</span>
+<span class="c1"># exporter = configure_tracing()</span>
+
+<span class="n">tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+<span class="k">with</span> <span class="n">tracer</span><span class="o">.</span><span class="n">start_as_current_span</span><span class="p">(</span><span class="s2">&quot;hello_world&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">span</span><span class="p">:</span>
+    <span class="n">action</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;echo&quot;</span><span class="p">,</span> <span class="sa">b</span><span class="s2">&quot;Hello, world!&quot;</span><span class="p">)</span>
+    <span class="c1"># Call list() on do_action to drain all results.</span>
+    <span class="nb">list</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;There are </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2"> spans.&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The span names are:</span><span class="se">\n</span><span class="s2">  </span><span class="si">{</span><span class="nb">list</span><span class="p">(</span><span class="n">span</span><span class="o">.</span><span class="n">name</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">span</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The span status codes are:</span><span class="se">\n</span><span class="s2">  &quot;</span>
+      <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">list</span><span class="p">(</span><span class="n">span</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">status_code</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">span</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>There are 3 spans.
+The span names are:
+  [&#39;server.FlightMethod.DO_ACTION&#39;, &#39;client.FlightMethod.DO_ACTION&#39;, &#39;hello_world&#39;].
+The span status codes are:
+  [&lt;StatusCode.OK: 1&gt;, &lt;StatusCode.OK: 1&gt;, &lt;StatusCode.UNSET: 0&gt;].
+</pre></div>
+</div>
+<p>As expected, we have three spans: one in our client code, one in the client
+middleware, and one in the server middleware.</p>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#streaming-parquet-storage-service">Streaming Parquet Storage Service</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#authentication-with-user-password">Authentication with user/password</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#securing-connections-with-tls">Securing connections with TLS</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#propagating-opentelemetry-traces">Propagating OpenTelemetry Traces</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="data.html" title="previous chapter">Data Manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/genindex.html b/dev/py/genindex.html
new file mode 100644
index 0000000..f57662f
--- /dev/null
+++ b/dev/py/genindex.html
@@ -0,0 +1,147 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/index.html b/dev/py/index.html
new file mode 100644
index 0000000..2ca3efd
--- /dev/null
+++ b/dev/py/index.html
@@ -0,0 +1,222 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow Python Cookbook &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and Writing Data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-python-cookbook">
+<h1>Apache Arrow Python Cookbook<a class="headerlink" href="#apache-arrow-python-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.</p>
+<p>This cookbook is tested with pyarrow 16.0.0.dev273.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="io.html#write-a-parquet-file">Write a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-parquet-file">Reading a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-subset-of-parquet-data">Reading a subset of Parquet data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#saving-arrow-arrays-to-disk">Saving Arrow Arrays to disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#memory-mapping-arrow-arrays-from-disk">Memory Mapping Arrow Arrays from disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-csv-files">Writing CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-csv-files-incrementally">Writing CSV files incrementally</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-csv-files">Reading CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-partitioned-datasets">Writing Partitioned Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-partitioned-data">Reading Partitioned data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-partitioned-data-from-s3">Reading Partitioned Data from S3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#write-a-feather-file">Write a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-feather-file">Reading a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-line-delimited-json">Reading Line Delimited JSON</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-compressed-data">Writing Compressed Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-compressed-data">Reading Compressed Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-arrays">Creating Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-tables">Creating Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#create-table-from-plain-types">Create Table from Plain Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-record-batches">Creating Record Batches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#store-categorical-data">Store Categorical Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#setting-the-data-type-of-an-arrow-array">Setting the data type of an Arrow Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#setting-the-schema-of-a-table">Setting the schema of a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#merging-multiple-schemas">Merging multiple schemas</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="data.html#computing-mean-min-max-values-of-an-array">Computing Mean/Min/Max values of an array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#counting-occurrences-of-elements">Counting Occurrences of Elements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#applying-arithmetic-functions-to-arrays">Applying arithmetic functions to arrays.</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#appending-tables-to-an-existing-table">Appending tables to an existing table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#adding-a-column-to-an-existing-table">Adding a column to an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#replacing-a-column-in-an-existing-table">Replacing a column in an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#group-a-table">Group a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#sort-a-table">Sort a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#searching-for-values-matching-a-predicate-in-arrays">Searching for values matching a predicate in Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#filtering-arrays-using-a-mask">Filtering Arrays using a mask</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#streaming-parquet-storage-service">Streaming Parquet Storage Service</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#authentication-with-user-password">Authentication with user/password</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#securing-connections-with-tls">Securing connections with TLS</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#propagating-opentelemetry-traces">Propagating OpenTelemetry Traces</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="io.html" title="next chapter">Reading and Writing Data</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/io.html b/dev/py/io.html
new file mode 100644
index 0000000..cbd7e09
--- /dev/null
+++ b/dev/py/io.html
@@ -0,0 +1,745 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and Writing Data &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+    <link rel="prev" title="Apache Arrow Python Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-data">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Reading and Writing Data</a><a class="headerlink" href="#reading-and-writing-data" title="Link to this heading">¶</a></h1>
+<p>Recipes related to reading and writing data from disk using
+Apache Arrow.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-data" id="id1">Reading and Writing Data</a></p>
+<ul>
+<li><p><a class="reference internal" href="#write-a-parquet-file" id="id2">Write a Parquet file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-parquet-file" id="id3">Reading a Parquet file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-subset-of-parquet-data" id="id4">Reading a subset of Parquet data</a></p></li>
+<li><p><a class="reference internal" href="#saving-arrow-arrays-to-disk" id="id5">Saving Arrow Arrays to disk</a></p></li>
+<li><p><a class="reference internal" href="#memory-mapping-arrow-arrays-from-disk" id="id6">Memory Mapping Arrow Arrays from disk</a></p></li>
+<li><p><a class="reference internal" href="#writing-csv-files" id="id7">Writing CSV files</a></p></li>
+<li><p><a class="reference internal" href="#writing-csv-files-incrementally" id="id8">Writing CSV files incrementally</a></p></li>
+<li><p><a class="reference internal" href="#reading-csv-files" id="id9">Reading CSV files</a></p></li>
+<li><p><a class="reference internal" href="#writing-partitioned-datasets" id="id10">Writing Partitioned Datasets</a></p></li>
+<li><p><a class="reference internal" href="#reading-partitioned-data" id="id11">Reading Partitioned data</a></p></li>
+<li><p><a class="reference internal" href="#reading-partitioned-data-from-s3" id="id12">Reading Partitioned Data from S3</a></p></li>
+<li><p><a class="reference internal" href="#write-a-feather-file" id="id13">Write a Feather file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-feather-file" id="id14">Reading a Feather file</a></p></li>
+<li><p><a class="reference internal" href="#reading-line-delimited-json" id="id15">Reading Line Delimited JSON</a></p></li>
+<li><p><a class="reference internal" href="#writing-compressed-data" id="id16">Writing Compressed Data</a></p></li>
+<li><p><a class="reference internal" href="#reading-compressed-data" id="id17">Reading Compressed Data</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="write-a-parquet-file">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Write a Parquet file</a><a class="headerlink" href="#write-a-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>To write it to a Parquet file,
+as Parquet is a format that contains multiple named columns,
+we must create a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> out of it,
+so that we get a table of a single column which can then be
+written to a Parquet file.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Once we have a table, it can be written to a Parquet File
+using the functions provided by the <code class="docutils literal notranslate"><span class="pre">pyarrow.parquet</span></code> module</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">pq</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;example.parquet&quot;</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="reading-a-parquet-file">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Reading a Parquet file</a><a class="headerlink" href="#reading-a-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Given a Parquet file, it can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>
+by using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pq</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.parquet&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The resulting table will contain the same columns that existed in
+the parquet file as <code class="xref py py-class docutils literal notranslate"><span class="pre">ChunkedArray</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="reading-a-subset-of-parquet-data">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Reading a subset of Parquet data</a><a class="headerlink" href="#reading-a-subset-of-parquet-data" title="Link to this heading">¶</a></h2>
+<p>When reading a Parquet file with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a>
+it is possible to restrict which Columns and Rows will be read
+into memory by using the <code class="docutils literal notranslate"><span class="pre">filters</span></code> and <code class="docutils literal notranslate"><span class="pre">columns</span></code> arguments</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pq</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.parquet&quot;</span><span class="p">,</span>
+                      <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">],</span>
+                      <span class="n">filters</span><span class="o">=</span><span class="p">[</span>
+                          <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;&gt;&quot;</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span>
+                          <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;&lt;&quot;</span><span class="p">,</span> <span class="mi">10</span><span class="p">),</span>
+                      <span class="p">])</span>
+</pre></div>
+</div>
+<p>The resulting table will contain only the projected columns
+and filtered rows. Refer to <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a>
+documentation for details about the syntax for filters.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[6,7,8,9]]
+</pre></div>
+</div>
+</section>
+<section id="saving-arrow-arrays-to-disk">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Saving Arrow Arrays to disk</a><a class="headerlink" href="#saving-arrow-arrays-to-disk" title="Link to this heading">¶</a></h2>
+<p>Apart from using arrow to read and save common file formats like Parquet,
+it is possible to dump data in the raw arrow format which allows
+direct memory mapping of data from disk. This format is called
+the Arrow IPC format.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can save the array by making a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> out
+of it and writing the record batch to disk.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">field</span><span class="p">(</span><span class="s1">&#39;nums&#39;</span><span class="p">,</span> <span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+<span class="p">])</span>
+
+<span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">OSFile</span><span class="p">(</span><span class="s1">&#39;arraydata.arrow&#39;</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">sink</span><span class="p">:</span>
+    <span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">ipc</span><span class="o">.</span><span class="n">new_file</span><span class="p">(</span><span class="n">sink</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+        <span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">record_batch</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">batch</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>If we were to save multiple arrays into the same file,
+we would just have to adapt the <code class="docutils literal notranslate"><span class="pre">schema</span></code> accordingly and add
+them all to the <code class="docutils literal notranslate"><span class="pre">record_batch</span></code> call.</p>
+</section>
+<section id="memory-mapping-arrow-arrays-from-disk">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Memory Mapping Arrow Arrays from disk</a><a class="headerlink" href="#memory-mapping-arrow-arrays-from-disk" title="Link to this heading">¶</a></h2>
+<p>Arrow arrays that have been written to disk in the Arrow IPC
+format can be memory mapped back directly from the disk.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">memory_map</span><span class="p">(</span><span class="s1">&#39;arraydata.arrow&#39;</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">source</span><span class="p">:</span>
+    <span class="n">loaded_arrays</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">ipc</span><span class="o">.</span><span class="n">open_file</span><span class="p">(</span><span class="n">source</span><span class="p">)</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">loaded_arrays</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+</section>
+<section id="writing-csv-files">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Writing CSV files</a><a class="headerlink" href="#writing-csv-files" title="Link to this heading">¶</a></h2>
+<p>It is possible to write an Arrow <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> to
+a CSV file using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.write_csv.html#pyarrow.csv.write_csv" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.csv.write_csv()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow.csv</span>
+<span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">write_csv</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;table.csv&quot;</span><span class="p">,</span>
+                 <span class="n">write_options</span><span class="o">=</span><span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">WriteOptions</span><span class="p">(</span><span class="n">include_header</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
+</pre></div>
+</div>
+</section>
+<section id="writing-csv-files-incrementally">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Writing CSV files incrementally</a><a class="headerlink" href="#writing-csv-files-incrementally" title="Link to this heading">¶</a></h2>
+<p>If you need to write data to a CSV file incrementally
+as you generate or retrieve the data and you don’t want to keep
+in memory the whole table to write it at once, it’s possible to use
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.CSVWriter.html#pyarrow.csv.CSVWriter" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.csv.CSVWriter</span></code></a> to write data incrementally</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">())])</span>
+<span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">CSVWriter</span><span class="p">(</span><span class="s2">&quot;table.csv&quot;</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+    <span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
+        <span class="n">datachunk</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="n">chunk</span><span class="o">*</span><span class="mi">10</span><span class="p">,</span> <span class="p">(</span><span class="n">chunk</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="o">*</span><span class="mi">10</span><span class="p">)</span>
+        <span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">datachunk</span><span class="p">)],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>It’s equally possible to write <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a>
+by passing them as you would for tables.</p>
+</section>
+<section id="reading-csv-files">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Reading CSV files</a><a class="headerlink" href="#reading-csv-files" title="Link to this heading">¶</a></h2>
+<p>Arrow can read <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> entities from CSV using an
+optimized codepath that can leverage multiple threads.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.csv</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&quot;table.csv&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Arrow will do its best to infer data types.  Further options can be
+provided to <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.read_csv.html#pyarrow.csv.read_csv" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.csv.read_csv()</span></code></a> to drive
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.ConvertOptions.html#pyarrow.csv.ConvertOptions" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.csv.ConvertOptions</span></code></a>.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="writing-partitioned-datasets">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Writing Partitioned Datasets</a><a class="headerlink" href="#writing-partitioned-datasets" title="Link to this heading">¶</a></h2>
+<p>When your dataset is big it usually makes sense to split it into
+multiple separate files. You can do this manually or use
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html#pyarrow.dataset.write_dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.write_dataset()</span></code></a> to let Arrow do the effort
+of splitting the data in chunks for you.</p>
+<p>The <code class="docutils literal notranslate"><span class="pre">partitioning</span></code> argument allows to tell <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html#pyarrow.dataset.write_dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.write_dataset()</span></code></a>
+for which columns the data should be split.</p>
+<p>For example given 100 birthdays, within 2000 and 2009</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy.random</span>
+<span class="n">data</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">({</span><span class="s2">&quot;day&quot;</span><span class="p">:</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">31</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">100</span><span class="p">),</span>
+                 <span class="s2">&quot;month&quot;</span><span class="p">:</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">100</span><span class="p">),</span>
+                 <span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="p">[</span><span class="mi">2000</span> <span class="o">+</span> <span class="n">x</span> <span class="o">//</span> <span class="mi">10</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)]})</span>
+</pre></div>
+</div>
+<p>Then we could partition the data by the year column so that it
+gets saved in 10 different files:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.dataset</span> <span class="k">as</span> <span class="nn">ds</span>
+
+<span class="n">ds</span><span class="o">.</span><span class="n">write_dataset</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">&quot;./partitioned&quot;</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s2">&quot;parquet&quot;</span><span class="p">,</span>
+                 <span class="n">partitioning</span><span class="o">=</span><span class="n">ds</span><span class="o">.</span><span class="n">partitioning</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([(</span><span class="s2">&quot;year&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int16</span><span class="p">())])))</span>
+</pre></div>
+</div>
+<p>Arrow will partition datasets in subdirectories by default, which will
+result in 10 different directories named with the value of the partitioning
+column each with a file containing the subset of the data for that partition:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyarrow</span> <span class="kn">import</span> <span class="n">fs</span>
+
+<span class="n">localfs</span> <span class="o">=</span> <span class="n">fs</span><span class="o">.</span><span class="n">LocalFileSystem</span><span class="p">()</span>
+<span class="n">partitioned_dir_content</span> <span class="o">=</span> <span class="n">localfs</span><span class="o">.</span><span class="n">get_file_info</span><span class="p">(</span><span class="n">fs</span><span class="o">.</span><span class="n">FileSelector</span><span class="p">(</span><span class="s2">&quot;./partitioned&quot;</span><span class="p">,</span> <span class="n">recursive</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
+<span class="n">files</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">((</span><span class="n">f</span><span class="o">.</span><span class="n">path</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">partitioned_dir_content</span> <span class="k">if</span> <span class="n">f</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="n">fs</span><span class="o">.</span><span class="n">FileType</span><span class="o">.</span><span class="n">File</span><span class="p">))</span>
+
+<span class="k">for</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">files</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">file</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>./partitioned/2000/part-0.parquet
+./partitioned/2001/part-0.parquet
+./partitioned/2002/part-0.parquet
+./partitioned/2003/part-0.parquet
+./partitioned/2004/part-0.parquet
+./partitioned/2005/part-0.parquet
+./partitioned/2006/part-0.parquet
+./partitioned/2007/part-0.parquet
+./partitioned/2008/part-0.parquet
+./partitioned/2009/part-0.parquet
+</pre></div>
+</div>
+</section>
+<section id="reading-partitioned-data">
+<h2><a class="toc-backref" href="#id11" role="doc-backlink">Reading Partitioned data</a><a class="headerlink" href="#reading-partitioned-data" title="Link to this heading">¶</a></h2>
+<p>In some cases, your dataset might be composed by multiple separate
+files each containing a piece of the data.</p>
+<p>In this case the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.dataset.html#pyarrow.dataset.dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.dataset()</span></code></a> function provides
+an interface to discover and read all those files as a single big dataset.</p>
+<p>For example if we have a structure like:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>examples/
+├── dataset1.parquet
+├── dataset2.parquet
+└── dataset3.parquet
+</pre></div>
+</div>
+<p>Then, pointing the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.dataset.html#pyarrow.dataset.dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.dataset()</span></code></a> function to the <code class="docutils literal notranslate"><span class="pre">examples</span></code> directory
+will discover those parquet files and will expose them all as a single
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.dataset</span> <span class="k">as</span> <span class="nn">ds</span>
+
+<span class="n">dataset</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">dataset</span><span class="p">(</span><span class="s2">&quot;./examples&quot;</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s2">&quot;parquet&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">files</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[&#39;./examples/dataset1.parquet&#39;, &#39;./examples/dataset2.parquet&#39;, &#39;./examples/dataset3.parquet&#39;]
+</pre></div>
+</div>
+<p>The whole dataset can be viewed as a single big table using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_table()</span></code></a>. While each parquet file
+contains only 10 rows, converting the dataset to a table will
+expose them as a single Table.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">to_table</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29]]
+</pre></div>
+</div>
+<p>Notice that converting to a table will force all data to be loaded
+in memory.  For big datasets is usually not what you want.</p>
+<p>For this reason, it might be better to rely on the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_batches" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_batches()</span></code></a> method, which will
+iteratively load the dataset one chunk of data at the time returning a
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> for each one of them.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">record_batch</span> <span class="ow">in</span> <span class="n">dataset</span><span class="o">.</span><span class="n">to_batches</span><span class="p">():</span>
+    <span class="n">col1</span> <span class="o">=</span> <span class="n">record_batch</span><span class="o">.</span><span class="n">column</span><span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">col1</span><span class="o">.</span><span class="n">_name</span><span class="si">}</span><span class="s2"> = </span><span class="si">{</span><span class="n">col1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">col1</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>col1 = 0 .. 9
+col1 = 10 .. 19
+col1 = 20 .. 29
+</pre></div>
+</div>
+</section>
+<section id="reading-partitioned-data-from-s3">
+<h2><a class="toc-backref" href="#id12" role="doc-backlink">Reading Partitioned Data from S3</a><a class="headerlink" href="#reading-partitioned-data-from-s3" title="Link to this heading">¶</a></h2>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset</span></code></a> is also able to abstract
+partitioned data coming from remote sources like S3 or HDFS.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyarrow</span> <span class="kn">import</span> <span class="n">fs</span>
+
+<span class="c1"># List content of s3://ursa-labs-taxi-data/2011</span>
+<span class="n">s3</span> <span class="o">=</span> <span class="n">fs</span><span class="o">.</span><span class="n">SubTreeFileSystem</span><span class="p">(</span>
+    <span class="s2">&quot;ursa-labs-taxi-data&quot;</span><span class="p">,</span>
+    <span class="n">fs</span><span class="o">.</span><span class="n">S3FileSystem</span><span class="p">(</span><span class="n">region</span><span class="o">=</span><span class="s2">&quot;us-east-2&quot;</span><span class="p">,</span> <span class="n">anonymous</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+<span class="p">)</span>
+<span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">s3</span><span class="o">.</span><span class="n">get_file_info</span><span class="p">(</span><span class="n">fs</span><span class="o">.</span><span class="n">FileSelector</span><span class="p">(</span><span class="s2">&quot;2011&quot;</span><span class="p">,</span> <span class="n">recursive</span><span class="o">=</span><span class="kc">True</span><span class="p">)):</span>
+    <span class="k">if</span> <span class="n">entry</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="n">fs</span><span class="o">.</span><span class="n">FileType</span><span class="o">.</span><span class="n">File</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">entry</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>2011/01/data.parquet
+2011/02/data.parquet
+2011/03/data.parquet
+2011/04/data.parquet
+2011/05/data.parquet
+2011/06/data.parquet
+2011/07/data.parquet
+2011/08/data.parquet
+2011/09/data.parquet
+2011/10/data.parquet
+2011/11/data.parquet
+2011/12/data.parquet
+</pre></div>
+</div>
+<p>The data in the bucket can be loaded as a single big dataset partitioned
+by <code class="docutils literal notranslate"><span class="pre">month</span></code> using</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">dataset</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">dataset</span><span class="p">(</span><span class="s2">&quot;s3://ursa-labs-taxi-data/2011&quot;</span><span class="p">,</span>
+                     <span class="n">partitioning</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;month&quot;</span><span class="p">])</span>
+<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">dataset</span><span class="o">.</span><span class="n">files</span><span class="p">[:</span><span class="mi">10</span><span class="p">]:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;...&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ursa-labs-taxi-data/2011/01/data.parquet
+ursa-labs-taxi-data/2011/02/data.parquet
+ursa-labs-taxi-data/2011/03/data.parquet
+ursa-labs-taxi-data/2011/04/data.parquet
+ursa-labs-taxi-data/2011/05/data.parquet
+ursa-labs-taxi-data/2011/06/data.parquet
+ursa-labs-taxi-data/2011/07/data.parquet
+ursa-labs-taxi-data/2011/08/data.parquet
+ursa-labs-taxi-data/2011/09/data.parquet
+ursa-labs-taxi-data/2011/10/data.parquet
+...
+</pre></div>
+</div>
+<p>The dataset can then be used with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_table()</span></code></a>
+or <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_batches" title="(in Apache Arrow v15.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_batches()</span></code></a> like you would for a local one.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>It is possible to load partitioned data also in the ipc arrow
+format or in feather format.</p>
+</div>
+<div class="admonition warning">
+<p class="admonition-title">Warning</p>
+<p>If the above code throws an error most likely the reason is your
+AWS credentials are not set. Follow these instructions to get
+<code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">Access</span> <span class="pre">Key</span> <span class="pre">Id</span></code> and <code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">Secret</span> <span class="pre">Access</span> <span class="pre">Key</span></code>:
+<a class="reference external" href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">AWS Credentials</a>.</p>
+<p>The credentials are normally stored in <code class="docutils literal notranslate"><span class="pre">~/.aws/credentials</span></code> (on Mac or Linux)
+or in <code class="docutils literal notranslate"><span class="pre">C:\Users\&lt;USERNAME&gt;\.aws\credentials</span></code> (on Windows) file.
+You will need to either create or update this file in the appropriate location.</p>
+<p>The contents of the file should look like this:</p>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>default<span class="o">]</span>
+<span class="nv">aws_access_key_id</span><span class="o">=</span>&lt;YOUR_AWS_ACCESS_KEY_ID&gt;
+<span class="nv">aws_secret_access_key</span><span class="o">=</span>&lt;YOUR_AWS_SECRET_ACCESS_KEY&gt;
+</pre></div>
+</div>
+</div>
+</section>
+<section id="write-a-feather-file">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Write a Feather file</a><a class="headerlink" href="#write-a-feather-file" title="Link to this heading">¶</a></h2>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>To write it to a Feather file, as Feather stores multiple columns,
+we must create a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> out of it,
+so that we get a table of a single column which can then be
+written to a Feather file.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Once we have a table, it can be written to a Feather File
+using the functions provided by the <code class="docutils literal notranslate"><span class="pre">pyarrow.feather</span></code> module</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.feather</span> <span class="k">as</span> <span class="nn">ft</span>
+
+<span class="n">ft</span><span class="o">.</span><span class="n">write_feather</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s1">&#39;example.feather&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="reading-a-feather-file">
+<h2><a class="toc-backref" href="#id14" role="doc-backlink">Reading a Feather file</a><a class="headerlink" href="#reading-a-feather-file" title="Link to this heading">¶</a></h2>
+<p>Given a Feather file, it can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>
+by using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.feather.read_table.html#pyarrow.feather.read_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.feather.read_table()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.feather</span> <span class="k">as</span> <span class="nn">ft</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">ft</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.feather&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The resulting table will contain the same columns that existed in
+the parquet file as <code class="xref py py-class docutils literal notranslate"><span class="pre">ChunkedArray</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="reading-line-delimited-json">
+<h2><a class="toc-backref" href="#id15" role="doc-backlink">Reading Line Delimited JSON</a><a class="headerlink" href="#reading-line-delimited-json" title="Link to this heading">¶</a></h2>
+<p>Arrow has builtin support for line-delimited JSON.
+Each line represents a row of data as a JSON object.</p>
+<p>Given some data in a file where each line is a JSON object
+containing a row of data:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">tempfile</span>
+
+<span class="k">with</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">NamedTemporaryFile</span><span class="p">(</span><span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;w+&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 1, &quot;b&quot;: 2.0, &quot;c&quot;: 1}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 3, &quot;b&quot;: 3.0, &quot;c&quot;: 2}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 5, &quot;b&quot;: 4.0, &quot;c&quot;: 3}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 7, &quot;b&quot;: 5.0, &quot;c&quot;: 4}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The content of the file can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.json.read_json.html#pyarrow.json.read_json" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.json.read_json()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.json</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">json</span><span class="o">.</span><span class="n">read_json</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="o">.</span><span class="n">to_pydict</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>{&#39;a&#39;: [1, 3, 5, 7], &#39;b&#39;: [2.0, 3.0, 4.0, 5.0], &#39;c&#39;: [1, 2, 3, 4]}
+</pre></div>
+</div>
+</section>
+<section id="writing-compressed-data">
+<h2><a class="toc-backref" href="#id16" role="doc-backlink">Writing Compressed Data</a><a class="headerlink" href="#writing-compressed-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides support for writing files in compressed formats,
+both for formats that provide compression natively like Parquet or Feather,
+and for formats that don’t support compression out of the box like CSV.</p>
+<p>Given a table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;numbers&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Writing compressed Parquet or Feather data is driven by the
+<code class="docutils literal notranslate"><span class="pre">compression</span></code> argument to the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.feather.write_feather.html#pyarrow.feather.write_feather" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.feather.write_feather()</span></code></a> and
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_table.html#pyarrow.parquet.write_table" title="(in Apache Arrow v15.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.write_table()</span></code></a> functions:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">pa</span><span class="o">.</span><span class="n">feather</span><span class="o">.</span><span class="n">write_feather</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;compressed.feather&quot;</span><span class="p">,</span>
+                         <span class="n">compression</span><span class="o">=</span><span class="s2">&quot;lz4&quot;</span><span class="p">)</span>
+<span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;compressed.parquet&quot;</span><span class="p">,</span>
+                       <span class="n">compression</span><span class="o">=</span><span class="s2">&quot;lz4&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>You can refer to each of those functions’ documentation for a complete
+list of supported compression formats.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Arrow actually uses compression by default when writing
+Parquet or Feather files. Feather is compressed using <code class="docutils literal notranslate"><span class="pre">lz4</span></code>
+by default and Parquet uses <code class="docutils literal notranslate"><span class="pre">snappy</span></code> by default.</p>
+</div>
+<p>For formats that don’t support compression natively, like CSV,
+it’s possible to save compressed data using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedOutputStream.html#pyarrow.CompressedOutputStream" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedOutputStream</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">CompressedOutputStream</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">,</span> <span class="s2">&quot;gzip&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">out</span><span class="p">:</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">write_csv</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>This requires decompressing the file when reading it back,
+which can be done using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedInputStream.html#pyarrow.CompressedInputStream" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedInputStream</span></code></a>
+as explained in the next recipe.</p>
+</section>
+<section id="reading-compressed-data">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Reading Compressed Data</a><a class="headerlink" href="#reading-compressed-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides support for reading compressed files,
+both for formats that provide it natively like Parquet or Feather,
+and for files in formats that don’t support compression natively,
+like CSV, but have been compressed by an application.</p>
+<p>Reading compressed formats that have native support for compression
+doesn’t require any special handling. We can for example read back
+the Parquet and Feather files we wrote in the previous recipe
+by simply invoking <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.feather.read_table()</span></code> and
+<code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_feather</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">feather</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;compressed.feather&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_feather</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_parquet</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;compressed.parquet&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_parquet</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<p>Reading data from formats that don’t have native support for
+compression instead involves decompressing them before decoding them.
+This can be done using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedInputStream.html#pyarrow.CompressedInputStream" title="(in Apache Arrow v15.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedInputStream</span></code></a> class
+which wraps files with a decompress operation before the result is
+provided to the actual read function.</p>
+<p>For example to read a compressed CSV file:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">CompressedInputStream</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">OSFile</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">),</span> <span class="s2">&quot;gzip&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="nb">input</span><span class="p">:</span>
+    <span class="n">table_csv</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="nb">input</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">table_csv</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>In the case of CSV, arrow is actually smart enough to try detecting
+compressed files using the file extension. So if your file is named
+<code class="docutils literal notranslate"><span class="pre">*.gz</span></code> or <code class="docutils literal notranslate"><span class="pre">*.bz2</span></code> the <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.csv.read_csv()</span></code> function will
+try to decompress it accordingly</p>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_csv2</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_csv2</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and Writing Data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#write-a-parquet-file">Write a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-parquet-file">Reading a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-subset-of-parquet-data">Reading a subset of Parquet data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#saving-arrow-arrays-to-disk">Saving Arrow Arrays to disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#memory-mapping-arrow-arrays-from-disk">Memory Mapping Arrow Arrays from disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-csv-files">Writing CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-csv-files-incrementally">Writing CSV files incrementally</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-csv-files">Reading CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-partitioned-datasets">Writing Partitioned Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-partitioned-data">Reading Partitioned data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-partitioned-data-from-s3">Reading Partitioned Data from S3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#write-a-feather-file">Write a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-feather-file">Reading a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-line-delimited-json">Reading Line Delimited JSON</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-compressed-data">Writing Compressed Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-compressed-data">Reading Compressed Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow Python Cookbook</a></li>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/io.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/objects.inv b/dev/py/objects.inv
new file mode 100644
index 0000000..0d90847
--- /dev/null
+++ b/dev/py/objects.inv
Binary files differ
diff --git a/dev/py/schema.html b/dev/py/schema.html
new file mode 100644
index 0000000..ad49b13
--- /dev/null
+++ b/dev/py/schema.html
@@ -0,0 +1,336 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with Schema &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Data Manipulation" href="data.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-schema">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Working with Schema</a><a class="headerlink" href="#working-with-schema" title="Link to this heading">¶</a></h1>
+<p>Arrow automatically infers the most appropriate data type when reading in data
+or converting Python objects to Arrow objects.</p>
+<p>However, you might want to manually tell Arrow which data types to
+use, for example, to ensure interoperability with databases and data warehouse
+systems.  This chapter includes recipes for dealing with schemas.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-schema" id="id1">Working with Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#setting-the-data-type-of-an-arrow-array" id="id2">Setting the data type of an Arrow Array</a></p></li>
+<li><p><a class="reference internal" href="#setting-the-schema-of-a-table" id="id3">Setting the schema of a Table</a></p></li>
+<li><p><a class="reference internal" href="#merging-multiple-schemas" id="id4">Merging multiple schemas</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="setting-the-data-type-of-an-arrow-array">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Setting the data type of an Arrow Array</a><a class="headerlink" href="#setting-the-data-type-of-an-arrow-array" title="Link to this heading">¶</a></h2>
+<p>If you have an existing array and want to change its data type,
+that can be done through the <code class="docutils literal notranslate"><span class="pre">cast</span></code> function:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int64
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">arr</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">())</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int8
+</pre></div>
+</div>
+<p>You can also create an array of the requested type by providing
+the type at array creation</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span> <span class="nb">type</span><span class="o">=</span><span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">())</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int8
+</pre></div>
+</div>
+</section>
+<section id="setting-the-schema-of-a-table">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Setting the schema of a Table</a><a class="headerlink" href="#setting-the-schema-of-a-table" title="Link to this heading">¶</a></h2>
+<p>Tables detain multiple columns, each with its own name
+and type. The union of types and names is what defines a schema.</p>
+<p>A schema in Arrow can be defined using <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.schema()</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col3&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float64</span><span class="p">())</span>
+<span class="p">])</span>
+</pre></div>
+</div>
+<p>The schema can then be provided to a table when created:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+    <span class="p">[</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">],</span>
+    <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int8
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<p>Like for arrays, it’s possible to cast tables to different schemas
+as far as they are compatible</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema_int32</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col3&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float64</span><span class="p">())</span>
+<span class="p">])</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">schema_int32</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int32
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+<section id="merging-multiple-schemas">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Merging multiple schemas</a><a class="headerlink" href="#merging-multiple-schemas" title="Link to this heading">¶</a></h2>
+<p>When you have multiple separate groups of data that you want to combine
+it might be necessary to unify their schemas to create a superset of them
+that applies to all data sources.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">first_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;population&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">())</span>
+<span class="p">])</span>
+
+<span class="n">second_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;language&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">())</span>
+<span class="p">])</span>
+</pre></div>
+</div>
+<p><code class="xref py py-func docutils literal notranslate"><span class="pre">unify_schemas()</span></code> can be used to combine multiple schemas into
+a single one:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">union_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">union_schema</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>country: string
+population: int32
+country_code: string
+language: string
+</pre></div>
+</div>
+<p>If the combined schemas have overlapping columns, they can still be combined
+as far as the colliding columns retain the same type (<code class="docutils literal notranslate"><span class="pre">country_code</span></code>):</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">third_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;lat&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;long&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+<span class="p">])</span>
+
+<span class="n">union_schema</span> <span class="o">=</span>  <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">,</span> <span class="n">third_schema</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">union_schema</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>country: string
+population: int32
+country_code: string
+language: string
+lat: float
+long: float
+</pre></div>
+</div>
+<p>If a merged field has instead diverging types in the combined schemas
+then trying to merge the schemas will fail. For example if <code class="docutils literal notranslate"><span class="pre">country_code</span></code>
+was a numeric instead of a string we would be unable to unify the schemas
+because in <code class="docutils literal notranslate"><span class="pre">second_schema</span></code> it was already declared as a <code class="docutils literal notranslate"><span class="pre">pa.string()</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">third_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;lat&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;long&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+<span class="p">])</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">union_schema</span> <span class="o">=</span>  <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">,</span> <span class="n">third_schema</span><span class="p">])</span>
+<span class="k">except</span> <span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">ArrowInvalid</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">ArrowTypeError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unable to merge: Field country_code has incompatible types: string vs int32
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#setting-the-data-type-of-an-arrow-array">Setting the data type of an Arrow Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#setting-the-schema-of-a-table">Setting the schema of a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#merging-multiple-schemas">Merging multiple schemas</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="data.html" title="next chapter">Data Manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+      |
+      <a href="_sources/schema.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/search.html b/dev/py/search.html
new file mode 100644
index 0000000..7bf8201
--- /dev/null
+++ b/dev/py/search.html
@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d1102ebc" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=49eeb2a1" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+
+  
+  
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo" />
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &#169;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/dev/py/searchindex.js b/dev/py/searchindex.js
new file mode 100644
index 0000000..4c44f53
--- /dev/null
+++ b/dev/py/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["create", "data", "flight", "index", "io", "schema"], "filenames": ["create.rst", "data.rst", "flight.rst", "index.rst", "io.rst", "schema.rst"], "titles": ["Creating Arrow Objects", "Data Manipulation", "Arrow Flight", "Apache Arrow Python Cookbook", "Reading and Writing Data", "Working with Schema"], "terms": {"recip": [0, 1, 2, 3, 4, 5], "relat": [0, 1, 2, 4], "creation": [0, 5], "tensor": 0, "all": [0, 1, 2, 4, 5], "other": [0, 2], "entiti": [0, 4], "keep": [0, 4], "continu": 0, "optimis": 0, "memori": [0, 2, 3], "footprint": 0, "simd": 0, "analys": 0, "In": [0, 1, 2, 4], "python": [0, 2, 5], "": [0, 1, 2, 4, 5], "possibl": [0, 1, 4, 5], "build": [0, 2], "pyarrow": [0, 1, 2, 3, 4, 5], "start": [0, 2], "list": [0, 1, 2, 4], "sequenc": 0, "gener": [0, 2, 4], "numpi": [0, 4], "panda": [0, 2], "seri": 0, "import": [0, 1, 2, 4, 5], "pa": [0, 1, 2, 4, 5], "1": [0, 1, 2, 4, 5], "2": [0, 1, 2, 4, 5], "3": [0, 1, 2, 4, 5], "4": [0, 1, 2, 4, 5], "5": [0, 1, 2, 4, 5], "print": [0, 1, 2, 4, 5], "can": [0, 1, 2, 4, 5], "also": [0, 1, 2, 3, 4, 5], "provid": [0, 1, 2, 4, 5], "mask": [0, 3], "specifi": 0, "which": [0, 1, 2, 3, 4, 5], "valu": [0, 2, 3, 4], "should": [0, 2, 4], "consid": 0, "null": [0, 1], "np": [0, 4], "true": [0, 1, 2, 4], "fals": [0, 1, 2, 4], "when": [0, 1, 2, 3, 4, 5], "leverag": [0, 2, 4], "optim": [0, 4], "code": [0, 2, 4], "path": [0, 2, 4], "reli": [0, 4], "intern": [0, 2], "represent": 0, "pd": [0, 2], "array_from_numpi": 0, "arang": [0, 4], "array_from_panda": 0, "support": [0, 4], "tabular": 0, "each": [0, 1, 2, 4, 5], "column": [0, 2, 3, 4, 5], "i": [0, 1, 2, 3, 4, 5], "repres": [0, 4], "chunkedarrai": [0, 1, 4], "pair": [0, 1], "multipl": [0, 1, 3, 4], "name": [0, 1, 2, 4, 5], "b": [0, 1, 2, 4, 5], "c": [0, 1, 2, 4, 5], "d": [0, 1, 4, 5], "e": [0, 1, 2, 5], "0": [0, 1, 2, 3, 4, 5], "col1": [0, 4, 5], "col2": [0, 5], "col3": [0, 5], "int64": [0, 1, 4, 5], "string": [0, 1, 2, 5], "doubl": [0, 1, 5], "allow": [0, 2, 4], "fast": 0, "zero": [0, 1], "copi": [0, 1], "structur": [0, 2, 4], "The": [0, 1, 2, 3, 4, 5], "function": [0, 2, 3, 4, 5], "varieti": 0, "input": [0, 4], "includ": [0, 1, 2, 5], "dictionari": [0, 2], "pass": [0, 2, 4], "convers": 0, "benefit": 0, "behaviour": 0, "from_pylist": 0, "method": [0, 1, 2, 4], "row": [0, 1, 2, 4], "dict": [0, 2], "ar": [0, 1, 2, 4, 5], "infer": [0, 4, 5], "schema": [0, 2, 3, 4], "explicitli": 0, "most": [0, 1, 2, 4, 5], "o": 0, "oper": [0, 1, 2, 4], "happen": 0, "ship": 0, "destin": 0, "recordbatch": [0, 4], "wai": [0, 2], "A": [0, 1, 2, 5], "seen": 0, "slice": 0, "from_arrai": [0, 4], "7": [0, 1, 4], "9": [0, 1, 4], "6": [0, 1, 2, 4], "8": [0, 1, 2, 4], "10": [0, 1, 4], "odd": 0, "even": [0, 2], "combin": [0, 1, 2, 5], "us": [0, 2, 3, 4, 5], "from_batch": [0, 2], "second_batch": 0, "11": [0, 1, 4], "13": [0, 4], "15": [0, 1, 4], "17": [0, 4], "19": [0, 4], "12": [0, 1, 4], "14": [0, 1, 4], "16": [0, 3, 4], "18": [0, 4], "20": [0, 1, 4], "equal": [0, 1, 4], "convert": [0, 2, 4, 5], "to_batch": [0, 4], "record_batch": [0, 2, 4], "max_chunks": 0, "len": [0, 1, 2], "dictionaryarrai": 0, "without": [0, 2], "cost": [0, 1], "repeat": [0, 1], "categori": 0, "over": [0, 2], "thi": [0, 2, 3, 4, 5], "reduc": 0, "might": [0, 1, 2, 3, 4, 5], "have": [0, 1, 2, 4, 5], "larg": [0, 2], "text": 0, "If": [0, 1, 2, 4, 5], "you": [0, 1, 2, 4, 5], "an": [0, 2, 3, 4], "contain": [0, 4], "dictionary_encod": 0, "arr": [0, 1, 4, 5], "red": 0, "green": 0, "blue": 0, "indic": 0, "alreadi": [0, 5], "know": 0, "skip": 0, "encod": [0, 2], "step": [0, 2], "directli": [0, 4], "transform": 1, "see": [1, 2], "complet": [1, 4], "avail": [1, 2], "arrow": 1, "those": [1, 3, 4], "expos": [1, 2, 4], "through": [1, 2, 5], "modul": [1, 3, 4], "given": [1, 4], "100": [1, 4], "number": [1, 4], "from": [1, 2, 3], "99": [1, 4], "f": [1, 2, 4], "we": [1, 2, 4, 5], "pc": 1, "49": 1, "And": [1, 2], "min_max": 1, "time": [1, 2, 4], "nums_arr": 1, "entri": [1, 4], "value_count": 1, "common": [1, 2, 3, 4], "multipli": 1, "198": 1, "split": [1, 4], "across": [1, 2], "two": [1, 2], "differ": [1, 4, 5], "concaten": 1, "singl": [1, 2, 4, 5], "oscar": 1, "nomin": 1, "divid": 1, "between": [1, 2], "oscar_nominations_1": 1, "meryl": 1, "streep": 1, "katharin": 1, "hepburn": 1, "21": [1, 4], "actor": 1, "oscar_nominations_2": 1, "jack": 1, "nicholson": 1, "bett": 1, "davi": 1, "them": [1, 2, 4, 5], "concat_t": 1, "oscar_nomin": 1, "By": 1, "default": [1, 2, 4], "doesn": [1, 4], "t": [1, 2, 4], "need": [1, 2, 3, 4], "rewrit": 1, "As": [1, 2], "made": 1, "result": [1, 2, 4], "chunk": [1, 2, 4], "point": [1, 4], "origin": 1, "ha": [1, 2, 4, 5], "been": [1, 4], "under": 1, "some": [1, 2, 4], "condit": 1, "cast": [1, 5], "one": [1, 2, 4, 5], "type": [1, 2, 3, 4], "anoth": [1, 2], "promot": 1, "case": [1, 2, 4], "extra": 1, "occur": 1, "extend": [1, 2], "its": [1, 4, 5], "append_column": 1, "suppos": [1, 2], "actress": 1, "addit": [1, 2], "track": 1, "year": [1, 4], "wa": [1, 2, 5], "won": 1, "wonyear": 1, "1980": 1, "1983": 1, "2012": 1, "1934": 1, "1968": 1, "1969": 1, "1982": 1, "item": 1, "child": [1, 2], "set_column": 1, "inform": [1, 2], "about": [1, 2, 4], "sold": 1, "supermarket": 1, "particular": 1, "dai": [1, 4], "sales_data": 1, "potato": 1, "bean": 1, "cucumb": 1, "egg": 1, "30": 1, "amount": 1, "index": [1, 3], "updat": [1, 2, 4], "sale": 1, "new_sales_data": 1, "new_amount": 1, "40": 1, "kei": [1, 2, 4], "group_bi": 1, "follow": [1, 2, 4], "aggreg": 1, "tablegroupbi": 1, "learn": 1, "more": [1, 2], "groupbi": 1, "here": [1, 2], "For": [1, 2, 4, 5], "exampl": [1, 2, 3, 4, 5], "let": [1, 2, 4], "sai": 1, "set": [1, 2, 3, 4], "associ": 1, "want": [1, 2, 4, 5], "like": [1, 2, 4, 5], "sum": 1, "evalu": 1, "how": [1, 2, 3], "mani": [1, 3], "uniqu": 1, "now": [1, 2], "field": [1, 4, 5], "note": 1, "aggregated_t": 1, "values_sum": 1, "31": [1, 4], "observ": 1, "carefulli": 1, "new": [1, 2], "return": [1, 2, 4], "form": 1, "option": [1, 2, 4], "take": [1, 2], "where": [1, 2, 4], "our": [1, 2], "dataset": [1, 2, 3], "exclud": 1, "sampl": 1, "none": [1, 2, 4], "grouped_t": 1, "countopt": 1, "mode": [1, 4], "only_valid": 1, "values_count": 1, "discuss": 1, "base": 1, "either": [1, 4], "ascend": 1, "descend": 1, "prepar": 1, "123": 1, "Then": [1, 2, 4], "sort_bi": 1, "sorted_t": 1, "look": [1, 4], "sever": [1, 2], "find": 1, "onli": [1, 2, 4], "greater": 1, "than": 1, "could": [1, 2, 4], "get": [1, 2, 4], "back": [1, 2, 4], "fit": [1, 2], "rang": [1, 2, 4], "gtfive": 1, "to_str": 1, "furthermor": 1, "filtered_arrai": 1, "someth": 1, "end": [1, 2], "up": [1, 2], "tell": [1, 4, 5], "posit": 1, "your": [1, 4], "four": 1, "first": [1, 2], "last": 1, "accord": 1, "produc": 1, "output": 1, "so": [1, 2, 4], "found": 1, "protocol": 2, "implement": 2, "store": [2, 3, 4], "send": 2, "receiv": 2, "file": [2, 3], "framework": 2, "particularli": 2, "flightserverbas": 2, "class": [2, 4], "pathlib": 2, "flightserv": 2, "def": 2, "__init__": 2, "self": 2, "locat": [2, 4], "grpc": 2, "8815": 2, "repo": 2, "kwarg": 2, "super": 2, "_locat": 2, "_repo": 2, "_make_flight_info": 2, "dataset_path": 2, "read_schema": 2, "metadata": 2, "read_metadata": 2, "descriptor": 2, "flightdescriptor": 2, "for_path": 2, "utf": 2, "endpoint": 2, "flightendpoint": 2, "flightinfo": 2, "num_row": 2, "serialized_s": 2, "list_flight": 2, "context": 2, "criteria": 2, "iterdir": 2, "yield": 2, "get_flight_info": 2, "decod": [2, 4], "do_put": 2, "reader": 2, "writer": [2, 4], "data_t": 2, "read_al": [2, 4], "write_t": [2, 4], "do_get": 2, "ticket": 2, "recordbatchstream": 2, "read_tabl": [2, 4], "list_act": 2, "drop_dataset": 2, "delet": [2, 4], "do_act": 2, "action": 2, "do_drop_dataset": 2, "bodi": 2, "to_pybyt": 2, "els": 2, "rais": 2, "notimplementederror": 2, "unlink": 2, "server": 2, "charg": 2, "data": [2, 3], "fetch": 2, "likewis": 2, "regard": 2, "specif": 2, "actual": [2, 4], "client": 2, "download": 2, "would": [2, 4, 5], "pretti": 2, "useless": 2, "didn": 2, "creat": [2, 3, 4, 5], "respons": 2, "deal": [2, 5], "save": [2, 3], "request": [2, 5], "add": [2, 4], "do": [2, 4], "custom": 2, "previou": [2, 4], "ad": [2, 3], "execut": 2, "thu": 2, "subclass": 2, "dispatch": 2, "properli": 2, "invok": [2, 4], "expect": 2, "serv": [2, 3], "__name__": 2, "__main__": 2, "mkdir": 2, "exist_ok": 2, "onc": [2, 4], "perform": [2, 3], "tabl": [2, 4], "upload": 2, "mario": 2, "luigi": 2, "peach": 2, "charact": 2, "upload_descriptor": 2, "_": 2, "close": 2, "abl": [2, 4], "retriev": [2, 4], "newli": 2, "total_record": 2, "size": [2, 4], "total_byt": 2, "read": [2, 3, 5], "to_panda": 2, "head": 2, "finish": 2, "drop": 2, "To": [2, 4], "confirm": 2, "current": 2, "exist": [2, 3, 4, 5], "improv": 2, "avoid": 2, "hold": 2, "entir": 2, "iter": [2, 4], "befor": [2, 4], "advantag": 2, "write": [2, 3], "increment": [2, 3], "open": 2, "wb": [2, 4], "sink": [2, 4], "parquetwrit": 2, "parquetfil": 2, "generatorstream": 2, "schema_arrow": 2, "iter_batch": 2, "ve": 2, "modifi": 2, "instead": [2, 4, 5], "batch": [2, 3, 4], "come": [2, 4], "ani": [2, 4], "record": [2, 3, 4], "u": [2, 4], "handl": [2, 4], "don": [2, 4], "while": [2, 4], "mean": [2, 3], "must": [2, 4], "call": [2, 4], "contrast": 2, "requir": [2, 4], "front": 2, "transfer": 2, "pure": 2, "give": 2, "spin": 2, "ll": 2, "had": 2, "num_batch": 2, "1024": 2, "rows_per_batch": 2, "4096": 2, "arrai": [2, 3], "int": 2, "write_batch": 2, "again": 2, "arriv": 2, "total_row": 2, "got": 2, "total": 2, "4194304": 2, "often": 2, "identifi": 2, "who": 2, "thei": [2, 5], "simplest": 2, "scheme": 2, "At": 2, "startup": 2, "itself": 2, "usernam": [2, 4], "author": 2, "token": 2, "futur": 2, "encrypt": 2, "channel": 2, "enabl": 2, "describ": 2, "http": 2, "basic": 2, "doe": 2, "rfc": 2, "7325": 2, "per": 2, "se": 2, "interfac": [2, 4], "demonstr": [2, 3], "below": 2, "minim": 2, "base64": 2, "secret": [2, 4], "echoserv": 2, "just": [2, 4], "echo": 2, "doaction": 2, "basicauthservermiddlewarefactori": 2, "servermiddlewarefactori": 2, "middlewar": 2, "paramet": 2, "cred": 2, "str": 2, "accept": 2, "map": [2, 3], "bearer": 2, "start_cal": 2, "info": 2, "header": 2, "valid": 2, "credenti": [2, 4], "everi": 2, "search": [2, 3], "insensit": 2, "auth_head": 2, "lower": 2, "break": 2, "flightunauthenticatederror": 2, "No": 2, "suppli": 2, "authtyp": 2, "tokenvalu": 2, "g": 2, "random": [2, 4], "auth_typ": 2, "partit": [2, 3], "initi": 2, "login": 2, "same": [2, 4, 5], "auth": 2, "b64decod": 2, "unknown": 2, "invalid": 2, "token_urlsaf": 2, "32": 2, "basicauthservermiddlewar": 2, "elif": 2, "servermiddlewar": 2, "sending_head": 2, "noopauthhandl": 2, "serverauthhandl": 2, "handler": 2, "respond": 2, "handshak": 2, "rpc": 2, "authenticate_basic_token": 2, "otherwis": 2, "op": 2, "outgo": 2, "incom": 2, "is_valid": 2, "auth_handl": 2, "8816": 2, "test": [2, 3], "make": [2, 4], "log": 2, "token_pair": 2, "hello": 2, "world": 2, "flightcallopt": 2, "fail": [2, 5], "error": [2, 4], "try": [2, 4, 5], "except": [2, 5], "unauthent": 2, "runtimeerror": 2, "detail": [2, 4], "Or": 2, "wrong": 2, "scenario": 2, "traffic": 2, "manag": 2, "via": 2, "commun": 2, "layer": 2, "messag": 2, "achiev": 2, "certif": 2, "dure": 2, "develop": 2, "easiest": 2, "approach": 2, "sign": 2, "load": [2, 4], "public": 2, "privat": 2, "root": 2, "product": 2, "environ": 2, "recommend": 2, "dotnet": 2, "window": [2, 4], "openssl": 2, "linux": [2, 4], "maco": 2, "altern": 2, "repositori": 2, "depend": 2, "mai": 2, "crt": 2, "One": 2, "pleas": 2, "visit": 2, "ibm": 2, "articl": 2, "run": 2, "work": [2, 3], "argpars": 2, "host": 2, "localhost": 2, "tls_certif": 2, "verify_cli": 2, "root_certif": 2, "classmethod": 2, "descriptor_to_kei": 2, "descriptor_typ": 2, "command": 2, "tupl": 2, "main": 2, "parser": 2, "argumentpars": 2, "add_argu": 2, "narg": 2, "metavar": 2, "certfil": 2, "keyfil": 2, "arg": 2, "parse_arg": 2, "port": 2, "5005": 2, "rb": 2, "cert_fil": 2, "tls_cert_chain": 2, "key_fil": 2, "tls_private_kei": 2, "append": [2, 3], "format": [2, 4], "push": 2, "assum": 2, "object": [2, 3, 4, 5], "datafram": 2, "push_to_serv": 2, "object_to_send": 2, "from_panda": 2, "help": 2, "trust": 2, "tls_root": 2, "root_cert": 2, "tls_root_cert": 2, "flightclient": 2, "anim": 2, "dog": 2, "cat": 2, "mous": 2, "big": [2, 4], "small": 2, "tini": 2, "df": 2, "animaldata": 2, "script": 2, "out": [2, 4], "distribut": 2, "collect": [2, 3], "level": 2, "measur": 2, "order": 2, "correl": 2, "span": 2, "manual": [2, 4, 5], "automat": [2, 5], "show": 2, "accomplish": 2, "inject": 2, "extract": 2, "side": 2, "defin": [2, 5], "statu": 2, "statuscod": 2, "clienttracingmiddlewarefactori": 2, "clientmiddlewarefactori": 2, "_tracer": 2, "get_trac": 2, "start_span": 2, "clienttracingmiddlewar": 2, "clientmiddlewar": 2, "_span": 2, "ctx": 2, "set_span_in_context": 2, "carrier": 2, "call_complet": 2, "record_except": 2, "set_statu": 2, "ok": 2, "servertracingmiddlewarefactori": 2, "servertracingmiddlewar": 2, "configur": 2, "export": 2, "processor": 2, "both": [2, 4], "sdk": 2, "somewher": 2, "sake": 2, "normal": [2, 4], "jaeger": 2, "part": [2, 4], "resourc": 2, "minimum": 2, "hostnam": 2, "process": 2, "id": [2, 4], "version": 2, "system": [2, 5], "tracerprovid": 2, "simplespanprocessor": 2, "service_nam": 2, "spanexport": 2, "spanexportresult": 2, "testspanexport": 2, "success": 2, "configure_trac": 2, "backend": 2, "although": 2, "necessari": [2, 5], "consol": 2, "good": 2, "anywai": 2, "attribut": 2, "my": 2, "add_span_processor": 2, "set_tracer_provid": 2, "earlier": 2, "within": [2, 4], "activ": 2, "pick": 2, "tracer": 2, "start_as_current_span": 2, "hello_world": 2, "drain": 2, "There": 2, "n": [2, 4], "status_cod": 2, "flightmethod": 2, "unset": 2, "three": 2, "solv": 3, "task": 3, "user": [3, 4], "robust": 3, "well": 3, "solut": 3, "dev273": 3, "parquet": 3, "subset": 3, "disk": 3, "csv": 3, "s3": 3, "feather": 3, "line": 3, "delimit": 3, "json": 3, "compress": 3, "plain": 3, "categor": 3, "merg": 3, "manipul": 3, "comput": 3, "min": 3, "max": 3, "count": 3, "occurr": 3, "element": 3, "appli": [3, 5], "arithmet": 3, "replac": 3, "group": [3, 5], "sort": [3, 4], "match": 3, "predic": 3, "filter": [3, 4], "flight": 3, "simpl": 3, "storag": 3, "servic": 3, "stream": 3, "authent": 3, "password": 3, "secur": 3, "connect": 3, "tl": 3, "propag": 3, "opentelemetri": 3, "trace": 3, "page": 3, "apach": 4, "written": 4, "pq": 4, "95": 4, "96": 4, "97": 4, "98": 4, "restrict": 4, "argument": 4, "project": 4, "refer": 4, "document": 4, "syntax": 4, "apart": 4, "dump": 4, "raw": 4, "direct": 4, "ipc": 4, "num": 4, "osfil": 4, "arraydata": 4, "new_fil": 4, "were": 4, "adapt": 4, "accordingli": 4, "memory_map": 4, "r": 4, "sourc": [4, 5], "loaded_arrai": 4, "open_fil": 4, "It": 4, "write_csv": 4, "write_opt": 4, "writeopt": 4, "include_head": 4, "whole": 4, "csvwriter": 4, "int32": [4, 5], "datachunk": 4, "codepath": 4, "thread": 4, "read_csv": 4, "best": 4, "further": 4, "drive": 4, "convertopt": 4, "usual": 4, "sens": 4, "separ": [4, 5], "write_dataset": 4, "effort": 4, "birthdai": 4, "2000": 4, "2009": 4, "randint": 4, "month": 4, "x": 4, "int16": 4, "subdirectori": 4, "directori": 4, "localf": 4, "localfilesystem": 4, "partitioned_dir_cont": 4, "get_file_info": 4, "fileselector": 4, "recurs": 4, "filetyp": 4, "2001": 4, "2002": 4, "2003": 4, "2004": 4, "2005": 4, "2006": 4, "2007": 4, "2008": 4, "compos": 4, "piec": 4, "discov": 4, "dataset1": 4, "dataset2": 4, "dataset3": 4, "view": 4, "to_tabl": 4, "22": 4, "23": 4, "24": 4, "25": 4, "26": 4, "27": 4, "28": 4, "29": 4, "notic": 4, "forc": 4, "what": [4, 5], "reason": 4, "better": 4, "_name": 4, "abstract": 4, "remot": 4, "hdf": 4, "ursa": 4, "lab": 4, "taxi": 4, "2011": 4, "subtreefilesystem": 4, "s3filesystem": 4, "region": 4, "east": 4, "anonym": 4, "01": 4, "02": 4, "03": 4, "04": 4, "05": 4, "06": 4, "07": 4, "08": 4, "09": 4, "bucket": 4, "local": 4, "abov": 4, "throw": 4, "aw": 4, "instruct": 4, "access": 4, "mac": 4, "appropri": [4, 5], "aws_access_key_id": 4, "your_aws_access_key_id": 4, "aws_secret_access_kei": 4, "your_aws_secret_access_kei": 4, "ft": 4, "write_feath": 4, "builtin": 4, "tempfil": 4, "namedtemporaryfil": 4, "w": 4, "read_json": 4, "to_pydict": 4, "nativ": 4, "box": 4, "driven": 4, "lz4": 4, "snappi": 4, "compressedoutputstream": 4, "gz": 4, "gzip": 4, "decompress": 4, "done": [4, 5], "compressedinputstream": 4, "explain": 4, "next": 4, "applic": 4, "special": 4, "wrote": 4, "simpli": 4, "table_feath": 4, "table_parquet": 4, "involv": 4, "wrap": 4, "table_csv": 4, "smart": 4, "enough": 4, "detect": 4, "extens": 4, "bz2": 4, "table_csv2": 4, "howev": 5, "ensur": 5, "interoper": 5, "databas": 5, "warehous": 5, "chapter": 5, "chang": 5, "int8": 5, "detain": 5, "own": 5, "union": 5, "float64": 5, "far": 5, "compat": 5, "schema_int32": 5, "unifi": 5, "superset": 5, "first_schema": 5, "countri": 5, "popul": 5, "second_schema": 5, "country_cod": 5, "languag": 5, "unify_schema": 5, "union_schema": 5, "overlap": 5, "still": 5, "collid": 5, "retain": 5, "third_schema": 5, "lat": 5, "float32": 5, "long": 5, "float": 5, "diverg": 5, "numer": 5, "unabl": 5, "becaus": 5, "declar": 5, "arrowinvalid": 5, "arrowtypeerror": 5, "incompat": 5, "v": 5}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"creat": 0, "arrow": [0, 2, 3, 4, 5], "object": 0, "content": [0, 1, 2, 3, 4, 5], "arrai": [0, 1, 4, 5], "tabl": [0, 1, 3, 5], "from": [0, 4], "plain": 0, "type": [0, 5], "record": 0, "batch": 0, "store": 0, "categor": 0, "data": [0, 1, 4, 5], "manipul": 1, "comput": 1, "mean": 1, "min": 1, "max": 1, "valu": 1, "an": [1, 5], "count": 1, "occurr": 1, "element": 1, "appli": 1, "arithmet": 1, "function": 1, "append": 1, "exist": 1, "ad": 1, "column": 1, "replac": 1, "group": 1, "sort": 1, "search": 1, "match": 1, "predic": 1, "filter": 1, "us": 1, "mask": 1, "flight": 2, "simpl": 2, "parquet": [2, 4], "storag": 2, "servic": 2, "stream": 2, "authent": 2, "user": 2, "password": 2, "secur": 2, "connect": 2, "tl": 2, "propag": 2, "opentelemetri": 2, "trace": 2, "apach": 3, "python": 3, "cookbook": 3, "indic": 3, "read": 4, "write": 4, "file": 4, "subset": 4, "save": 4, "disk": 4, "memori": 4, "map": 4, "csv": 4, "increment": 4, "partit": 4, "dataset": 4, "s3": 4, "feather": 4, "line": 4, "delimit": 4, "json": 4, "compress": 4, "work": 5, "schema": 5, "set": 5, "merg": 5, "multipl": 5}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Creating Arrow Objects": [[0, "creating-arrow-objects"]], "Contents": [[0, "contents"], [1, "contents"], [2, "contents"], [5, "contents"], [4, "contents"]], "Creating Arrays": [[0, "creating-arrays"]], "Creating Tables": [[0, "creating-tables"]], "Create Table from Plain Types": [[0, "create-table-from-plain-types"]], "Creating Record Batches": [[0, "creating-record-batches"]], "Store Categorical Data": [[0, "store-categorical-data"]], "Data Manipulation": [[1, "data-manipulation"]], "Computing Mean/Min/Max values of an array": [[1, "computing-mean-min-max-values-of-an-array"]], "Counting Occurrences of Elements": [[1, "counting-occurrences-of-elements"]], "Applying arithmetic functions to arrays.": [[1, "applying-arithmetic-functions-to-arrays"]], "Appending tables to an existing table": [[1, "appending-tables-to-an-existing-table"]], "Adding a column to an existing Table": [[1, "adding-a-column-to-an-existing-table"]], "Replacing a column in an existing Table": [[1, "replacing-a-column-in-an-existing-table"]], "Group a Table": [[1, "group-a-table"]], "Sort a Table": [[1, "sort-a-table"]], "Searching for values matching a predicate in Arrays": [[1, "searching-for-values-matching-a-predicate-in-arrays"]], "Filtering Arrays using a mask": [[1, "filtering-arrays-using-a-mask"]], "Arrow Flight": [[2, "arrow-flight"]], "Simple Parquet storage service with Arrow Flight": [[2, "simple-parquet-storage-service-with-arrow-flight"]], "Streaming Parquet Storage Service": [[2, "streaming-parquet-storage-service"]], "Authentication with user/password": [[2, "authentication-with-user-password"]], "Securing connections with TLS": [[2, "securing-connections-with-tls"]], "Propagating OpenTelemetry Traces": [[2, "propagating-opentelemetry-traces"]], "Apache Arrow Python Cookbook": [[3, "apache-arrow-python-cookbook"]], "Contents:": [[3, null]], "Indices and tables": [[3, "indices-and-tables"]], "Working with Schema": [[5, "working-with-schema"]], "Setting the data type of an Arrow Array": [[5, "setting-the-data-type-of-an-arrow-array"]], "Setting the schema of a Table": [[5, "setting-the-schema-of-a-table"]], "Merging multiple schemas": [[5, "merging-multiple-schemas"]], "Reading and Writing Data": [[4, "reading-and-writing-data"]], "Write a Parquet file": [[4, "write-a-parquet-file"]], "Reading a Parquet file": [[4, "reading-a-parquet-file"]], "Reading a subset of Parquet data": [[4, "reading-a-subset-of-parquet-data"]], "Saving Arrow Arrays to disk": [[4, "saving-arrow-arrays-to-disk"]], "Memory Mapping Arrow Arrays from disk": [[4, "memory-mapping-arrow-arrays-from-disk"]], "Writing CSV files": [[4, "writing-csv-files"]], "Writing CSV files incrementally": [[4, "writing-csv-files-incrementally"]], "Reading CSV files": [[4, "reading-csv-files"]], "Writing Partitioned Datasets": [[4, "writing-partitioned-datasets"]], "Reading Partitioned data": [[4, "reading-partitioned-data"]], "Reading Partitioned Data from S3": [[4, "reading-partitioned-data-from-s3"]], "Write a Feather file": [[4, "write-a-feather-file"]], "Reading a Feather file": [[4, "reading-a-feather-file"]], "Reading Line Delimited JSON": [[4, "reading-line-delimited-json"]], "Writing Compressed Data": [[4, "writing-compressed-data"]], "Reading Compressed Data": [[4, "reading-compressed-data"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/dev/r/404.html b/dev/r/404.html
new file mode 100644
index 0000000..ac33a36
--- /dev/null
+++ b/dev/r/404.html
@@ -0,0 +1,476 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>Page not found | Apache Arrow R Cookbook</title>
+  <meta name="description" content="Page not found | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="Page not found | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="Page not found | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+
+
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="page-not-found" class="section level1">
+<h1>Page not found</h1>
+<p>The page you requested cannot be found (perhaps it was moved or renamed).</p>
+<p>You may want to try searching to find the page's new location, or use
+the table of contents to find the page you are looking for.</p>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+
+
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/%s",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/creating-arrow-objects.html b/dev/r/creating-arrow-objects.html
new file mode 100644
index 0000000..1ae8648
--- /dev/null
+++ b/dev/r/creating-arrow-objects.html
@@ -0,0 +1,563 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>4 Creating Arrow Objects | Apache Arrow R Cookbook</title>
+  <meta name="description" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="reading-and-writing-data---multiple-files.html"/>
+<link rel="next" href="defining-data-types.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="creating-arrow-objects" class="section level1 hasAnchor" number="4">
+<h1><span class="header-section-number">4</span> Creating Arrow Objects<a href="creating-arrow-objects.html#creating-arrow-objects" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="create-an-arrow-array-from-an-r-object" class="section level2 hasAnchor" number="4.1">
+<h2><span class="header-section-number">4.1</span> Create an Arrow Array from an R object<a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing vector in R to an Arrow Array object.</p>
+<div id="solution-25" class="section level3 hasAnchor" number="4.1.1">
+<h3><span class="header-section-number">4.1.1</span> Solution<a href="creating-arrow-objects.html#solution-25" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb63"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb63-1"><a href="creating-arrow-objects.html#cb63-1" tabindex="-1"></a><span class="co"># Create an example vector</span></span>
+<span id="cb63-2"><a href="creating-arrow-objects.html#cb63-2" tabindex="-1"></a>score <span class="ot">=</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)</span>
+<span id="cb63-3"><a href="creating-arrow-objects.html#cb63-3" tabindex="-1"></a></span>
+<span id="cb63-4"><a href="creating-arrow-objects.html#cb63-4" tabindex="-1"></a><span class="co"># Convert to Arrow Array</span></span>
+<span id="cb63-5"><a href="creating-arrow-objects.html#cb63-5" tabindex="-1"></a>score_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(score)</span>
+<span id="cb63-6"><a href="creating-arrow-objects.html#cb63-6" tabindex="-1"></a></span>
+<span id="cb63-7"><a href="creating-arrow-objects.html#cb63-7" tabindex="-1"></a><span class="co"># View Array</span></span>
+<span id="cb63-8"><a href="creating-arrow-objects.html#cb63-8" tabindex="-1"></a>score_array</span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   99,
+##   97,
+##   99
+## ]</code></pre>
+</div>
+</div>
+<div id="create-a-arrow-table-from-an-r-object" class="section level2 hasAnchor" number="4.2">
+<h2><span class="header-section-number">4.2</span> Create a Arrow Table from an R object<a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing data frame in R to an Arrow Table object.</p>
+<div id="solution-26" class="section level3 hasAnchor" number="4.2.1">
+<h3><span class="header-section-number">4.2.1</span> Solution<a href="creating-arrow-objects.html#solution-26" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb65"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb65-1"><a href="creating-arrow-objects.html#cb65-1" tabindex="-1"></a><span class="co"># Create an example data frame</span></span>
+<span id="cb65-2"><a href="creating-arrow-objects.html#cb65-2" tabindex="-1"></a>my_tibble <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>))</span>
+<span id="cb65-3"><a href="creating-arrow-objects.html#cb65-3" tabindex="-1"></a><span class="co"># Convert to Arrow Table</span></span>
+<span id="cb65-4"><a href="creating-arrow-objects.html#cb65-4" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(my_tibble)</span>
+<span id="cb65-5"><a href="creating-arrow-objects.html#cb65-5" tabindex="-1"></a><span class="co"># View table</span></span>
+<span id="cb65-6"><a href="creating-arrow-objects.html#cb65-6" tabindex="-1"></a>my_table</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+</div>
+</div>
+<div id="view-the-contents-of-an-arrow-table-or-recordbatch" class="section level2 hasAnchor" number="4.3">
+<h2><span class="header-section-number">4.3</span> View the contents of an Arrow Table or RecordBatch<a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to view the contents of an Arrow Table or RecordBatch.</p>
+<div id="solution-27" class="section level3 hasAnchor" number="4.3.1">
+<h3><span class="header-section-number">4.3.1</span> Solution<a href="creating-arrow-objects.html#solution-27" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb67"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb67-1"><a href="creating-arrow-objects.html#cb67-1" tabindex="-1"></a><span class="co"># View Table</span></span>
+<span id="cb67-2"><a href="creating-arrow-objects.html#cb67-2" tabindex="-1"></a>dplyr<span class="sc">::</span><span class="fu">collect</span>(my_table)</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 2
+##   group score
+##   &lt;chr&gt; &lt;dbl&gt;
+## 1 A        99
+## 2 B        97
+## 3 C        99</code></pre>
+</div>
+</div>
+<div id="manually-create-a-recordbatch-from-an-r-object." class="section level2 hasAnchor" number="4.4">
+<h2><span class="header-section-number">4.4</span> Manually create a RecordBatch from an R object.<a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object." class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing data frame in R to an Arrow RecordBatch object.</p>
+<div id="solution-28" class="section level3 hasAnchor" number="4.4.1">
+<h3><span class="header-section-number">4.4.1</span> Solution<a href="creating-arrow-objects.html#solution-28" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb69"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb69-1"><a href="creating-arrow-objects.html#cb69-1" tabindex="-1"></a><span class="co"># Create an example data frame</span></span>
+<span id="cb69-2"><a href="creating-arrow-objects.html#cb69-2" tabindex="-1"></a>my_tibble <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>))</span>
+<span id="cb69-3"><a href="creating-arrow-objects.html#cb69-3" tabindex="-1"></a><span class="co"># Convert to Arrow RecordBatch</span></span>
+<span id="cb69-4"><a href="creating-arrow-objects.html#cb69-4" tabindex="-1"></a>my_record_batch <span class="ot">&lt;-</span> <span class="fu">record_batch</span>(my_tibble)</span>
+<span id="cb69-5"><a href="creating-arrow-objects.html#cb69-5" tabindex="-1"></a><span class="co"># View RecordBatch</span></span>
+<span id="cb69-6"><a href="creating-arrow-objects.html#cb69-6" tabindex="-1"></a>my_record_batch</span></code></pre></div>
+<pre><code>## RecordBatch
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="reading-and-writing-data---multiple-files.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="defining-data-types.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/creating_arrow_objects.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/defining-data-types.html b/dev/r/defining-data-types.html
new file mode 100644
index 0000000..e565c35
--- /dev/null
+++ b/dev/r/defining-data-types.html
@@ -0,0 +1,644 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>5 Defining Data Types | Apache Arrow R Cookbook</title>
+  <meta name="description" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="creating-arrow-objects.html"/>
+<link rel="next" href="manipulating-data---arrays.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="defining-data-types" class="section level1 hasAnchor" number="5">
+<h1><span class="header-section-number">5</span> Defining Data Types<a href="defining-data-types.html#defining-data-types" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-2" class="section level2 hasAnchor" number="5.1">
+<h2><span class="header-section-number">5.1</span> Introduction<a href="defining-data-types.html#introduction-2" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>As discussed in previous chapters, Arrow automatically infers the most
+appropriate data type when reading in data or converting R objects to Arrow
+objects. However, you might want to manually tell Arrow which data types to
+use, for example, to ensure interoperability with databases and data warehouse
+systems. This chapter includes recipes for:</p>
+<ul>
+<li>changing the data types of existing Arrow objects</li>
+<li>defining data types during the process of creating Arrow objects</li>
+</ul>
+<p>A table showing the default mappings between R and Arrow data types can be found
+in <a href="https://arrow.apache.org/docs/r/articles/arrow.html#r-to-arrow">R data type to Arrow data type mappings</a>.</p>
+<p>A table containing Arrow data types, and their R equivalents can be found in
+<a href="https://arrow.apache.org/docs/r/articles/arrow.html#arrow-to-r">Arrow data type to R data type mapping</a>.</p>
+</div>
+<div id="update-data-type-of-an-existing-arrow-array" class="section level2 hasAnchor" number="5.2">
+<h2><span class="header-section-number">5.2</span> Update data type of an existing Arrow Array<a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to change the data type of an existing Arrow Array.</p>
+<div id="solution-29" class="section level3 hasAnchor" number="5.2.1">
+<h3><span class="header-section-number">5.2.1</span> Solution<a href="defining-data-types.html#solution-29" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb71"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb71-1"><a href="defining-data-types.html#cb71-1" tabindex="-1"></a><span class="co"># Create an Array to cast</span></span>
+<span id="cb71-2"><a href="defining-data-types.html#cb71-2" tabindex="-1"></a>integer_arr <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>)</span>
+<span id="cb71-3"><a href="defining-data-types.html#cb71-3" tabindex="-1"></a></span>
+<span id="cb71-4"><a href="defining-data-types.html#cb71-4" tabindex="-1"></a><span class="co"># Cast to an unsigned int8 type</span></span>
+<span id="cb71-5"><a href="defining-data-types.html#cb71-5" tabindex="-1"></a>uint_arr <span class="ot">&lt;-</span> integer_arr<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_type =</span> <span class="fu">uint8</span>())</span>
+<span id="cb71-6"><a href="defining-data-types.html#cb71-6" tabindex="-1"></a></span>
+<span id="cb71-7"><a href="defining-data-types.html#cb71-7" tabindex="-1"></a>uint_arr</span></code></pre></div>
+<pre><code>## Array
+## &lt;uint8&gt;
+## [
+##   1,
+##   2,
+##   3,
+##   4,
+##   5
+## ]</code></pre>
+</div>
+<div id="discussion-10" class="section level3 hasAnchor" number="5.2.2">
+<h3><span class="header-section-number">5.2.2</span> Discussion<a href="defining-data-types.html#discussion-10" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>There are some data types which are not compatible with each other. Errors will
+occur if you try to cast between incompatible data types.</p>
+<div class="sourceCode" id="cb73"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb73-1"><a href="defining-data-types.html#cb73-1" tabindex="-1"></a>int_arr <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>)</span>
+<span id="cb73-2"><a href="defining-data-types.html#cb73-2" tabindex="-1"></a>int_arr<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_type =</span> <span class="fu">binary</span>())</span></code></pre></div>
+<div class="sourceCode" id="cb74"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb74-1"><a href="defining-data-types.html#cb74-1" tabindex="-1"></a><span class="do">## Error: NotImplemented: Unsupported cast from int32 to binary using function cast_binary</span></span></code></pre></div>
+</div>
+</div>
+<div id="update-data-type-of-a-field-in-an-existing-arrow-table" class="section level2 hasAnchor" number="5.3">
+<h2><span class="header-section-number">5.3</span> Update data type of a field in an existing Arrow Table<a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to change the type of one or more fields in an existing Arrow Table.</p>
+<div id="solution-30" class="section level3 hasAnchor" number="5.3.1">
+<h3><span class="header-section-number">5.3.1</span> Solution<a href="defining-data-types.html#solution-30" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb75"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb75-1"><a href="defining-data-types.html#cb75-1" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb75-2"><a href="defining-data-types.html#cb75-2" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb75-3"><a href="defining-data-types.html#cb75-3" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb75-4"><a href="defining-data-types.html#cb75-4" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb75-5"><a href="defining-data-types.html#cb75-5" tabindex="-1"></a>)</span>
+<span id="cb75-6"><a href="defining-data-types.html#cb75-6" tabindex="-1"></a></span>
+<span id="cb75-7"><a href="defining-data-types.html#cb75-7" tabindex="-1"></a><span class="co"># Convert tibble to an Arrow table</span></span>
+<span id="cb75-8"><a href="defining-data-types.html#cb75-8" tabindex="-1"></a>oscars_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars)</span>
+<span id="cb75-9"><a href="defining-data-types.html#cb75-9" tabindex="-1"></a></span>
+<span id="cb75-10"><a href="defining-data-types.html#cb75-10" tabindex="-1"></a><span class="co"># The default mapping from numeric column &quot;num_awards&quot; is to a double</span></span>
+<span id="cb75-11"><a href="defining-data-types.html#cb75-11" tabindex="-1"></a>oscars_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;double&gt;</code></pre>
+<div class="sourceCode" id="cb77"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb77-1"><a href="defining-data-types.html#cb77-1" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb77-2"><a href="defining-data-types.html#cb77-2" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb77-3"><a href="defining-data-types.html#cb77-3" tabindex="-1"></a></span>
+<span id="cb77-4"><a href="defining-data-types.html#cb77-4" tabindex="-1"></a><span class="co"># Cast to an int16</span></span>
+<span id="cb77-5"><a href="defining-data-types.html#cb77-5" tabindex="-1"></a>oscars_arrow_int <span class="ot">&lt;-</span> oscars_arrow<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_schema =</span> oscars_schema)</span>
+<span id="cb77-6"><a href="defining-data-types.html#cb77-6" tabindex="-1"></a></span>
+<span id="cb77-7"><a href="defining-data-types.html#cb77-7" tabindex="-1"></a>oscars_arrow_int</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;int16&gt;</code></pre>
+</div>
+<div id="no-compat-type" class="section level3 hasAnchor" number="5.3.2">
+<h3><span class="header-section-number">5.3.2</span> Discussion<a href="defining-data-types.html#no-compat-type" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>There are some Arrow data types which do not have any R equivalent. Attempting
+to cast to these data types or using a schema which contains them will result in
+an error.</p>
+<div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb79-1"><a href="defining-data-types.html#cb79-1" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb79-2"><a href="defining-data-types.html#cb79-2" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb79-3"><a href="defining-data-types.html#cb79-3" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb79-4"><a href="defining-data-types.html#cb79-4" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb79-5"><a href="defining-data-types.html#cb79-5" tabindex="-1"></a>)</span>
+<span id="cb79-6"><a href="defining-data-types.html#cb79-6" tabindex="-1"></a></span>
+<span id="cb79-7"><a href="defining-data-types.html#cb79-7" tabindex="-1"></a><span class="co"># Convert tibble to an Arrow table</span></span>
+<span id="cb79-8"><a href="defining-data-types.html#cb79-8" tabindex="-1"></a>oscars_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars)</span>
+<span id="cb79-9"><a href="defining-data-types.html#cb79-9" tabindex="-1"></a></span>
+<span id="cb79-10"><a href="defining-data-types.html#cb79-10" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as float16 which doesn&#39;t have an R equivalent</span></span>
+<span id="cb79-11"><a href="defining-data-types.html#cb79-11" tabindex="-1"></a>oscars_schema_invalid <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">float16</span>())</span>
+<span id="cb79-12"><a href="defining-data-types.html#cb79-12" tabindex="-1"></a></span>
+<span id="cb79-13"><a href="defining-data-types.html#cb79-13" tabindex="-1"></a><span class="co"># The default mapping from numeric column &quot;num_awards&quot; is to a double</span></span>
+<span id="cb79-14"><a href="defining-data-types.html#cb79-14" tabindex="-1"></a>oscars_arrow<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_schema =</span> oscars_schema_invalid)</span></code></pre></div>
+<div class="sourceCode" id="cb80"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb80-1"><a href="defining-data-types.html#cb80-1" tabindex="-1"></a><span class="do">## Error: NotImplemented: Unsupported cast from double to halffloat using function cast_half_float</span></span></code></pre></div>
+</div>
+</div>
+<div id="specify-data-types-when-creating-an-arrow-table-from-an-r-object" class="section level2 hasAnchor" number="5.4">
+<h2><span class="header-section-number">5.4</span> Specify data types when creating an Arrow table from an R object<a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to manually specify Arrow data types when converting an object from a
+data frame to an Arrow object.</p>
+<div id="solution-31" class="section level3 hasAnchor" number="5.4.1">
+<h3><span class="header-section-number">5.4.1</span> Solution<a href="defining-data-types.html#solution-31" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb81"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb81-1"><a href="defining-data-types.html#cb81-1" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb81-2"><a href="defining-data-types.html#cb81-2" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb81-3"><a href="defining-data-types.html#cb81-3" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb81-4"><a href="defining-data-types.html#cb81-4" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb81-5"><a href="defining-data-types.html#cb81-5" tabindex="-1"></a>)</span>
+<span id="cb81-6"><a href="defining-data-types.html#cb81-6" tabindex="-1"></a></span>
+<span id="cb81-7"><a href="defining-data-types.html#cb81-7" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb81-8"><a href="defining-data-types.html#cb81-8" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb81-9"><a href="defining-data-types.html#cb81-9" tabindex="-1"></a></span>
+<span id="cb81-10"><a href="defining-data-types.html#cb81-10" tabindex="-1"></a><span class="co"># create arrow Table containing data and schema</span></span>
+<span id="cb81-11"><a href="defining-data-types.html#cb81-11" tabindex="-1"></a>oscars_data_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars, <span class="at">schema =</span> oscars_schema)</span>
+<span id="cb81-12"><a href="defining-data-types.html#cb81-12" tabindex="-1"></a></span>
+<span id="cb81-13"><a href="defining-data-types.html#cb81-13" tabindex="-1"></a>oscars_data_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;int16&gt;</code></pre>
+</div>
+</div>
+<div id="specify-data-types-when-reading-in-files" class="section level2 hasAnchor" number="5.5">
+<h2><span class="header-section-number">5.5</span> Specify data types when reading in files<a href="defining-data-types.html#specify-data-types-when-reading-in-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to manually specify Arrow data types when reading in files.</p>
+<div id="solution-32" class="section level3 hasAnchor" number="5.5.1">
+<h3><span class="header-section-number">5.5.1</span> Solution<a href="defining-data-types.html#solution-32" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb83"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb83-1"><a href="defining-data-types.html#cb83-1" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb83-2"><a href="defining-data-types.html#cb83-2" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb83-3"><a href="defining-data-types.html#cb83-3" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb83-4"><a href="defining-data-types.html#cb83-4" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb83-5"><a href="defining-data-types.html#cb83-5" tabindex="-1"></a>)</span>
+<span id="cb83-6"><a href="defining-data-types.html#cb83-6" tabindex="-1"></a></span>
+<span id="cb83-7"><a href="defining-data-types.html#cb83-7" tabindex="-1"></a><span class="co"># write dataset to disk</span></span>
+<span id="cb83-8"><a href="defining-data-types.html#cb83-8" tabindex="-1"></a><span class="fu">write_dataset</span>(oscars, <span class="at">path =</span> <span class="st">&quot;oscars_data&quot;</span>)</span>
+<span id="cb83-9"><a href="defining-data-types.html#cb83-9" tabindex="-1"></a></span>
+<span id="cb83-10"><a href="defining-data-types.html#cb83-10" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb83-11"><a href="defining-data-types.html#cb83-11" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb83-12"><a href="defining-data-types.html#cb83-12" tabindex="-1"></a></span>
+<span id="cb83-13"><a href="defining-data-types.html#cb83-13" tabindex="-1"></a><span class="co"># read the dataset in, using the schema instead of inferring the type automatically</span></span>
+<span id="cb83-14"><a href="defining-data-types.html#cb83-14" tabindex="-1"></a>oscars_dataset_arrow <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(<span class="st">&quot;oscars_data&quot;</span>, <span class="at">schema =</span> oscars_schema)</span>
+<span id="cb83-15"><a href="defining-data-types.html#cb83-15" tabindex="-1"></a></span>
+<span id="cb83-16"><a href="defining-data-types.html#cb83-16" tabindex="-1"></a>oscars_dataset_arrow</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 Parquet file
+## actor: string
+## num_awards: int16</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="creating-arrow-objects.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="manipulating-data---arrays.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/specify_data_types_and_schemas.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/flight.html b/dev/r/flight.html
new file mode 100644
index 0000000..338d7c0
--- /dev/null
+++ b/dev/r/flight.html
@@ -0,0 +1,560 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>9 Flight | Apache Arrow R Cookbook</title>
+  <meta name="description" content="9 Flight | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="9 Flight | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="9 Flight | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="using-pyarrow-from-r.html"/>
+
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="flight" class="section level1 hasAnchor" number="9">
+<h1><span class="header-section-number">9</span> Flight<a href="flight.html#flight" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-6" class="section level2 hasAnchor" number="9.1">
+<h2><span class="header-section-number">9.1</span> Introduction<a href="flight.html#introduction-6" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>Flight is a general-purpose client-server framework for high performance
+transport of large datasets over network interfaces, built as part of the
+Apache Arrow project.</p>
+<p>Flight allows for highly efficient data transfer as it:</p>
+<ul>
+<li>removes the need for serialization during data transfer</li>
+<li>allows for parallel data streaming</li>
+<li>is highly optimized to take advantage of Arrow’s columnar format.</li>
+</ul>
+<p>The arrow package provides methods for connecting to Flight RPC servers to send
+and receive data.</p>
+<p>It should be noted that the Flight implementation in the R package depends on
+<a href="https://arrow.apache.org/docs/python/">PyArrow</a> which is called via
+<a href="https://rstudio.github.io/reticulate/">reticulate</a>. This is quite different
+from the other capabilities in the R package, nearly all of which are all
+implemented directly.</p>
+</div>
+<div id="connect-to-a-flight-server" class="section level2 hasAnchor" number="9.2">
+<h2><span class="header-section-number">9.2</span> Connect to a Flight server<a href="flight.html#connect-to-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to connect to a Flight server running on a specified host and port.</p>
+<div id="solution-44" class="section level3 hasAnchor" number="9.2.1">
+<h3><span class="header-section-number">9.2.1</span> Solution<a href="flight.html#solution-44" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb133"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb133-1"><a href="flight.html#cb133-1" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span></code></pre></div>
+</div>
+<div id="see-also-4" class="section level3 hasAnchor" number="9.2.2">
+<h3><span class="header-section-number">9.2.2</span> See also<a href="flight.html#see-also-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For an example of how to set up a Flight server from R, see
+<a href="https://arrow.apache.org/docs/r/articles/flight.html">the Flight vignette</a>.</p>
+</div>
+</div>
+<div id="send-data-to-a-flight-server" class="section level2 hasAnchor" number="9.3">
+<h2><span class="header-section-number">9.3</span> Send data to a Flight server<a href="flight.html#send-data-to-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to send data that you have in memory to a Flight server</p>
+<div id="solution-45" class="section level3 hasAnchor" number="9.3.1">
+<h3><span class="header-section-number">9.3.1</span> Solution<a href="flight.html#solution-45" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb134"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb134-1"><a href="flight.html#cb134-1" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb134-2"><a href="flight.html#cb134-2" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb134-3"><a href="flight.html#cb134-3" tabindex="-1"></a></span>
+<span id="cb134-4"><a href="flight.html#cb134-4" tabindex="-1"></a><span class="co"># Send the data</span></span>
+<span id="cb134-5"><a href="flight.html#cb134-5" tabindex="-1"></a><span class="fu">flight_put</span>(</span>
+<span id="cb134-6"><a href="flight.html#cb134-6" tabindex="-1"></a>  local_client,</span>
+<span id="cb134-7"><a href="flight.html#cb134-7" tabindex="-1"></a>  <span class="at">data =</span> airquality,</span>
+<span id="cb134-8"><a href="flight.html#cb134-8" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;pollution_data&quot;</span></span>
+<span id="cb134-9"><a href="flight.html#cb134-9" tabindex="-1"></a>)</span></code></pre></div>
+</div>
+</div>
+<div id="check-what-resources-exist-on-a-flight-server" class="section level2 hasAnchor" number="9.4">
+<h2><span class="header-section-number">9.4</span> Check what resources exist on a Flight server<a href="flight.html#check-what-resources-exist-on-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to see what paths are available on a Flight server.</p>
+<div id="solution-46" class="section level3 hasAnchor" number="9.4.1">
+<h3><span class="header-section-number">9.4.1</span> Solution<a href="flight.html#solution-46" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb135"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb135-1"><a href="flight.html#cb135-1" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb135-2"><a href="flight.html#cb135-2" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb135-3"><a href="flight.html#cb135-3" tabindex="-1"></a></span>
+<span id="cb135-4"><a href="flight.html#cb135-4" tabindex="-1"></a><span class="co"># Retrieve path listing</span></span>
+<span id="cb135-5"><a href="flight.html#cb135-5" tabindex="-1"></a><span class="fu">list_flights</span>(local_client)</span></code></pre></div>
+<div class="sourceCode" id="cb136"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb136-1"><a href="flight.html#cb136-1" tabindex="-1"></a><span class="co"># [1] &quot;pollution_data&quot;</span></span></code></pre></div>
+</div>
+</div>
+<div id="retrieve-data-from-a-flight-server" class="section level2 hasAnchor" number="9.5">
+<h2><span class="header-section-number">9.5</span> Retrieve data from a Flight server<a href="flight.html#retrieve-data-from-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to retrieve data on a Flight server from a specified path.</p>
+<div id="solution-47" class="section level3 hasAnchor" number="9.5.1">
+<h3><span class="header-section-number">9.5.1</span> Solution<a href="flight.html#solution-47" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb137"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb137-1"><a href="flight.html#cb137-1" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb137-2"><a href="flight.html#cb137-2" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb137-3"><a href="flight.html#cb137-3" tabindex="-1"></a></span>
+<span id="cb137-4"><a href="flight.html#cb137-4" tabindex="-1"></a><span class="co"># Retrieve data</span></span>
+<span id="cb137-5"><a href="flight.html#cb137-5" tabindex="-1"></a><span class="fu">flight_get</span>(</span>
+<span id="cb137-6"><a href="flight.html#cb137-6" tabindex="-1"></a>  local_client,</span>
+<span id="cb137-7"><a href="flight.html#cb137-7" tabindex="-1"></a>  <span class="st">&quot;pollution_data&quot;</span></span>
+<span id="cb137-8"><a href="flight.html#cb137-8" tabindex="-1"></a>)</span></code></pre></div>
+<div class="sourceCode" id="cb138"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb138-1"><a href="flight.html#cb138-1" tabindex="-1"></a><span class="co"># Table</span></span>
+<span id="cb138-2"><a href="flight.html#cb138-2" tabindex="-1"></a><span class="co"># 153 rows x 6 columns</span></span>
+<span id="cb138-3"><a href="flight.html#cb138-3" tabindex="-1"></a><span class="co"># $Ozone &lt;int32&gt;</span></span>
+<span id="cb138-4"><a href="flight.html#cb138-4" tabindex="-1"></a><span class="co"># $Solar.R &lt;int32&gt;</span></span>
+<span id="cb138-5"><a href="flight.html#cb138-5" tabindex="-1"></a><span class="co"># $Wind &lt;double&gt;</span></span>
+<span id="cb138-6"><a href="flight.html#cb138-6" tabindex="-1"></a><span class="co"># $Temp &lt;int32&gt;</span></span>
+<span id="cb138-7"><a href="flight.html#cb138-7" tabindex="-1"></a><span class="co"># $Month &lt;int32&gt;</span></span>
+<span id="cb138-8"><a href="flight.html#cb138-8" tabindex="-1"></a><span class="co"># $Day &lt;int32&gt;</span></span>
+<span id="cb138-9"><a href="flight.html#cb138-9" tabindex="-1"></a><span class="co"># </span></span>
+<span id="cb138-10"><a href="flight.html#cb138-10" tabindex="-1"></a><span class="co"># See $metadata for additional Schema metadata</span></span></code></pre></div>
+
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="using-pyarrow-from-r.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/flight.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/images/arrow.png b/dev/r/images/arrow.png
new file mode 100644
index 0000000..72104b0
--- /dev/null
+++ b/dev/r/images/arrow.png
Binary files differ
diff --git a/dev/r/index.html b/dev/r/index.html
new file mode 100644
index 0000000..0c3d2a5
--- /dev/null
+++ b/dev/r/index.html
@@ -0,0 +1,516 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>Apache Arrow R Cookbook</title>
+  <meta name="description" content="Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+
+<link rel="next" href="reading-and-writing-data---single-files.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="header">
+<h1 class="title">Apache Arrow R Cookbook</h1>
+</div>
+<div id="preface" class="section level1 hasAnchor" number="1">
+<h1><span class="header-section-number">1</span> Preface<a href="index.html#preface" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<p><img src="images/arrow.png" title="Apache Arrow logo" /></p>
+<p>This cookbook aims to provide a number of recipes showing how to perform common
+tasks using <a href="https://arrow.apache.org/docs/r/">arrow</a>. This version of the
+cookbook works with arrow &gt;= 6.0.0, but in future we will maintain different
+versions for the last few major R package releases.</p>
+<div id="what-is-arrow" class="section level2 hasAnchor" number="1.1">
+<h2><span class="header-section-number">1.1</span> What is Arrow?<a href="index.html#what-is-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>Apache Arrow is a cross-language development platform for in-memory analytics.<br />
+The arrow R package provides a low-level interface to much of the functionality
+available in the C++ implementation, as well as a higher-level interface to the
+compute functionality via an implementation of the <a href="https://dplyr.tidyverse.org/">dplyr</a> API.</p>
+</div>
+<div id="alternative-resources" class="section level2 hasAnchor" number="1.2">
+<h2><span class="header-section-number">1.2</span> Alternative resources<a href="index.html#alternative-resources" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>For a complete reference guide to the functions in arrow, as well as vignettes,
+see <a href="https://arrow.apache.org/docs/r/">the pkgdown site</a>.</p>
+<p>If you have any requests for new recipes, please open a ticket via
+<a href="https://github.com/apache/arrow-cookbook/issues">the cookbook’s GitHub Issues page</a>.</p>
+<p>If you have any Arrow feature requests to make or bugs to report, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a></p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+
+<a href="reading-and-writing-data---single-files.html" class="navigation navigation-next navigation-unique" aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/index.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css b/dev/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css
new file mode 100644
index 0000000..b563ec9
--- /dev/null
+++ b/dev/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css
@@ -0,0 +1,2 @@
+/* Styles for section anchors */
+a.anchor-section::before {content: '#';font-size: 80%;}
diff --git a/dev/r/libs/anchor-sections-1.1.0/anchor-sections.css b/dev/r/libs/anchor-sections-1.1.0/anchor-sections.css
new file mode 100644
index 0000000..041905f
--- /dev/null
+++ b/dev/r/libs/anchor-sections-1.1.0/anchor-sections.css
@@ -0,0 +1,4 @@
+/* Styles for section anchors */
+a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;}
+.hasAnchor:hover a.anchor-section {visibility: visible;}
+ul > li > .anchor-section {display: none;}
diff --git a/dev/r/libs/anchor-sections-1.1.0/anchor-sections.js b/dev/r/libs/anchor-sections-1.1.0/anchor-sections.js
new file mode 100644
index 0000000..fee005d
--- /dev/null
+++ b/dev/r/libs/anchor-sections-1.1.0/anchor-sections.js
@@ -0,0 +1,11 @@
+document.addEventListener('DOMContentLoaded', function () {
+  // If section divs is used, we need to put the anchor in the child header
+  const headers = document.querySelectorAll("div.hasAnchor.section[class*='level'] > :first-child")
+
+  headers.forEach(function (x) {
+    // Add to the header node
+    if (!x.classList.contains('hasAnchor')) x.classList.add('hasAnchor')
+    // Remove from the section or div created by Pandoc
+    x.parentElement.classList.remove('hasAnchor')
+  })
+})
diff --git a/dev/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf b/dev/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf
new file mode 100644
index 0000000..35acda2
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf
Binary files differ
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-bookdown.css b/dev/r/libs/gitbook-2.6.7/css/plugin-bookdown.css
new file mode 100644
index 0000000..ab7c20e
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-bookdown.css
@@ -0,0 +1,105 @@
+.book .book-header h1 {
+  padding-left: 20px;
+  padding-right: 20px;
+}
+.book .book-header.fixed {
+  position: fixed;
+  right: 0;
+  top: 0;
+  left: 0;
+  border-bottom: 1px solid rgba(0,0,0,.07);
+}
+span.search-highlight {
+  background-color: #ffff88;
+}
+@media (min-width: 600px) {
+  .book.with-summary .book-header.fixed {
+    left: 300px;
+  }
+}
+@media (max-width: 1240px) {
+  .book .book-body.fixed {
+    top: 50px;
+  }
+  .book .book-body.fixed .body-inner {
+    top: auto;
+  }
+}
+@media (max-width: 600px) {
+  .book.with-summary .book-header.fixed {
+    left: calc(100% - 60px);
+    min-width: 300px;
+  }
+  .book.with-summary .book-body {
+    transform: none;
+    left: calc(100% - 60px);
+    min-width: 300px;
+  }
+  .book .book-body.fixed {
+    top: 0;
+  }
+}
+
+.book .book-body.fixed .body-inner {
+  top: 50px;
+}
+.book .book-body .page-wrapper .page-inner section.normal sub, .book .book-body .page-wrapper .page-inner section.normal sup {
+  font-size: 85%;
+}
+
+@media print {
+  .book .book-summary, .book .book-body .book-header, .fa {
+    display: none !important;
+  }
+  .book .book-body.fixed {
+    left: 0px;
+  }
+  .book .book-body,.book .book-body .body-inner, .book.with-summary {
+    overflow: visible !important;
+  }
+}
+.kable_wrapper {
+  border-spacing: 20px 0;
+  border-collapse: separate;
+  border: none;
+  margin: auto;
+}
+.kable_wrapper > tbody > tr > td {
+  vertical-align: top;
+}
+.book .book-body .page-wrapper .page-inner section.normal table tr.header {
+  border-top-width: 2px;
+}
+.book .book-body .page-wrapper .page-inner section.normal table tr:last-child td {
+  border-bottom-width: 2px;
+}
+.book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th {
+  border-left: none;
+  border-right: none;
+}
+.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr, .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr > td {
+  border-top: none;
+}
+.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr:last-child > td {
+    border-bottom: none;
+}
+
+div.theorem, div.lemma, div.corollary, div.proposition, div.conjecture {
+  font-style: italic;
+}
+span.theorem, span.lemma, span.corollary, span.proposition, span.conjecture {
+  font-style: normal;
+}
+div.proof>*:last-child:after {
+  content: "\25a2";
+  float: right;
+}
+.header-section-number {
+  padding-right: .5em;
+}
+#header .multi-author {
+  margin: 0.5em 0 -0.5em 0;
+}
+#header .date {
+  margin-top: 1.5em;
+}
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-clipboard.css b/dev/r/libs/gitbook-2.6.7/css/plugin-clipboard.css
new file mode 100644
index 0000000..6844a70
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-clipboard.css
@@ -0,0 +1,18 @@
+div.sourceCode {
+  position: relative;
+}
+
+.copy-to-clipboard-button {
+  position: absolute;
+  right: 0;
+  top: 0;
+  visibility: hidden;
+}
+
+.copy-to-clipboard-button:focus {
+  outline: 0;
+}
+
+div.sourceCode:hover > .copy-to-clipboard-button {
+  visibility: visible;
+}
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css b/dev/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css
new file mode 100644
index 0000000..3fa6f35
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css
@@ -0,0 +1,303 @@
+/*
+ * Theme 1
+ */
+.color-theme-1 .dropdown-menu {
+  background-color: #111111;
+  border-color: #7e888b;
+}
+.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
+  border-bottom: 9px solid #111111;
+}
+.color-theme-1 .dropdown-menu .buttons {
+  border-color: #7e888b;
+}
+.color-theme-1 .dropdown-menu .button {
+  color: #afa790;
+}
+.color-theme-1 .dropdown-menu .button:hover {
+  color: #73553c;
+}
+/*
+ * Theme 2
+ */
+.color-theme-2 .dropdown-menu {
+  background-color: #2d3143;
+  border-color: #272a3a;
+}
+.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
+  border-bottom: 9px solid #2d3143;
+}
+.color-theme-2 .dropdown-menu .buttons {
+  border-color: #272a3a;
+}
+.color-theme-2 .dropdown-menu .button {
+  color: #62677f;
+}
+.color-theme-2 .dropdown-menu .button:hover {
+  color: #f4f4f5;
+}
+.book .book-header .font-settings .font-enlarge {
+  line-height: 30px;
+  font-size: 1.4em;
+}
+.book .book-header .font-settings .font-reduce {
+  line-height: 30px;
+  font-size: 1em;
+}
+
+/* sidebar transition background */
+div.book.color-theme-1 {
+  background: #f3eacb;
+}
+.book.color-theme-1 .book-body {
+  color: #704214;
+  background: #f3eacb;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section {
+  background: #f3eacb;
+}
+
+/* sidebar transition background */
+div.book.color-theme-2 {
+  background: #1c1f2b;
+}
+
+.book.color-theme-2 .book-body {
+  color: #bdcadb;
+  background: #1c1f2b;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section {
+  background: #1c1f2b;
+}
+.book.font-size-0 .book-body .page-inner section {
+  font-size: 1.2rem;
+}
+.book.font-size-1 .book-body .page-inner section {
+  font-size: 1.4rem;
+}
+.book.font-size-2 .book-body .page-inner section {
+  font-size: 1.6rem;
+}
+.book.font-size-3 .book-body .page-inner section {
+  font-size: 2.2rem;
+}
+.book.font-size-4 .book-body .page-inner section {
+  font-size: 4rem;
+}
+.book.font-family-0 {
+  font-family: Georgia, serif;
+}
+.book.font-family-1 {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal {
+  color: #704214;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 {
+  border-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr {
+  background-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
+  border-color: #c4b29f;
+  opacity: 0.9;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
+  background: #fdf6e3;
+  color: #657b83;
+  border-color: #f8df9c;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight {
+  background-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td {
+  border-color: #f5d06c;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr {
+  color: inherit;
+  background-color: #fdf6e3;
+  border-color: #444444;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
+  background-color: #fbeecb;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
+  color: #bdcadb;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
+  color: #3eb1d0;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: #fffffa;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
+  border-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
+  background-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
+  border-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
+  color: #9dbed8;
+  background: #2d3143;
+  border-color: #2d3143;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
+  background-color: #282a39;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
+  border-color: #3b3f54;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
+  color: #b6c2d2;
+  background-color: #2d3143;
+  border-color: #3b3f54;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
+  background-color: #35394b;
+}
+.book.color-theme-1 .book-header {
+  color: #afa790;
+  background: transparent;
+}
+.book.color-theme-1 .book-header .btn {
+  color: #afa790;
+}
+.book.color-theme-1 .book-header .btn:hover {
+  color: #73553c;
+  background: none;
+}
+.book.color-theme-1 .book-header h1 {
+  color: #704214;
+}
+.book.color-theme-2 .book-header {
+  color: #7e888b;
+  background: transparent;
+}
+.book.color-theme-2 .book-header .btn {
+  color: #3b3f54;
+}
+.book.color-theme-2 .book-header .btn:hover {
+  color: #fffff5;
+  background: none;
+}
+.book.color-theme-2 .book-header h1 {
+  color: #bdcadb;
+}
+.book.color-theme-1 .book-body .navigation {
+  color: #afa790;
+}
+.book.color-theme-1 .book-body .navigation:hover {
+  color: #73553c;
+}
+.book.color-theme-2 .book-body .navigation {
+  color: #383f52;
+}
+.book.color-theme-2 .book-body .navigation:hover {
+  color: #fffff5;
+}
+/*
+ * Theme 1
+ */
+.book.color-theme-1 .book-summary {
+  color: #afa790;
+  background: #111111;
+  border-right: 1px solid rgba(0, 0, 0, 0.07);
+}
+.book.color-theme-1 .book-summary .book-search {
+  background: transparent;
+}
+.book.color-theme-1 .book-summary .book-search input,
+.book.color-theme-1 .book-summary .book-search input:focus {
+  border: 1px solid transparent;
+}
+.book.color-theme-1 .book-summary ul.summary li.divider {
+  background: #7e888b;
+  box-shadow: none;
+}
+.book.color-theme-1 .book-summary ul.summary li i.fa-check {
+  color: #33cc33;
+}
+.book.color-theme-1 .book-summary ul.summary li.done > a {
+  color: #877f6a;
+}
+.book.color-theme-1 .book-summary ul.summary li a,
+.book.color-theme-1 .book-summary ul.summary li span {
+  color: #877f6a;
+  background: transparent;
+  font-weight: normal;
+}
+.book.color-theme-1 .book-summary ul.summary li.active > a,
+.book.color-theme-1 .book-summary ul.summary li a:hover {
+  color: #704214;
+  background: transparent;
+  font-weight: normal;
+}
+/*
+ * Theme 2
+ */
+.book.color-theme-2 .book-summary {
+  color: #bcc1d2;
+  background: #2d3143;
+  border-right: none;
+}
+.book.color-theme-2 .book-summary .book-search {
+  background: transparent;
+}
+.book.color-theme-2 .book-summary .book-search input,
+.book.color-theme-2 .book-summary .book-search input:focus {
+  border: 1px solid transparent;
+}
+.book.color-theme-2 .book-summary ul.summary li.divider {
+  background: #272a3a;
+  box-shadow: none;
+}
+.book.color-theme-2 .book-summary ul.summary li i.fa-check {
+  color: #33cc33;
+}
+.book.color-theme-2 .book-summary ul.summary li.done > a {
+  color: #62687f;
+}
+.book.color-theme-2 .book-summary ul.summary li a,
+.book.color-theme-2 .book-summary ul.summary li span {
+  color: #c1c6d7;
+  background: transparent;
+  font-weight: 600;
+}
+.book.color-theme-2 .book-summary ul.summary li.active > a,
+.book.color-theme-2 .book-summary ul.summary li a:hover {
+  color: #f4f4f5;
+  background: #252737;
+  font-weight: 600;
+}
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-highlight.css b/dev/r/libs/gitbook-2.6.7/css/plugin-highlight.css
new file mode 100644
index 0000000..2aabd3d
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-highlight.css
@@ -0,0 +1,426 @@
+.book .book-body .page-wrapper .page-inner section.normal pre,
+.book .book-body .page-wrapper .page-inner section.normal code {
+  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+  /* Tomorrow Comment */
+  /* Tomorrow Red */
+  /* Tomorrow Orange */
+  /* Tomorrow Yellow */
+  /* Tomorrow Green */
+  /* Tomorrow Aqua */
+  /* Tomorrow Blue */
+  /* Tomorrow Purple */
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-title {
+  color: #8e908c;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
+  color: #c82829;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
+  color: #f5871f;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
+  color: #eab700;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  color: #718c00;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
+  color: #3e999f;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
+.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
+.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
+.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
+  color: #4271ae;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
+  color: #8959a8;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  background: white;
+  color: #4d4d4c;
+  padding: 0.5em;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
+.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
+.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .css,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  opacity: 0.5;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
+  /*
+
+Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
+
+*/
+  /* Solarized Green */
+  /* Solarized Cyan */
+  /* Solarized Blue */
+  /* Solarized Yellow */
+  /* Solarized Orange */
+  /* Solarized Red */
+  /* Solarized Violet */
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  padding: 0.5em;
+  background: #fdf6e3;
+  color: #657b83;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc {
+  color: #93a1a1;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title {
+  color: #859900;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url {
+  color: #2aa198;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function {
+  color: #268bd2;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference {
+  color: #b58900;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header {
+  color: #cb4b16;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important {
+  color: #dc322f;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label {
+  color: #6c71c4;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula {
+  background: #eee8d5;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
+  /* Tomorrow Night Bright Theme */
+  /* Original theme - https://github.com/chriskempson/tomorrow-theme */
+  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+  /* Tomorrow Comment */
+  /* Tomorrow Red */
+  /* Tomorrow Orange */
+  /* Tomorrow Yellow */
+  /* Tomorrow Green */
+  /* Tomorrow Aqua */
+  /* Tomorrow Blue */
+  /* Tomorrow Purple */
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title {
+  color: #969896;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
+  color: #d54e53;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
+  color: #e78c45;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
+  color: #e7c547;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  color: #b9ca4a;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
+  color: #70c0b1;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
+  color: #7aa6da;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
+  color: #c397d8;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  background: black;
+  color: #eaeaea;
+  padding: 0.5em;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-search.css b/dev/r/libs/gitbook-2.6.7/css/plugin-search.css
new file mode 100644
index 0000000..c85e557
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-search.css
@@ -0,0 +1,31 @@
+.book .book-summary .book-search {
+  padding: 6px;
+  background: transparent;
+  position: absolute;
+  top: -50px;
+  left: 0px;
+  right: 0px;
+  transition: top 0.5s ease;
+}
+.book .book-summary .book-search input,
+.book .book-summary .book-search input:focus,
+.book .book-summary .book-search input:hover {
+  width: 100%;
+  background: transparent;
+  border: 1px solid #ccc;
+  box-shadow: none;
+  outline: none;
+  line-height: 22px;
+  padding: 7px 4px;
+  color: inherit;
+  box-sizing: border-box;
+}
+.book.with-search .book-summary .book-search {
+  top: 0px;
+}
+.book.with-search .book-summary ul.summary {
+  top: 50px;
+}
+.with-search .summary li[data-level] a[href*=".html#"] {
+  display: none;
+}
diff --git a/dev/r/libs/gitbook-2.6.7/css/plugin-table.css b/dev/r/libs/gitbook-2.6.7/css/plugin-table.css
new file mode 100644
index 0000000..7fba1b9
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/plugin-table.css
@@ -0,0 +1 @@
+.book .book-body .page-wrapper .page-inner section.normal table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700}
diff --git a/dev/r/libs/gitbook-2.6.7/css/style.css b/dev/r/libs/gitbook-2.6.7/css/style.css
new file mode 100644
index 0000000..cba69b2
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/css/style.css
@@ -0,0 +1,13 @@
+/*! normalize.css v2.1.0 | MIT License | git.io/normalize */img,legend{border:0}*{-webkit-font-smoothing:antialiased}sub,sup{position:relative}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book-langs-index .inner .languages:after,.buttons:after,.dropdown-menu .buttons:after{clear:both}body,html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}.hidden,[hidden]{display:none}audio:not([controls]){display:none;height:0}html{font-family:sans-serif}body,figure{margin:0}a:focus{outline:dotted thin}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button{margin-right:10px;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}/*!
+ * Preboot v2
+ *
+ * Open sourced under MIT license by @mdo.
+ * Some variables and mixins from Bootstrap (Apache 2 license).
+ */.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}/*!
+ *  Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
+ *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('./fontawesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
+.book .book-header,.book .book-summary{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.book-langs-index{width:100%;height:100%;padding:40px 0;margin:0;overflow:auto}@media (max-width:600px){.book-langs-index{padding:0}}.book-langs-index .inner{max-width:600px;width:100%;margin:0 auto;padding:30px;background:#fff;border-radius:3px}.book-langs-index .inner h3{margin:0}.book-langs-index .inner .languages{list-style:none;padding:20px 30px;margin-top:20px;border-top:1px solid #eee}.book-langs-index .inner .languages:after,.book-langs-index .inner .languages:before{content:" ";display:table;line-height:0}.book-langs-index .inner .languages li{width:50%;float:left;padding:10px 5px;font-size:16px}@media (max-width:600px){.book-langs-index .inner .languages li{width:100%;max-width:100%}}.book .book-header{overflow:visible;height:50px;padding:0 8px;z-index:2;font-size:.85em;color:#7e888b;background:0 0}.book .book-header .btn{display:block;height:50px;padding:0 15px;border-bottom:none;color:#ccc;text-transform:uppercase;line-height:50px;-webkit-box-shadow:none!important;box-shadow:none!important;position:relative;font-size:14px}.book .book-header .btn:hover{position:relative;text-decoration:none;color:#444;background:0 0}.book .book-header h1{margin:0;font-size:20px;font-weight:200;text-align:center;line-height:50px;opacity:0;padding-left:200px;padding-right:200px;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book .book-header h1 a,.book .book-header h1 a:hover{color:inherit;text-decoration:none}@media (max-width:1000px){.book .book-header h1{display:none}}.book .book-header h1 i{display:none}.book .book-header:hover h1{opacity:1}.book.is-loading .book-header h1 i{display:inline-block}.book.is-loading .book-header h1 a{display:none}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;display:none;float:left;min-width:160px;padding:0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:1px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.open{display:block}.dropdown-menu.dropdown-left{left:auto;right:4%}.dropdown-menu.dropdown-left .dropdown-caret{right:14px;left:auto}.dropdown-menu .dropdown-caret{position:absolute;top:-8px;left:14px;width:18px;height:10px;float:left;overflow:hidden}.dropdown-menu .dropdown-caret .caret-inner,.dropdown-menu .dropdown-caret .caret-outer{display:inline-block;top:0;border-left:9px solid transparent;border-right:9px solid transparent;position:absolute}.dropdown-menu .dropdown-caret .caret-outer{border-bottom:9px solid rgba(0,0,0,.1);height:auto;left:0;width:auto;margin-left:-1px}.dropdown-menu .dropdown-caret .caret-inner{margin-top:-1px;top:1px;border-bottom:9px solid #fafafa}.dropdown-menu .buttons{border-bottom:1px solid rgba(0,0,0,.07)}.dropdown-menu .buttons:after,.dropdown-menu .buttons:before{content:" ";display:table;line-height:0}.dropdown-menu .buttons:last-child{border-bottom:none}.dropdown-menu .buttons .button{border:0;background-color:transparent;color:#a6a6a6;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.alert,.dropdown-menu .buttons .button:hover{color:#444}.dropdown-menu .buttons .button:focus,.dropdown-menu .buttons .button:hover{outline:0}.dropdown-menu .buttons .button.size-2{width:50%}.dropdown-menu .buttons .button.size-3{width:33%}.alert{padding:15px;margin-bottom:20px;background:#eee;border-bottom:5px solid #ddd}.alert-success{background:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-info{background:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-danger{background:#f2dede;border-color:#ebccd1;color:#a94442}.alert-warning{background:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.book .book-summary{position:absolute;top:0;left:-300px;bottom:0;z-index:1;width:300px;color:#364149;background:#fafafa;border-right:1px solid rgba(0,0,0,.07);-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-summary ul.summary{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;list-style:none;margin:0;padding:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary ul.summary li{list-style:none}.book .book-summary ul.summary li.divider{height:1px;margin:7px 0;overflow:hidden;background:rgba(0,0,0,.07)}.book .book-summary ul.summary li i.fa-check{display:none;position:absolute;right:9px;top:16px;font-size:9px;color:#3c3}.book .book-summary ul.summary li.done>a{color:#364149;font-weight:400}.book .book-summary ul.summary li.done>a i{display:inline}.book .book-summary ul.summary li a,.book .book-summary ul.summary li span{display:block;padding:10px 15px;border-bottom:none;color:#364149;background:0 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative}.book .book-summary ul.summary li span{cursor:not-allowed;opacity:.3;filter:alpha(opacity=30)}.book .book-summary ul.summary li a:hover,.book .book-summary ul.summary li.active>a{color:#008cff;background:0 0;text-decoration:none}.book .book-summary ul.summary li ul{padding-left:20px}@media (max-width:600px){.book .book-summary{width:calc(100% - 60px);bottom:0;left:-100%}}.book.with-summary .book-summary{left:0}.book.without-animation .book-summary{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book{position:relative;width:100%;height:100%}.book .book-body,.book .book-body .body-inner{position:absolute;top:0;left:0;overflow-y:auto;bottom:0;right:0}.book .book-body{color:#000;background:#fff;-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-body .page-wrapper{position:relative;outline:0}.book .book-body .page-wrapper .page-inner{max-width:800px;margin:0 auto;padding:20px 0 40px}.book .book-body .page-wrapper .page-inner section{margin:0;padding:5px 15px;background:#fff;border-radius:2px;line-height:1.7;font-size:1.6rem}.book .book-body .page-wrapper .page-inner .btn-group .btn{border-radius:0;background:#eee;border:0}@media (max-width:1240px){.book .book-body{-webkit-transition:-webkit-transform 250ms ease;-moz-transition:-moz-transform 250ms ease;-o-transition:-o-transform 250ms ease;transition:transform 250ms ease;padding-bottom:20px}.book .book-body .body-inner{position:static;min-height:calc(100% - 50px)}}@media (min-width:600px){.book.with-summary .book-body{left:300px}}@media (max-width:600px){.book.with-summary{overflow:hidden}.book.with-summary .book-body{-webkit-transform:translate(calc(100% - 60px),0);-moz-transform:translate(calc(100% - 60px),0);-ms-transform:translate(calc(100% - 60px),0);-o-transform:translate(calc(100% - 60px),0);transform:translate(calc(100% - 60px),0)}}.book.without-animation .book-body{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.buttons:after,.buttons:before{content:" ";display:table;line-height:0}.button{border:0;background:#eee;color:#666;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.button:hover{color:#444}.button:focus,.button:hover{outline:0}.button.size-2{width:50%}.button.size-3{width:33%}.book .book-body .page-wrapper .page-inner section{display:none}.book .book-body .page-wrapper .page-inner section.normal{display:block;word-wrap:break-word;overflow:hidden;color:#333;line-height:1.7;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%}.book .book-body .page-wrapper .page-inner section.normal *{box-sizing:border-box;-webkit-box-sizing:border-box;}.book .book-body .page-wrapper .page-inner section.normal>:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal>:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal figure,.book .book-body .page-wrapper .page-inner section.normal img,.book .book-body .page-wrapper .page-inner section.normal pre,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal tr{page-break-inside:avoid}.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal p{orphans:3;widows:3}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5{page-break-after:avoid}.book .book-body .page-wrapper .page-inner section.normal b,.book .book-body .page-wrapper .page-inner section.normal strong{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal em{font-style:italic}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal dl,.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal p,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal ul{margin-top:0;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal a{color:#4183c4;text-decoration:none;background:0 0}.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:focus,.book .book-body .page-wrapper .page-inner section.normal a:hover{outline:0;text-decoration:underline}.book .book-body .page-wrapper .page-inner section.normal img{border:0;max-width:100%}.book .book-body .page-wrapper .page-inner section.normal hr{height:4px;padding:0;margin:1.7em 0;overflow:hidden;background-color:#e7e7e7;border:none}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book .book-body .page-wrapper .page-inner section.normal hr:before{display:table;content:" "}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{margin-top:1.275em;margin-bottom:.85em;}.book .book-body .page-wrapper .page-inner section.normal h1{font-size:2em}.book .book-body .page-wrapper .page-inner section.normal h2{font-size:1.75em}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:1.5em}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:1.25em}.book .book-body .page-wrapper .page-inner section.normal h5{font-size:1em}.book .book-body .page-wrapper .page-inner section.normal h6{font-size:1em;color:#777}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none;color:inherit}.book .book-body .page-wrapper .page-inner section.normal pre{overflow:auto;word-wrap:normal;margin:0 0 1.275em;padding:.85em 1em;background:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.book .book-body .page-wrapper .page-inner section.normal pre>code:after,.book .book-body .page-wrapper .page-inner section.normal pre>code:before{content:normal}.book .book-body .page-wrapper .page-inner section.normal code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal code:after,.book .book-body .page-wrapper .page-inner section.normal code:before{letter-spacing:-.2em;content:"\00a0"}.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal ul{padding:0 0 0 2em;margin:0 0 .85em}.book .book-body .page-wrapper .page-inner section.normal ol ol,.book .book-body .page-wrapper .page-inner section.normal ol ul,.book .book-body .page-wrapper .page-inner section.normal ul ol,.book .book-body .page-wrapper .page-inner section.normal ul ul{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal ol ol{list-style-type:lower-roman}.book .book-body .page-wrapper .page-inner section.normal blockquote{margin:0 0 .85em;padding:0 15px;opacity:0.75;border-left:4px solid #dcdcdc}.book .book-body .page-wrapper .page-inner section.normal blockquote:first-child{margin-top:0}.book .book-body .page-wrapper .page-inner section.normal blockquote:last-child{margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal dl{padding:0}.book .book-body .page-wrapper .page-inner section.normal dl dt{padding:0;margin-top:.85em;font-style:italic;font-weight:700}.book .book-body .page-wrapper .page-inner section.normal dl dd{padding:0 .85em;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal dd{margin-left:0}.book .book-body .page-wrapper .page-inner section.normal .glossary-term{cursor:help;text-decoration:underline}.book .book-body .navigation{position:absolute;top:50px;bottom:0;margin:0;max-width:150px;min-width:90px;display:flex;justify-content:center;align-content:center;flex-direction:column;font-size:40px;color:#ccc;text-align:center;-webkit-transition:all 350ms ease;-moz-transition:all 350ms ease;-o-transition:all 350ms ease;transition:all 350ms ease}.book .book-body .navigation:hover{text-decoration:none;color:#444}.book .book-body .navigation.navigation-next{right:0}.book .book-body .navigation.navigation-prev{left:0}@media (max-width:1240px){.book .book-body .navigation{position:static;top:auto;max-width:50%;width:50%;display:inline-block;float:left}.book .book-body .navigation.navigation-unique{max-width:100%;width:100%}}.book .book-body .page-wrapper .page-inner section.glossary{margin-bottom:40px}.book .book-body .page-wrapper .page-inner section.glossary h2 a,.book .book-body .page-wrapper .page-inner section.glossary h2 a:hover{color:inherit;text-decoration:none}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index{list-style:none;margin:0;padding:0}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:auto;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none}a{text-decoration:none}body,html{height:100%}html{font-size:62.5%}body{text-rendering:optimizeLegibility;font-smoothing:antialiased;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:.2px;text-size-adjust:100%}
+.book .book-summary ul.summary li a span {display:inline;padding:initial;overflow:visible;cursor:auto;opacity:1;}
+/* show arrow before summary tag as in bootstrap */
+details > summary {display:list-item;cursor:pointer;}
diff --git a/dev/r/libs/gitbook-2.6.7/js/app.min.js b/dev/r/libs/gitbook-2.6.7/js/app.min.js
new file mode 100644
index 0000000..643f1f9
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/app.min.js
@@ -0,0 +1 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=jQuery}},{}],2:[function(require,module,exports){(function(global){(function(){var undefined;var VERSION="3.10.1";var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256;var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...";var HOT_COUNT=150,HOT_SPAN=16;var LARGE_ARRAY_SIZE=200;var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2;var FUNC_ERROR_TEXT="Expected a function";var PLACEHOLDER="__lodash_placeholder__";var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEscapedHtml=/&(?:amp|lt|gt|quot|#39|#96);/g,reUnescapedHtml=/[&<>"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;var reRegExpChars=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,reHasRegExpChars=RegExp(reRegExpChars.source);var reComboMark=/[\u0300-\u036f\ufe20-\ufe23]/g;var reEscapeChar=/\\(\\)?/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reHasHexPrefix=/^0[xX]/;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsUint=/^\d+$/;var reLatin1=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;var reNoMatch=/($^)/;var reUnescapedString=/['\n\r\u2028\u2029\\]/g;var reWords=function(){var upper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lower="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(upper+"+(?="+upper+lower+")|"+upper+"?"+lower+"|"+upper+"+|[0-9]+","g")}();var contextProps=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"];var templateCounter=-1;var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=false;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"};var htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"};var htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"};var objectTypes={function:true,object:true};var regexpEscapes={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global&&global.Object&&global;var freeSelf=objectTypes[typeof self]&&self&&self.Object&&self;var freeWindow=objectTypes[typeof window]&&window&&window.Object&&window;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this;function baseCompareAscending(value,other){if(value!==other){var valIsNull=value===null,valIsUndef=value===undefined,valIsReflexive=value===value;var othIsNull=other===null,othIsUndef=other===undefined,othIsReflexive=other===other;if(value>other&&!othIsNull||!valIsReflexive||valIsNull&&!othIsUndef&&othIsReflexive||valIsUndef&&othIsReflexive){return 1}if(value<other&&!valIsNull||!othIsReflexive||othIsNull&&!valIsUndef&&valIsReflexive||othIsUndef&&valIsReflexive){return-1}}return 0}function baseFindIndex(array,predicate,fromRight){var length=array.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIndexOf(array,value,fromIndex){if(value!==value){return indexOfNaN(array,fromIndex)}var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function baseIsFunction(value){return typeof value=="function"||false}function baseToString(value){return value==null?"":value+""}function charsLeftIndex(string,chars){var index=-1,length=string.length;while(++index<length&&chars.indexOf(string.charAt(index))>-1){}return index}function charsRightIndex(string,chars){var index=string.length;while(index--&&chars.indexOf(string.charAt(index))>-1){}return index}function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=baseCompareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result}var order=orders[index];return result*(order==="asc"||order===true?1:-1)}}return object.index-other.index}function deburrLetter(letter){return deburredLetters[letter]}function escapeHtmlChar(chr){return htmlEscapes[chr]}function escapeRegExpChar(chr,leadingChar,whitespaceChar){if(leadingChar){chr=regexpEscapes[chr]}else if(whitespaceChar){chr=stringEscapes[chr]}return"\\"+chr}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function indexOfNaN(array,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?0:-1);while(fromRight?index--:++index<length){var other=array[index];if(other!==other){return index}}return-1}function isObjectLike(value){return!!value&&typeof value=="object"}function isSpace(charCode){return charCode<=160&&(charCode>=9&&charCode<=13)||charCode==32||charCode==160||charCode==5760||charCode==6158||charCode>=8192&&(charCode<=8202||charCode==8232||charCode==8233||charCode==8239||charCode==8287||charCode==12288||charCode==65279)}function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){if(array[index]===placeholder){array[index]=PLACEHOLDER;result[++resIndex]=index}}return result}function sortedUniq(array,iteratee){var seen,index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(!index||seen!==computed){seen=computed;result[++resIndex]=value}}return result}function trimmedLeftIndex(string){var index=-1,length=string.length;while(++index<length&&isSpace(string.charCodeAt(index))){}return index}function trimmedRightIndex(string){var index=string.length;while(index--&&isSpace(string.charCodeAt(index))){}return index}function unescapeHtmlChar(chr){return htmlUnescapes[chr]}function runInContext(context){context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;var arrayProto=Array.prototype,objectProto=Object.prototype,stringProto=String.prototype;var fnToString=Function.prototype.toString;var hasOwnProperty=objectProto.hasOwnProperty;var idCounter=0;var objToString=objectProto.toString;var oldDash=root._;var reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ArrayBuffer=context.ArrayBuffer,clearTimeout=context.clearTimeout,parseFloat=context.parseFloat,pow=Math.pow,propertyIsEnumerable=objectProto.propertyIsEnumerable,Set=getNative(context,"Set"),setTimeout=context.setTimeout,splice=arrayProto.splice,Uint8Array=context.Uint8Array,WeakMap=getNative(context,"WeakMap");var nativeCeil=Math.ceil,nativeCreate=getNative(Object,"create"),nativeFloor=Math.floor,nativeIsArray=getNative(Array,"isArray"),nativeIsFinite=context.isFinite,nativeKeys=getNative(Object,"keys"),nativeMax=Math.max,nativeMin=Math.min,nativeNow=getNative(Date,"now"),nativeParseInt=context.parseInt,nativeRandom=Math.random;var NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,POSITIVE_INFINITY=Number.POSITIVE_INFINITY;var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;var MAX_SAFE_INTEGER=9007199254740991;var metaMap=WeakMap&&new WeakMap;var realNames={};function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty.call(value,"__chain__")&&hasOwnProperty.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}function baseLodash(){}function LodashWrapper(value,chainAll,actions){this.__wrapped__=value;this.__actions__=actions||[];this.__chain__=!!chainAll}var support=lodash.support={};lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=POSITIVE_INFINITY;this.__views__=[]}function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=arrayCopy(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=arrayCopy(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=arrayCopy(this.__views__);return result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true}else{result=this.clone();result.__dir__*=-1}return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||arrLength<LARGE_ARRAY_SIZE||arrLength==length&&takeCount==length){return baseWrapperValue(isRight&&isArr?array.reverse():array,this.__actions__)}var result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer}else{break outer}}}result[resIndex++]=value}return result}function MapCache(){this.__data__={}}function mapDelete(key){return this.has(key)&&delete this.__data__[key]}function mapGet(key){return key=="__proto__"?undefined:this.__data__[key]}function mapHas(key){return key!="__proto__"&&hasOwnProperty.call(this.__data__,key)}function mapSet(key,value){if(key!="__proto__"){this.__data__[key]=value}return this}function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}function cacheIndexOf(cache,value){var data=cache.data,result=typeof value=="string"||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}function cachePush(value){var data=this.data;if(typeof value=="string"||isObject(value)){data.set.add(value)}else{data.hash[value]=true}}function arrayConcat(array,other){var index=-1,length=array.length,othIndex=-1,othLength=other.length,result=Array(length+othLength);while(++index<length){result[index]=array[index]}while(++othIndex<othLength){result[index++]=other[othIndex]}return result}function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function arrayEach(array,iteratee){var index=-1,length=array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function arrayEachRight(array,iteratee){var length=array.length;while(length--){if(iteratee(array[length],length,array)===false){break}}return array}function arrayEvery(array,predicate){var index=-1,length=array.length;while(++index<length){if(!predicate(array[index],index,array)){return false}}return true}function arrayExtremum(array,iteratee,comparator,exValue){var index=-1,length=array.length,computed=exValue,result=computed;while(++index<length){var value=array[index],current=+iteratee(value);if(comparator(current,computed)){computed=current;result=value}}return result}function arrayFilter(array,predicate){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[++resIndex]=value}}return result}function arrayMap(array,iteratee){var index=-1,length=array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}function arrayReduce(array,iteratee,accumulator,initFromArray){var index=-1,length=array.length;if(initFromArray&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function arrayReduceRight(array,iteratee,accumulator,initFromArray){var length=array.length;if(initFromArray&&length){accumulator=array[--length]}while(length--){accumulator=iteratee(accumulator,array[length],length,array)}return accumulator}function arraySome(array,predicate){var index=-1,length=array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}function arraySum(array,iteratee){var length=array.length,result=0;while(length--){result+=+iteratee(array[length])||0}return result}function assignDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:objectValue}function assignOwnDefaults(objectValue,sourceValue,key,object){return objectValue===undefined||!hasOwnProperty.call(object,key)?sourceValue:objectValue}function assignWith(object,source,customizer){var index=-1,props=keys(source),length=props.length;while(++index<length){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);if((result===result?result!==value:value===value)||value===undefined&&!(key in object)){object[key]=result}}return object}function baseAssign(object,source){return source==null?object:baseCopy(source,keys(source),object)}function baseAt(collection,props){var index=-1,isNil=collection==null,isArr=!isNil&&isArrayLike(collection),length=isArr?collection.length:0,propsLength=props.length,result=Array(propsLength);while(++index<propsLength){var key=props[index];if(isArr){result[index]=isIndex(key,length)?collection[key]:undefined}else{result[index]=isNil?undefined:collection[key]}}return result}function baseCopy(source,props,object){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;if(type=="function"){return thisArg===undefined?func:bindCallback(func,thisArg,argCount)}if(func==null){return identity}if(type=="object"){return baseMatches(func)}return thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer){result=object?customizer(value,key,object):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return arrayCopy(value,result)}}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag==objectTag||tag==argsTag||isFunc&&!object){result=initCloneObject(isFunc?{}:value);if(!isDeep){return baseAssign(result,value)}}else{return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{}}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}stackA.push(value);stackB.push(result);(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)});return result}var baseCreate=function(){function object(){}return function(prototype){if(isObject(prototype)){object.prototype=prototype;var result=new object;object.prototype=undefined}return result||{}}}();function baseDelay(func,wait,args){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values){var length=array?array.length:0,result=[];if(!length){return result}var index=-1,indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,cache=isCommon&&values.length>=LARGE_ARRAY_SIZE?createCache(values):null,valuesLength=values.length;if(cache){indexOf=cacheIndexOf;isCommon=false;values=cache}outer:while(++index<length){var value=array[index];if(isCommon&&value===value){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===value){continue outer}}result.push(value)}else if(indexOf(values,value,0)<0){result.push(value)}}return result}var baseEach=createBaseEach(baseForOwn);var baseEachRight=createBaseEach(baseForOwnRight,true);function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result});return result}function baseExtremum(collection,iteratee,comparator,exValue){var computed=exValue,result=computed;baseEach(collection,function(value,index,collection){var current=+iteratee(value,index,collection);if(comparator(current,computed)||current===exValue&&current===result){computed=current;result=value}});return result}function baseFill(array,value,start,end){var length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end>>>0;start>>>=0;while(start<length){array[start++]=value}return array}function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value)}});return result}function baseFind(collection,predicate,eachFunc,retKey){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=retKey?key:value;return false}});return result}function baseFlatten(array,isDeep,isStrict,result){result||(result=[]);var index=-1,length=array.length;while(++index<length){var value=array[index];if(isObjectLike(value)&&isArrayLike(value)&&(isStrict||isArray(value)||isArguments(value))){if(isDeep){baseFlatten(value,isDeep,isStrict,result)}else{arrayPush(result,value)}}else if(!isStrict){result[result.length]=value}}return result}var baseFor=createBaseFor();var baseForRight=createBaseFor(true);function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return baseForRight(object,iteratee,keys)}function baseFunctions(object,props){var index=-1,length=props.length,resIndex=-1,result=[];while(++index<length){var key=props[index];if(isFunction(object[key])){result[++resIndex]=key}}return result}function baseGet(object,path,pathKey){if(object==null){return}if(pathKey!==undefined&&pathKey in toObject(object)){path=[pathKey]}var index=0,length=path.length;while(object!=null&&index<length){object=object[path[index++]]}return index&&index==length?object:undefined}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other){return true}if(value==null||other==null||!isObject(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;if(!objIsArr){objTag=objToString.call(object);if(objTag==argsTag){objTag=objectTag}else if(objTag!=objectTag){objIsArr=isTypedArray(object)}}if(!othIsArr){othTag=objToString.call(other);if(othTag==argsTag){othTag=objectTag}else if(othTag!=objectTag){othIsArr=isTypedArray(other)}}var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!(objIsArr||objIsObj)){return equalByTag(object,other,objTag)}if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}}if(!isSameTag){return false}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==object){return stackB[length]==other}}stackA.push(object);stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);stackA.pop();stackB.pop();return result}function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=toObject(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false}}else{var result=customizer?customizer(objValue,srcValue,key):undefined;if(!(result===undefined?baseIsEqual(srcValue,objValue,customizer,true):result)){return false}}}return true}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)});return result}function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){var key=matchData[0][0],value=matchData[0][1];return function(object){if(object==null){return false}return object[key]===value&&(value!==undefined||key in toObject(object))}}return function(object){return baseIsMatch(object,matchData)}}function baseMatchesProperty(path,srcValue){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(srcValue),pathKey=path+"";path=toPath(path);return function(object){if(object==null){return false}var key=pathKey;object=toObject(object);if((isArr||!isCommon)&&!(key in object)){object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));if(object==null){return false}key=last(path);object=toObject(object)}return object[key]===srcValue?srcValue!==undefined||key in object:baseIsEqual(srcValue,object[key],undefined,true)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object)){return object}var isSrcArr=isArrayLike(source)&&(isArray(source)||isTypedArray(source)),props=isSrcArr?undefined:keys(source);arrayEach(props||source,function(srcValue,key){if(props){key=srcValue;srcValue=source[key]}if(isObjectLike(srcValue)){stackA||(stackA=[]);stackB||(stackB=[]);baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB)}else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;if(isCommon){result=srcValue}if((result!==undefined||isSrcArr&&!(key in object))&&(isCommon||(result===result?result!==value:value===value))){object[key]=result}}});return object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){var length=stackA.length,srcValue=source[key];while(length--){if(stackA[length]==srcValue){object[key]=stackB[length];return}}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;if(isCommon){result=srcValue;if(isArrayLike(srcValue)&&(isArray(srcValue)||isTypedArray(srcValue))){result=isArray(value)?value:isArrayLike(value)?arrayCopy(value):[]}else if(isPlainObject(srcValue)||isArguments(srcValue)){result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}}else{isCommon=false}}stackA.push(srcValue);stackB.push(result);if(isCommon){object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB)}else if(result===result?result!==value:value===value){object[key]=result}}function baseProperty(key){return function(object){return object==null?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";path=toPath(path);return function(object){return baseGet(object,path,pathKey)}}function basePullAt(array,indexes){var length=array?indexes.length:0;while(length--){var index=indexes[length];if(index!=previous&&isIndex(index)){var previous=index;splice.call(array,index,1)}}return array}function baseRandom(min,max){return min+nativeFloor(nativeRandom()*(max-min+1))}function baseReduce(collection,iteratee,accumulator,initFromCollection,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initFromCollection?(initFromCollection=false,value):iteratee(accumulator,value,index,collection)});return accumulator}var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};function baseSlice(array,start,end){var index=-1,length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}function baseSortByOrder(collection,iteratees,orders){var callback=getCallback(),index=-1;iteratees=arrayMap(iteratees,function(iteratee){return callback(iteratee)});var result=baseMap(collection,function(value){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function baseSum(collection,iteratee){var result=0;baseEach(collection,function(value,index,collection){result+=+iteratee(value,index,collection)||0});return result}function baseUniq(array,iteratee){var index=-1,indexOf=getIndexOf(),length=array.length,isCommon=indexOf==baseIndexOf,isLarge=isCommon&&length>=LARGE_ARRAY_SIZE,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(indexOf(seen,computed,0)<0){if(iteratee||isLarge){seen.push(computed)}result.push(value)}}return result}function baseValues(object,props){var index=-1,length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value()}var index=-1,length=actions.length;while(++index<length){var action=actions[index];result=action.func.apply(action.thisArg,arrayPush([result],action.args))}return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(typeof value=="number"&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if((retHighest?computed<=value:computed<value)&&computed!==null){low=mid+1}else{high=mid}}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsNull=value===null,valIsUndef=value===undefined;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),isDef=computed!==undefined,isReflexive=computed===computed;if(valIsNaN){var setLow=isReflexive||retHighest}else if(valIsNull){setLow=isReflexive&&isDef&&(retHighest||computed!=null)}else if(valIsUndef){setLow=isReflexive&&(retHighest||isDef)}else if(computed==null){setLow=false}else{setLow=retHighest?computed<=value:computed<value}if(setLow){low=mid+1}else{high=mid}}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(thisArg===undefined){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){var result=new ArrayBuffer(buffer.byteLength),view=new Uint8Array(result);view.set(new Uint8Array(buffer));return result}function composeArgs(args,partials,holders){var holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),leftIndex=-1,leftLength=partials.length,result=Array(leftLength+argsLength);while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){result[holders[argsIndex]]=args[argsIndex]}while(argsLength--){result[leftIndex++]=args[argsIndex++]}return result}function composeArgsRight(args,partials,holders){var holdersIndex=-1,holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),rightIndex=-1,rightLength=partials.length,result=Array(argsLength+rightLength);while(++argsIndex<argsLength){result[argsIndex]=args[argsIndex]}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){result[offset+holders[holdersIndex]]=args[argsIndex++]}return result}function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};iteratee=getCallback(iteratee,thisArg,3);if(isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}}else{baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)})}return result}}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=object==null?0:sources.length,customizer=length>2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;if(typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=typeof thisArg=="function"?thisArg:undefined;length-=customizer?1:0}if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}while(++index<length){var source=sources[index];if(source){assigner(object,source,customizer)}}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length)){return eachFunc(collection,iteratee)}var index=fromRight?length:-1,iterable=toObject(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){var key=props[index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}function createBindWrapper(func,thisArg){var Ctor=createCtorWrapper(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(thisArg,arguments)}return wrapper}function createCache(values){return nativeCreate&&Set?new SetCache(values):null}function createCompounder(callback){return function(string){var index=-1,array=words(deburr(string)),length=array.length,result="";while(++index<length){result=callback(result,array[index],index)}return result}}function createCtorWrapper(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(flag){function curryFunc(func,arity,guard){if(guard&&isIterateeCall(func,arity,guard)){arity=undefined}var result=createWrapper(func,flag,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curryFunc.placeholder;return result}return curryFunc}function createDefaults(assigner,customizer){return restParam(function(args){var object=args[0];if(object==null){return object}args.push(customizer);return assigner.apply(undefined,args)})}function createExtremum(comparator,exValue){return function(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}iteratee=getCallback(iteratee,thisArg,3);if(iteratee.length==1){collection=isArray(collection)?collection:toIterable(collection);var result=arrayExtremum(collection,iteratee,comparator,exValue);if(!(collection.length&&result===exValue)){return result}}return baseExtremum(collection,iteratee,comparator,exValue)}}function createFind(eachFunc,fromRight){return function(collection,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);if(isArray(collection)){var index=baseFindIndex(collection,predicate,fromRight);return index>-1?collection[index]:undefined}return baseFind(collection,predicate,eachFunc)}}function createFindIndex(fromRight){return function(array,predicate,thisArg){if(!(array&&array.length)){return-1}predicate=getCallback(predicate,thisArg,3);return baseFindIndex(array,predicate,fromRight)}}function createFindKey(objectFunc){return function(object,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(object,predicate,objectFunc,true)}}function createFlow(fromRight){return function(){var wrapper,length=arguments.length,index=fromRight?length:-1,leftIndex=0,funcs=Array(length);while(fromRight?index--:++index<length){var func=funcs[leftIndex++]=arguments[index];if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(!wrapper&&LodashWrapper.prototype.thru&&getFuncName(func)=="wrapper"){wrapper=new LodashWrapper([],true)}}index=wrapper?-1:length;while(++index<length){func=funcs[index];var funcName=getFuncName(func),data=funcName=="wrapper"?getData(func):undefined;if(data&&isLaziable(data[0])&&data[1]==(ARY_FLAG|CURRY_FLAG|PARTIAL_FLAG|REARG_FLAG)&&!data[4].length&&data[9]==1){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3])}else{wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}}return function(){var args=arguments,value=args[0];if(wrapper&&args.length==1&&isArray(value)&&value.length>=LARGE_ARRAY_SIZE){return wrapper.plant(value).value()}var index=0,result=length?funcs[index].apply(this,args):value;while(++index<length){result=funcs[index].call(this,result)}return result}}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return typeof iteratee=="function"&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function createForIn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||thisArg!==undefined){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee,keysIn)}}function createForOwn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||thisArg!==undefined){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee)}}function createObjectMapper(isMapKeys){return function(object,iteratee,thisArg){var result={};iteratee=getCallback(iteratee,thisArg,3);baseForOwn(object,function(value,key,object){var mapped=iteratee(value,key,object);key=isMapKeys?mapped:key;value=isMapKeys?value:mapped;result[key]=value});return result}}function createPadDir(fromRight){return function(string,length,chars){string=baseToString(string);return(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}function createPartial(flag){var partialFunc=restParam(function(func,partials){var holders=replaceHolders(partials,partialFunc.placeholder);return createWrapper(func,flag,undefined,partials,holders)});return partialFunc}function createReduce(arrayFunc,eachFunc){return function(collection,iteratee,accumulator,thisArg){var initFromArray=arguments.length<3;return typeof iteratee=="function"&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee,accumulator,initFromArray):baseReduce(collection,getCallback(iteratee,thisArg,4),accumulator,initFromArray,eachFunc)}}function createHybridWrapper(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&ARY_FLAG,isBind=bitmask&BIND_FLAG,isBindKey=bitmask&BIND_KEY_FLAG,isCurry=bitmask&CURRY_FLAG,isCurryBound=bitmask&CURRY_BOUND_FLAG,isCurryRight=bitmask&CURRY_RIGHT_FLAG,Ctor=isBindKey?undefined:createCtorWrapper(func);function wrapper(){var length=arguments.length,index=length,args=Array(length);while(index--){args[index]=arguments[index]}if(partials){args=composeArgs(args,partials,holders)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight)}if(isCurry||isCurryRight){var placeholder=wrapper.placeholder,argsHolders=replaceHolders(args,placeholder);length-=argsHolders.length;if(length<arity){var newArgPos=argPos?arrayCopy(argPos):undefined,newArity=nativeMax(arity-length,0),newsHolders=isCurry?argsHolders:undefined,newHoldersRight=isCurry?undefined:argsHolders,newPartials=isCurry?args:undefined,newPartialsRight=isCurry?undefined:args;bitmask|=isCurry?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG);if(!isCurryBound){bitmask&=~(BIND_FLAG|BIND_KEY_FLAG)}var newData=[func,bitmask,thisArg,newPartials,newsHolders,newPartialsRight,newHoldersRight,newArgPos,ary,newArity],result=createHybridWrapper.apply(undefined,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return result}}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;if(argPos){args=reorder(args,argPos)}if(isAry&&ary<args.length){args.length=ary}if(this&&this!==root&&this instanceof wrapper){fn=Ctor||createCtorWrapper(func)}return fn.apply(thisBinding,args)}return wrapper}function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}function createPartialWrapper(func,bitmask,thisArg,partials){var isBind=bitmask&BIND_FLAG,Ctor=createCtorWrapper(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength);while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,args)}return wrapper}function createRound(methodName){var func=Math[methodName];return function(number,precision){precision=precision===undefined?0:+precision||0;if(precision){precision=pow(10,precision);return func(number*precision)/precision}return func(number)}}function createSortedIndex(retHighest){return function(array,value,iteratee,thisArg){var callback=getCallback(iteratee);return iteratee==null&&callback===baseCallback?binaryIndex(array,value,retHighest):binaryIndexBy(array,value,callback(iteratee,thisArg,1),retHighest)}}function createWrapper(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var length=partials?partials.length:0;if(!length){bitmask&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG);partials=holders=undefined}length-=holders?holders.length:0;if(bitmask&PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data);bitmask=newData[1];arity=newData[9]}newData[9]=arity==null?isBindKey?0:func.length:nativeMax(arity-length,0)||0;if(bitmask==BIND_FLAG){var result=createBindWrapper(newData[0],newData[2])}else if((bitmask==PARTIAL_FLAG||bitmask==(BIND_FLAG|PARTIAL_FLAG))&&!newData[4].length){result=createPartialWrapper.apply(undefined,newData)}else{result=createHybridWrapper.apply(undefined,newData)}var setter=data?baseSetData:setData;return setter(result,newData)}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength)){return false}while(++index<arrLength){var arrValue=array[index],othValue=other[index],result=customizer?customizer(isLoose?othValue:arrValue,isLoose?arrValue:othValue,index):undefined;if(result!==undefined){if(result){continue}return false}if(isLoose){if(!arraySome(other,function(othValue){return arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)})){return false}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))){return false}}return true}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==+other;case regexpTag:case stringTag:return object==other+""}return false}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isLoose?key in other:hasOwnProperty.call(other,key))){return false}}var skipCtor=isLoose;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key],result=customizer?customizer(isLoose?othValue:objValue,isLoose?objValue:othValue,key):undefined;if(!(result===undefined?equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB):result)){return false}skipCtor||(skipCtor=key=="constructor")}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){return false}}return true}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;result=result===callback?baseCallback:result;return argCount?result(func,thisArg,argCount):result}var getData=!metaMap?noop:function(func){return metaMap.get(func)};function getFuncName(func){var result=func.name,array=realNames[result],length=array?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;result=result===indexOf?baseIndexOf:result;return collection?result(collection,target,fromIndex):result}var getLength=baseProperty("length");function getMatchData(object){var result=pairs(object),length=result.length;while(length--){result[length][2]=isStrictComparable(result[length][1])}return result}function getNative(object,key){var value=object==null?undefined:object[key];return isNative(value)?value:undefined}function getView(start,end,transforms){var index=-1,length=transforms.length;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size);break}}return{start:start,end:end}}function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}function initCloneObject(object){var Ctor=object.constructor;if(!(typeof Ctor=="function"&&Ctor instanceof Ctor)){Ctor=Object}return new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function invokePath(object,path,args){if(object!=null&&!isKey(path,object)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));path=last(path)}var func=object==null?object:object[path];return func==null?undefined:func.apply(object,args)}function isArrayLike(value){return value!=null&&isLength(getLength(value))}function isIndex(value,length){value=typeof value=="number"||reIsUint.test(value)?+value:-1;length=length==null?MAX_SAFE_INTEGER:length;return value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){var other=object[index];return value===value?value===other:other!==other}return false}function isKey(value,object){var type=typeof value;if(type=="string"&&reIsPlainProp.test(value)||type=="number"){return true}if(isArray(value)){return false}var result=!reIsDeepProp.test(value);return result||object!=null&&value in toObject(object)}function isLaziable(func){var funcName=getFuncName(func);if(!(funcName in LazyWrapper.prototype)){return false}var other=lodash[funcName];if(func===other){return true}var data=getData(other);return!!data&&func===data[0]}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isStrictComparable(value){return value===value&&!isObject(value)}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<ARY_FLAG;var isCombo=srcBitmask==ARY_FLAG&&bitmask==CURRY_FLAG||srcBitmask==ARY_FLAG&&bitmask==REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(ARY_FLAG|REARG_FLAG)&&bitmask==CURRY_FLAG;if(!(isCommon||isCombo)){return data}if(srcBitmask&BIND_FLAG){data[2]=source[2];newBitmask|=bitmask&BIND_FLAG?0:CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):arrayCopy(value);data[4]=partials?replaceHolders(data[3],PLACEHOLDER):arrayCopy(source[4])}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):arrayCopy(value);data[6]=partials?replaceHolders(data[5],PLACEHOLDER):arrayCopy(source[6])}value=source[7];if(value){data[7]=arrayCopy(value)}if(srcBitmask&ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}function mergeDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:merge(objectValue,sourceValue,mergeDefaults)}function pickByArray(object,props){object=toObject(object);var index=-1,length=props.length,result={};while(++index<length){var key=props[index];if(key in object){result[key]=object[key]}}return result}function pickByCallback(object,predicate){var result={};baseForIn(object,function(value,key,object){if(predicate(value,key,object)){result[key]=value}});return result}function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=arrayCopy(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}var setData=function(){var count=0,lastCalled=0;return function(key,value){var stamp=now(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return key}}else{count=0}return baseSetData(key,value)}}();function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object));var index=-1,result=[];while(++index<propsLength){var key=props[index];if(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key)){result.push(key)}}return result}function toIterable(value){if(value==null){return[]}if(!isArrayLike(value)){return values(value)}return isObject(value)?value:Object(value)}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value)){return value}var result=[];baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)});return result}function wrapperClone(wrapper){return wrapper instanceof LazyWrapper?wrapper.clone():new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__,arrayCopy(wrapper.__actions__))}function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size==null){size=1}else{size=nativeMax(nativeFloor(size)||1,1)}var index=0,length=array?array.length:0,resIndex=-1,result=Array(nativeCeil(length/size));while(index<length){result[++resIndex]=baseSlice(array,index,index+=size)}return result}function compact(array){var index=-1,length=array?array.length:0,resIndex=-1,result=[];while(++index<length){var value=array[index];if(value){result[++resIndex]=value}}return result}var difference=restParam(function(array,values){return isObjectLike(array)&&isArrayLike(array)?baseDifference(array,baseFlatten(values,false,true)):[]});function drop(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,n<0?0:n)}function dropRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,0,n<0?0:n)}function dropRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true,true):[]}function dropWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true):[]}function fill(array,value,start,end){var length=array?array.length:0;if(!length){return[]}if(start&&typeof start!="number"&&isIterateeCall(array,value,start)){start=0;end=length}return baseFill(array,value,start,end)}var findIndex=createFindIndex();var findLastIndex=createFindIndex(true);function first(array){return array?array[0]:undefined}function flatten(array,isDeep,guard){var length=array?array.length:0;if(guard&&isIterateeCall(array,isDeep,guard)){isDeep=false}return length?baseFlatten(array,isDeep):[]}function flattenDeep(array){var length=array?array.length:0;return length?baseFlatten(array,true):[]}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex}else if(fromIndex){var index=binaryIndex(array,value);if(index<length&&(value===value?value===array[index]:array[index]!==array[index])){return index}return-1}return baseIndexOf(array,value,fromIndex||0)}function initial(array){return dropRight(array,1)}var intersection=restParam(function(arrays){var othLength=arrays.length,othIndex=othLength,caches=Array(length),indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,result=[];while(othIndex--){var value=arrays[othIndex]=isArrayLike(value=arrays[othIndex])?value:[];caches[othIndex]=isCommon&&value.length>=120?createCache(othIndex&&value):null}var array=arrays[0],index=-1,length=array?array.length:0,seen=caches[0];outer:while(++index<length){value=array[index];if((seen?cacheIndexOf(seen,value):indexOf(result,value,0))<0){var othIndex=othLength;while(--othIndex){var cache=caches[othIndex];if((cache?cacheIndexOf(cache,value):indexOf(arrays[othIndex],value,0))<0){continue outer}}if(seen){seen.push(value)}result.push(value)}}return result});function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}var index=length;if(typeof fromIndex=="number"){index=(fromIndex<0?nativeMax(length+fromIndex,0):nativeMin(fromIndex||0,length-1))+1}else if(fromIndex){index=binaryIndex(array,value,true)-1;var other=array[index];if(value===value?value===other:other!==other){return index}return-1}if(value!==value){return indexOfNaN(array,index,true)}while(index--){if(array[index]===value){return index}}return-1}function pull(){var args=arguments,array=args[0];if(!(array&&array.length)){return array}var index=0,indexOf=getIndexOf(),length=args.length;while(++index<length){var fromIndex=0,value=args[index];while((fromIndex=indexOf(array,value,fromIndex))>-1){splice.call(array,fromIndex,1)}}return array}var pullAt=restParam(function(array,indexes){indexes=baseFlatten(indexes);var result=baseAt(array,indexes);basePullAt(array,indexes.sort(baseCompareAscending));return result});function remove(array,predicate,thisArg){var result=[];if(!(array&&array.length)){return result}var index=-1,indexes=[],length=array.length;predicate=getCallback(predicate,thisArg,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index)}}basePullAt(array,indexes);return result}function rest(array){return drop(array,1)}function slice(array,start,end){var length=array?array.length:0;if(!length){return[]}if(end&&typeof end!="number"&&isIterateeCall(array,start,end)){start=0;end=length}return baseSlice(array,start,end)}var sortedIndex=createSortedIndex();var sortedLastIndex=createSortedIndex(true);function take(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,0,n<0?0:n)}function takeRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,n<0?0:n)}function takeRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),false,true):[]}function takeWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3)):[]}var union=restParam(function(arrays){return baseUniq(baseFlatten(arrays,false,true))});function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?undefined:isSorted;isSorted=false}var callback=getCallback();if(!(iteratee==null&&callback===baseCallback)){iteratee=callback(iteratee,thisArg,3)}return isSorted&&getIndexOf()==baseIndexOf?sortedUniq(array,iteratee):baseUniq(array,iteratee)}function unzip(array){if(!(array&&array.length)){return[]}var index=-1,length=0;array=arrayFilter(array,function(group){if(isArrayLike(group)){length=nativeMax(group.length,length);return true}});var result=Array(length);while(++index<length){result[index]=arrayMap(array,baseProperty(index))}return result}function unzipWith(array,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}var result=unzip(array);if(iteratee==null){return result}iteratee=bindCallback(iteratee,thisArg,4);return arrayMap(result,function(group){return arrayReduce(group,iteratee,undefined,true)})}var without=restParam(function(array,values){return isArrayLike(array)?baseDifference(array,values):[]});function xor(){var index=-1,length=arguments.length;while(++index<length){var array=arguments[index];if(isArrayLike(array)){var result=result?arrayPush(baseDifference(result,array),baseDifference(array,result)):array}}return result?baseUniq(result):[]}var zip=restParam(unzip);function zipObject(props,values){var index=-1,length=props?props.length:0,result={};if(length&&!values&&!isArray(props[0])){values=[]}while(++index<length){var key=props[index];if(values){result[key]=values[index]}else if(key){result[key[0]]=key[1]}}return result}var zipWith=restParam(function(arrays){var length=arrays.length,iteratee=length>2?arrays[length-2]:undefined,thisArg=length>1?arrays[length-1]:undefined;if(length>2&&typeof iteratee=="function"){length-=2}else{iteratee=length>1&&typeof thisArg=="function"?(--length,thisArg):undefined;thisArg=undefined}arrays.length=length;return unzipWith(arrays,iteratee,thisArg)});function chain(value){var result=lodash(value);result.__chain__=true;return result}function tap(value,interceptor,thisArg){interceptor.call(thisArg,value);return value}function thru(value,interceptor,thisArg){return interceptor.call(thisArg,value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}var wrapperConcat=restParam(function(values){values=baseFlatten(values);return this.thru(function(array){return arrayConcat(isArray(array)?array:[toObject(array)],values)})});function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);if(result){previous.__wrapped__=clone}else{result=clone}var previous=clone;parent=parent.__wrapped__}previous.__wrapped__=value;return result}function wrapperReverse(){var value=this.__wrapped__;var interceptor=function(value){return wrapped&&wrapped.__dir__<0?value:value.reverse()};if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this)}wrapped=wrapped.reverse();wrapped.__actions__.push({func:thru,args:[interceptor],thisArg:undefined});return new LodashWrapper(wrapped,this.__chain__)}return this.thru(interceptor)}function wrapperToString(){return this.value()+""}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var at=restParam(function(collection,props){return baseAt(collection,baseFlatten(props))});var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1});function every(collection,predicate,thisArg){var func=isArray(collection)?arrayEvery:baseEvery;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=undefined}if(typeof predicate!="function"||thisArg!==undefined){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function filter(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,predicate)}var find=createFind(baseEach);var findLast=createFind(baseEachRight,true);function findWhere(collection,source){return find(collection,baseMatches(source))}var forEach=createForEach(arrayEach,baseEach);var forEachRight=createForEach(arrayEachRight,baseEachRight);var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;if(!isLength(length)){collection=values(collection);length=collection.length}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<=length&&collection.indexOf(target,fromIndex)>-1:!!length&&getIndexOf(collection,target,fromIndex)>-1}var indexBy=createAggregator(function(result,value,key){result[key]=value});var invoke=restParam(function(collection,path,args){var index=-1,isFunc=typeof path=="function",isProp=isKey(path),result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){var func=isFunc?path:isProp&&value!=null?value[path]:undefined;result[++index]=func?func.apply(value,args):invokePath(value,path,args)});return result});function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=getCallback(iteratee,thisArg,3);return func(collection,iteratee)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function pluck(collection,path){return map(collection,property(path))}var reduce=createReduce(arrayReduce,baseEach);var reduceRight=createReduce(arrayReduceRight,baseEachRight);function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n==null){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var index=-1,result=toArray(collection),length=result.length,lastIndex=length-1;n=nativeMin(n<0?0:+n||0,length);while(++index<n){var rand=baseRandom(index,lastIndex),value=result[rand];result[rand]=result[index];result[index]=value}result.length=n;return result}function shuffle(collection){return sample(collection,POSITIVE_INFINITY)}function size(collection){var length=collection?getLength(collection):0;return isLength(length)?length:keys(collection).length}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=undefined}if(typeof predicate!="function"||thisArg!==undefined){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}var index=-1;iteratee=getCallback(iteratee,thisArg,3);var result=baseMap(collection,function(value,key,collection){return{criteria:iteratee(value,key,collection),index:++index,value:value}});return baseSortBy(result,compareAscending)}var sortByAll=restParam(function(collection,iteratees){if(collection==null){return[]}var guard=iteratees[2];if(guard&&isIterateeCall(iteratees[0],iteratees[1],guard)){iteratees.length=1}return baseSortByOrder(collection,baseFlatten(iteratees),[])});function sortByOrder(collection,iteratees,orders,guard){if(collection==null){return[]}if(guard&&isIterateeCall(iteratees,orders,guard)){orders=undefined}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees]}if(!isArray(orders)){orders=orders==null?[]:[orders]}return baseSortByOrder(collection,iteratees,orders)}function where(collection,source){return filter(collection,baseMatches(source))}var now=nativeNow||function(){return(new Date).getTime()};function after(n,func){if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}n=nativeIsFinite(n=+n)?n:0;return function(){if(--n<1){return func.apply(this,arguments)}}}function ary(func,n,guard){if(guard&&isIterateeCall(func,n,guard)){n=undefined}n=func&&n==null?func.length:nativeMax(+n||0,0);return createWrapper(func,ARY_FLAG,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}return function(){if(--n>0){result=func.apply(this,arguments)}if(n<=1){func=undefined}return result}}var bind=restParam(function(func,thisArg,partials){var bitmask=BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)});var bindAll=restParam(function(object,methodNames){methodNames=methodNames.length?baseFlatten(methodNames):functions(object);var index=-1,length=methodNames.length;while(++index<length){var key=methodNames[index];object[key]=createWrapper(object[key],BIND_FLAG,object)}return object});var bindKey=restParam(function(object,key,partials){var bitmask=BIND_FLAG|BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,bindKey.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(key,bitmask,object,partials,holders)});var curry=createCurry(CURRY_FLAG);var curryRight=createCurry(CURRY_RIGHT_FLAG);function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=!!options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?!!options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}lastCalled=0;maxTimeoutId=timeoutId=trailingCall=undefined}function complete(isCalled,id){if(id){clearTimeout(id)}maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=undefined}}}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){complete(trailingCall,maxTimeoutId)}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){complete(trailing,timeoutId)}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=undefined}return result}debounced.cancel=cancel;return debounced}var defer=restParam(function(func,args){return baseDelay(func,1,args)});var delay=restParam(function(func,wait,args){return baseDelay(func,wait,args)});var flow=createFlow();var flowRight=createFlow(true);function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new memoize.Cache;return memoized}var modArgs=restParam(function(func,transforms){transforms=baseFlatten(transforms);if(typeof func!="function"||!arrayEvery(transforms,baseIsFunction)){throw new TypeError(FUNC_ERROR_TEXT)}var length=transforms.length;return restParam(function(args){var index=nativeMin(args.length,length);while(index--){args[index]=transforms[index](args[index])}return func.apply(this,args)})});function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){return!predicate.apply(this,arguments)}}function once(func){return before(2,func)}var partial=createPartial(PARTIAL_FLAG);var partialRight=createPartial(PARTIAL_RIGHT_FLAG);var rearg=restParam(function(func,indexes){return createWrapper(func,REARG_FLAG,undefined,undefined,undefined,baseFlatten(indexes))});function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(start===undefined?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++index<length){rest[index]=args[start+index]}switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);index=-1;while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=rest;return func.apply(this,otherArgs)}}function spread(func){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(array){return func.apply(this,array)}}function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}return debounce(func,wait,{leading:leading,maxWait:+wait,trailing:trailing})}function wrap(value,wrapper){wrapper=wrapper==null?identity:wrapper;return createWrapper(wrapper,PARTIAL_FLAG,undefined,[value],[])}function clone(value,isDeep,customizer,thisArg){if(isDeep&&typeof isDeep!="boolean"&&isIterateeCall(value,isDeep,customizer)){isDeep=false}else if(typeof isDeep=="function"){thisArg=customizer;customizer=isDeep;isDeep=false}return typeof customizer=="function"?baseClone(value,isDeep,bindCallback(customizer,thisArg,1)):baseClone(value,isDeep)}function cloneDeep(value,customizer,thisArg){return typeof customizer=="function"?baseClone(value,true,bindCallback(customizer,thisArg,1)):baseClone(value,true)}function gt(value,other){return value>other}function gte(value,other){return value>=other}function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")}var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};function isBoolean(value){return value===true||value===false||isObjectLike(value)&&objToString.call(value)==boolTag}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag}function isElement(value){return!!value&&value.nodeType===1&&isObjectLike(value)&&!isPlainObject(value)}function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))){return!value.length}return!keys(value).length}function isEqual(value,other,customizer,thisArg){customizer=typeof customizer=="function"?bindCallback(customizer,thisArg,3):undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&typeof value.message=="string"&&objToString.call(value)==errorTag}function isFinite(value){return typeof value=="number"&&nativeIsFinite(value)}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isMatch(object,source,customizer,thisArg){customizer=typeof customizer=="function"?bindCallback(customizer,thisArg,3):undefined;return baseIsMatch(object,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(value==null){return false}if(isFunction(value)){return reIsNative.test(fnToString.call(value))}return isObjectLike(value)&&reIsHostCtor.test(value)}function isNull(value){return value===null}function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag}function isPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag&&!isArguments(value))||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return result===undefined||hasOwnProperty.call(value,result)}function isRegExp(value){return isObject(value)&&objToString.call(value)==regexpTag}function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function isUndefined(value){return value===undefined}function lt(value,other){return value<other}function lte(value,other){return value<=other}function toArray(value){var length=value?getLength(value):0;if(!isLength(length)){return values(value)}if(!length){return[]}return arrayCopy(value)}function toPlainObject(value){return baseCopy(value,keysIn(value))}var merge=createAssigner(baseMerge);var assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)});function create(prototype,properties,guard){var result=baseCreate(prototype);if(guard&&isIterateeCall(prototype,properties,guard)){properties=undefined}return properties?baseAssign(result,properties):result}var defaults=createDefaults(assign,assignDefaults);var defaultsDeep=createDefaults(merge,mergeDefaults);var findKey=createFindKey(baseForOwn);var findLastKey=createFindKey(baseForOwnRight);var forIn=createForIn(baseFor);var forInRight=createForIn(baseForRight);var forOwn=createForOwn(baseForOwn);var forOwnRight=createForOwn(baseForOwnRight);function functions(object){return baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,toPath(path),path+"");return result===undefined?defaultValue:result}function has(object,path){if(object==null){return false}var result=hasOwnProperty.call(object,path);if(!result&&!isKey(path)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));if(object==null){return false}path=last(path);result=hasOwnProperty.call(object,path)}return result||isLength(object.length)&&isIndex(path,object.length)&&(isArray(object)||isArguments(object))}function invert(object,multiValue,guard){if(guard&&isIterateeCall(object,multiValue,guard)){multiValue=undefined}var index=-1,props=keys(object),length=props.length,result={};while(++index<length){var key=props[index],value=object[key];if(multiValue){if(hasOwnProperty.call(result,value)){result[value].push(key)}else{result[value]=[key]}}else{result[value]=key}}return result}var keys=!nativeKeys?shimKeys:function(object){var Ctor=object==null?undefined:object.constructor;if(typeof Ctor=="function"&&Ctor.prototype===object||typeof object!="function"&&isArrayLike(object)){return shimKeys(object)}return isObject(object)?nativeKeys(object):[]};function keysIn(object){if(object==null){return[]}if(!isObject(object)){object=Object(object)}var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;var Ctor=object.constructor,index=-1,isProto=typeof Ctor=="function"&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;while(++index<length){result[index]=index+""}for(var key in object){if(!(skipIndexes&&isIndex(key,length))&&!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}var mapKeys=createObjectMapper(true);var mapValues=createObjectMapper();var omit=restParam(function(object,props){if(object==null){return{}}if(typeof props[0]!="function"){var props=arrayMap(baseFlatten(props),String);return pickByArray(object,baseDifference(keysIn(object),props))}var predicate=bindCallback(props[0],props[1],3);return pickByCallback(object,function(value,key,object){return!predicate(value,key,object)})});function pairs(object){object=toObject(object);var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){var key=props[index];result[index]=[key,object[key]]}return result}var pick=restParam(function(object,props){if(object==null){return{}}return typeof props[0]=="function"?pickByCallback(object,bindCallback(props[0],props[1],3)):pickByArray(object,baseFlatten(props))});function result(object,path,defaultValue){var result=object==null?undefined:object[path];if(result===undefined){if(object!=null&&!isKey(path,object)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));result=object==null?undefined:object[last(path)]}result=result===undefined?defaultValue:result}return isFunction(result)?result.call(object):result}function set(object,path,value){if(object==null){return object}var pathKey=path+"";path=object[pathKey]!=null||isKey(path,object)?[pathKey]:toPath(path);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=path[index];if(isObject(nested)){if(index==lastIndex){nested[key]=value}else if(nested[key]==null){nested[key]=isIndex(path[index+1])?[]:{}}}nested=nested[key]}return object}function transform(object,iteratee,accumulator,thisArg){var isArr=isArray(object)||isTypedArray(object);iteratee=getCallback(iteratee,thisArg,4);if(accumulator==null){if(isArr||isObject(object)){var Ctor=object.constructor;if(isArr){accumulator=isArray(object)?new Ctor:[]}else{accumulator=baseCreate(isFunction(Ctor)?Ctor.prototype:undefined)}}else{accumulator={}}}(isArr?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)});return accumulator}function values(object){return baseValues(object,keys(object))}function valuesIn(object){return baseValues(object,keysIn(object))}function inRange(value,start,end){start=+start||0;if(end===undefined){end=start;start=0}else{end=+end||0}return value>=nativeMin(start,end)&&value<nativeMax(start,end)}function random(min,max,floating){if(floating&&isIterateeCall(min,max,floating)){max=floating=undefined}var noMin=min==null,noMax=max==null;if(floating==null){if(noMax&&typeof min=="boolean"){floating=min;min=1}else if(typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1;noMax=false}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?word.charAt(0).toUpperCase()+word.slice(1):word)});function capitalize(string){string=baseToString(string);return string&&string.charAt(0).toUpperCase()+string.slice(1)}function deburr(string){string=baseToString(string);return string&&string.replace(reLatin1,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=baseToString(string);target=target+"";var length=string.length;position=position===undefined?length:nativeMin(position<0?0:+position||0,length);position-=target.length;return position>=0&&string.indexOf(target,position)==position}function escape(string){string=baseToString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,escapeRegExpChar):string||"(?:)"}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()});function pad(string,length,chars){string=baseToString(string);length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length)){return string}var mid=(length-strLength)/2,leftLength=nativeFloor(mid),rightLength=nativeCeil(mid);chars=createPadding("",rightLength,chars);return chars.slice(0,leftLength)+string+chars}var padLeft=createPadDir();var padRight=createPadDir(true);function parseInt(string,radix,guard){if(guard?isIterateeCall(string,radix,guard):radix==null){radix=0}else if(radix){radix=+radix}string=trim(string);return nativeParseInt(string,radix||(reHasHexPrefix.test(string)?16:10))}function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);string+=string}while(n);return result}var snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()});var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+(word.charAt(0).toUpperCase()+word.slice(1))});function startsWith(string,target,position){string=baseToString(string);position=position==null?0:nativeMin(position<0?0:+position||0,string.length);return string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;if(otherOptions&&isIterateeCall(string,options,otherOptions)){options=otherOptions=undefined}string=baseToString(string);options=assignWith(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var imports=assignWith(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");var sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable;if(!variable){source="with (obj) {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});result.source=source;if(isError(result)){throw result}return result}function trim(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1)}chars=chars+"";return string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)}function trimLeft(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string))}return string.slice(charsLeftIndex(string,chars+""))}function trimRight(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(0,trimmedRightIndex(string)+1)}return string.slice(0,charsRightIndex(string,chars+"")+1)}function trunc(string,options,guard){if(guard&&isIterateeCall(string,options,guard)){options=undefined}var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(options!=null){if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length;omission="omission"in options?baseToString(options.omission):omission}else{length=+options||0}}string=baseToString(string);if(length>=string.length){return string}var end=length-omission.length;if(end<1){return omission}var result=string.slice(0,end);if(separator==null){return result+omission}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);if(!separator.global){separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")}separator.lastIndex=0;while(match=separator.exec(substring)){newEnd=match.index}result=result.slice(0,newEnd==null?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index)}}return result+omission}function unescape(string){string=baseToString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){if(guard&&isIterateeCall(string,pattern,guard)){pattern=undefined}string=baseToString(string);return string.match(pattern||reWords)||[]}var attempt=restParam(function(func,args){try{return func.apply(undefined,args)}catch(e){return isError(e)?e:new Error(e)}});function callback(func,thisArg,guard){if(guard&&isIterateeCall(func,thisArg,guard)){thisArg=undefined}return isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,true))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,true))}var method=restParam(function(path,args){return function(object){return invokePath(object,path,args)}});var methodOf=restParam(function(object,args){return function(path){return invokePath(object,path,args)}});function mixin(object,source,options){if(options==null){var isObj=isObject(source),props=isObj?keys(source):undefined,methodNames=props&&props.length?baseFunctions(source,props):undefined;if(!(methodNames?methodNames.length:isObj)){methodNames=false;options=source;source=object;object=this}}if(!methodNames){methodNames=baseFunctions(source,keys(source))}var chain=true,index=-1,isFunc=isFunction(object),length=methodNames.length;if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}while(++index<length){var methodName=methodNames[index],func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(func){return function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=arrayCopy(this.__actions__);actions.push({func:func,args:arguments,thisArg:object});result.__chain__=chainAll;return result}return func.apply(object,arrayPush([this.value()],arguments))}}(func)}}return object}function noConflict(){root._=oldDash;return this}function noop(){}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}function propertyOf(object){return function(path){return baseGet(object,toPath(path),path+"")}}function range(start,end,step){if(step&&isIterateeCall(start,end,step)){end=step=undefined}start=+start||0;step=step==null?1:+step||0;if(end==null){end=start;start=0}else{end=+end||0}var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(++index<length){result[index]=start;start+=step}return result}function times(n,iteratee,thisArg){n=nativeFloor(n);if(n<1||!nativeIsFinite(n)){return[]}var index=-1,result=Array(nativeMin(n,MAX_ARRAY_LENGTH));iteratee=bindCallback(iteratee,thisArg,1);while(++index<n){if(index<MAX_ARRAY_LENGTH){result[index]=iteratee(index)}else{iteratee(index)}}return result}function uniqueId(prefix){var id=++idCounter;return baseToString(prefix)+id}function add(augend,addend){return(+augend||0)+(+addend||0)}var ceil=createRound("ceil");var floor=createRound("floor");var max=createExtremum(gt,NEGATIVE_INFINITY);var min=createExtremum(lt,POSITIVE_INFINITY);var round=createRound("round");function sum(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}iteratee=getCallback(iteratee,thisArg,3);return iteratee.length==1?arraySum(isArray(collection)?collection:toIterable(collection),iteratee):baseSum(collection,iteratee)}lodash.prototype=baseLodash.prototype;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;MapCache.prototype["delete"]=mapDelete;MapCache.prototype.get=mapGet;MapCache.prototype.has=mapHas;MapCache.prototype.set=mapSet;SetCache.prototype.push=cachePush;memoize.Cache=MapCache;lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.callback=callback;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defaultsDeep=defaultsDeep;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flow=flow;lodash.flowRight=flowRight;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.functions=functions;lodash.groupBy=groupBy;lodash.indexBy=indexBy;lodash.initial=initial;lodash.intersection=intersection;lodash.invert=invert;lodash.invoke=invoke;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.modArgs=modArgs;lodash.negate=negate;lodash.omit=omit;lodash.once=once;lodash.pairs=pairs;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pluck=pluck;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAt=pullAt;lodash.range=range;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.restParam=restParam;lodash.set=set;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortByAll=sortByAll;lodash.sortByOrder=sortByOrder;lodash.spread=spread;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.times=times;lodash.toArray=toArray;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.union=union;lodash.uniq=uniq;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.where=where;lodash.without=without;lodash.wrap=wrap;lodash.xor=xor;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipWith=zipWith;lodash.backflow=flowRight;lodash.collect=map;lodash.compose=flowRight;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.extend=assign;lodash.iteratee=callback;lodash.methods=functions;lodash.object=zipObject;lodash.select=filter;lodash.tail=rest;lodash.unique=uniq;mixin(lodash,lodash);lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.deburr=deburr;lodash.endsWith=endsWith;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.findWhere=findWhere;lodash.first=first;lodash.floor=floor;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isBoolean=isBoolean;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isMatch=isMatch;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isString=isString;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.min=min;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padLeft=padLeft;lodash.padRight=padRight;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedLastIndex=sortedLastIndex;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.sum=sum;lodash.template=template;lodash.trim=trim;lodash.trimLeft=trimLeft;lodash.trimRight=trimRight;lodash.trunc=trunc;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.words=words;lodash.all=every;lodash.any=some;lodash.contains=includes;lodash.eq=isEqual;lodash.detect=find;lodash.foldl=reduce;lodash.foldr=reduceRight;lodash.head=first;lodash.include=includes;lodash.inject=reduce;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!lodash.prototype[methodName]){source[methodName]=func}});return source}(),false);lodash.sample=sample;lodash.prototype.sample=function(n){if(!this.__chain__&&n==null){return sample(this.value())}return this.thru(function(value){return sample(value,n)})};lodash.VERSION=VERSION;arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash});arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){var filtered=this.__filtered__;if(filtered&&!index){return new LazyWrapper(this)}n=n==null?1:nativeMax(nativeFloor(n)||0,0);var result=this.clone();if(filtered){result.__takeCount__=nativeMin(result.__takeCount__,n)}else{result.__views__.push({size:n,type:methodName+(result.__dir__<0?"Right":"")})}return result};LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}});arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type!=LAZY_MAP_FLAG;LazyWrapper.prototype[methodName]=function(iteratee,thisArg){var result=this.clone();result.__iteratees__.push({iteratee:getCallback(iteratee,thisArg,1),type:type});result.__filtered__=result.__filtered__||isFilter;return result}});arrayEach(["first","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}});arrayEach(["initial","rest"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}});arrayEach(["pluck","where"],function(methodName,index){var operationName=index?"filter":"map",createCallback=index?baseMatches:property;LazyWrapper.prototype[methodName]=function(value){return this[operationName](createCallback(value))}});LazyWrapper.prototype.compact=function(){return this.filter(identity)};LazyWrapper.prototype.reject=function(predicate,thisArg){predicate=getCallback(predicate,thisArg,1);return this.filter(function(value){return!predicate(value)})};LazyWrapper.prototype.slice=function(start,end){start=start==null?0:+start||0;var result=this;if(result.__filtered__&&(start>0||end<0)){return new LazyWrapper(result)}if(start<0){result=result.takeRight(-start)}else if(start){result=result.drop(start)}if(end!==undefined){end=+end||0;result=end<0?result.dropRight(-end):result.take(end-start)}return result};LazyWrapper.prototype.takeRightWhile=function(predicate,thisArg){return this.reverse().takeWhile(predicate,thisArg).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(POSITIVE_INFINITY)};baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|map|reject)|While$/.test(methodName),retUnwrapped=/^(?:first|last)$/.test(methodName),lodashFunc=lodash[retUnwrapped?"take"+(methodName=="last"?"Right":""):methodName];if(!lodashFunc){return}lodash.prototype[methodName]=function(){var args=retUnwrapped?[1]:arguments,chainAll=this.__chain__,value=this.__wrapped__,isHybrid=!!this.__actions__.length,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);if(useLazy&&checkIteratee&&typeof iteratee=="function"&&iteratee.length!=1){isLazy=useLazy=false}var interceptor=function(value){return retUnwrapped&&chainAll?lodashFunc(value,1)[0]:lodashFunc.apply(undefined,arrayPush([value],args))};var action={func:thru,args:[interceptor],thisArg:undefined},onlyLazy=isLazy&&!isHybrid;if(retUnwrapped&&!chainAll){if(onlyLazy){value=value.clone();value.__actions__.push(action);return func.call(value)}return lodashFunc.call(undefined,this.value())[0]}if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);result.__actions__.push(action);return new LodashWrapper(result,chainAll)}return this.thru(interceptor)}});arrayEach(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(methodName){var func=(/^(?:replace|split)$/.test(methodName)?stringProto:arrayProto)[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:join|pop|replace|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){return func.apply(this.value(),args)}return this[chainName](function(value){return func.apply(value,args)})}});baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name,names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}});realNames[createHybridWrapper(undefined,BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.concat=wrapperConcat;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toString=wrapperToString;lodash.prototype.run=lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.collect=lodash.prototype.map;lodash.prototype.head=lodash.prototype.first;lodash.prototype.select=lodash.prototype.filter;lodash.prototype.tail=lodash.prototype.rest;return lodash}var _=runInContext();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root._=_;define(function(){return _})}else if(freeExports&&freeModule){if(moduleExports){(freeModule.exports=_)._=_}else{freeExports._=_}}else{root._=_}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){(function(window,document,undefined){var _MAP={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"};var _KEYCODE_MAP={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"};var _SHIFT_MAP={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"};var _SPECIAL_ALIASES={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};var _REVERSE_MAP;for(var i=1;i<20;++i){_MAP[111+i]="f"+i}for(i=0;i<=9;++i){_MAP[i+96]=i}function _addEvent(object,type,callback){if(object.addEventListener){object.addEventListener(type,callback,false);return}object.attachEvent("on"+type,callback)}function _characterFromEvent(e){if(e.type=="keypress"){var character=String.fromCharCode(e.which);if(!e.shiftKey){character=character.toLowerCase()}return character}if(_MAP[e.which]){return _MAP[e.which]}if(_KEYCODE_MAP[e.which]){return _KEYCODE_MAP[e.which]}return String.fromCharCode(e.which).toLowerCase()}function _modifiersMatch(modifiers1,modifiers2){return modifiers1.sort().join(",")===modifiers2.sort().join(",")}function _eventModifiers(e){var modifiers=[];if(e.shiftKey){modifiers.push("shift")}if(e.altKey){modifiers.push("alt")}if(e.ctrlKey){modifiers.push("ctrl")}if(e.metaKey){modifiers.push("meta")}return modifiers}function _preventDefault(e){if(e.preventDefault){e.preventDefault();return}e.returnValue=false}function _stopPropagation(e){if(e.stopPropagation){e.stopPropagation();return}e.cancelBubble=true}function _isModifier(key){return key=="shift"||key=="ctrl"||key=="alt"||key=="meta"}function _getReverseMap(){if(!_REVERSE_MAP){_REVERSE_MAP={};for(var key in _MAP){if(key>95&&key<112){continue}if(_MAP.hasOwnProperty(key)){_REVERSE_MAP[_MAP[key]]=key}}}return _REVERSE_MAP}function _pickBestAction(key,modifiers,action){if(!action){action=_getReverseMap()[key]?"keydown":"keypress"}if(action=="keypress"&&modifiers.length){action="keydown"}return action}function _keysFromString(combination){if(combination==="+"){return["+"]}combination=combination.replace(/\+{2}/g,"+plus");return combination.split("+")}function _getKeyInfo(combination,action){var keys;var key;var i;var modifiers=[];keys=_keysFromString(combination);for(i=0;i<keys.length;++i){key=keys[i];if(_SPECIAL_ALIASES[key]){key=_SPECIAL_ALIASES[key]}if(action&&action!="keypress"&&_SHIFT_MAP[key]){key=_SHIFT_MAP[key];modifiers.push("shift")}if(_isModifier(key)){modifiers.push(key)}}action=_pickBestAction(key,modifiers,action);return{key:key,modifiers:modifiers,action:action}}function _belongsTo(element,ancestor){if(element===null||element===document){return false}if(element===ancestor){return true}return _belongsTo(element.parentNode,ancestor)}function Mousetrap(targetElement){var self=this;targetElement=targetElement||document;if(!(self instanceof Mousetrap)){return new Mousetrap(targetElement)}self.target=targetElement;self._callbacks={};self._directMap={};var _sequenceLevels={};var _resetTimer;var _ignoreNextKeyup=false;var _ignoreNextKeypress=false;var _nextExpectedAction=false;function _resetSequences(doNotReset){doNotReset=doNotReset||{};var activeSequences=false,key;for(key in _sequenceLevels){if(doNotReset[key]){activeSequences=true;continue}_sequenceLevels[key]=0}if(!activeSequences){_nextExpectedAction=false}}function _getMatches(character,modifiers,e,sequenceName,combination,level){var i;var callback;var matches=[];var action=e.type;if(!self._callbacks[character]){return[]}if(action=="keyup"&&_isModifier(character)){modifiers=[character]}for(i=0;i<self._callbacks[character].length;++i){callback=self._callbacks[character][i];if(!sequenceName&&callback.seq&&_sequenceLevels[callback.seq]!=callback.level){continue}if(action!=callback.action){continue}if(action=="keypress"&&!e.metaKey&&!e.ctrlKey||_modifiersMatch(modifiers,callback.modifiers)){var deleteCombo=!sequenceName&&callback.combo==combination;var deleteSequence=sequenceName&&callback.seq==sequenceName&&callback.level==level;if(deleteCombo||deleteSequence){self._callbacks[character].splice(i,1)}matches.push(callback)}}return matches}function _fireCallback(callback,e,combo,sequence){if(self.stopCallback(e,e.target||e.srcElement,combo,sequence)){return}if(callback(e,combo)===false){_preventDefault(e);_stopPropagation(e)}}self._handleKey=function(character,modifiers,e){var callbacks=_getMatches(character,modifiers,e);var i;var doNotReset={};var maxLevel=0;var processedSequenceCallback=false;for(i=0;i<callbacks.length;++i){if(callbacks[i].seq){maxLevel=Math.max(maxLevel,callbacks[i].level)}}for(i=0;i<callbacks.length;++i){if(callbacks[i].seq){if(callbacks[i].level!=maxLevel){continue}processedSequenceCallback=true;doNotReset[callbacks[i].seq]=1;_fireCallback(callbacks[i].callback,e,callbacks[i].combo,callbacks[i].seq);continue}if(!processedSequenceCallback){_fireCallback(callbacks[i].callback,e,callbacks[i].combo)}}var ignoreThisKeypress=e.type=="keypress"&&_ignoreNextKeypress;if(e.type==_nextExpectedAction&&!_isModifier(character)&&!ignoreThisKeypress){_resetSequences(doNotReset)}_ignoreNextKeypress=processedSequenceCallback&&e.type=="keydown"};function _handleKeyEvent(e){if(typeof e.which!=="number"){e.which=e.keyCode}var character=_characterFromEvent(e);if(!character){return}if(e.type=="keyup"&&_ignoreNextKeyup===character){_ignoreNextKeyup=false;return}self.handleKey(character,_eventModifiers(e),e)}function _resetSequenceTimer(){clearTimeout(_resetTimer);_resetTimer=setTimeout(_resetSequences,1e3)}function _bindSequence(combo,keys,callback,action){_sequenceLevels[combo]=0;function _increaseSequence(nextAction){return function(){_nextExpectedAction=nextAction;++_sequenceLevels[combo];_resetSequenceTimer()}}function _callbackAndReset(e){_fireCallback(callback,e,combo);if(action!=="keyup"){_ignoreNextKeyup=_characterFromEvent(e)}setTimeout(_resetSequences,10)}for(var i=0;i<keys.length;++i){var isFinal=i+1===keys.length;var wrappedCallback=isFinal?_callbackAndReset:_increaseSequence(action||_getKeyInfo(keys[i+1]).action);_bindSingle(keys[i],wrappedCallback,action,combo,i)}}function _bindSingle(combination,callback,action,sequenceName,level){self._directMap[combination+":"+action]=callback;combination=combination.replace(/\s+/g," ");var sequence=combination.split(" ");var info;if(sequence.length>1){_bindSequence(combination,sequence,callback,action);return}info=_getKeyInfo(combination,action);self._callbacks[info.key]=self._callbacks[info.key]||[];_getMatches(info.key,info.modifiers,{type:info.action},sequenceName,combination,level);self._callbacks[info.key][sequenceName?"unshift":"push"]({callback:callback,modifiers:info.modifiers,action:info.action,seq:sequenceName,level:level,combo:combination})}self._bindMultiple=function(combinations,callback,action){for(var i=0;i<combinations.length;++i){_bindSingle(combinations[i],callback,action)}};_addEvent(targetElement,"keypress",_handleKeyEvent);_addEvent(targetElement,"keydown",_handleKeyEvent);_addEvent(targetElement,"keyup",_handleKeyEvent)}Mousetrap.prototype.bind=function(keys,callback,action){var self=this;keys=keys instanceof Array?keys:[keys];self._bindMultiple.call(self,keys,callback,action);return self};Mousetrap.prototype.unbind=function(keys,action){var self=this;return self.bind.call(self,keys,function(){},action)};Mousetrap.prototype.trigger=function(keys,action){var self=this;if(self._directMap[keys+":"+action]){self._directMap[keys+":"+action]({},keys)}return self};Mousetrap.prototype.reset=function(){var self=this;self._callbacks={};self._directMap={};return self};Mousetrap.prototype.stopCallback=function(e,element){var self=this;if((" "+element.className+" ").indexOf(" mousetrap ")>-1){return false}if(_belongsTo(element,self.target)){return false}return element.tagName=="INPUT"||element.tagName=="SELECT"||element.tagName=="TEXTAREA"||element.isContentEditable};Mousetrap.prototype.handleKey=function(){var self=this;return self._handleKey.apply(self,arguments)};Mousetrap.init=function(){var documentMousetrap=Mousetrap(document);for(var method in documentMousetrap){if(method.charAt(0)!=="_"){Mousetrap[method]=function(method){return function(){return documentMousetrap[method].apply(documentMousetrap,arguments)}}(method)}}};Mousetrap.init();window.Mousetrap=Mousetrap;if(typeof module!=="undefined"&&module.exports){module.exports=Mousetrap}if(typeof define==="function"&&define.amd){define(function(){return Mousetrap})}})(window,document)},{}],4:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:5}],5:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=setTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;clearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){setTimeout(drainQueue,0)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],6:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320){output.push(((value&1023)<<10)+(extra&1023)+65536)}else{output.push(value);counter--}}else{output.push(value)}}return output}function ucs2encode(array){return map(array,function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128){output.push(stringFromCharCode(currentValue))}}handledCPCount=basicLength=output.length;if(basicLength){output.push(delimiter)}while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m){m=currentValue}}handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}punycode={version:"1.3.2",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define("punycode",function(){return punycode})}else if(freeExports&&freeModule){if(module.exports==freeExports){freeModule.exports=punycode}else{for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key])}}}else{root.punycode=punycode}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],7:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&";eq=eq||"=";var obj={};if(typeof qs!=="string"||qs.length===0){return obj}var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;if(options&&typeof options.maxKeys==="number"){maxKeys=options.maxKeys}var len=qs.length;if(maxKeys>0&&len>maxKeys){len=maxKeys}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],8:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i))}return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key)}return res}},{}],9:[function(require,module,exports){"use strict";exports.decode=exports.parse=require("./decode");exports.encode=exports.stringify=require("./encode")},{"./decode":7,"./encode":8}],10:[function(require,module,exports){var punycode=require("punycode");exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var rest=url;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}var auth,atSign;if(hostEnd===-1){atSign=rest.lastIndexOf("@")}else{atSign=rest.lastIndexOf("@",hostEnd)}if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}if(hostEnd===-1)hostEnd=rest.length;this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part)continue;if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++){if(part.charCodeAt(j)>127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){var domainArray=this.hostname.split(".");var newOut=[];for(var i=0;i<domainArray.length;++i){var s=domainArray[i];newOut.push(s.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(s):s)}this.hostname=newOut.join(".")}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];var esc=encodeURIComponent(ae);if(esc===ae){esc=escape(ae)}rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString){this.query=querystring.parse(this.query)}rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest)this.pathname=rest;if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(isString(obj))obj=urlParse(obj);if(!(obj instanceof Url))return Url.prototype.format.call(obj);return obj.format()}Url.prototype.format=function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host){host=auth+this.host}else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){host+=":"+this.port}}if(this.query&&isObject(this.query)&&Object.keys(this.query).length){query=querystring.stringify(this.query)}var search=this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":")protocol+=":";if(this.slashes||(!protocol||slashedProtocol[protocol])&&host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/")pathname="/"+pathname}else if(!host){host=""}if(hash&&hash.charAt(0)!=="#")hash="#"+hash;if(search&&search.charAt(0)!=="?")search="?"+search;pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)});search=search.replace("#","%23");return protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,false,true)).format()};function urlResolveObject(source,relative){if(!source)return relative;return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;Object.keys(this).forEach(function(k){result[k]=this[k]},this);result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&!relative.protocol){Object.keys(relative).forEach(function(k){if(k!=="protocol")result[k]=relative[k]});if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname){result.path=result.pathname="/"}result.href=result.format();return result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){Object.keys(relative).forEach(function(k){result[k]=relative[k]});result.href=result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift()));if(!relative.host)relative.host="";if(!relative.hostname)relative.hostname="";if(relPath[0]!=="")relPath.unshift("");if(relPath.length<2)relPath.unshift("");result.pathname=relPath.join("/")}else{result.pathname=relative.pathname}result.search=relative.search;result.query=relative.query;result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host){if(srcPath[0]==="")srcPath[0]=result.host;else srcPath.unshift(result.host)}result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host){if(relPath[0]==="")relPath[0]=relative.host;else relPath.unshift(relative.host)}relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath)srcPath=[];srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last=="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host};function isString(arg){return typeof arg==="string"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isNull(arg){return arg===null}function isNullOrUndefined(arg){return arg==null}},{punycode:6,querystring:9}],11:[function(require,module,exports){var $=require("jquery");function toggleDropdown(e){var $dropdown=$(e.currentTarget).parent().find(".dropdown-menu");$dropdown.toggleClass("open");e.stopPropagation();e.preventDefault()}function closeDropdown(e){$(".dropdown-menu").removeClass("open")}function init(){$(document).on("click",".toggle-dropdown",toggleDropdown);$(document).on("click",".dropdown-menu",function(e){e.stopPropagation()});$(document).on("click",closeDropdown)}module.exports={init:init}},{jquery:1}],12:[function(require,module,exports){var $=require("jquery");module.exports=$({})},{jquery:1}],13:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var storage=require("./storage");var dropdown=require("./dropdown");var events=require("./events");var state=require("./state");var keyboard=require("./keyboard");var navigation=require("./navigation");var sidebar=require("./sidebar");var toolbar=require("./toolbar");function start(config){sidebar.init();keyboard.init();dropdown.init();navigation.init();toolbar.createButton({index:0,icon:"fa fa-align-justify",label:"Toggle Sidebar",onClick:function(e){e.preventDefault();sidebar.toggle()}});events.trigger("start",config);navigation.notify()}var gitbook={start:start,events:events,state:state,toolbar:toolbar,sidebar:sidebar,storage:storage,keyboard:keyboard};var MODULES={gitbook:gitbook,jquery:$,lodash:_};window.gitbook=gitbook;window.$=$;window.jQuery=$;gitbook.require=function(mods,fn){mods=_.map(mods,function(mod){mod=mod.toLowerCase();if(!MODULES[mod]){throw new Error("GitBook module "+mod+" doesn't exist")}return MODULES[mod]});fn.apply(null,mods)};module.exports={}},{"./dropdown":11,"./events":12,"./keyboard":14,"./navigation":16,"./sidebar":18,"./state":19,"./storage":20,"./toolbar":21,jquery:1,lodash:2}],14:[function(require,module,exports){var Mousetrap=require("mousetrap");var navigation=require("./navigation");var sidebar=require("./sidebar");function bindShortcut(keys,fn){Mousetrap.bind(keys,function(e){fn();return false})}function init(){bindShortcut(["right"],function(e){navigation.goNext()});bindShortcut(["left"],function(e){navigation.goPrev()});bindShortcut(["s"],function(e){sidebar.toggle()})}module.exports={init:init,bind:bindShortcut}},{"./navigation":16,"./sidebar":18,mousetrap:3}],15:[function(require,module,exports){var state=require("./state");function showLoading(p){state.$book.addClass("is-loading");p.always(function(){state.$book.removeClass("is-loading")});return p}module.exports={show:showLoading}},{"./state":19}],16:[function(require,module,exports){var $=require("jquery");var url=require("url");var events=require("./events");var state=require("./state");var loading=require("./loading");var usePushState=typeof history.pushState!=="undefined";function handleNavigation(relativeUrl,push){var uri=url.resolve(window.location.pathname,relativeUrl);notifyPageChange();location.href=relativeUrl;return}function updateNavigationPosition(){var bodyInnerWidth,pageWrapperWidth;bodyInnerWidth=parseInt($(".body-inner").css("width"),10);pageWrapperWidth=parseInt($(".page-wrapper").css("width"),10);$(".navigation-next").css("margin-right",bodyInnerWidth-pageWrapperWidth+"px")}function notifyPageChange(){events.trigger("page.change")}function preparePage(notify){var $bookBody=$(".book-body");var $bookInner=$bookBody.find(".body-inner");var $pageWrapper=$bookInner.find(".page-wrapper");updateNavigationPosition();$bookInner.scrollTop(0);$bookBody.scrollTop(0);if(notify!==false)notifyPageChange()}function isLeftClickEvent(e){return e.button===0}function isModifiedEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function handlePagination(e){if(isModifiedEvent(e)||!isLeftClickEvent(e)){return}e.stopPropagation();e.preventDefault();var url=$(this).attr("href");if(url)handleNavigation(url,true)}function goNext(){var url=$(".navigation-next").attr("href");if(url)handleNavigation(url,true)}function goPrev(){var url=$(".navigation-prev").attr("href");if(url)handleNavigation(url,true)}function init(){$.ajaxSetup({});if(location.protocol!=="file:"){history.replaceState({path:window.location.href},"")}window.onpopstate=function(event){if(event.state===null){return}return handleNavigation(event.state.path,false)};$(document).on("click",".navigation-prev",handlePagination);$(document).on("click",".navigation-next",handlePagination);$(document).on("click",".summary [data-path] a",handlePagination);$(window).resize(updateNavigationPosition);preparePage(false)}module.exports={init:init,goNext:goNext,goPrev:goPrev,notify:notifyPageChange}},{"./events":12,"./loading":15,"./state":19,jquery:1,url:10}],17:[function(require,module,exports){module.exports={isMobile:function(){return document.body.clientWidth<=600}}},{}],18:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var storage=require("./storage");var platform=require("./platform");var state=require("./state");function toggleSidebar(_state,animation){if(state!=null&&isOpen()==_state)return;if(animation==null)animation=true;state.$book.toggleClass("without-animation",!animation);state.$book.toggleClass("with-summary",_state);storage.set("sidebar",isOpen())}function isOpen(){return state.$book.hasClass("with-summary")}function init(){if(platform.isMobile()){toggleSidebar(false,false)}else{toggleSidebar(storage.get("sidebar",true),false)}$(document).on("click",".book-summary li.chapter a",function(e){if(platform.isMobile())toggleSidebar(false,false)})}function filterSummary(paths){var $summary=$(".book-summary");$summary.find("li").each(function(){var path=$(this).data("path");var st=paths==null||_.contains(paths,path);$(this).toggle(st);if(st)$(this).parents("li").show()})}module.exports={init:init,isOpen:isOpen,toggle:toggleSidebar,filter:filterSummary}},{"./platform":17,"./state":19,"./storage":20,jquery:1,lodash:2}],19:[function(require,module,exports){var $=require("jquery");var url=require("url");var path=require("path");var state={};state.update=function(dom){var $book=$(dom.find(".book"));state.$book=$book;state.level=$book.data("level");state.basePath=$book.data("basepath");state.innerLanguage=$book.data("innerlanguage");state.revision=$book.data("revision");state.filepath=$book.data("filepath");state.chapterTitle=$book.data("chapter-title");state.root=url.resolve(location.protocol+"//"+location.host,path.dirname(path.resolve(location.pathname.replace(/\/$/,"/index.html"),state.basePath))).replace(/\/?$/,"/");state.bookRoot=state.innerLanguage?url.resolve(state.root,".."):state.root};state.update($);module.exports=state},{jquery:1,path:4,url:10}],20:[function(require,module,exports){var baseKey="";module.exports={setBaseKey:function(key){baseKey=key},set:function(key,value){key=baseKey+":"+key;try{sessionStorage[key]=JSON.stringify(value)}catch(e){}},get:function(key,def){key=baseKey+":"+key;if(sessionStorage[key]===undefined)return def;try{var v=JSON.parse(sessionStorage[key]);return v==null?def:v}catch(err){return sessionStorage[key]||def}},remove:function(key){key=baseKey+":"+key;sessionStorage.removeItem(key)}}},{}],21:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var events=require("./events");var buttons=[];function insertAt(parent,selector,index,element){var lastIndex=parent.children(selector).length;if(index<0){index=Math.max(0,lastIndex+1+index)}parent.append(element);if(index<lastIndex){parent.children(selector).eq(index).before(parent.children(selector).last())}}function defaultOnClick(e){e.preventDefault()}function createDropdownMenu(dropdown){var $menu=$("<div>",{class:"dropdown-menu",html:'<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>'});if(_.isString(dropdown)){$menu.append(dropdown)}else{var groups=_.map(dropdown,function(group){if(_.isArray(group))return group;else return[group]});_.each(groups,function(group){var $group=$("<div>",{class:"buttons"});var sizeClass="size-"+group.length;_.each(group,function(btn){btn=_.defaults(btn||{},{text:"",className:"",onClick:defaultOnClick});var $btn=$("<button>",{class:"button "+sizeClass+" "+btn.className,text:btn.text});$btn.click(btn.onClick);$group.append($btn)});$menu.append($group)})}return $menu}function createButton(opts){opts=_.defaults(opts||{},{label:"",icon:"",text:"",position:"left",className:"",onClick:defaultOnClick,dropdown:null,index:null});buttons.push(opts);updateButton(opts)}function updateButton(opts){var $result;var $toolbar=$(".book-header");var $title=$toolbar.find("h1");var positionClass="pull-"+opts.position;var $btn=$("<a>",{class:"btn",text:opts.text?" "+opts.text:"","aria-label":opts.label,title:opts.label,href:"#"});$btn.click(opts.onClick);if(opts.icon){$("<i>",{class:opts.icon}).prependTo($btn)}if(opts.dropdown){var $container=$("<div>",{class:"dropdown "+positionClass+" "+opts.className});$btn.addClass("toggle-dropdown");$container.append($btn);var $menu=createDropdownMenu(opts.dropdown);$menu.addClass("dropdown-"+(opts.position=="right"?"left":"right"));$container.append($menu);$result=$container}else{$btn.addClass(positionClass);$btn.addClass(opts.className);$result=$btn}$result.addClass("js-toolbar-action");if(_.isNumber(opts.index)&&opts.index>=0){insertAt($toolbar,".btn, .dropdown, h1",opts.index,$result)}else{$result.insertBefore($title)}}module.exports={createButton:createButton}},{"./events":12,jquery:1,lodash:2}]},{},[13]);
diff --git a/dev/r/libs/gitbook-2.6.7/js/clipboard.min.js b/dev/r/libs/gitbook-2.6.7/js/clipboard.min.js
new file mode 100644
index 0000000..99561a0
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/clipboard.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clipboard.js v2.0.4
+ * https://zenorocha.github.io/clipboard.js
+ *
+ * Licensed MIT © Zeno Rocha
+ */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});
diff --git a/dev/r/libs/gitbook-2.6.7/js/jquery.highlight.js b/dev/r/libs/gitbook-2.6.7/js/jquery.highlight.js
new file mode 100644
index 0000000..8ff7a0b
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/jquery.highlight.js
@@ -0,0 +1,86 @@
+gitbook.require(["jQuery"], function(jQuery) {
+
+/*
+ * jQuery Highlight plugin
+ *
+ * Based on highlight v3 by Johann Burkard
+ * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
+ *
+ * Code a little bit refactored and cleaned (in my humble opinion).
+ * Most important changes:
+ *  - has an option to highlight only entire words (wordsOnly - false by default),
+ *  - has an option to be case sensitive (caseSensitive - false by default)
+ *  - highlight element tag and class names can be specified in options
+ *
+ * Copyright (c) 2009 Bartek Szopka
+ *
+ * Licensed under MIT license.
+ *
+ */
+
+jQuery.extend({
+    highlight: function (node, re, nodeName, className) {
+        if (node.nodeType === 3) {
+            var match = node.data.match(re);
+            if (match) {
+                var highlight = document.createElement(nodeName || 'span');
+                highlight.className = className || 'highlight';
+                var wordNode = node.splitText(match.index);
+                wordNode.splitText(match[0].length);
+                var wordClone = wordNode.cloneNode(true);
+                highlight.appendChild(wordClone);
+                wordNode.parentNode.replaceChild(highlight, wordNode);
+                return 1; //skip added node in parent
+            }
+        } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children
+                !/(script|style)/i.test(node.tagName) && // ignore script and style nodes
+                !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted
+            for (var i = 0; i < node.childNodes.length; i++) {
+                i += jQuery.highlight(node.childNodes[i], re, nodeName, className);
+            }
+        }
+        return 0;
+    }
+});
+
+jQuery.fn.unhighlight = function (options) {
+    var settings = { className: 'highlight', element: 'span' };
+    jQuery.extend(settings, options);
+
+    return this.find(settings.element + "." + settings.className).each(function () {
+        var parent = this.parentNode;
+        parent.replaceChild(this.firstChild, this);
+        parent.normalize();
+    }).end();
+};
+
+jQuery.fn.highlight = function (words, options) {
+    var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false };
+    jQuery.extend(settings, options);
+
+    if (words.constructor === String) {
+        words = [words];
+        // also match 'foo-bar' if search for 'foo bar'
+        if (/\s/.test(words[0])) words.push(words[0].replace(/\s+/, '-'));
+    }
+    words = jQuery.grep(words, function(word, i){
+      return word !== '';
+    });
+    words = jQuery.map(words, function(word, i) {
+      return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+    });
+    if (words.length === 0) { return this; }
+
+    var flag = settings.caseSensitive ? "" : "i";
+    var pattern = "(" + words.join("|") + ")";
+    if (settings.wordsOnly) {
+        pattern = "\\b" + pattern + "\\b";
+    }
+    var re = new RegExp(pattern, flag);
+
+    return this.each(function () {
+        jQuery.highlight(this, re, settings.element, settings.className);
+    });
+};
+
+});
diff --git a/dev/r/libs/gitbook-2.6.7/js/plugin-bookdown.js b/dev/r/libs/gitbook-2.6.7/js/plugin-bookdown.js
new file mode 100644
index 0000000..0080966
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/plugin-bookdown.js
@@ -0,0 +1,259 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+
+  var gs = gitbook.storage;
+
+  gitbook.events.bind("start", function(e, config) {
+
+    // add the Edit button (edit on Github)
+    var edit = config.edit;
+    if (edit && edit.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-edit',
+      label: edit.text || 'Edit',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(edit.link);
+      }
+    });
+
+    // add the History button (file history on Github)
+    var history = config.history;
+    if (history && history.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-history',
+      label: history.text || 'History',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(history.link);
+      }
+    });
+
+    // add the View button (file view on Github)
+    var view = config.view;
+    if (view && view.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-eye',
+      label: view.text || 'View Source',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(view.link);
+      }
+    });
+
+    // add the Download button
+    var down = config.download;
+    var normalizeDownload = function() {
+      if (!down || !(down instanceof Array) || down.length === 0) return;
+      if (down[0] instanceof Array) return down;
+      return $.map(down, function(file, i) {
+        return [[file, file.replace(/.*[.]/g, '').toUpperCase()]];
+      });
+    };
+    down = normalizeDownload(down);
+    if (down) if (down.length === 1 && /[.]pdf$/.test(down[0][0])) {
+      gitbook.toolbar.createButton({
+        icon: 'fa fa-file-pdf-o',
+        label: down[0][1],
+        position: 'left',
+        onClick: function(e) {
+          e.preventDefault();
+          window.open(down[0][0]);
+        }
+      });
+    } else {
+      gitbook.toolbar.createButton({
+        icon: 'fa fa-download',
+        label: 'Download',
+        position: 'left',
+        dropdown: $.map(down, function(item, i) {
+          return {
+            text: item[1],
+            onClick: function(e) {
+              e.preventDefault();
+              window.open(item[0]);
+            }
+          };
+        })
+      });
+    }
+
+    // add the Information button
+    var info = ['Keyboard shortcuts (<> indicates arrow keys):',
+      '<left>/<right>: navigate to previous/next page',
+      's: Toggle sidebar'];
+    if (config.search !== false) info.push('f: Toggle search input ' +
+      '(use <up>/<down>/Enter in the search input to navigate through search matches; ' +
+      'press Esc to cancel search)');
+    if (config.info !== false) gitbook.toolbar.createButton({
+      icon: 'fa fa-info',
+      label: 'Information about the toolbar',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.alert(info.join('\n\n'));
+      }
+    });
+
+    // highlight the current section in TOC
+    var href = window.location.pathname;
+    href = href.substr(href.lastIndexOf('/') + 1);
+    // accentuated characters need to be decoded (#819)
+    href = decodeURIComponent(href);
+    if (href === '') href = 'index.html';
+    var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first();
+    var summary = $('ul.summary'), chaps = summary.find('li.chapter');
+    if (li.length === 0) li = chaps.first();
+    li.addClass('active');
+    chaps.on('click', function(e) {
+      chaps.removeClass('active');
+      $(this).addClass('active');
+      gs.set('tocScrollTop', summary.scrollTop());
+    });
+
+    var toc = config.toc;
+    // collapse TOC items that are not for the current chapter
+    if (toc && toc.collapse) (function() {
+      var type = toc.collapse;
+      if (type === 'none') return;
+      if (type !== 'section' && type !== 'subsection') return;
+      // sections under chapters
+      var toc_sub = summary.children('li[data-level]').children('ul');
+      if (type === 'section') {
+        toc_sub.hide()
+          .parent().has(li).children('ul').show();
+      } else {
+        toc_sub.children('li').children('ul').hide()
+          .parent().has(li).children('ul').show();
+      }
+      li.children('ul').show();
+      var toc_sub2 = toc_sub.children('li');
+      if (type === 'section') toc_sub2.children('ul').hide();
+      summary.children('li[data-level]').find('a')
+        .on('click.bookdown', function(e) {
+          if (href === $(this).attr('href').replace(/#.*/, ''))
+            $(this).parent('li').children('ul').toggle();
+        });
+    })();
+
+    // add tooltips to the <a>'s that are truncated
+    $('a').each(function(i, el) {
+      if (el.offsetWidth >= el.scrollWidth) return;
+      if (typeof el.title === 'undefined') return;
+      el.title = el.text;
+    });
+
+    // restore TOC scroll position
+    var pos = gs.get('tocScrollTop');
+    if (typeof pos !== 'undefined') summary.scrollTop(pos);
+
+    // highlight the TOC item that has same text as the heading in view as scrolling
+    if (toc && toc.scroll_highlight !== false && li.length > 0) (function() {
+      // scroll the current TOC item into viewport
+      var ht = $(window).height(), rect = li[0].getBoundingClientRect();
+      if (rect.top >= ht || rect.top <= 0 || rect.bottom <= 0) {
+        summary.scrollTop(li[0].offsetTop);
+      }
+      // current chapter TOC items
+      var items = $('a[href^="' + href + '"]').parent('li.chapter'),
+          m = items.length;
+      if (m === 0) {
+        items = summary.find('li.chapter');
+        m = items.length;
+      }
+      if (m === 0) return;
+      // all section titles on current page
+      var hs = bookInner.find('.page-inner').find('h1,h2,h3'), n = hs.length,
+          ts = hs.map(function(i, el) { return $(el).text(); });
+      if (n === 0) return;
+      var scrollHandler = function(e) {
+        var ht = $(window).height();
+        clearTimeout($.data(this, 'scrollTimer'));
+        $.data(this, 'scrollTimer', setTimeout(function() {
+          // find the first visible title in the viewport
+          for (var i = 0; i < n; i++) {
+            var rect = hs[i].getBoundingClientRect();
+            if (rect.top >= 0 && rect.bottom <= ht) break;
+          }
+          if (i === n) return;
+          items.removeClass('active');
+          for (var j = 0; j < m; j++) {
+            if (items.eq(j).children('a').first().text() === ts[i]) break;
+          }
+          if (j === m) j = 0;  // highlight the chapter title
+          // search bottom-up for a visible TOC item to highlight; if an item is
+          // hidden, we check if its parent is visible, and so on
+          while (j > 0 && items.eq(j).is(':hidden')) j--;
+          items.eq(j).addClass('active');
+        }, 250));
+      };
+      bookInner.on('scroll.bookdown', scrollHandler);
+      bookBody.on('scroll.bookdown', scrollHandler);
+    })();
+
+    // do not refresh the page if the TOC item points to the current page
+    $('a[href="' + href + '"]').parent('li.chapter').children('a')
+      .on('click', function(e) {
+        bookInner.scrollTop(0);
+        bookBody.scrollTop(0);
+        return false;
+      });
+
+    var toolbar = config.toolbar;
+    if (!toolbar || toolbar.position !== 'static') {
+      var bookHeader = $('.book-header');
+      bookBody.addClass('fixed');
+      bookHeader.addClass('fixed')
+      .css('background-color', bookBody.css('background-color'))
+      .on('click.bookdown', function(e) {
+        // the theme may have changed after user clicks the theme button
+        bookHeader.css('background-color', bookBody.css('background-color'));
+      });
+    }
+
+  });
+
+  gitbook.events.bind("page.change", function(e) {
+    // store TOC scroll position
+    var summary = $('ul.summary');
+    gs.set('tocScrollTop', summary.scrollTop());
+  });
+
+  var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner');
+  var chapterTitle = function() {
+    return bookInner.find('.page-inner').find('h1,h2').first().text();
+  };
+  var saveScrollPos = function(e) {
+    // save scroll position before page is reloaded
+    gs.set('bodyScrollTop', {
+      body: bookBody.scrollTop(),
+      inner: bookInner.scrollTop(),
+      focused: document.hasFocus(),
+      title: chapterTitle()
+    });
+  };
+  $(document).on('servr:reload', saveScrollPos);
+
+  // check if the page is loaded in an iframe (e.g. the RStudio preview window)
+  var inIFrame = function() {
+    var inIframe = true;
+    try { inIframe = window.self !== window.top; } catch (e) {}
+    return inIframe;
+  };
+  if (inIFrame()) {
+    $(window).on('blur unload', saveScrollPos);
+  }
+
+  $(function(e) {
+    var pos = gs.get('bodyScrollTop');
+    if (pos) {
+      if (pos.title === chapterTitle()) {
+        if (pos.body !== 0) bookBody.scrollTop(pos.body);
+        if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
+      }
+    }
+    if ((pos && pos.focused) || !inIFrame()) bookInner.find('.page-wrapper').focus();
+    // clear book body scroll position
+    gs.remove('bodyScrollTop');
+  });
+
+});
diff --git a/dev/r/libs/gitbook-2.6.7/js/plugin-clipboard.js b/dev/r/libs/gitbook-2.6.7/js/plugin-clipboard.js
new file mode 100644
index 0000000..f0880be
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/plugin-clipboard.js
@@ -0,0 +1,33 @@
+gitbook.require(["gitbook", "jQuery"], function(gitbook, $) {
+
+  var copyButton = '<button type="button" class="copy-to-clipboard-button" title="Copy to clipboard" aria-label="Copy to clipboard"><i class="fa fa-copy"></i></button>';
+  var clipboard;
+
+  gitbook.events.bind("page.change", function() {
+
+    if (!ClipboardJS.isSupported()) return;
+
+    // the page.change event is thrown twice: before and after the page changes
+    if (clipboard) {
+      // clipboard is already defined but we are on the same page
+      if (clipboard._prevPage === window.location.pathname) return;
+      // clipboard is already defined and url path change
+      // we can deduct that we are before page changes
+      clipboard.destroy(); // destroy the previous events listeners
+      clipboard = undefined; // reset the clipboard object
+      return;
+    }
+
+    $(copyButton).prependTo("div.sourceCode");
+
+    clipboard = new ClipboardJS(".copy-to-clipboard-button", {
+      text: function(trigger) {
+        return trigger.parentNode.textContent;
+      }
+    });
+
+    clipboard._prevPage = window.location.pathname
+
+  });
+
+});
diff --git a/dev/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js b/dev/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js
new file mode 100644
index 0000000..a70f0fb
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js
@@ -0,0 +1,152 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var fontState;
+
+    var THEMES = {
+        "white": 0,
+        "sepia": 1,
+        "night": 2
+    };
+
+    var FAMILY = {
+        "serif": 0,
+        "sans": 1
+    };
+
+    // Save current font settings
+    function saveFontSettings() {
+        gitbook.storage.set("fontState", fontState);
+        update();
+    }
+
+    // Increase font size
+    function enlargeFontSize(e) {
+        e.preventDefault();
+        if (fontState.size >= 4) return;
+
+        fontState.size++;
+        saveFontSettings();
+    };
+
+    // Decrease font size
+    function reduceFontSize(e) {
+        e.preventDefault();
+        if (fontState.size <= 0) return;
+
+        fontState.size--;
+        saveFontSettings();
+    };
+
+    // Change font family
+    function changeFontFamily(index, e) {
+        e.preventDefault();
+
+        fontState.family = index;
+        saveFontSettings();
+    };
+
+    // Change type of color
+    function changeColorTheme(index, e) {
+        e.preventDefault();
+
+        var $book = $(".book");
+
+        if (fontState.theme !== 0)
+            $book.removeClass("color-theme-"+fontState.theme);
+
+        fontState.theme = index;
+        if (fontState.theme !== 0)
+            $book.addClass("color-theme-"+fontState.theme);
+
+        saveFontSettings();
+    };
+
+    function update() {
+        var $book = gitbook.state.$book;
+
+        $(".font-settings .font-family-list li").removeClass("active");
+        $(".font-settings .font-family-list li:nth-child("+(fontState.family+1)+")").addClass("active");
+
+        $book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
+        $book.addClass("font-size-"+fontState.size);
+        $book.addClass("font-family-"+fontState.family);
+
+        if(fontState.theme !== 0) {
+            $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
+            $book.addClass("color-theme-"+fontState.theme);
+        }
+    };
+
+    function init(config) {
+        var $bookBody, $book;
+
+        //Find DOM elements.
+        $book = gitbook.state.$book;
+        $bookBody = $book.find(".book-body");
+
+        // Instantiate font state object
+        fontState = gitbook.storage.get("fontState", {
+            size: config.size || 2,
+            family: FAMILY[config.family || "sans"],
+            theme: THEMES[config.theme || "white"]
+        });
+
+        update();
+    };
+
+
+    gitbook.events.bind("start", function(e, config) {
+        var opts = config.fontsettings;
+        if (!opts) return;
+        
+        // Create buttons in toolbar
+        gitbook.toolbar.createButton({
+            icon: 'fa fa-font',
+            label: 'Font Settings',
+            className: 'font-settings',
+            dropdown: [
+                [
+                    {
+                        text: 'A',
+                        className: 'font-reduce',
+                        onClick: reduceFontSize
+                    },
+                    {
+                        text: 'A',
+                        className: 'font-enlarge',
+                        onClick: enlargeFontSize
+                    }
+                ],
+                [
+                    {
+                        text: 'Serif',
+                        onClick: _.partial(changeFontFamily, 0)
+                    },
+                    {
+                        text: 'Sans',
+                        onClick: _.partial(changeFontFamily, 1)
+                    }
+                ],
+                [
+                    {
+                        text: 'White',
+                        onClick: _.partial(changeColorTheme, 0)
+                    },
+                    {
+                        text: 'Sepia',
+                        onClick: _.partial(changeColorTheme, 1)
+                    },
+                    {
+                        text: 'Night',
+                        onClick: _.partial(changeColorTheme, 2)
+                    }
+                ]
+            ]
+        });
+
+
+        // Init current settings
+        init(opts);
+    });
+});
+
+
diff --git a/dev/r/libs/gitbook-2.6.7/js/plugin-search.js b/dev/r/libs/gitbook-2.6.7/js/plugin-search.js
new file mode 100644
index 0000000..747fcce
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/plugin-search.js
@@ -0,0 +1,270 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var index = null;
+    var fuse = null;
+    var _search = {engine: 'lunr', opts: {}};
+    var $searchInput, $searchLabel, $searchForm;
+    var $highlighted = [], hi, hiOpts = { className: 'search-highlight' };
+    var collapse = false, toc_visible = [];
+
+    function init(config) {
+        // Instantiate search settings
+        _search = gitbook.storage.get("search", {
+            engine: config.search.engine || 'lunr',
+            opts: config.search.options || {},
+        });
+    };
+
+    // Save current search settings
+    function saveSearchSettings() {
+        gitbook.storage.set("search", _search);
+    }
+
+    // Use a specific index
+    function loadIndex(data) {
+        // [Yihui] In bookdown, I use a character matrix to store the chapter
+        // content, and the index is dynamically built on the client side.
+        // Gitbook prebuilds the index data instead: https://github.com/GitbookIO/plugin-search
+        // We can certainly do that via R packages V8 and jsonlite, but let's
+        // see how slow it really is before improving it. On the other hand,
+        // lunr cannot handle non-English text very well, e.g. the default
+        // tokenizer cannot deal with Chinese text, so we may want to replace
+        // lunr with a dumb simple text matching approach.
+        if (_search.engine === 'lunr') {
+          index = lunr(function () {
+            this.ref('url');
+            this.field('title', { boost: 10 });
+            this.field('body');
+          });
+          data.map(function(item) {
+            index.add({
+              url: item[0],
+              title: item[1],
+              body: item[2]
+            });
+          });
+          return;
+        }
+        fuse = new Fuse(data.map((_data => {
+            return {
+                url: _data[0],
+                title: _data[1],
+                body: _data[2]
+            };
+        })), Object.assign(
+            {
+                includeScore: true,
+                threshold: 0.1,
+                ignoreLocation: true,
+                keys: ["title", "body"]
+            },
+            _search.opts
+        ));
+    }
+
+    // Fetch the search index
+    function fetchIndex() {
+        return $.getJSON(gitbook.state.basePath+"/search_index.json")
+                .then(loadIndex);  // [Yihui] we need to use this object later
+    }
+
+    // Search for a term and return results
+    function search(q) {
+        let results = [];
+        switch (_search.engine) {
+            case 'fuse':
+                if (!fuse) return;
+                results = fuse.search(q).map(function(result) {
+                    var parts = result.item.url.split('#');
+                    return {
+                        path: parts[0],
+                        hash: parts[1]
+                    };
+                });
+                break;
+            case 'lunr':
+            default:
+                if (!index) return;
+                results = _.chain(index.search(q)).map(function(result) {
+                    var parts = result.ref.split("#");
+                    return {
+                        path: parts[0],
+                        hash: parts[1]
+                    };
+                })
+                .value();
+        }
+
+        // [Yihui] Highlight the search keyword on current page
+        $highlighted = $('.page-inner')
+          .unhighlight(hiOpts).highlight(q, hiOpts).find('span.search-highlight');
+        scrollToHighlighted(0);
+
+        return results;
+    }
+
+    // [Yihui] Scroll the chapter body to the i-th highlighted string
+    function scrollToHighlighted(d) {
+      var n = $highlighted.length;
+      hi = hi === undefined ? 0 : hi + d;
+      // navignate to the previous/next page in the search results if reached the top/bottom
+      var b = hi < 0;
+      if (d !== 0 && (b || hi >= n)) {
+        var path = currentPath(), n2 = toc_visible.length;
+        if (n2 === 0) return;
+        for (var i = b ? 0 : n2; (b && i < n2) || (!b && i >= 0); i += b ? 1 : -1) {
+          if (toc_visible.eq(i).data('path') === path) break;
+        }
+        i += b ? -1 : 1;
+        if (i < 0) i = n2 - 1;
+        if (i >= n2) i = 0;
+        var lnk = toc_visible.eq(i).find('a[href$=".html"]');
+        if (lnk.length) lnk[0].click();
+        return;
+      }
+      if (n === 0) return;
+      var $p = $highlighted.eq(hi);
+      $p[0].scrollIntoView();
+      $highlighted.css('background-color', '');
+      // an orange background color on the current item and removed later
+      $p.css('background-color', 'orange');
+      setTimeout(function() {
+        $p.css('background-color', '');
+      }, 2000);
+    }
+
+    function currentPath() {
+      var href = window.location.pathname;
+      href = href.substr(href.lastIndexOf('/') + 1);
+      return href === '' ? 'index.html' : href;
+    }
+
+    // Create search form
+    function createForm(value) {
+        if ($searchForm) $searchForm.remove();
+        if ($searchLabel) $searchLabel.remove();
+        if ($searchInput) $searchInput.remove();
+
+        $searchForm = $('<div>', {
+            'class': 'book-search',
+            'role': 'search'
+        });
+
+        $searchLabel = $('<label>', {
+            'for': 'search-box',
+            'aria-hidden': 'false',
+            'hidden': ''
+        });
+
+        $searchInput = $('<input>', {
+            'id': 'search-box',
+            'type': 'search',
+            'class': 'form-control',
+            'val': value,
+            'placeholder': 'Type to search (Enter for navigation)',
+            'title': 'Use Enter or the <Down> key to navigate to the next match, or the <Up> key to the previous match'
+        });
+
+        $searchLabel.append("Type to search");
+        $searchLabel.appendTo($searchForm);
+        $searchInput.appendTo($searchForm);
+        $searchForm.prependTo(gitbook.state.$book.find('.book-summary'));
+    }
+
+    // Return true if search is open
+    function isSearchOpen() {
+        return gitbook.state.$book.hasClass("with-search");
+    }
+
+    // Toggle the search
+    function toggleSearch(_state) {
+        if (isSearchOpen() === _state) return;
+        if (!$searchInput) return;
+
+        gitbook.state.$book.toggleClass("with-search", _state);
+
+        // If search bar is open: focus input
+        if (isSearchOpen()) {
+            gitbook.sidebar.toggle(true);
+            $searchInput.focus();
+        } else {
+            $searchInput.blur();
+            $searchInput.val("");
+            gitbook.storage.remove("keyword");
+            gitbook.sidebar.filter(null);
+            $('.page-inner').unhighlight(hiOpts);
+        }
+    }
+
+    function sidebarFilter(results) {
+        gitbook.sidebar.filter(_.pluck(results, "path"));
+        toc_visible = $('ul.summary').find('li:visible');
+    }
+
+    // Recover current search when page changed
+    function recoverSearch() {
+        var keyword = gitbook.storage.get("keyword", "");
+
+        createForm(keyword);
+
+        if (keyword.length > 0) {
+            if(!isSearchOpen()) {
+                toggleSearch(true); // [Yihui] open the search box
+            }
+            sidebarFilter(search(keyword));
+        }
+    }
+
+
+    gitbook.events.bind("start", function(e, config) {
+        // [Yihui] disable search
+        if (config.search === false) return;
+        init(config);
+        collapse = !config.toc || config.toc.collapse === 'section' ||
+          config.toc.collapse === 'subsection';
+
+        // Pre-fetch search index and create the form
+        fetchIndex()
+        // [Yihui] recover search after the page is loaded
+        .then(recoverSearch);
+
+
+        // Type in search bar
+        $(document).on("keyup", ".book-search input", function(e) {
+            var key = (e.keyCode ? e.keyCode : e.which);
+            // [Yihui] Escape -> close search box; Up/Down/Enter: previous/next highlighted
+            if (key == 27) {
+                e.preventDefault();
+                toggleSearch(false);
+            } else if (key == 38) {
+              scrollToHighlighted(-1);
+            } else if (key == 40 || key == 13) {
+              scrollToHighlighted(1);
+            }
+        }).on("input", ".book-search input", function(e) {
+            var q = $(this).val().trim();
+            if (q.length === 0) {
+                gitbook.sidebar.filter(null);
+                gitbook.storage.remove("keyword");
+                $('.page-inner').unhighlight(hiOpts);
+            } else {
+                var results = search(q);
+                sidebarFilter(results);
+                gitbook.storage.set("keyword", q);
+            }
+        });
+
+        // Create the toggle search button
+        gitbook.toolbar.createButton({
+            icon: 'fa fa-search',
+            label: 'Search',
+            position: 'left',
+            onClick: toggleSearch
+        });
+
+        // Bind keyboard to toggle search
+        gitbook.keyboard.bind(['f'], toggleSearch);
+    });
+
+    // [Yihui] do not try to recover search; always start fresh
+    // gitbook.events.bind("page.change", recoverSearch);
+});
diff --git a/dev/r/libs/gitbook-2.6.7/js/plugin-sharing.js b/dev/r/libs/gitbook-2.6.7/js/plugin-sharing.js
new file mode 100644
index 0000000..9a01b0f
--- /dev/null
+++ b/dev/r/libs/gitbook-2.6.7/js/plugin-sharing.js
@@ -0,0 +1,116 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var SITES = {
+        'github': {
+            'label': 'Github',
+            'icon': 'fa fa-github',
+            'onClick': function(e) {
+                e.preventDefault();
+                var repo = $('meta[name="github-repo"]').attr('content');
+                if (typeof repo === 'undefined') throw("Github repo not defined");
+                window.open("https://github.com/"+repo);
+            }
+        },
+        'facebook': {
+            'label': 'Facebook',
+            'icon': 'fa fa-facebook',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(location.href));
+            }
+        },
+        'twitter': {
+            'label': 'Twitter',
+            'icon': 'fa fa-twitter',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://twitter.com/intent/tweet?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent(location.href)+"&hashtags=rmarkdown,bookdown");
+            }
+        },
+        'linkedin': {
+            'label': 'LinkedIn',
+            'icon': 'fa fa-linkedin',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
+            }
+        },
+        'weibo': {
+            'label': 'Weibo',
+            'icon': 'fa fa-weibo',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
+            }
+        },
+        'instapaper': {
+            'label': 'Instapaper',
+            'icon': 'fa fa-italic',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href));
+            }
+        },
+        'vk': {
+            'label': 'VK',
+            'icon': 'fa fa-vk',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href));
+            }
+        },
+        'whatsapp': {
+            'label': 'Whatsapp',
+            'icon': 'fa fa-whatsapp',
+            'onClick': function(e) {
+                e.preventDefault();
+                var url = encodeURIComponent(location.href);
+                window.open((isMobile() ? "whatsapp://send" : "https://web.whatsapp.com/send") + "?text=" + url);
+            }
+        },
+    };
+
+    function isMobile() {
+      return !!navigator.maxTouchPoints;
+    }
+
+    gitbook.events.bind("start", function(e, config) {
+        var opts = config.sharing;
+        if (!opts) return;
+
+        // Create dropdown menu
+        var menu = _.chain(opts.all)
+            .map(function(id) {
+                var site = SITES[id];
+                if (!site) return;
+                return {
+                    text: site.label,
+                    onClick: site.onClick
+                };
+            })
+            .compact()
+            .value();
+
+        // Create main button with dropdown
+        if (menu.length > 0) {
+            gitbook.toolbar.createButton({
+                icon: 'fa fa-share-alt',
+                label: 'Share',
+                position: 'right',
+                dropdown: [menu]
+            });
+        }
+
+        // Direct actions to share
+        _.each(SITES, function(site, sideId) {
+            if (!opts[sideId]) return;
+
+            gitbook.toolbar.createButton({
+                icon: site.icon,
+                label: site.label,
+                title: site.label,
+                position: 'right',
+                onClick: site.onClick
+            });
+        });
+    });
+});
diff --git a/dev/r/libs/jquery-3.6.0/jquery-3.6.0.min.js b/dev/r/libs/jquery-3.6.0/jquery-3.6.0.min.js
new file mode 100644
index 0000000..c4c6022
--- /dev/null
+++ b/dev/r/libs/jquery-3.6.0/jquery-3.6.0.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
diff --git a/dev/r/manipulating-data---arrays.html b/dev/r/manipulating-data---arrays.html
new file mode 100644
index 0000000..c0d47f8
--- /dev/null
+++ b/dev/r/manipulating-data---arrays.html
@@ -0,0 +1,654 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>6 Manipulating Data - Arrays | Apache Arrow R Cookbook</title>
+  <meta name="description" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="defining-data-types.html"/>
+<link rel="next" href="manipulating-data---tables.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="manipulating-data---arrays" class="section level1 hasAnchor" number="6">
+<h1><span class="header-section-number">6</span> Manipulating Data - Arrays<a href="manipulating-data---arrays.html#manipulating-data---arrays" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-3" class="section level2 hasAnchor" number="6.1">
+<h2><span class="header-section-number">6.1</span> Introduction<a href="manipulating-data---arrays.html#introduction-3" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>An Arrow Array is roughly equivalent to an R vector - it can be used to
+represent a single column of data, with all values having the same data type.</p>
+<p>A number of base R functions which have S3 generic methods have been implemented
+to work on Arrow Arrays; for example <code>mean</code>, <code>min</code>, and <code>max</code>.</p>
+</div>
+<div id="filter-by-values-matching-a-predicate-or-mask" class="section level2 hasAnchor" number="6.2">
+<h2><span class="header-section-number">6.2</span> Filter by values matching a predicate or mask<a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to search for values in an Array that match a predicate condition.</p>
+<div id="solution-33" class="section level3 hasAnchor" number="6.2.1">
+<h3><span class="header-section-number">6.2.1</span> Solution<a href="manipulating-data---arrays.html#solution-33" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb85-1"><a href="manipulating-data---arrays.html#cb85-1" tabindex="-1"></a>my_values <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>, <span class="cn">NA</span>))</span>
+<span id="cb85-2"><a href="manipulating-data---arrays.html#cb85-2" tabindex="-1"></a>my_values[my_values <span class="sc">&gt;</span> <span class="dv">3</span>]</span></code></pre></div>
+<pre><code>## Array
+## &lt;int32&gt;
+## [
+##   4,
+##   5,
+##   null
+## ]</code></pre>
+</div>
+<div id="discussion-11" class="section level3 hasAnchor" number="6.2.2">
+<h3><span class="header-section-number">6.2.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-11" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can refer to items in an Array using the square brackets <code>[]</code> like you can
+an R vector.</p>
+</div>
+</div>
+<div id="compute-meanminmax-etc-value-of-an-array" class="section level2 hasAnchor" number="6.3">
+<h2><span class="header-section-number">6.3</span> Compute Mean/Min/Max, etc value of an Array<a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to calculate the mean, minimum, or maximum of values in an array.</p>
+<div id="solution-34" class="section level3 hasAnchor" number="6.3.1">
+<h3><span class="header-section-number">6.3.1</span> Solution<a href="manipulating-data---arrays.html#solution-34" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb87"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb87-1"><a href="manipulating-data---arrays.html#cb87-1" tabindex="-1"></a>my_values <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>, <span class="cn">NA</span>))</span>
+<span id="cb87-2"><a href="manipulating-data---arrays.html#cb87-2" tabindex="-1"></a><span class="fu">mean</span>(my_values, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## Scalar
+## 3</code></pre>
+</div>
+<div id="discussion-12" class="section level3 hasAnchor" number="6.3.2">
+<h3><span class="header-section-number">6.3.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-12" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Many base R generic functions such as <code>mean()</code>, <code>min()</code>, and <code>max()</code> have been
+mapped to their Arrow equivalents, and so can be called on Arrow Array objects
+in the same way. They will return Arrow objects themselves.</p>
+<p>If you want to use an R function which does not have an Arrow mapping, you can
+use <code>as.vector()</code> to convert Arrow objects to base R vectors.</p>
+<div class="sourceCode" id="cb89"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb89-1"><a href="manipulating-data---arrays.html#cb89-1" tabindex="-1"></a>arrow_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">100</span>)</span>
+<span id="cb89-2"><a href="manipulating-data---arrays.html#cb89-2" tabindex="-1"></a><span class="co"># get Tukey&#39;s five-number summary</span></span>
+<span id="cb89-3"><a href="manipulating-data---arrays.html#cb89-3" tabindex="-1"></a><span class="fu">fivenum</span>(<span class="fu">as.vector</span>(arrow_array))</span></code></pre></div>
+<pre><code>## [1]   1.0  25.5  50.5  75.5 100.0</code></pre>
+<p>You can tell if a function is a standard S3 generic function by looking
+at the body of the function - S3 generic functions call <code>UseMethod()</code>
+to determine the appropriate version of that function to use for the object.</p>
+<div class="sourceCode" id="cb91"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb91-1"><a href="manipulating-data---arrays.html#cb91-1" tabindex="-1"></a>mean</span></code></pre></div>
+<pre><code>## function (x, ...) 
+## UseMethod(&quot;mean&quot;)
+## &lt;bytecode: 0x55d9fb32d190&gt;
+## &lt;environment: namespace:base&gt;</code></pre>
+<p>You can also use <code>isS3stdGeneric()</code> to determine if a function is an S3 generic.</p>
+<div class="sourceCode" id="cb93"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb93-1"><a href="manipulating-data---arrays.html#cb93-1" tabindex="-1"></a><span class="fu">isS3stdGeneric</span>(<span class="st">&quot;mean&quot;</span>)</span></code></pre></div>
+<pre><code>## mean 
+## TRUE</code></pre>
+<p>If you find an S3 generic function which isn’t implemented for Arrow objects
+but you would like to be able to use, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a>.</p>
+</div>
+</div>
+<div id="count-occurrences-of-elements-in-an-array" class="section level2 hasAnchor" number="6.4">
+<h2><span class="header-section-number">6.4</span> Count occurrences of elements in an Array<a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to count repeated values in an Array.</p>
+<div id="solution-35" class="section level3 hasAnchor" number="6.4.1">
+<h3><span class="header-section-number">6.4.1</span> Solution<a href="manipulating-data---arrays.html#solution-35" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb95"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb95-1"><a href="manipulating-data---arrays.html#cb95-1" tabindex="-1"></a>repeated_vals <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>))</span>
+<span id="cb95-2"><a href="manipulating-data---arrays.html#cb95-2" tabindex="-1"></a><span class="fu">value_counts</span>(repeated_vals)</span></code></pre></div>
+<pre><code>## StructArray
+## &lt;struct&lt;values: double, counts: int64&gt;&gt;
+## -- is_valid: all not null
+## -- child 0 type: double
+##   [
+##     1,
+##     2,
+##     3
+##   ]
+## -- child 1 type: int64
+##   [
+##     2,
+##     1,
+##     5
+##   ]</code></pre>
+</div>
+<div id="discussion-13" class="section level3 hasAnchor" number="6.4.2">
+<h3><span class="header-section-number">6.4.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-13" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Some functions in the Arrow R package do not have base R equivalents. In other
+cases, the base R equivalents are not generic functions so they cannot be called
+directly on Arrow Array objects.</p>
+<p>For example, the <code>value_counts()</code> function in the Arrow R package is loosely
+equivalent to the base R function <code>table()</code>, which is not a generic function.</p>
+</div>
+</div>
+<div id="apply-arithmetic-functions-to-arrays." class="section level2 hasAnchor" number="6.5">
+<h2><span class="header-section-number">6.5</span> Apply arithmetic functions to Arrays.<a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays." class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use the various arithmetic operators on Array objects.</p>
+<div id="solution-36" class="section level3 hasAnchor" number="6.5.1">
+<h3><span class="header-section-number">6.5.1</span> Solution<a href="manipulating-data---arrays.html#solution-36" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb97"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb97-1"><a href="manipulating-data---arrays.html#cb97-1" tabindex="-1"></a>num_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">10</span>)</span>
+<span id="cb97-2"><a href="manipulating-data---arrays.html#cb97-2" tabindex="-1"></a>num_array <span class="sc">+</span> <span class="dv">10</span></span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   11,
+##   12,
+##   13,
+##   14,
+##   15,
+##   16,
+##   17,
+##   18,
+##   19,
+##   20
+## ]</code></pre>
+</div>
+<div id="discussion-14" class="section level3 hasAnchor" number="6.5.2">
+<h3><span class="header-section-number">6.5.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-14" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You will get the same result if you pass in the value you’re adding as an Arrow object.</p>
+<div class="sourceCode" id="cb99"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb99-1"><a href="manipulating-data---arrays.html#cb99-1" tabindex="-1"></a>num_array <span class="sc">+</span> Scalar<span class="sc">$</span><span class="fu">create</span>(<span class="dv">10</span>)</span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   11,
+##   12,
+##   13,
+##   14,
+##   15,
+##   16,
+##   17,
+##   18,
+##   19,
+##   20
+## ]</code></pre>
+</div>
+</div>
+<div id="call-arrow-compute-functions-directly-on-arrays" class="section level2 hasAnchor" number="6.6">
+<h2><span class="header-section-number">6.6</span> Call Arrow compute functions directly on Arrays<a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to call an Arrow compute function directly on an Array.</p>
+<div id="solution-37" class="section level3 hasAnchor" number="6.6.1">
+<h3><span class="header-section-number">6.6.1</span> Solution<a href="manipulating-data---arrays.html#solution-37" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb101"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb101-1"><a href="manipulating-data---arrays.html#cb101-1" tabindex="-1"></a>first_100_numbers <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">100</span>)</span>
+<span id="cb101-2"><a href="manipulating-data---arrays.html#cb101-2" tabindex="-1"></a></span>
+<span id="cb101-3"><a href="manipulating-data---arrays.html#cb101-3" tabindex="-1"></a><span class="co"># Calculate the variance of 1 to 100, setting the delta degrees of freedom to 0.</span></span>
+<span id="cb101-4"><a href="manipulating-data---arrays.html#cb101-4" tabindex="-1"></a><span class="fu">call_function</span>(<span class="st">&quot;variance&quot;</span>, first_100_numbers, <span class="at">options =</span> <span class="fu">list</span>(<span class="at">ddof =</span> <span class="dv">0</span>))</span></code></pre></div>
+<pre><code>## Scalar
+## 833.25</code></pre>
+</div>
+<div id="discussion-15" class="section level3 hasAnchor" number="6.6.2">
+<h3><span class="header-section-number">6.6.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-15" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can use <code>call_function()</code> to call Arrow compute functions directly on
+Scalar, Array, and ChunkedArray objects. The returned object will be an Arrow object.</p>
+</div>
+<div id="see-also-2" class="section level3 hasAnchor" number="6.6.3">
+<h3><span class="header-section-number">6.6.3</span> See also<a href="manipulating-data---arrays.html#see-also-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For a more in-depth discussion of Arrow compute functions, see the section on <a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow">using arrow functions in dplyr verbs in arrow</a></p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="defining-data-types.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="manipulating-data---tables.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/arrays.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/manipulating-data---tables.html b/dev/r/manipulating-data---tables.html
new file mode 100644
index 0000000..fd0277f
--- /dev/null
+++ b/dev/r/manipulating-data---tables.html
@@ -0,0 +1,964 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>7 Manipulating Data - Tables | Apache Arrow R Cookbook</title>
+  <meta name="description" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="manipulating-data---arrays.html"/>
+<link rel="next" href="using-pyarrow-from-r.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="manipulating-data---tables" class="section level1 hasAnchor" number="7">
+<h1><span class="header-section-number">7</span> Manipulating Data - Tables<a href="manipulating-data---tables.html#manipulating-data---tables" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-4" class="section level2 hasAnchor" number="7.1">
+<h2><span class="header-section-number">7.1</span> Introduction<a href="manipulating-data---tables.html#introduction-4" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>One of the aims of the Arrow project is to reduce duplication between different
+data frame implementations. The underlying implementation of a data frame is a
+conceptually different thing to the code- or the application programming interface (API)-that you write to work with it.</p>
+<p>You may have seen this before in packages like dbplyr which allow you to use
+the dplyr API to interact with SQL databases.</p>
+<p>The Arrow R package has been written so that the underlying Arrow Table-like
+objects can be manipulated using the dplyr API, which allows you to use dplyr verbs.</p>
+<p>For example, here’s a short pipeline of data manipulation which uses dplyr exclusively:</p>
+<div class="sourceCode" id="cb103"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb103-1"><a href="manipulating-data---tables.html#cb103-1" tabindex="-1"></a><span class="fu">library</span>(dplyr)</span>
+<span id="cb103-2"><a href="manipulating-data---tables.html#cb103-2" tabindex="-1"></a>starwars <span class="sc">%&gt;%</span></span>
+<span id="cb103-3"><a href="manipulating-data---tables.html#cb103-3" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb103-4"><a href="manipulating-data---tables.html#cb103-4" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">height_ft =</span> height<span class="sc">/</span><span class="fl">30.48</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb103-5"><a href="manipulating-data---tables.html#cb103-5" tabindex="-1"></a>  <span class="fu">select</span>(name, height_ft)</span></code></pre></div>
+<pre><code>## # A tibble: 35 × 2
+##    name               height_ft
+##    &lt;chr&gt;                  &lt;dbl&gt;
+##  1 Luke Skywalker          5.64
+##  2 Darth Vader             6.63
+##  3 Leia Organa             4.92
+##  4 Owen Lars               5.84
+##  5 Beru Whitesun Lars      5.41
+##  6 Biggs Darklighter       6.00
+##  7 Obi-Wan Kenobi          5.97
+##  8 Anakin Skywalker        6.17
+##  9 Wilhuff Tarkin          5.91
+## 10 Han Solo                5.91
+## # ℹ 25 more rows</code></pre>
+<p>And the same results as using Arrow with dplyr syntax:</p>
+<div class="sourceCode" id="cb105"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb105-1"><a href="manipulating-data---tables.html#cb105-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb105-2"><a href="manipulating-data---tables.html#cb105-2" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb105-3"><a href="manipulating-data---tables.html#cb105-3" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">height_ft =</span> height<span class="sc">/</span><span class="fl">30.48</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb105-4"><a href="manipulating-data---tables.html#cb105-4" tabindex="-1"></a>  <span class="fu">select</span>(name, height_ft) <span class="sc">%&gt;%</span></span>
+<span id="cb105-5"><a href="manipulating-data---tables.html#cb105-5" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 35 × 2
+##    name               height_ft
+##    &lt;chr&gt;                  &lt;dbl&gt;
+##  1 Luke Skywalker          5.64
+##  2 Darth Vader             6.63
+##  3 Leia Organa             4.92
+##  4 Owen Lars               5.84
+##  5 Beru Whitesun Lars      5.41
+##  6 Biggs Darklighter       6.00
+##  7 Obi-Wan Kenobi          5.97
+##  8 Anakin Skywalker        6.17
+##  9 Wilhuff Tarkin          5.91
+## 10 Han Solo                5.91
+## # ℹ 25 more rows</code></pre>
+<p>You’ll notice we’ve used <code>collect()</code> in the Arrow pipeline above. That’s because
+one of the ways in which Arrow is efficient is that it works out the instructions
+for the calculations it needs to perform (<em>expressions</em>) and only runs them
+using Arrow once you actually pull the data into your R session. This means
+instead of doing lots of separate operations, it does them all at once in a
+more optimised way. This is called <em>lazy evaluation</em>.</p>
+<p>It also means that you are able to manipulate data that is larger than you can
+fit into memory on the machine you’re running your code on, if you only pull
+data into R when you have selected the desired subset, or when using functions
+which can operate on chunks of data.</p>
+<p>You can also have data which is split across multiple files. For example, you
+might have files which are stored in multiple Parquet or Feather files,
+partitioned across different directories. You can open partitioned or multi-file datasets
+using <code>open_dataset()</code> as discussed in a previous chapter, and then manipulate
+this data using Arrow before even reading any of the data into R.</p>
+</div>
+<div id="use-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.2">
+<h2><span class="header-section-number">7.2</span> Use dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use a dplyr verb in Arrow.</p>
+<div id="solution-38" class="section level3 hasAnchor" number="7.2.1">
+<h3><span class="header-section-number">7.2.1</span> Solution<a href="manipulating-data---tables.html#solution-38" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb107"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb107-1"><a href="manipulating-data---tables.html#cb107-1" tabindex="-1"></a><span class="fu">library</span>(dplyr)</span>
+<span id="cb107-2"><a href="manipulating-data---tables.html#cb107-2" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb107-3"><a href="manipulating-data---tables.html#cb107-3" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>, homeworld <span class="sc">==</span> <span class="st">&quot;Tatooine&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb107-4"><a href="manipulating-data---tables.html#cb107-4" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 8 × 14
+##   name      height  mass hair_color skin_color eye_color birth_year sex   gender
+##   &lt;chr&gt;      &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+## 1 Luke Sky…    172    77 blond      fair       blue            19   male  mascu…
+## 2 Darth Va…    202   136 none       white      yellow          41.9 male  mascu…
+## 3 Owen Lars    178   120 brown, gr… light      blue            52   male  mascu…
+## 4 Beru Whi…    165    75 brown      light      blue            47   fema… femin…
+## 5 Biggs Da…    183    84 black      light      brown           24   male  mascu…
+## 6 Anakin S…    188    84 blond      fair       blue            41.9 male  mascu…
+## 7 Shmi Sky…    163    NA black      fair       brown           72   fema… femin…
+## 8 Cliegg L…    183    NA brown      fair       blue            82   male  mascu…
+## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;</code></pre>
+</div>
+<div id="discussion-16" class="section level3 hasAnchor" number="7.2.2">
+<h3><span class="header-section-number">7.2.2</span> Discussion<a href="manipulating-data---tables.html#discussion-16" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can use most of the dplyr verbs directly from Arrow.</p>
+</div>
+<div id="see-also-3" class="section level3 hasAnchor" number="7.2.3">
+<h3><span class="header-section-number">7.2.3</span> See also<a href="manipulating-data---tables.html#see-also-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can find examples of the various dplyr verbs in “Introduction to dplyr” -
+run <code>vignette("dplyr", package = "dplyr")</code> or view on
+the <a href="https://dplyr.tidyverse.org/articles/dplyr.html">pkgdown site</a>.</p>
+<p>You can see more information about using <code>arrow_table()</code> to create Arrow Tables
+and <code>collect()</code> to view them as R data frames in <a href="creating-arrow-objects.html#creating-arrow-objects">Creating Arrow Objects</a>.</p>
+</div>
+</div>
+<div id="use-r-functions-in-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.3">
+<h2><span class="header-section-number">7.3</span> Use R functions in dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use an R function inside a dplyr verb in Arrow.</p>
+<div id="solution-39" class="section level3 hasAnchor" number="7.3.1">
+<h3><span class="header-section-number">7.3.1</span> Solution<a href="manipulating-data---tables.html#solution-39" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb109"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb109-1"><a href="manipulating-data---tables.html#cb109-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb109-2"><a href="manipulating-data---tables.html#cb109-2" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="fu">str_detect</span>(name, <span class="st">&quot;Darth&quot;</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb109-3"><a href="manipulating-data---tables.html#cb109-3" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 2 × 14
+##   name      height  mass hair_color skin_color eye_color birth_year sex   gender
+##   &lt;chr&gt;      &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+## 1 Darth Va…    202   136 none       white      yellow          41.9 male  mascu…
+## 2 Darth Ma…    175    80 none       red        yellow          54   male  mascu…
+## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;</code></pre>
+</div>
+<div id="discussion-17" class="section level3 hasAnchor" number="7.3.2">
+<h3><span class="header-section-number">7.3.2</span> Discussion<a href="manipulating-data---tables.html#discussion-17" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The Arrow R package allows you to use dplyr verbs containing expressions which
+include base R and many tidyverse functions, but call Arrow functions under the hood.
+If you find any base R or tidyverse functions which you would like to see a
+mapping of in Arrow, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a>.</p>
+<p>The following packages (amongst some from others) have had many function
+bindings/mappings written in arrow:</p>
+<ul>
+<li><a href="https://lubridate.tidyverse.org/">lubridate</a></li>
+<li><a href="https://stringr.tidyverse.org/">stringr</a></li>
+<li><a href="https://dplyr.tidyverse.org/">dplyr</a></li>
+</ul>
+<p>If you try to call a function which does not have arrow mapping, the data will
+be pulled back into R, and you will see a warning message.</p>
+<div class="sourceCode" id="cb111"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb111-1"><a href="manipulating-data---tables.html#cb111-1" tabindex="-1"></a><span class="fu">library</span>(stringr)</span>
+<span id="cb111-2"><a href="manipulating-data---tables.html#cb111-2" tabindex="-1"></a></span>
+<span id="cb111-3"><a href="manipulating-data---tables.html#cb111-3" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb111-4"><a href="manipulating-data---tables.html#cb111-4" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">name_split =</span> <span class="fu">str_split_fixed</span>(name, <span class="st">&quot; &quot;</span>, <span class="dv">2</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb111-5"><a href="manipulating-data---tables.html#cb111-5" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## Warning: Expression str_split_fixed(name, &quot; &quot;, 2) not supported in Arrow;
+## pulling data into R</code></pre>
+<pre><code>## # A tibble: 87 × 15
+##    name     height  mass hair_color skin_color eye_color birth_year sex   gender
+##    &lt;chr&gt;     &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+##  1 Luke Sk…    172    77 blond      fair       blue            19   male  mascu…
+##  2 C-3PO       167    75 &lt;NA&gt;       gold       yellow         112   none  mascu…
+##  3 R2-D2        96    32 &lt;NA&gt;       white, bl… red             33   none  mascu…
+##  4 Darth V…    202   136 none       white      yellow          41.9 male  mascu…
+##  5 Leia Or…    150    49 brown      light      brown           19   fema… femin…
+##  6 Owen La…    178   120 brown, gr… light      blue            52   male  mascu…
+##  7 Beru Wh…    165    75 brown      light      blue            47   fema… femin…
+##  8 R5-D4        97    32 &lt;NA&gt;       white, red red             NA   none  mascu…
+##  9 Biggs D…    183    84 black      light      brown           24   male  mascu…
+## 10 Obi-Wan…    182    77 auburn, w… fair       blue-gray       57   male  mascu…
+## # ℹ 77 more rows
+## # ℹ 6 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;,
+## #   name_split &lt;chr[,2]&gt;</code></pre>
+</div>
+</div>
+<div id="use-arrow-functions-in-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.4">
+<h2><span class="header-section-number">7.4</span> Use Arrow functions in dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use a function which is implemented in Arrow’s C++ library but either:</p>
+<ul>
+<li>it doesn’t have a mapping to a base R or tidyverse equivalent, or</li>
+<li>it has a mapping but nevertheless you want to call the C++ function directly</li>
+</ul>
+<div id="solution-40" class="section level3 hasAnchor" number="7.4.1">
+<h3><span class="header-section-number">7.4.1</span> Solution<a href="manipulating-data---tables.html#solution-40" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb114-1"><a href="manipulating-data---tables.html#cb114-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb114-2"><a href="manipulating-data---tables.html#cb114-2" tabindex="-1"></a>  <span class="fu">select</span>(name) <span class="sc">%&gt;%</span></span>
+<span id="cb114-3"><a href="manipulating-data---tables.html#cb114-3" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">padded_name =</span> <span class="fu">arrow_ascii_lpad</span>(name, <span class="at">options =</span> <span class="fu">list</span>(<span class="at">width =</span> <span class="dv">10</span>, <span class="at">padding =</span> <span class="st">&quot;*&quot;</span>))) <span class="sc">%&gt;%</span></span>
+<span id="cb114-4"><a href="manipulating-data---tables.html#cb114-4" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 87 × 2
+##    name               padded_name       
+##    &lt;chr&gt;              &lt;chr&gt;             
+##  1 Luke Skywalker     Luke Skywalker    
+##  2 C-3PO              *****C-3PO        
+##  3 R2-D2              *****R2-D2        
+##  4 Darth Vader        Darth Vader       
+##  5 Leia Organa        Leia Organa       
+##  6 Owen Lars          *Owen Lars        
+##  7 Beru Whitesun Lars Beru Whitesun Lars
+##  8 R5-D4              *****R5-D4        
+##  9 Biggs Darklighter  Biggs Darklighter 
+## 10 Obi-Wan Kenobi     Obi-Wan Kenobi    
+## # ℹ 77 more rows</code></pre>
+</div>
+<div id="discussion-18" class="section level3 hasAnchor" number="7.4.2">
+<h3><span class="header-section-number">7.4.2</span> Discussion<a href="manipulating-data---tables.html#discussion-18" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The vast majority of Arrow C++ compute functions have been mapped to their
+base R or tidyverse equivalents, and we strongly recommend that you use
+these mappings where possible, as the original functions are well documented
+and the mapped versions have been tested to ensure the results returned are as
+expected.</p>
+<p>However, there may be circumstances in which you might want to use a compute
+function from the Arrow C++ library which does not have a base R or tidyverse
+equivalent.</p>
+<p>You can find documentation of Arrow C++ compute functions in
+<a href="https://arrow.apache.org/docs/cpp/compute.html#available-functions">the C++ documention</a>.
+This documentation lists all available compute functions, any associated options classes
+they need, and the valid data types that they can be used with.</p>
+<p>You can list all available Arrow compute functions from R by calling
+<code>list_compute_functions()</code>.</p>
+<div class="sourceCode" id="cb116"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb116-1"><a href="manipulating-data---tables.html#cb116-1" tabindex="-1"></a><span class="fu">list_compute_functions</span>()</span></code></pre></div>
+<pre><code>##   [1] &quot;abs&quot;                             &quot;abs_checked&quot;                    
+##   [3] &quot;acos&quot;                            &quot;acos_checked&quot;                   
+##   [5] &quot;add&quot;                             &quot;add_checked&quot;                    
+##   [7] &quot;all&quot;                             &quot;and&quot;                            
+##   [9] &quot;and_kleene&quot;                      &quot;and_not&quot;                        
+##  [11] &quot;and_not_kleene&quot;                  &quot;any&quot;                            
+##  [13] &quot;approximate_median&quot;              &quot;array_filter&quot;                   
+##  [15] &quot;array_sort_indices&quot;              &quot;array_take&quot;                     
+##  [17] &quot;ascii_capitalize&quot;                &quot;ascii_center&quot;                   
+##  [19] &quot;ascii_is_alnum&quot;                  &quot;ascii_is_alpha&quot;                 
+##  [21] &quot;ascii_is_decimal&quot;                &quot;ascii_is_lower&quot;                 
+##  [23] &quot;ascii_is_printable&quot;              &quot;ascii_is_space&quot;                 
+##  [25] &quot;ascii_is_title&quot;                  &quot;ascii_is_upper&quot;                 
+##  [27] &quot;ascii_lower&quot;                     &quot;ascii_lpad&quot;                     
+##  [29] &quot;ascii_ltrim&quot;                     &quot;ascii_ltrim_whitespace&quot;         
+##  [31] &quot;ascii_reverse&quot;                   &quot;ascii_rpad&quot;                     
+##  [33] &quot;ascii_rtrim&quot;                     &quot;ascii_rtrim_whitespace&quot;         
+##  [35] &quot;ascii_split_whitespace&quot;          &quot;ascii_swapcase&quot;                 
+##  [37] &quot;ascii_title&quot;                     &quot;ascii_trim&quot;                     
+##  [39] &quot;ascii_trim_whitespace&quot;           &quot;ascii_upper&quot;                    
+##  [41] &quot;asin&quot;                            &quot;asin_checked&quot;                   
+##  [43] &quot;assume_timezone&quot;                 &quot;atan&quot;                           
+##  [45] &quot;atan2&quot;                           &quot;binary_join&quot;                    
+##  [47] &quot;binary_join_element_wise&quot;        &quot;binary_length&quot;                  
+##  [49] &quot;binary_repeat&quot;                   &quot;binary_replace_slice&quot;           
+##  [51] &quot;binary_reverse&quot;                  &quot;binary_slice&quot;                   
+##  [53] &quot;bit_wise_and&quot;                    &quot;bit_wise_not&quot;                   
+##  [55] &quot;bit_wise_or&quot;                     &quot;bit_wise_xor&quot;                   
+##  [57] &quot;case_when&quot;                       &quot;cast&quot;                           
+##  [59] &quot;ceil&quot;                            &quot;ceil_temporal&quot;                  
+##  [61] &quot;choose&quot;                          &quot;coalesce&quot;                       
+##  [63] &quot;cos&quot;                             &quot;cos_checked&quot;                    
+##  [65] &quot;count&quot;                           &quot;count_all&quot;                      
+##  [67] &quot;count_distinct&quot;                  &quot;count_substring&quot;                
+##  [69] &quot;count_substring_regex&quot;           &quot;cumulative_max&quot;                 
+##  [71] &quot;cumulative_mean&quot;                 &quot;cumulative_min&quot;                 
+##  [73] &quot;cumulative_prod&quot;                 &quot;cumulative_prod_checked&quot;        
+##  [75] &quot;cumulative_sum&quot;                  &quot;cumulative_sum_checked&quot;         
+##  [77] &quot;day&quot;                             &quot;day_of_week&quot;                    
+##  [79] &quot;day_of_year&quot;                     &quot;day_time_interval_between&quot;      
+##  [81] &quot;days_between&quot;                    &quot;dictionary_decode&quot;              
+##  [83] &quot;dictionary_encode&quot;               &quot;divide&quot;                         
+##  [85] &quot;divide_checked&quot;                  &quot;drop_null&quot;                      
+##  [87] &quot;ends_with&quot;                       &quot;equal&quot;                          
+##  [89] &quot;exp&quot;                             &quot;extract_regex&quot;                  
+##  [91] &quot;fill_null_backward&quot;              &quot;fill_null_forward&quot;              
+##  [93] &quot;filter&quot;                          &quot;find_substring&quot;                 
+##  [95] &quot;find_substring_regex&quot;            &quot;first&quot;                          
+##  [97] &quot;first_last&quot;                      &quot;floor&quot;                          
+##  [99] &quot;floor_temporal&quot;                  &quot;greater&quot;                        
+## [101] &quot;greater_equal&quot;                   &quot;hour&quot;                           
+## [103] &quot;hours_between&quot;                   &quot;if_else&quot;                        
+## [105] &quot;index&quot;                           &quot;index_in&quot;                       
+## [107] &quot;index_in_meta_binary&quot;            &quot;indices_nonzero&quot;                
+## [109] &quot;invert&quot;                          &quot;is_dst&quot;                         
+## [111] &quot;is_finite&quot;                       &quot;is_in&quot;                          
+## [113] &quot;is_in_meta_binary&quot;               &quot;is_inf&quot;                         
+## [115] &quot;is_leap_year&quot;                    &quot;is_nan&quot;                         
+## [117] &quot;is_null&quot;                         &quot;is_valid&quot;                       
+## [119] &quot;iso_calendar&quot;                    &quot;iso_week&quot;                       
+## [121] &quot;iso_year&quot;                        &quot;last&quot;                           
+## [123] &quot;less&quot;                            &quot;less_equal&quot;                     
+## [125] &quot;list_element&quot;                    &quot;list_flatten&quot;                   
+## [127] &quot;list_parent_indices&quot;             &quot;list_slice&quot;                     
+## [129] &quot;list_value_length&quot;               &quot;ln&quot;                             
+## [131] &quot;ln_checked&quot;                      &quot;local_timestamp&quot;                
+## [133] &quot;log10&quot;                           &quot;log10_checked&quot;                  
+## [135] &quot;log1p&quot;                           &quot;log1p_checked&quot;                  
+## [137] &quot;log2&quot;                            &quot;log2_checked&quot;                   
+## [139] &quot;logb&quot;                            &quot;logb_checked&quot;                   
+## [141] &quot;make_struct&quot;                     &quot;map_lookup&quot;                     
+## [143] &quot;match_like&quot;                      &quot;match_substring&quot;                
+## [145] &quot;match_substring_regex&quot;           &quot;max&quot;                            
+## [147] &quot;max_element_wise&quot;                &quot;mean&quot;                           
+## [149] &quot;microsecond&quot;                     &quot;microseconds_between&quot;           
+## [151] &quot;millisecond&quot;                     &quot;milliseconds_between&quot;           
+## [153] &quot;min&quot;                             &quot;min_element_wise&quot;               
+## [155] &quot;min_max&quot;                         &quot;minute&quot;                         
+## [157] &quot;minutes_between&quot;                 &quot;mode&quot;                           
+## [159] &quot;month&quot;                           &quot;month_day_nano_interval_between&quot;
+## [161] &quot;month_interval_between&quot;          &quot;multiply&quot;                       
+## [163] &quot;multiply_checked&quot;                &quot;nanosecond&quot;                     
+## [165] &quot;nanoseconds_between&quot;             &quot;negate&quot;                         
+## [167] &quot;negate_checked&quot;                  &quot;not_equal&quot;                      
+## [169] &quot;or&quot;                              &quot;or_kleene&quot;                      
+## [171] &quot;pairwise_diff&quot;                   &quot;pairwise_diff_checked&quot;          
+## [173] &quot;partition_nth_indices&quot;           &quot;power&quot;                          
+## [175] &quot;power_checked&quot;                   &quot;product&quot;                        
+## [177] &quot;quantile&quot;                        &quot;quarter&quot;                        
+## [179] &quot;quarters_between&quot;                &quot;random&quot;                         
+## [181] &quot;rank&quot;                            &quot;replace_substring&quot;              
+## [183] &quot;replace_substring_regex&quot;         &quot;replace_with_mask&quot;              
+## [185] &quot;round&quot;                           &quot;round_binary&quot;                   
+## [187] &quot;round_temporal&quot;                  &quot;round_to_multiple&quot;              
+## [189] &quot;run_end_decode&quot;                  &quot;run_end_encode&quot;                 
+## [191] &quot;second&quot;                          &quot;seconds_between&quot;                
+## [193] &quot;select_k_unstable&quot;               &quot;shift_left&quot;                     
+## [195] &quot;shift_left_checked&quot;              &quot;shift_right&quot;                    
+## [197] &quot;shift_right_checked&quot;             &quot;sign&quot;                           
+## [199] &quot;sin&quot;                             &quot;sin_checked&quot;                    
+## [201] &quot;sort_indices&quot;                    &quot;split_pattern&quot;                  
+## [203] &quot;split_pattern_regex&quot;             &quot;sqrt&quot;                           
+## [205] &quot;sqrt_checked&quot;                    &quot;starts_with&quot;                    
+## [207] &quot;stddev&quot;                          &quot;strftime&quot;                       
+## [209] &quot;string_is_ascii&quot;                 &quot;strptime&quot;                       
+## [211] &quot;struct_field&quot;                    &quot;subsecond&quot;                      
+## [213] &quot;subtract&quot;                        &quot;subtract_checked&quot;               
+## [215] &quot;sum&quot;                             &quot;take&quot;                           
+## [217] &quot;tan&quot;                             &quot;tan_checked&quot;                    
+## [219] &quot;tdigest&quot;                         &quot;true_unless_null&quot;               
+## [221] &quot;trunc&quot;                           &quot;unique&quot;                         
+## [223] &quot;us_week&quot;                         &quot;us_year&quot;                        
+## [225] &quot;utf8_capitalize&quot;                 &quot;utf8_center&quot;                    
+## [227] &quot;utf8_is_alnum&quot;                   &quot;utf8_is_alpha&quot;                  
+## [229] &quot;utf8_is_decimal&quot;                 &quot;utf8_is_digit&quot;                  
+## [231] &quot;utf8_is_lower&quot;                   &quot;utf8_is_numeric&quot;                
+## [233] &quot;utf8_is_printable&quot;               &quot;utf8_is_space&quot;                  
+## [235] &quot;utf8_is_title&quot;                   &quot;utf8_is_upper&quot;                  
+## [237] &quot;utf8_length&quot;                     &quot;utf8_lower&quot;                     
+## [239] &quot;utf8_lpad&quot;                       &quot;utf8_ltrim&quot;                     
+## [241] &quot;utf8_ltrim_whitespace&quot;           &quot;utf8_normalize&quot;                 
+## [243] &quot;utf8_replace_slice&quot;              &quot;utf8_reverse&quot;                   
+## [245] &quot;utf8_rpad&quot;                       &quot;utf8_rtrim&quot;                     
+## [247] &quot;utf8_rtrim_whitespace&quot;           &quot;utf8_slice_codeunits&quot;           
+## [249] &quot;utf8_split_whitespace&quot;           &quot;utf8_swapcase&quot;                  
+## [251] &quot;utf8_title&quot;                      &quot;utf8_trim&quot;                      
+## [253] &quot;utf8_trim_whitespace&quot;            &quot;utf8_upper&quot;                     
+## [255] &quot;value_counts&quot;                    &quot;variance&quot;                       
+## [257] &quot;week&quot;                            &quot;weeks_between&quot;                  
+## [259] &quot;xor&quot;                             &quot;year&quot;                           
+## [261] &quot;year_month_day&quot;                  &quot;years_between&quot;</code></pre>
+<p>The majority of functions here have been mapped to their base R or tidyverse
+equivalent and can be called within a dplyr query as usual. For functions which
+don’t have a base R or tidyverse equivalent, or you want to supply custom
+options, you can call them by prefixing their name with “arrow_”.</p>
+<p>For example, base R’s <code>is.na()</code> function is the equivalent of the Arrow C++
+compute function <code>is_null()</code> with the option <code>nan_is_null</code> set to <code>TRUE</code>.<br />
+A mapping between these functions (with <code>nan_is_null</code> set to <code>TRUE</code>) has been
+created in arrow.</p>
+<div class="sourceCode" id="cb118"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb118-1"><a href="manipulating-data---tables.html#cb118-1" tabindex="-1"></a>demo_df <span class="ot">&lt;-</span> <span class="fu">data.frame</span>(<span class="at">x =</span> <span class="fu">c</span>(<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="cn">NA</span>, <span class="cn">NaN</span>))</span>
+<span id="cb118-2"><a href="manipulating-data---tables.html#cb118-2" tabindex="-1"></a></span>
+<span id="cb118-3"><a href="manipulating-data---tables.html#cb118-3" tabindex="-1"></a><span class="fu">arrow_table</span>(demo_df) <span class="sc">%&gt;%</span></span>
+<span id="cb118-4"><a href="manipulating-data---tables.html#cb118-4" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">y =</span> <span class="fu">is.na</span>(x)) <span class="sc">%&gt;%</span> </span>
+<span id="cb118-5"><a href="manipulating-data---tables.html#cb118-5" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 5 × 2
+##       x y    
+##   &lt;dbl&gt; &lt;lgl&gt;
+## 1     1 FALSE
+## 2     2 FALSE
+## 3     3 FALSE
+## 4    NA TRUE 
+## 5   NaN TRUE</code></pre>
+<p>If you want to call Arrow’s <code>is_null()</code> function but with <code>nan_is_null</code> set to
+<code>FALSE</code> (so it returns <code>TRUE</code> when a value being examined is <code>NA</code> but <code>FALSE</code>
+when the value being examined is <code>NaN</code>), you must call <code>is_null()</code> directly and
+specify the option <code>nan_is_null = FALSE</code>.</p>
+<div class="sourceCode" id="cb120"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb120-1"><a href="manipulating-data---tables.html#cb120-1" tabindex="-1"></a><span class="fu">arrow_table</span>(demo_df) <span class="sc">%&gt;%</span></span>
+<span id="cb120-2"><a href="manipulating-data---tables.html#cb120-2" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">y =</span> <span class="fu">arrow_is_null</span>(x, <span class="at">options  =</span> <span class="fu">list</span>(<span class="at">nan_is_null =</span> <span class="cn">FALSE</span>))) <span class="sc">%&gt;%</span> </span>
+<span id="cb120-3"><a href="manipulating-data---tables.html#cb120-3" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 5 × 2
+##       x y    
+##   &lt;dbl&gt; &lt;lgl&gt;
+## 1     1 FALSE
+## 2     2 FALSE
+## 3     3 FALSE
+## 4    NA TRUE 
+## 5   NaN FALSE</code></pre>
+<div id="compute-functions-with-options" class="section level4 hasAnchor" number="7.4.2.1">
+<h4><span class="header-section-number">7.4.2.1</span> Compute functions with options<a href="manipulating-data---tables.html#compute-functions-with-options" class="anchor-section" aria-label="Anchor link to header"></a></h4>
+<p>Although not all Arrow C++ compute functions require options to be specified,
+most do. For these functions to work in R, they must be linked up
+with the appropriate libarrow options C++ class via the R
+package’s C++ code. At the time of writing, all compute functions available in
+the development version of the Arrow R package had been associated with their options
+classes. However, as the Arrow C++ library’s functionality extends, compute
+functions may be added which do not yet have an R binding. If you find a C++
+compute function which you wish to use from the R package, please <a href="https://github.com/apache/arrow/issues">open an issue
+on the Github project</a>.</p>
+</div>
+</div>
+</div>
+<div id="compute-window-aggregates" class="section level2 hasAnchor" number="7.5">
+<h2><span class="header-section-number">7.5</span> Compute Window Aggregates<a href="manipulating-data---tables.html#compute-window-aggregates" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to apply an aggregation (e.g. <code>mean()</code>) on a grouped table or within a rowwise operation like <code>filter()</code>:</p>
+<div id="solution-41" class="section level3 hasAnchor" number="7.5.1">
+<h3><span class="header-section-number">7.5.1</span> Solution<a href="manipulating-data---tables.html#solution-41" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb122"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb122-1"><a href="manipulating-data---tables.html#cb122-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb122-2"><a href="manipulating-data---tables.html#cb122-2" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb122-3"><a href="manipulating-data---tables.html#cb122-3" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb122-4"><a href="manipulating-data---tables.html#cb122-4" tabindex="-1"></a>  <span class="fu">left_join</span>(</span>
+<span id="cb122-5"><a href="manipulating-data---tables.html#cb122-5" tabindex="-1"></a>    <span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb122-6"><a href="manipulating-data---tables.html#cb122-6" tabindex="-1"></a>      <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb122-7"><a href="manipulating-data---tables.html#cb122-7" tabindex="-1"></a>      <span class="fu">summarize</span>(<span class="at">mean_height =</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>))</span>
+<span id="cb122-8"><a href="manipulating-data---tables.html#cb122-8" tabindex="-1"></a>  ) <span class="sc">%&gt;%</span></span>
+<span id="cb122-9"><a href="manipulating-data---tables.html#cb122-9" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> mean_height) <span class="sc">%&gt;%</span></span>
+<span id="cb122-10"><a href="manipulating-data---tables.html#cb122-10" tabindex="-1"></a>  <span class="fu">select</span>(<span class="sc">!</span>mean_height) <span class="sc">%&gt;%</span></span>
+<span id="cb122-11"><a href="manipulating-data---tables.html#cb122-11" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 28 × 4
+##    name                  height  mass hair_color
+##    &lt;chr&gt;                  &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Luke Skywalker           172    77 blond     
+##  2 Leia Organa              150    49 brown     
+##  3 Beru Whitesun Lars       165    75 brown     
+##  4 Wedge Antilles           170    77 brown     
+##  5 Yoda                      66    17 white     
+##  6 Lobot                    175    79 none      
+##  7 Ackbar                   180    83 none      
+##  8 Wicket Systri Warrick     88    20 brown     
+##  9 Nien Nunb                160    68 none      
+## 10 Finis Valorum            170    NA blond     
+## # ℹ 18 more rows</code></pre>
+<p>Or using <code>to_duckdb()</code></p>
+<div class="sourceCode" id="cb124"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb124-1"><a href="manipulating-data---tables.html#cb124-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb124-2"><a href="manipulating-data---tables.html#cb124-2" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb124-3"><a href="manipulating-data---tables.html#cb124-3" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb124-4"><a href="manipulating-data---tables.html#cb124-4" tabindex="-1"></a>  <span class="fu">to_duckdb</span>() <span class="sc">%&gt;%</span></span>
+<span id="cb124-5"><a href="manipulating-data---tables.html#cb124-5" tabindex="-1"></a>  <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb124-6"><a href="manipulating-data---tables.html#cb124-6" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb124-7"><a href="manipulating-data---tables.html#cb124-7" tabindex="-1"></a>  <span class="fu">to_arrow</span>() <span class="sc">%&gt;%</span></span>
+<span id="cb124-8"><a href="manipulating-data---tables.html#cb124-8" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 28 × 4
+##    name           height  mass hair_color
+##    &lt;chr&gt;           &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Yoda               66    17 white     
+##  2 Luke Skywalker    172    77 blond     
+##  3 Finis Valorum     170    NA blond     
+##  4 R4-P17             96    NA none      
+##  5 Lobot             175    79 none      
+##  6 Ackbar            180    83 none      
+##  7 Nien Nunb         160    68 none      
+##  8 Darth Maul        175    80 none      
+##  9 Bib Fortuna       180    NA none      
+## 10 Ayla Secura       178    55 none      
+## # ℹ 18 more rows</code></pre>
+</div>
+<div id="discusson" class="section level3 hasAnchor" number="7.5.2">
+<h3><span class="header-section-number">7.5.2</span> Discusson<a href="manipulating-data---tables.html#discusson" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Arrow does not support window functions, and pulls the data into R. For large tables, this sacrifices performance.</p>
+<div class="sourceCode" id="cb126"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb126-1"><a href="manipulating-data---tables.html#cb126-1" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb126-2"><a href="manipulating-data---tables.html#cb126-2" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb126-3"><a href="manipulating-data---tables.html#cb126-3" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb126-4"><a href="manipulating-data---tables.html#cb126-4" tabindex="-1"></a>  <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb126-5"><a href="manipulating-data---tables.html#cb126-5" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>))</span></code></pre></div>
+<pre><code>## Warning: Expression height &lt; mean(height, na.rm = TRUE) not supported in Arrow;
+## pulling data into R</code></pre>
+<pre><code>## # A tibble: 28 × 4
+## # Groups:   hair_color [5]
+##    name                  height  mass hair_color
+##    &lt;chr&gt;                  &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Luke Skywalker           172    77 blond     
+##  2 Leia Organa              150    49 brown     
+##  3 Beru Whitesun Lars       165    75 brown     
+##  4 Wedge Antilles           170    77 brown     
+##  5 Yoda                      66    17 white     
+##  6 Lobot                    175    79 none      
+##  7 Ackbar                   180    83 none      
+##  8 Wicket Systri Warrick     88    20 brown     
+##  9 Nien Nunb                160    68 none      
+## 10 Finis Valorum            170    NA blond     
+## # ℹ 18 more rows</code></pre>
+<p>You can perform these window aggregate operations on Arrow tables by:</p>
+<ul>
+<li>Computing the aggregation separately, and joining the result</li>
+<li>Passing the data to DuckDB, and use the DuckDB query engine to perform the operations</li>
+</ul>
+<p>Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the <a href="https://arrow.apache.org/blog/2021/12/03/arrow-duckdb/">Arrow blog post</a>.</p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="manipulating-data---arrays.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="using-pyarrow-from-r.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/tables.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/reading-and-writing-data---multiple-files.html b/dev/r/reading-and-writing-data---multiple-files.html
new file mode 100644
index 0000000..4859316
--- /dev/null
+++ b/dev/r/reading-and-writing-data---multiple-files.html
@@ -0,0 +1,842 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook</title>
+  <meta name="description" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="reading-and-writing-data---single-files.html"/>
+<link rel="next" href="creating-arrow-objects.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="reading-and-writing-data---multiple-files" class="section level1 hasAnchor" number="3">
+<h1><span class="header-section-number">3</span> Reading and Writing Data - Multiple Files<a href="reading-and-writing-data---multiple-files.html#reading-and-writing-data---multiple-files" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-1" class="section level2 hasAnchor" number="3.1">
+<h2><span class="header-section-number">3.1</span> Introduction<a href="reading-and-writing-data---multiple-files.html#introduction-1" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>When reading files into R using Apache Arrow, you can read:</p>
+<ul>
+<li>a single file into memory as a data frame or an Arrow Table</li>
+<li>a single file that is too large to fit in memory as an Arrow Dataset</li>
+<li>multiple and partitioned files as an Arrow Dataset</li>
+</ul>
+<p>This chapter contains recipes related to using Apache Arrow to read and
+write files too large for memory and multiple or partitioned files as an
+Arrow Dataset. There are a number of
+circumstances in which you may want to read in the data as an Arrow Dataset:</p>
+<ul>
+<li>your single data file is too large to load into memory</li>
+<li>your data are partitioned among numerous files</li>
+<li>you want faster performance from your <code>dplyr</code> queries</li>
+<li>you want to be able to take advantage of Arrow’s compute functions</li>
+</ul>
+<p>It is possible to read in partitioned data in Parquet, Feather (also known as Arrow IPC), and CSV or
+other text-delimited formats. If you are choosing a partitioned multiple file format, we
+recommend Parquet or Feather (Arrow IPC ), both of which can have improved performance
+when compared to CSVs due to their capabilities around metadata and compression.</p>
+</div>
+<div id="write-data-to-disk---parquet" class="section level2 hasAnchor" number="3.2">
+<h2><span class="header-section-number">3.2</span> Write data to disk - Parquet<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single Parquet file.</p>
+<div id="solution-15" class="section level3 hasAnchor" number="3.2.1">
+<h3><span class="header-section-number">3.2.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-15" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb31-1"><a href="reading-and-writing-data---multiple-files.html#cb31-1" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality, <span class="at">path =</span> <span class="st">&quot;airquality_data&quot;</span>)</span></code></pre></div>
+</div>
+<div id="discussion-4" class="section level3 hasAnchor" number="3.2.2">
+<h3><span class="header-section-number">3.2.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The default format for <code>open_dataset()</code> and <code>write_dataset()</code> is Parquet.</p>
+</div>
+</div>
+<div id="write-partitioned-data---parquet" class="section level2 hasAnchor" number="3.3">
+<h2><span class="header-section-number">3.3</span> Write partitioned data - Parquet<a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save multiple Parquet data files to disk in partitions based on columns in the data.</p>
+<div id="solution-16" class="section level3 hasAnchor" number="3.3.1">
+<h3><span class="header-section-number">3.3.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-16" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb32-1"><a href="reading-and-writing-data---multiple-files.html#cb32-1" tabindex="-1"></a><span class="fu">write_dataset</span>(airquality, <span class="st">&quot;airquality_partitioned&quot;</span>, <span class="at">partitioning =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>))</span></code></pre></div>
+<p>As you can see, this has created folders based on the supplied partition variable <code>Month</code>.</p>
+<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb33-1"><a href="reading-and-writing-data---multiple-files.html#cb33-1" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot;</code></pre>
+</div>
+<div id="discussion-5" class="section level3 hasAnchor" number="3.3.2">
+<h3><span class="header-section-number">3.3.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-5" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The data is written to separate folders based on the values in the <code>Month</code>
+column. The default behaviour is to use Hive-style (i.e. “col_name=value” folder names)
+partitions.</p>
+<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb35-1"><a href="reading-and-writing-data---multiple-files.html#cb35-1" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb35-2"><a href="reading-and-writing-data---multiple-files.html#cb35-2" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5/part-0.parquet&quot; &quot;Month=6/part-0.parquet&quot; &quot;Month=7/part-0.parquet&quot;
+## [4] &quot;Month=8/part-0.parquet&quot; &quot;Month=9/part-0.parquet&quot;</code></pre>
+<p>You can specify multiple partitioning variables to add extra levels of partitioning.</p>
+<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb37-1"><a href="reading-and-writing-data---multiple-files.html#cb37-1" tabindex="-1"></a><span class="fu">write_dataset</span>(airquality, <span class="st">&quot;airquality_partitioned_deeper&quot;</span>, <span class="at">partitioning =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>))</span>
+<span id="cb37-2"><a href="reading-and-writing-data---multiple-files.html#cb37-2" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned_deeper&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot;</code></pre>
+<p>If you take a look in one of these folders, you will see that the data is then partitioned by the second partition variable, <code>Day</code>.</p>
+<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb39-1"><a href="reading-and-writing-data---multiple-files.html#cb39-1" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb39-2"><a href="reading-and-writing-data---multiple-files.html#cb39-2" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned_deeper/Month=5&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>##  [1] &quot;Day=1/part-0.parquet&quot;  &quot;Day=10/part-0.parquet&quot; &quot;Day=11/part-0.parquet&quot;
+##  [4] &quot;Day=12/part-0.parquet&quot; &quot;Day=13/part-0.parquet&quot; &quot;Day=14/part-0.parquet&quot;
+##  [7] &quot;Day=15/part-0.parquet&quot; &quot;Day=16/part-0.parquet&quot; &quot;Day=17/part-0.parquet&quot;
+## [10] &quot;Day=18/part-0.parquet&quot; &quot;Day=19/part-0.parquet&quot; &quot;Day=2/part-0.parquet&quot; 
+## [13] &quot;Day=20/part-0.parquet&quot; &quot;Day=21/part-0.parquet&quot; &quot;Day=22/part-0.parquet&quot;
+## [16] &quot;Day=23/part-0.parquet&quot; &quot;Day=24/part-0.parquet&quot; &quot;Day=25/part-0.parquet&quot;
+## [19] &quot;Day=26/part-0.parquet&quot; &quot;Day=27/part-0.parquet&quot; &quot;Day=28/part-0.parquet&quot;
+## [22] &quot;Day=29/part-0.parquet&quot; &quot;Day=3/part-0.parquet&quot;  &quot;Day=30/part-0.parquet&quot;
+## [25] &quot;Day=31/part-0.parquet&quot; &quot;Day=4/part-0.parquet&quot;  &quot;Day=5/part-0.parquet&quot; 
+## [28] &quot;Day=6/part-0.parquet&quot;  &quot;Day=7/part-0.parquet&quot;  &quot;Day=8/part-0.parquet&quot; 
+## [31] &quot;Day=9/part-0.parquet&quot;</code></pre>
+<p>There are two different ways to specify variables to use for partitioning -
+either via the <code>partitioning</code> variable as above, or by using <code>dplyr::group_by()</code> on your data - the group variables will form the partitions.</p>
+<div class="sourceCode" id="cb41"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb41-1"><a href="reading-and-writing-data---multiple-files.html#cb41-1" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> <span class="fu">group_by</span>(airquality, Month, Day),</span>
+<span id="cb41-2"><a href="reading-and-writing-data---multiple-files.html#cb41-2" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_groupby&quot;</span>)</span></code></pre></div>
+<div class="sourceCode" id="cb42"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb42-1"><a href="reading-and-writing-data---multiple-files.html#cb42-1" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb42-2"><a href="reading-and-writing-data---multiple-files.html#cb42-2" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_groupby&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>##   [1] &quot;Month=5/Day=1/part-0.parquet&quot;  &quot;Month=5/Day=10/part-0.parquet&quot;
+##   [3] &quot;Month=5/Day=11/part-0.parquet&quot; &quot;Month=5/Day=12/part-0.parquet&quot;
+##   [5] &quot;Month=5/Day=13/part-0.parquet&quot; &quot;Month=5/Day=14/part-0.parquet&quot;
+##   [7] &quot;Month=5/Day=15/part-0.parquet&quot; &quot;Month=5/Day=16/part-0.parquet&quot;
+##   [9] &quot;Month=5/Day=17/part-0.parquet&quot; &quot;Month=5/Day=18/part-0.parquet&quot;
+##  [11] &quot;Month=5/Day=19/part-0.parquet&quot; &quot;Month=5/Day=2/part-0.parquet&quot; 
+##  [13] &quot;Month=5/Day=20/part-0.parquet&quot; &quot;Month=5/Day=21/part-0.parquet&quot;
+##  [15] &quot;Month=5/Day=22/part-0.parquet&quot; &quot;Month=5/Day=23/part-0.parquet&quot;
+##  [17] &quot;Month=5/Day=24/part-0.parquet&quot; &quot;Month=5/Day=25/part-0.parquet&quot;
+##  [19] &quot;Month=5/Day=26/part-0.parquet&quot; &quot;Month=5/Day=27/part-0.parquet&quot;
+##  [21] &quot;Month=5/Day=28/part-0.parquet&quot; &quot;Month=5/Day=29/part-0.parquet&quot;
+##  [23] &quot;Month=5/Day=3/part-0.parquet&quot;  &quot;Month=5/Day=30/part-0.parquet&quot;
+##  [25] &quot;Month=5/Day=31/part-0.parquet&quot; &quot;Month=5/Day=4/part-0.parquet&quot; 
+##  [27] &quot;Month=5/Day=5/part-0.parquet&quot;  &quot;Month=5/Day=6/part-0.parquet&quot; 
+##  [29] &quot;Month=5/Day=7/part-0.parquet&quot;  &quot;Month=5/Day=8/part-0.parquet&quot; 
+##  [31] &quot;Month=5/Day=9/part-0.parquet&quot;  &quot;Month=6/Day=1/part-0.parquet&quot; 
+##  [33] &quot;Month=6/Day=10/part-0.parquet&quot; &quot;Month=6/Day=11/part-0.parquet&quot;
+##  [35] &quot;Month=6/Day=12/part-0.parquet&quot; &quot;Month=6/Day=13/part-0.parquet&quot;
+##  [37] &quot;Month=6/Day=14/part-0.parquet&quot; &quot;Month=6/Day=15/part-0.parquet&quot;
+##  [39] &quot;Month=6/Day=16/part-0.parquet&quot; &quot;Month=6/Day=17/part-0.parquet&quot;
+##  [41] &quot;Month=6/Day=18/part-0.parquet&quot; &quot;Month=6/Day=19/part-0.parquet&quot;
+##  [43] &quot;Month=6/Day=2/part-0.parquet&quot;  &quot;Month=6/Day=20/part-0.parquet&quot;
+##  [45] &quot;Month=6/Day=21/part-0.parquet&quot; &quot;Month=6/Day=22/part-0.parquet&quot;
+##  [47] &quot;Month=6/Day=23/part-0.parquet&quot; &quot;Month=6/Day=24/part-0.parquet&quot;
+##  [49] &quot;Month=6/Day=25/part-0.parquet&quot; &quot;Month=6/Day=26/part-0.parquet&quot;
+##  [51] &quot;Month=6/Day=27/part-0.parquet&quot; &quot;Month=6/Day=28/part-0.parquet&quot;
+##  [53] &quot;Month=6/Day=29/part-0.parquet&quot; &quot;Month=6/Day=3/part-0.parquet&quot; 
+##  [55] &quot;Month=6/Day=30/part-0.parquet&quot; &quot;Month=6/Day=4/part-0.parquet&quot; 
+##  [57] &quot;Month=6/Day=5/part-0.parquet&quot;  &quot;Month=6/Day=6/part-0.parquet&quot; 
+##  [59] &quot;Month=6/Day=7/part-0.parquet&quot;  &quot;Month=6/Day=8/part-0.parquet&quot; 
+##  [61] &quot;Month=6/Day=9/part-0.parquet&quot;  &quot;Month=7/Day=1/part-0.parquet&quot; 
+##  [63] &quot;Month=7/Day=10/part-0.parquet&quot; &quot;Month=7/Day=11/part-0.parquet&quot;
+##  [65] &quot;Month=7/Day=12/part-0.parquet&quot; &quot;Month=7/Day=13/part-0.parquet&quot;
+##  [67] &quot;Month=7/Day=14/part-0.parquet&quot; &quot;Month=7/Day=15/part-0.parquet&quot;
+##  [69] &quot;Month=7/Day=16/part-0.parquet&quot; &quot;Month=7/Day=17/part-0.parquet&quot;
+##  [71] &quot;Month=7/Day=18/part-0.parquet&quot; &quot;Month=7/Day=19/part-0.parquet&quot;
+##  [73] &quot;Month=7/Day=2/part-0.parquet&quot;  &quot;Month=7/Day=20/part-0.parquet&quot;
+##  [75] &quot;Month=7/Day=21/part-0.parquet&quot; &quot;Month=7/Day=22/part-0.parquet&quot;
+##  [77] &quot;Month=7/Day=23/part-0.parquet&quot; &quot;Month=7/Day=24/part-0.parquet&quot;
+##  [79] &quot;Month=7/Day=25/part-0.parquet&quot; &quot;Month=7/Day=26/part-0.parquet&quot;
+##  [81] &quot;Month=7/Day=27/part-0.parquet&quot; &quot;Month=7/Day=28/part-0.parquet&quot;
+##  [83] &quot;Month=7/Day=29/part-0.parquet&quot; &quot;Month=7/Day=3/part-0.parquet&quot; 
+##  [85] &quot;Month=7/Day=30/part-0.parquet&quot; &quot;Month=7/Day=31/part-0.parquet&quot;
+##  [87] &quot;Month=7/Day=4/part-0.parquet&quot;  &quot;Month=7/Day=5/part-0.parquet&quot; 
+##  [89] &quot;Month=7/Day=6/part-0.parquet&quot;  &quot;Month=7/Day=7/part-0.parquet&quot; 
+##  [91] &quot;Month=7/Day=8/part-0.parquet&quot;  &quot;Month=7/Day=9/part-0.parquet&quot; 
+##  [93] &quot;Month=8/Day=1/part-0.parquet&quot;  &quot;Month=8/Day=10/part-0.parquet&quot;
+##  [95] &quot;Month=8/Day=11/part-0.parquet&quot; &quot;Month=8/Day=12/part-0.parquet&quot;
+##  [97] &quot;Month=8/Day=13/part-0.parquet&quot; &quot;Month=8/Day=14/part-0.parquet&quot;
+##  [99] &quot;Month=8/Day=15/part-0.parquet&quot; &quot;Month=8/Day=16/part-0.parquet&quot;
+## [101] &quot;Month=8/Day=17/part-0.parquet&quot; &quot;Month=8/Day=18/part-0.parquet&quot;
+## [103] &quot;Month=8/Day=19/part-0.parquet&quot; &quot;Month=8/Day=2/part-0.parquet&quot; 
+## [105] &quot;Month=8/Day=20/part-0.parquet&quot; &quot;Month=8/Day=21/part-0.parquet&quot;
+## [107] &quot;Month=8/Day=22/part-0.parquet&quot; &quot;Month=8/Day=23/part-0.parquet&quot;
+## [109] &quot;Month=8/Day=24/part-0.parquet&quot; &quot;Month=8/Day=25/part-0.parquet&quot;
+## [111] &quot;Month=8/Day=26/part-0.parquet&quot; &quot;Month=8/Day=27/part-0.parquet&quot;
+## [113] &quot;Month=8/Day=28/part-0.parquet&quot; &quot;Month=8/Day=29/part-0.parquet&quot;
+## [115] &quot;Month=8/Day=3/part-0.parquet&quot;  &quot;Month=8/Day=30/part-0.parquet&quot;
+## [117] &quot;Month=8/Day=31/part-0.parquet&quot; &quot;Month=8/Day=4/part-0.parquet&quot; 
+## [119] &quot;Month=8/Day=5/part-0.parquet&quot;  &quot;Month=8/Day=6/part-0.parquet&quot; 
+## [121] &quot;Month=8/Day=7/part-0.parquet&quot;  &quot;Month=8/Day=8/part-0.parquet&quot; 
+## [123] &quot;Month=8/Day=9/part-0.parquet&quot;  &quot;Month=9/Day=1/part-0.parquet&quot; 
+## [125] &quot;Month=9/Day=10/part-0.parquet&quot; &quot;Month=9/Day=11/part-0.parquet&quot;
+## [127] &quot;Month=9/Day=12/part-0.parquet&quot; &quot;Month=9/Day=13/part-0.parquet&quot;
+## [129] &quot;Month=9/Day=14/part-0.parquet&quot; &quot;Month=9/Day=15/part-0.parquet&quot;
+## [131] &quot;Month=9/Day=16/part-0.parquet&quot; &quot;Month=9/Day=17/part-0.parquet&quot;
+## [133] &quot;Month=9/Day=18/part-0.parquet&quot; &quot;Month=9/Day=19/part-0.parquet&quot;
+## [135] &quot;Month=9/Day=2/part-0.parquet&quot;  &quot;Month=9/Day=20/part-0.parquet&quot;
+## [137] &quot;Month=9/Day=21/part-0.parquet&quot; &quot;Month=9/Day=22/part-0.parquet&quot;
+## [139] &quot;Month=9/Day=23/part-0.parquet&quot; &quot;Month=9/Day=24/part-0.parquet&quot;
+## [141] &quot;Month=9/Day=25/part-0.parquet&quot; &quot;Month=9/Day=26/part-0.parquet&quot;
+## [143] &quot;Month=9/Day=27/part-0.parquet&quot; &quot;Month=9/Day=28/part-0.parquet&quot;
+## [145] &quot;Month=9/Day=29/part-0.parquet&quot; &quot;Month=9/Day=3/part-0.parquet&quot; 
+## [147] &quot;Month=9/Day=30/part-0.parquet&quot; &quot;Month=9/Day=4/part-0.parquet&quot; 
+## [149] &quot;Month=9/Day=5/part-0.parquet&quot;  &quot;Month=9/Day=6/part-0.parquet&quot; 
+## [151] &quot;Month=9/Day=7/part-0.parquet&quot;  &quot;Month=9/Day=8/part-0.parquet&quot; 
+## [153] &quot;Month=9/Day=9/part-0.parquet&quot;</code></pre>
+<p>Each of these folders contains 1 or more Parquet files containing the relevant partition of the data.</p>
+<div class="sourceCode" id="cb44"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb44-1"><a href="reading-and-writing-data---multiple-files.html#cb44-1" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_groupby/Month=5/Day=10&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;part-0.parquet&quot;</code></pre>
+<p>Note that when there was an <code>NA</code> value in the partition column,
+these values are written to the <code>col_name=__HIVE_DEFAULT_PARTITION__</code>
+directory.</p>
+</div>
+</div>
+<div id="read-partitioned-data" class="section level2 hasAnchor" number="3.4">
+<h2><span class="header-section-number">3.4</span> Read partitioned data<a href="reading-and-writing-data---multiple-files.html#read-partitioned-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read partitioned data files as an Arrow Dataset.</p>
+<div id="solution-17" class="section level3 hasAnchor" number="3.4.1">
+<h3><span class="header-section-number">3.4.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-17" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb46"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb46-1"><a href="reading-and-writing-data---multiple-files.html#cb46-1" tabindex="-1"></a><span class="co"># Read data from directory</span></span>
+<span id="cb46-2"><a href="reading-and-writing-data---multiple-files.html#cb46-2" tabindex="-1"></a>air_data <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(<span class="st">&quot;airquality_partitioned_deeper&quot;</span>)</span>
+<span id="cb46-3"><a href="reading-and-writing-data---multiple-files.html#cb46-3" tabindex="-1"></a></span>
+<span id="cb46-4"><a href="reading-and-writing-data---multiple-files.html#cb46-4" tabindex="-1"></a><span class="co"># View data</span></span>
+<span id="cb46-5"><a href="reading-and-writing-data---multiple-files.html#cb46-5" tabindex="-1"></a>air_data</span></code></pre></div>
+<pre><code>## FileSystemDataset with 153 Parquet files
+## Ozone: int32
+## Solar.R: int32
+## Wind: double
+## Temp: int32
+## Month: int32
+## Day: int32
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+<div id="discussion-6" class="section level3 hasAnchor" number="3.4.2">
+<h3><span class="header-section-number">3.4.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-6" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Partitioning allows you to split data across
+multiple files and folders, avoiding problems associated with storing all your data
+in a single file. This can provide further advantages when using Arrow, as Arrow will only
+read in the necessary partitioned files needed for any given analysis.</p>
+</div>
+</div>
+<div id="write-data-to-disk---featherarrow-ipc-format" class="section level2 hasAnchor" number="3.5">
+<h2><span class="header-section-number">3.5</span> Write data to disk - Feather/Arrow IPC format<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single Feather/Arrow IPC file.</p>
+<div id="solution-18" class="section level3 hasAnchor" number="3.5.1">
+<h3><span class="header-section-number">3.5.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-18" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb48"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb48-1"><a href="reading-and-writing-data---multiple-files.html#cb48-1" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb48-2"><a href="reading-and-writing-data---multiple-files.html#cb48-2" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_feather&quot;</span>,</span>
+<span id="cb48-3"><a href="reading-and-writing-data---multiple-files.html#cb48-3" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;feather&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-in-featherarrow-ipc-data-as-an-arrow-dataset" class="section level2 hasAnchor" number="3.6">
+<h2><span class="header-section-number">3.6</span> Read in Feather/Arrow IPC data as an Arrow Dataset<a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in Feather/Arrow IPC data as an Arrow Dataset</p>
+<div id="solution-19" class="section level3 hasAnchor" number="3.6.1">
+<h3><span class="header-section-number">3.6.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-19" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb49"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb49-1"><a href="reading-and-writing-data---multiple-files.html#cb49-1" tabindex="-1"></a><span class="co"># write Arrow file to use in this example</span></span>
+<span id="cb49-2"><a href="reading-and-writing-data---multiple-files.html#cb49-2" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb49-3"><a href="reading-and-writing-data---multiple-files.html#cb49-3" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_arrow&quot;</span>,</span>
+<span id="cb49-4"><a href="reading-and-writing-data---multiple-files.html#cb49-4" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;arrow&quot;</span>)</span>
+<span id="cb49-5"><a href="reading-and-writing-data---multiple-files.html#cb49-5" tabindex="-1"></a></span>
+<span id="cb49-6"><a href="reading-and-writing-data---multiple-files.html#cb49-6" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb49-7"><a href="reading-and-writing-data---multiple-files.html#cb49-7" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality_data_arrow&quot;</span>, <span class="at">format =</span> <span class="st">&quot;arrow&quot;</span>)</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 Feather file
+## Ozone: int32
+## Solar.R: int32
+## Wind: double
+## Temp: int32
+## Month: int32
+## Day: int32
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+</div>
+<div id="write-data-to-disk---csv-format" class="section level2 hasAnchor" number="3.7">
+<h2><span class="header-section-number">3.7</span> Write data to disk - CSV format<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single CSV file.</p>
+<div id="solution-20" class="section level3 hasAnchor" number="3.7.1">
+<h3><span class="header-section-number">3.7.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-20" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb51"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb51-1"><a href="reading-and-writing-data---multiple-files.html#cb51-1" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb51-2"><a href="reading-and-writing-data---multiple-files.html#cb51-2" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_csv&quot;</span>,</span>
+<span id="cb51-3"><a href="reading-and-writing-data---multiple-files.html#cb51-3" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-in-csv-data-as-an-arrow-dataset" class="section level2 hasAnchor" number="3.8">
+<h2><span class="header-section-number">3.8</span> Read in CSV data as an Arrow Dataset<a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in CSV data as an Arrow Dataset</p>
+<div id="solution-21" class="section level3 hasAnchor" number="3.8.1">
+<h3><span class="header-section-number">3.8.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-21" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb52"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb52-1"><a href="reading-and-writing-data---multiple-files.html#cb52-1" tabindex="-1"></a><span class="co"># write CSV file to use in this example</span></span>
+<span id="cb52-2"><a href="reading-and-writing-data---multiple-files.html#cb52-2" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb52-3"><a href="reading-and-writing-data---multiple-files.html#cb52-3" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_csv&quot;</span>,</span>
+<span id="cb52-4"><a href="reading-and-writing-data---multiple-files.html#cb52-4" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span>
+<span id="cb52-5"><a href="reading-and-writing-data---multiple-files.html#cb52-5" tabindex="-1"></a></span>
+<span id="cb52-6"><a href="reading-and-writing-data---multiple-files.html#cb52-6" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb52-7"><a href="reading-and-writing-data---multiple-files.html#cb52-7" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality_data_csv&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 csv file
+## Ozone: int64
+## Solar.R: int64
+## Wind: double
+## Temp: int64
+## Month: int64
+## Day: int64</code></pre>
+</div>
+</div>
+<div id="read-in-a-csv-dataset-no-headers" class="section level2 hasAnchor" number="3.9">
+<h2><span class="header-section-number">3.9</span> Read in a CSV dataset (no headers)<a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in a dataset containing CSVs with no headers</p>
+<div id="solution-22" class="section level3 hasAnchor" number="3.9.1">
+<h3><span class="header-section-number">3.9.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-22" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb54"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb54-1"><a href="reading-and-writing-data---multiple-files.html#cb54-1" tabindex="-1"></a><span class="co"># write CSV file to use in this example</span></span>
+<span id="cb54-2"><a href="reading-and-writing-data---multiple-files.html#cb54-2" tabindex="-1"></a>dataset_1 <span class="ot">&lt;-</span> airquality[<span class="dv">1</span><span class="sc">:</span><span class="dv">40</span>, <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>)]</span>
+<span id="cb54-3"><a href="reading-and-writing-data---multiple-files.html#cb54-3" tabindex="-1"></a>dataset_2 <span class="ot">&lt;-</span> airquality[<span class="dv">41</span><span class="sc">:</span><span class="dv">80</span>, <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>)]</span>
+<span id="cb54-4"><a href="reading-and-writing-data---multiple-files.html#cb54-4" tabindex="-1"></a></span>
+<span id="cb54-5"><a href="reading-and-writing-data---multiple-files.html#cb54-5" tabindex="-1"></a><span class="fu">dir.create</span>(<span class="st">&quot;airquality&quot;</span>)</span>
+<span id="cb54-6"><a href="reading-and-writing-data---multiple-files.html#cb54-6" tabindex="-1"></a><span class="fu">write.table</span>(dataset_1, <span class="st">&quot;airquality/part-1.csv&quot;</span>, <span class="at">sep =</span> <span class="st">&quot;,&quot;</span>, <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">col.names =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb54-7"><a href="reading-and-writing-data---multiple-files.html#cb54-7" tabindex="-1"></a><span class="fu">write.table</span>(dataset_2, <span class="st">&quot;airquality/part-2.csv&quot;</span>, <span class="at">sep =</span> <span class="st">&quot;,&quot;</span>, <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">col.names =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb54-8"><a href="reading-and-writing-data---multiple-files.html#cb54-8" tabindex="-1"></a></span>
+<span id="cb54-9"><a href="reading-and-writing-data---multiple-files.html#cb54-9" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb54-10"><a href="reading-and-writing-data---multiple-files.html#cb54-10" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>, <span class="at">column_names =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>))</span></code></pre></div>
+<pre><code>## FileSystemDataset with 2 csv files
+## Month: int64
+## Day: int64
+## Temp: int64</code></pre>
+</div>
+<div id="discussion-7" class="section level3 hasAnchor" number="3.9.2">
+<h3><span class="header-section-number">3.9.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-7" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>If your dataset is made up of headerless CSV files, you must supply the names of
+each column. You can do this in multiple ways - either via the <code>column_names</code>
+parameter (as shown above) or via a schema:</p>
+<div class="sourceCode" id="cb56"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb56-1"><a href="reading-and-writing-data---multiple-files.html#cb56-1" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>, <span class="at">schema =</span> <span class="fu">schema</span>(<span class="st">&quot;Month&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>(), <span class="st">&quot;Day&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>(), <span class="st">&quot;Temp&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>()))</span></code></pre></div>
+<pre><code>## FileSystemDataset with 2 csv files
+## Month: int32
+## Day: int32
+## Temp: int32</code></pre>
+<p>One additional advantage of using a schema is that you also have control of the
+data types of the columns. If you provide both column names and a schema, the values
+in <code>column_names</code> must match the <code>schema</code> field names.</p>
+</div>
+</div>
+<div id="write-compressed-partitioned-data" class="section level2 hasAnchor" number="3.10">
+<h2><span class="header-section-number">3.10</span> Write compressed partitioned data<a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save partitioned files, compressed with a specified compression algorithm.</p>
+<div id="solution-23" class="section level3 hasAnchor" number="3.10.1">
+<h3><span class="header-section-number">3.10.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-23" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb58"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb58-1"><a href="reading-and-writing-data---multiple-files.html#cb58-1" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb58-2"><a href="reading-and-writing-data---multiple-files.html#cb58-2" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb58-3"><a href="reading-and-writing-data---multiple-files.html#cb58-3" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb58-4"><a href="reading-and-writing-data---multiple-files.html#cb58-4" tabindex="-1"></a></span>
+<span id="cb58-5"><a href="reading-and-writing-data---multiple-files.html#cb58-5" tabindex="-1"></a><span class="co"># Write dataset to file</span></span>
+<span id="cb58-6"><a href="reading-and-writing-data---multiple-files.html#cb58-6" tabindex="-1"></a><span class="fu">write_dataset</span>(iris, <span class="at">path =</span> td, <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span></code></pre></div>
+<div class="sourceCode" id="cb59"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb59-1"><a href="reading-and-writing-data---multiple-files.html#cb59-1" tabindex="-1"></a><span class="co"># View files in the directory</span></span>
+<span id="cb59-2"><a href="reading-and-writing-data---multiple-files.html#cb59-2" tabindex="-1"></a><span class="fu">list.files</span>(td, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;part-0.parquet&quot;</code></pre>
+</div>
+<div id="discussion-8" class="section level3 hasAnchor" number="3.10.2">
+<h3><span class="header-section-number">3.10.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-8" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can supply the <code>compression</code> argument to <code>write_dataset()</code> as long as
+the compression algorithm is compatible with the chosen format. See <code>?write_dataset()</code>
+for more information on supported compression algorithms and default settings.</p>
+</div>
+</div>
+<div id="read-compressed-data-1" class="section level2 hasAnchor" number="3.11">
+<h2><span class="header-section-number">3.11</span> Read compressed data<a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in data which has been compressed.</p>
+<div id="solution-24" class="section level3 hasAnchor" number="3.11.1">
+<h3><span class="header-section-number">3.11.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-24" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb61"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb61-1"><a href="reading-and-writing-data---multiple-files.html#cb61-1" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb61-2"><a href="reading-and-writing-data---multiple-files.html#cb61-2" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb61-3"><a href="reading-and-writing-data---multiple-files.html#cb61-3" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb61-4"><a href="reading-and-writing-data---multiple-files.html#cb61-4" tabindex="-1"></a></span>
+<span id="cb61-5"><a href="reading-and-writing-data---multiple-files.html#cb61-5" tabindex="-1"></a><span class="co"># Write dataset to file</span></span>
+<span id="cb61-6"><a href="reading-and-writing-data---multiple-files.html#cb61-6" tabindex="-1"></a><span class="fu">write_dataset</span>(iris, <span class="at">path =</span> td, <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span>
+<span id="cb61-7"><a href="reading-and-writing-data---multiple-files.html#cb61-7" tabindex="-1"></a></span>
+<span id="cb61-8"><a href="reading-and-writing-data---multiple-files.html#cb61-8" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb61-9"><a href="reading-and-writing-data---multiple-files.html#cb61-9" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(td) <span class="sc">%&gt;%</span></span>
+<span id="cb61-10"><a href="reading-and-writing-data---multiple-files.html#cb61-10" tabindex="-1"></a>  <span class="fu">collect</span>()</span>
+<span id="cb61-11"><a href="reading-and-writing-data---multiple-files.html#cb61-11" tabindex="-1"></a></span>
+<span id="cb61-12"><a href="reading-and-writing-data---multiple-files.html#cb61-12" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;fct&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+</div>
+<div id="discussion-9" class="section level3 hasAnchor" number="3.11.2">
+<h3><span class="header-section-number">3.11.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-9" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Note that Arrow automatically detects the compression and you do not have to
+supply it in the call to <code>open_dataset()</code> or the <code>read_*()</code> functions.</p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="reading-and-writing-data---single-files.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="creating-arrow-objects.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/datasets.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/reading-and-writing-data---single-files.html b/dev/r/reading-and-writing-data---single-files.html
new file mode 100644
index 0000000..4dff086
--- /dev/null
+++ b/dev/r/reading-and-writing-data---single-files.html
@@ -0,0 +1,946 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook</title>
+  <meta name="description" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="index.html"/>
+<link rel="next" href="reading-and-writing-data---multiple-files.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="reading-and-writing-data---single-files" class="section level1 hasAnchor" number="2">
+<h1><span class="header-section-number">2</span> Reading and Writing Data - Single Files<a href="reading-and-writing-data---single-files.html#reading-and-writing-data---single-files" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction" class="section level2 hasAnchor" number="2.1">
+<h2><span class="header-section-number">2.1</span> Introduction<a href="reading-and-writing-data---single-files.html#introduction" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>When reading files into R using Apache Arrow, you can read:</p>
+<ul>
+<li>a single file into memory as a data frame or an Arrow Table</li>
+<li>a single file that is too large to fit in memory as an Arrow Dataset</li>
+<li>multiple and partitioned files as an Arrow Dataset</li>
+</ul>
+<p>This chapter contains recipes related to using Apache Arrow to read and
+write single file data into memory as an Arrow Table. There are a number of circumstances in
+which you may want to read in single file data as an Arrow Table:</p>
+<ul>
+<li>your data file is large and having performance issues</li>
+<li>you want faster performance from your <code>dplyr</code> queries</li>
+<li>you want to be able to take advantage of Arrow’s compute functions</li>
+</ul>
+<p>If a single data file is too large to load into memory, you can use the Arrow Dataset API.
+Recipes for using <code>open_dataset()</code> and <code>write_dataset()</code> are in the Reading and Writing Data - Multiple Files
+chapter.</p>
+</div>
+<div id="convert-data-from-a-data-frame-to-an-arrow-table" class="section level2 hasAnchor" number="2.2">
+<h2><span class="header-section-number">2.2</span> Convert data from a data frame to an Arrow Table<a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing <code>data.frame</code> or <code>tibble</code> object into an Arrow Table.</p>
+<div id="solution" class="section level3 hasAnchor" number="2.2.1">
+<h3><span class="header-section-number">2.2.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="reading-and-writing-data---single-files.html#cb1-1" tabindex="-1"></a>air_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(airquality)</span>
+<span id="cb1-2"><a href="reading-and-writing-data---single-files.html#cb1-2" tabindex="-1"></a>air_table</span></code></pre></div>
+<pre><code>## Table
+## 153 rows x 6 columns
+## $Ozone &lt;int32&gt;
+## $Solar.R &lt;int32&gt;
+## $Wind &lt;double&gt;
+## $Temp &lt;int32&gt;
+## $Month &lt;int32&gt;
+## $Day &lt;int32&gt;
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+</div>
+<div id="convert-data-from-an-arrow-table-to-a-data-frame" class="section level2 hasAnchor" number="2.3">
+<h2><span class="header-section-number">2.3</span> Convert data from an Arrow Table to a data frame<a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an Arrow Table to a data frame to view the data or work with it
+in your usual analytics pipeline.</p>
+<div id="solution-1" class="section level3 hasAnchor" number="2.3.1">
+<h3><span class="header-section-number">2.3.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="reading-and-writing-data---single-files.html#cb3-1" tabindex="-1"></a>air_df <span class="ot">&lt;-</span> <span class="fu">as.data.frame</span>(air_table)</span>
+<span id="cb3-2"><a href="reading-and-writing-data---single-files.html#cb3-2" tabindex="-1"></a>air_df</span></code></pre></div>
+<pre><code>##     Ozone Solar.R Wind Temp Month Day
+## 1      41     190  7.4   67     5   1
+## 2      36     118  8.0   72     5   2
+## 3      12     149 12.6   74     5   3
+## 4      18     313 11.5   62     5   4
+## 5      NA      NA 14.3   56     5   5
+## 6      28      NA 14.9   66     5   6
+## 7      23     299  8.6   65     5   7
+## 8      19      99 13.8   59     5   8
+## 9       8      19 20.1   61     5   9
+## 10     NA     194  8.6   69     5  10
+## 11      7      NA  6.9   74     5  11
+## 12     16     256  9.7   69     5  12
+## 13     11     290  9.2   66     5  13
+## 14     14     274 10.9   68     5  14
+## 15     18      65 13.2   58     5  15
+## 16     14     334 11.5   64     5  16
+## 17     34     307 12.0   66     5  17
+## 18      6      78 18.4   57     5  18
+## 19     30     322 11.5   68     5  19
+## 20     11      44  9.7   62     5  20
+## 21      1       8  9.7   59     5  21
+## 22     11     320 16.6   73     5  22
+## 23      4      25  9.7   61     5  23
+## 24     32      92 12.0   61     5  24
+## 25     NA      66 16.6   57     5  25
+## 26     NA     266 14.9   58     5  26
+## 27     NA      NA  8.0   57     5  27
+## 28     23      13 12.0   67     5  28
+## 29     45     252 14.9   81     5  29
+## 30    115     223  5.7   79     5  30
+## 31     37     279  7.4   76     5  31
+## 32     NA     286  8.6   78     6   1
+## 33     NA     287  9.7   74     6   2
+## 34     NA     242 16.1   67     6   3
+## 35     NA     186  9.2   84     6   4
+## 36     NA     220  8.6   85     6   5
+## 37     NA     264 14.3   79     6   6
+## 38     29     127  9.7   82     6   7
+## 39     NA     273  6.9   87     6   8
+## 40     71     291 13.8   90     6   9
+## 41     39     323 11.5   87     6  10
+## 42     NA     259 10.9   93     6  11
+## 43     NA     250  9.2   92     6  12
+## 44     23     148  8.0   82     6  13
+## 45     NA     332 13.8   80     6  14
+## 46     NA     322 11.5   79     6  15
+## 47     21     191 14.9   77     6  16
+## 48     37     284 20.7   72     6  17
+## 49     20      37  9.2   65     6  18
+## 50     12     120 11.5   73     6  19
+## 51     13     137 10.3   76     6  20
+## 52     NA     150  6.3   77     6  21
+## 53     NA      59  1.7   76     6  22
+## 54     NA      91  4.6   76     6  23
+## 55     NA     250  6.3   76     6  24
+## 56     NA     135  8.0   75     6  25
+## 57     NA     127  8.0   78     6  26
+## 58     NA      47 10.3   73     6  27
+## 59     NA      98 11.5   80     6  28
+## 60     NA      31 14.9   77     6  29
+## 61     NA     138  8.0   83     6  30
+## 62    135     269  4.1   84     7   1
+## 63     49     248  9.2   85     7   2
+## 64     32     236  9.2   81     7   3
+## 65     NA     101 10.9   84     7   4
+## 66     64     175  4.6   83     7   5
+## 67     40     314 10.9   83     7   6
+## 68     77     276  5.1   88     7   7
+## 69     97     267  6.3   92     7   8
+## 70     97     272  5.7   92     7   9
+## 71     85     175  7.4   89     7  10
+## 72     NA     139  8.6   82     7  11
+## 73     10     264 14.3   73     7  12
+## 74     27     175 14.9   81     7  13
+## 75     NA     291 14.9   91     7  14
+## 76      7      48 14.3   80     7  15
+## 77     48     260  6.9   81     7  16
+## 78     35     274 10.3   82     7  17
+## 79     61     285  6.3   84     7  18
+## 80     79     187  5.1   87     7  19
+## 81     63     220 11.5   85     7  20
+## 82     16       7  6.9   74     7  21
+## 83     NA     258  9.7   81     7  22
+## 84     NA     295 11.5   82     7  23
+## 85     80     294  8.6   86     7  24
+## 86    108     223  8.0   85     7  25
+## 87     20      81  8.6   82     7  26
+## 88     52      82 12.0   86     7  27
+## 89     82     213  7.4   88     7  28
+## 90     50     275  7.4   86     7  29
+## 91     64     253  7.4   83     7  30
+## 92     59     254  9.2   81     7  31
+## 93     39      83  6.9   81     8   1
+## 94      9      24 13.8   81     8   2
+## 95     16      77  7.4   82     8   3
+## 96     78      NA  6.9   86     8   4
+## 97     35      NA  7.4   85     8   5
+## 98     66      NA  4.6   87     8   6
+## 99    122     255  4.0   89     8   7
+## 100    89     229 10.3   90     8   8
+## 101   110     207  8.0   90     8   9
+## 102    NA     222  8.6   92     8  10
+## 103    NA     137 11.5   86     8  11
+## 104    44     192 11.5   86     8  12
+## 105    28     273 11.5   82     8  13
+## 106    65     157  9.7   80     8  14
+## 107    NA      64 11.5   79     8  15
+## 108    22      71 10.3   77     8  16
+## 109    59      51  6.3   79     8  17
+## 110    23     115  7.4   76     8  18
+## 111    31     244 10.9   78     8  19
+## 112    44     190 10.3   78     8  20
+## 113    21     259 15.5   77     8  21
+## 114     9      36 14.3   72     8  22
+## 115    NA     255 12.6   75     8  23
+## 116    45     212  9.7   79     8  24
+## 117   168     238  3.4   81     8  25
+## 118    73     215  8.0   86     8  26
+## 119    NA     153  5.7   88     8  27
+## 120    76     203  9.7   97     8  28
+## 121   118     225  2.3   94     8  29
+## 122    84     237  6.3   96     8  30
+## 123    85     188  6.3   94     8  31
+## 124    96     167  6.9   91     9   1
+## 125    78     197  5.1   92     9   2
+## 126    73     183  2.8   93     9   3
+## 127    91     189  4.6   93     9   4
+## 128    47      95  7.4   87     9   5
+## 129    32      92 15.5   84     9   6
+## 130    20     252 10.9   80     9   7
+## 131    23     220 10.3   78     9   8
+## 132    21     230 10.9   75     9   9
+## 133    24     259  9.7   73     9  10
+## 134    44     236 14.9   81     9  11
+## 135    21     259 15.5   76     9  12
+## 136    28     238  6.3   77     9  13
+## 137     9      24 10.9   71     9  14
+## 138    13     112 11.5   71     9  15
+## 139    46     237  6.9   78     9  16
+## 140    18     224 13.8   67     9  17
+## 141    13      27 10.3   76     9  18
+## 142    24     238 10.3   68     9  19
+## 143    16     201  8.0   82     9  20
+## 144    13     238 12.6   64     9  21
+## 145    23      14  9.2   71     9  22
+## 146    36     139 10.3   81     9  23
+## 147     7      49 10.3   69     9  24
+## 148    14      20 16.6   63     9  25
+## 149    30     193  6.9   70     9  26
+## 150    NA     145 13.2   77     9  27
+## 151    14     191 14.3   75     9  28
+## 152    18     131  8.0   76     9  29
+## 153    20     223 11.5   68     9  30</code></pre>
+</div>
+<div id="discussion" class="section level3 hasAnchor" number="2.3.2">
+<h3><span class="header-section-number">2.3.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can <code>dplyr::collect()</code> to return a tibble or <code>as.data.frame()</code> to return a <code>data.frame</code>.</p>
+</div>
+</div>
+<div id="write-a-parquet-file" class="section level2 hasAnchor" number="2.4">
+<h2><span class="header-section-number">2.4</span> Write a Parquet file<a href="reading-and-writing-data---single-files.html#write-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write a single Parquet file to disk.</p>
+<div id="solution-2" class="section level3 hasAnchor" number="2.4.1">
+<h3><span class="header-section-number">2.4.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="reading-and-writing-data---single-files.html#cb5-1" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb5-2"><a href="reading-and-writing-data---single-files.html#cb5-2" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb5-3"><a href="reading-and-writing-data---single-files.html#cb5-3" tabindex="-1"></a><span class="co"># Write to Parquet</span></span>
+<span id="cb5-4"><a href="reading-and-writing-data---single-files.html#cb5-4" tabindex="-1"></a><span class="fu">write_parquet</span>(my_table, <span class="st">&quot;my_table.parquet&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-parquet-file" class="section level2 hasAnchor" number="2.5">
+<h2><span class="header-section-number">2.5</span> Read a Parquet file<a href="reading-and-writing-data---single-files.html#read-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Parquet file into memory.</p>
+<div id="solution-3" class="section level3 hasAnchor" number="2.5.1">
+<h3><span class="header-section-number">2.5.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="reading-and-writing-data---single-files.html#cb6-1" tabindex="-1"></a>parquet_tbl <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;my_table.parquet&quot;</span>)</span>
+<span id="cb6-2"><a href="reading-and-writing-data---single-files.html#cb6-2" tabindex="-1"></a>parquet_tbl</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 2
+##   group score
+##   &lt;chr&gt; &lt;dbl&gt;
+## 1 A        99
+## 2 B        97
+## 3 C        99</code></pre>
+<p>As the argument <code>as_data_frame</code> was left set to its default value of <code>TRUE</code>, the file was read in as a tibble.</p>
+<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="reading-and-writing-data---single-files.html#cb8-1" tabindex="-1"></a><span class="fu">class</span>(parquet_tbl)</span></code></pre></div>
+<pre><code>## [1] &quot;tbl_df&quot;     &quot;tbl&quot;        &quot;data.frame&quot;</code></pre>
+</div>
+<div id="discussion-1" class="section level3 hasAnchor" number="2.5.2">
+<h3><span class="header-section-number">2.5.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>If you set <code>as_data_frame</code> to <code>FALSE</code>, the file will be read in as an Arrow Table.</p>
+<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="reading-and-writing-data---single-files.html#cb10-1" tabindex="-1"></a>my_table_arrow <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;my_table.parquet&quot;</span>, <span class="at">as_data_frame =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb10-2"><a href="reading-and-writing-data---single-files.html#cb10-2" tabindex="-1"></a>my_table_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="reading-and-writing-data---single-files.html#cb12-1" tabindex="-1"></a><span class="fu">class</span>(my_table_arrow)</span></code></pre></div>
+<pre><code>## [1] &quot;Table&quot;        &quot;ArrowTabular&quot; &quot;ArrowObject&quot;  &quot;R6&quot;</code></pre>
+</div>
+</div>
+<div id="read-a-parquet-file-from-s3" class="section level2 hasAnchor" number="2.6">
+<h2><span class="header-section-number">2.6</span> Read a Parquet file from S3<a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Parquet file from S3 into memory.</p>
+<div id="solution-4" class="section level3 hasAnchor" number="2.6.1">
+<h3><span class="header-section-number">2.6.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="reading-and-writing-data---single-files.html#cb14-1" tabindex="-1"></a>df <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="at">file =</span> <span class="st">&quot;s3://voltrondata-labs-datasets/nyc-taxi/year=2019/month=6/part-0.parquet&quot;</span>)</span></code></pre></div>
+</div>
+<div id="see-also" class="section level3 hasAnchor" number="2.6.2">
+<h3><span class="header-section-number">2.6.2</span> See also<a href="reading-and-writing-data---single-files.html#see-also" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For more in-depth instructions, including how to work with S3 buckets which require authentication, you can find a guide to reading and writing to/from S3 buckets here: <a href="https://arrow.apache.org/docs/r/articles/fs.html" class="uri">https://arrow.apache.org/docs/r/articles/fs.html</a>.</p>
+</div>
+</div>
+<div id="filter-columns-while-reading-a-parquet-file" class="section level2 hasAnchor" number="2.7">
+<h2><span class="header-section-number">2.7</span> Filter columns while reading a Parquet file<a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to specify which columns to include when reading in a single Parquet file into memory.</p>
+<div id="solution-5" class="section level3 hasAnchor" number="2.7.1">
+<h3><span class="header-section-number">2.7.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-5" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="reading-and-writing-data---single-files.html#cb15-1" tabindex="-1"></a><span class="co"># Create table to read back in</span></span>
+<span id="cb15-2"><a href="reading-and-writing-data---single-files.html#cb15-2" tabindex="-1"></a>dist_time <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">distance =</span> <span class="fu">c</span>(<span class="fl">12.2</span>, <span class="fl">15.7</span>, <span class="fl">14.2</span>), <span class="at">time =</span> <span class="fu">c</span>(<span class="dv">43</span>, <span class="dv">44</span>, <span class="dv">40</span>)))</span>
+<span id="cb15-3"><a href="reading-and-writing-data---single-files.html#cb15-3" tabindex="-1"></a><span class="co"># Write to Parquet</span></span>
+<span id="cb15-4"><a href="reading-and-writing-data---single-files.html#cb15-4" tabindex="-1"></a><span class="fu">write_parquet</span>(dist_time, <span class="st">&quot;dist_time.parquet&quot;</span>)</span>
+<span id="cb15-5"><a href="reading-and-writing-data---single-files.html#cb15-5" tabindex="-1"></a></span>
+<span id="cb15-6"><a href="reading-and-writing-data---single-files.html#cb15-6" tabindex="-1"></a><span class="co"># Read in only the &quot;time&quot; column</span></span>
+<span id="cb15-7"><a href="reading-and-writing-data---single-files.html#cb15-7" tabindex="-1"></a>time_only <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;dist_time.parquet&quot;</span>, <span class="at">col_select =</span> <span class="st">&quot;time&quot;</span>)</span>
+<span id="cb15-8"><a href="reading-and-writing-data---single-files.html#cb15-8" tabindex="-1"></a>time_only</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 1
+##    time
+##   &lt;dbl&gt;
+## 1    43
+## 2    44
+## 3    40</code></pre>
+</div>
+</div>
+<div id="write-a-feather-v2arrow-ipc-file" class="section level2 hasAnchor" number="2.8">
+<h2><span class="header-section-number">2.8</span> Write a Feather V2/Arrow IPC file<a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write a single Feather V2 file (also called Arrow IPC file).</p>
+<div id="solution-6" class="section level3 hasAnchor" number="2.8.1">
+<h3><span class="header-section-number">2.8.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-6" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="reading-and-writing-data---single-files.html#cb17-1" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb17-2"><a href="reading-and-writing-data---single-files.html#cb17-2" tabindex="-1"></a><span class="fu">write_feather</span>(my_table, <span class="st">&quot;my_table.arrow&quot;</span>)</span></code></pre></div>
+</div>
+<div id="discussion-2" class="section level3 hasAnchor" number="2.8.2">
+<h3><span class="header-section-number">2.8.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For legacy support, you can write data in the original Feather format by setting the <code>version</code> parameter to <code>1</code>.</p>
+<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="reading-and-writing-data---single-files.html#cb18-1" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb18-2"><a href="reading-and-writing-data---single-files.html#cb18-2" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb18-3"><a href="reading-and-writing-data---single-files.html#cb18-3" tabindex="-1"></a><span class="co"># Write to Feather format V1</span></span>
+<span id="cb18-4"><a href="reading-and-writing-data---single-files.html#cb18-4" tabindex="-1"></a><span class="fu">write_feather</span>(mtcars, <span class="st">&quot;my_table.feather&quot;</span>, <span class="at">version =</span> <span class="dv">1</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-featherarrow-ipc-file" class="section level2 hasAnchor" number="2.9">
+<h2><span class="header-section-number">2.9</span> Read a Feather/Arrow IPC file<a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Feather V1 or V2 file into memory (also called Arrow IPC file).</p>
+<div id="solution-7" class="section level3 hasAnchor" number="2.9.1">
+<h3><span class="header-section-number">2.9.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-7" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="reading-and-writing-data---single-files.html#cb19-1" tabindex="-1"></a>my_feather_tbl <span class="ot">&lt;-</span> <span class="fu">read_feather</span>(<span class="st">&quot;my_table.arrow&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="write-streaming-arrow-ipc-files" class="section level2 hasAnchor" number="2.10">
+<h2><span class="header-section-number">2.10</span> Write streaming Arrow IPC files<a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write to the Arrow IPC stream format.</p>
+<div id="solution-8" class="section level3 hasAnchor" number="2.10.1">
+<h3><span class="header-section-number">2.10.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-8" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb20-1"><a href="reading-and-writing-data---single-files.html#cb20-1" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb20-2"><a href="reading-and-writing-data---single-files.html#cb20-2" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(</span>
+<span id="cb20-3"><a href="reading-and-writing-data---single-files.html#cb20-3" tabindex="-1"></a>  <span class="fu">data.frame</span>(</span>
+<span id="cb20-4"><a href="reading-and-writing-data---single-files.html#cb20-4" tabindex="-1"></a>    <span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>),</span>
+<span id="cb20-5"><a href="reading-and-writing-data---single-files.html#cb20-5" tabindex="-1"></a>    <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)</span>
+<span id="cb20-6"><a href="reading-and-writing-data---single-files.html#cb20-6" tabindex="-1"></a>    )</span>
+<span id="cb20-7"><a href="reading-and-writing-data---single-files.html#cb20-7" tabindex="-1"></a>)</span>
+<span id="cb20-8"><a href="reading-and-writing-data---single-files.html#cb20-8" tabindex="-1"></a><span class="co"># Write to IPC stream format</span></span>
+<span id="cb20-9"><a href="reading-and-writing-data---single-files.html#cb20-9" tabindex="-1"></a><span class="fu">write_ipc_stream</span>(my_table, <span class="st">&quot;my_table.arrows&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-streaming-arrow-ipc-files" class="section level2 hasAnchor" number="2.11">
+<h2><span class="header-section-number">2.11</span> Read streaming Arrow IPC files<a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read from the Arrow IPC stream format.</p>
+<div id="solution-9" class="section level3 hasAnchor" number="2.11.1">
+<h3><span class="header-section-number">2.11.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-9" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="reading-and-writing-data---single-files.html#cb21-1" tabindex="-1"></a>my_ipc_stream <span class="ot">&lt;-</span> arrow<span class="sc">::</span><span class="fu">read_ipc_stream</span>(<span class="st">&quot;my_table.arrows&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="write-a-csv-file" class="section level2 hasAnchor" number="2.12">
+<h2><span class="header-section-number">2.12</span> Write a CSV file<a href="reading-and-writing-data---single-files.html#write-a-csv-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write Arrow data to a single CSV file.</p>
+<div id="solution-10" class="section level3 hasAnchor" number="2.12.1">
+<h3><span class="header-section-number">2.12.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-10" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="reading-and-writing-data---single-files.html#cb22-1" tabindex="-1"></a><span class="fu">write_csv_arrow</span>(cars, <span class="st">&quot;cars.csv&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-csv-file" class="section level2 hasAnchor" number="2.13">
+<h2><span class="header-section-number">2.13</span> Read a CSV file<a href="reading-and-writing-data---single-files.html#read-a-csv-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single CSV file into memory.</p>
+<div id="solution-11" class="section level3 hasAnchor" number="2.13.1">
+<h3><span class="header-section-number">2.13.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-11" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="reading-and-writing-data---single-files.html#cb23-1" tabindex="-1"></a>my_csv <span class="ot">&lt;-</span> <span class="fu">read_csv_arrow</span>(<span class="st">&quot;cars.csv&quot;</span>, <span class="at">as_data_frame =</span> <span class="cn">FALSE</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-json-file" class="section level2 hasAnchor" number="2.14">
+<h2><span class="header-section-number">2.14</span> Read a JSON file<a href="reading-and-writing-data---single-files.html#read-a-json-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a JSON file into memory.</p>
+<div id="solution-12" class="section level3 hasAnchor" number="2.14.1">
+<h3><span class="header-section-number">2.14.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-12" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb24-1"><a href="reading-and-writing-data---single-files.html#cb24-1" tabindex="-1"></a><span class="co"># Create a file to read back in</span></span>
+<span id="cb24-2"><a href="reading-and-writing-data---single-files.html#cb24-2" tabindex="-1"></a>tf <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb24-3"><a href="reading-and-writing-data---single-files.html#cb24-3" tabindex="-1"></a><span class="fu">writeLines</span>(<span class="st">&#39;</span></span>
+<span id="cb24-4"><a href="reading-and-writing-data---single-files.html#cb24-4" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;United Kingdom&quot;, &quot;code&quot;: &quot;GB&quot;, &quot;long&quot;: -3.44, &quot;lat&quot;: 55.38}</span></span>
+<span id="cb24-5"><a href="reading-and-writing-data---single-files.html#cb24-5" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;France&quot;, &quot;code&quot;: &quot;FR&quot;, &quot;long&quot;: 2.21, &quot;lat&quot;: 46.23}</span></span>
+<span id="cb24-6"><a href="reading-and-writing-data---single-files.html#cb24-6" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;Germany&quot;, &quot;code&quot;: &quot;DE&quot;, &quot;long&quot;: 10.45, &quot;lat&quot;: 51.17}</span></span>
+<span id="cb24-7"><a href="reading-and-writing-data---single-files.html#cb24-7" tabindex="-1"></a><span class="st">  &#39;</span>, tf, <span class="at">useBytes =</span> <span class="cn">TRUE</span>)</span>
+<span id="cb24-8"><a href="reading-and-writing-data---single-files.html#cb24-8" tabindex="-1"></a></span>
+<span id="cb24-9"><a href="reading-and-writing-data---single-files.html#cb24-9" tabindex="-1"></a><span class="co"># Read in the data</span></span>
+<span id="cb24-10"><a href="reading-and-writing-data---single-files.html#cb24-10" tabindex="-1"></a>countries <span class="ot">&lt;-</span> <span class="fu">read_json_arrow</span>(tf, <span class="at">col_select =</span> <span class="fu">c</span>(<span class="st">&quot;country&quot;</span>, <span class="st">&quot;long&quot;</span>, <span class="st">&quot;lat&quot;</span>))</span>
+<span id="cb24-11"><a href="reading-and-writing-data---single-files.html#cb24-11" tabindex="-1"></a>countries</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 3
+##   country         long   lat
+##   &lt;chr&gt;          &lt;dbl&gt; &lt;dbl&gt;
+## 1 United Kingdom -3.44  55.4
+## 2 France          2.21  46.2
+## 3 Germany        10.4   51.2</code></pre>
+</div>
+</div>
+<div id="write-a-compressed-single-data-file" class="section level2 hasAnchor" number="2.15">
+<h2><span class="header-section-number">2.15</span> Write a compressed single data file<a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save a single file, compressed with a specified compression algorithm.</p>
+<div id="solution-13" class="section level3 hasAnchor" number="2.15.1">
+<h3><span class="header-section-number">2.15.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-13" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb26-1"><a href="reading-and-writing-data---single-files.html#cb26-1" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb26-2"><a href="reading-and-writing-data---single-files.html#cb26-2" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb26-3"><a href="reading-and-writing-data---single-files.html#cb26-3" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb26-4"><a href="reading-and-writing-data---single-files.html#cb26-4" tabindex="-1"></a></span>
+<span id="cb26-5"><a href="reading-and-writing-data---single-files.html#cb26-5" tabindex="-1"></a><span class="co"># Write data compressed with the gzip algorithm instead of the default</span></span>
+<span id="cb26-6"><a href="reading-and-writing-data---single-files.html#cb26-6" tabindex="-1"></a><span class="fu">write_parquet</span>(iris, <span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>), <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span></code></pre></div>
+</div>
+<div id="see-also-1" class="section level3 hasAnchor" number="2.15.2">
+<h3><span class="header-section-number">2.15.2</span> See also<a href="reading-and-writing-data---single-files.html#see-also-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Some formats write compressed data by default. For more information
+on the supported compression algorithms and default settings, see:</p>
+<ul>
+<li><code>?write_parquet()</code></li>
+<li><code>?write_feather()</code></li>
+</ul>
+</div>
+</div>
+<div id="read-compressed-data" class="section level2 hasAnchor" number="2.16">
+<h2><span class="header-section-number">2.16</span> Read compressed data<a href="reading-and-writing-data---single-files.html#read-compressed-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in a single data file which has been compressed.</p>
+<div id="solution-14" class="section level3 hasAnchor" number="2.16.1">
+<h3><span class="header-section-number">2.16.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-14" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb27-1"><a href="reading-and-writing-data---single-files.html#cb27-1" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb27-2"><a href="reading-and-writing-data---single-files.html#cb27-2" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb27-3"><a href="reading-and-writing-data---single-files.html#cb27-3" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb27-4"><a href="reading-and-writing-data---single-files.html#cb27-4" tabindex="-1"></a></span>
+<span id="cb27-5"><a href="reading-and-writing-data---single-files.html#cb27-5" tabindex="-1"></a><span class="co"># Write data which is to be read back in</span></span>
+<span id="cb27-6"><a href="reading-and-writing-data---single-files.html#cb27-6" tabindex="-1"></a><span class="fu">write_parquet</span>(iris, <span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>), <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span>
+<span id="cb27-7"><a href="reading-and-writing-data---single-files.html#cb27-7" tabindex="-1"></a></span>
+<span id="cb27-8"><a href="reading-and-writing-data---single-files.html#cb27-8" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb27-9"><a href="reading-and-writing-data---single-files.html#cb27-9" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>))</span>
+<span id="cb27-10"><a href="reading-and-writing-data---single-files.html#cb27-10" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;fct&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+</div>
+<div id="discussion-3" class="section level3 hasAnchor" number="2.16.2">
+<h3><span class="header-section-number">2.16.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Note that Arrow automatically detects the compression and you do not have to
+supply it in the call to the <code>read_*()</code> or the <code>open_dataset()</code> functions.</p>
+<p>Although the CSV format does not support compression itself, Arrow supports
+reading in CSV data which has been compressed, if the file extension is <code>.gz</code>.</p>
+<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb29-1"><a href="reading-and-writing-data---single-files.html#cb29-1" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb29-2"><a href="reading-and-writing-data---single-files.html#cb29-2" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb29-3"><a href="reading-and-writing-data---single-files.html#cb29-3" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb29-4"><a href="reading-and-writing-data---single-files.html#cb29-4" tabindex="-1"></a></span>
+<span id="cb29-5"><a href="reading-and-writing-data---single-files.html#cb29-5" tabindex="-1"></a><span class="co"># Write data which is to be read back in</span></span>
+<span id="cb29-6"><a href="reading-and-writing-data---single-files.html#cb29-6" tabindex="-1"></a><span class="fu">write.csv</span>(iris, <span class="fu">gzfile</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.csv.gz&quot;</span>)), <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">quote =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb29-7"><a href="reading-and-writing-data---single-files.html#cb29-7" tabindex="-1"></a></span>
+<span id="cb29-8"><a href="reading-and-writing-data---single-files.html#cb29-8" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb29-9"><a href="reading-and-writing-data---single-files.html#cb29-9" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">read_csv_arrow</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.csv.gz&quot;</span>))</span>
+<span id="cb29-10"><a href="reading-and-writing-data---single-files.html#cb29-10" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;chr&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="reading-and-writing-data---multiple-files.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/reading_and_writing_data.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/dev/r/reference-keys.txt b/dev/r/reference-keys.txt
new file mode 100644
index 0000000..f8f09e3
--- /dev/null
+++ b/dev/r/reference-keys.txt
@@ -0,0 +1,141 @@
+preface
+what-is-arrow
+alternative-resources
+reading-and-writing-data---single-files
+introduction
+convert-data-from-a-data-frame-to-an-arrow-table
+solution
+convert-data-from-an-arrow-table-to-a-data-frame
+solution-1
+discussion
+write-a-parquet-file
+solution-2
+read-a-parquet-file
+solution-3
+discussion-1
+read-a-parquet-file-from-s3
+solution-4
+see-also
+filter-columns-while-reading-a-parquet-file
+solution-5
+write-a-feather-v2arrow-ipc-file
+solution-6
+discussion-2
+read-a-featherarrow-ipc-file
+solution-7
+write-streaming-arrow-ipc-files
+solution-8
+read-streaming-arrow-ipc-files
+solution-9
+write-a-csv-file
+solution-10
+read-a-csv-file
+solution-11
+read-a-json-file
+solution-12
+write-a-compressed-single-data-file
+solution-13
+see-also-1
+read-compressed-data
+solution-14
+discussion-3
+reading-and-writing-data---multiple-files
+introduction-1
+write-data-to-disk---parquet
+solution-15
+discussion-4
+write-partitioned-data---parquet
+solution-16
+discussion-5
+read-partitioned-data
+solution-17
+discussion-6
+write-data-to-disk---featherarrow-ipc-format
+solution-18
+read-in-featherarrow-ipc-data-as-an-arrow-dataset
+solution-19
+write-data-to-disk---csv-format
+solution-20
+read-in-csv-data-as-an-arrow-dataset
+solution-21
+read-in-a-csv-dataset-no-headers
+solution-22
+discussion-7
+write-compressed-partitioned-data
+solution-23
+discussion-8
+read-compressed-data-1
+solution-24
+discussion-9
+creating-arrow-objects
+create-an-arrow-array-from-an-r-object
+solution-25
+create-a-arrow-table-from-an-r-object
+solution-26
+view-the-contents-of-an-arrow-table-or-recordbatch
+solution-27
+manually-create-a-recordbatch-from-an-r-object.
+solution-28
+defining-data-types
+introduction-2
+update-data-type-of-an-existing-arrow-array
+solution-29
+discussion-10
+update-data-type-of-a-field-in-an-existing-arrow-table
+solution-30
+no-compat-type
+specify-data-types-when-creating-an-arrow-table-from-an-r-object
+solution-31
+specify-data-types-when-reading-in-files
+solution-32
+manipulating-data---arrays
+introduction-3
+filter-by-values-matching-a-predicate-or-mask
+solution-33
+discussion-11
+compute-meanminmax-etc-value-of-an-array
+solution-34
+discussion-12
+count-occurrences-of-elements-in-an-array
+solution-35
+discussion-13
+apply-arithmetic-functions-to-arrays.
+solution-36
+discussion-14
+call-arrow-compute-functions-directly-on-arrays
+solution-37
+discussion-15
+see-also-2
+manipulating-data---tables
+introduction-4
+use-dplyr-verbs-in-arrow
+solution-38
+discussion-16
+see-also-3
+use-r-functions-in-dplyr-verbs-in-arrow
+solution-39
+discussion-17
+use-arrow-functions-in-dplyr-verbs-in-arrow
+solution-40
+discussion-18
+compute-functions-with-options
+compute-window-aggregates
+solution-41
+discusson
+using-pyarrow-from-r
+introduction-5
+create-an-arrow-object-using-pyarrow-in-r
+solution-42
+call-a-pyarrow-function-from-r
+solution-43
+flight
+introduction-6
+connect-to-a-flight-server
+solution-44
+see-also-4
+send-data-to-a-flight-server
+solution-45
+check-what-resources-exist-on-a-flight-server
+solution-46
+retrieve-data-from-a-flight-server
+solution-47
diff --git a/dev/r/search_index.json b/dev/r/search_index.json
new file mode 100644
index 0000000..05483f1
--- /dev/null
+++ b/dev/r/search_index.json
@@ -0,0 +1 @@
+[["index.html", "Apache Arrow R Cookbook 1 Preface 1.1 What is Arrow? 1.2 Alternative resources", " Apache Arrow R Cookbook 1 Preface This cookbook aims to provide a number of recipes showing how to perform common tasks using arrow. This version of the cookbook works with arrow &gt;= 6.0.0, but in future we will maintain different versions for the last few major R package releases. 1.1 What is Arrow? Apache Arrow is a cross-language development platform for in-memory analytics. The arrow R package provides a low-level interface to much of the functionality available in the C++ implementation, as well as a higher-level interface to the compute functionality via an implementation of the dplyr API. 1.2 Alternative resources For a complete reference guide to the functions in arrow, as well as vignettes, see the pkgdown site. If you have any requests for new recipes, please open a ticket via the cookbook’s GitHub Issues page. If you have any Arrow feature requests to make or bugs to report, please open an issue on the project JIRA "],["reading-and-writing-data---single-files.html", "2 Reading and Writing Data - Single Files 2.1 Introduction 2.2 Convert data from a data frame to an Arrow Table 2.3 Convert data from an Arrow Table to a data frame 2.4 Write a Parquet file 2.5 Read a Parquet file 2.6 Read a Parquet file from S3 2.7 Filter columns while reading a Parquet file 2.8 Write a Feather V2/Arrow IPC file 2.9 Read a Feather/Arrow IPC file 2.10 Write streaming Arrow IPC files 2.11 Read streaming Arrow IPC files 2.12 Write a CSV file 2.13 Read a CSV file 2.14 Read a JSON file 2.15 Write a compressed single data file 2.16 Read compressed data", " 2 Reading and Writing Data - Single Files 2.1 Introduction When reading files into R using Apache Arrow, you can read: a single file into memory as a data frame or an Arrow Table a single file that is too large to fit in memory as an Arrow Dataset multiple and partitioned files as an Arrow Dataset This chapter contains recipes related to using Apache Arrow to read and write single file data into memory as an Arrow Table. There are a number of circumstances in which you may want to read in single file data as an Arrow Table: your data file is large and having performance issues you want faster performance from your dplyr queries you want to be able to take advantage of Arrow’s compute functions If a single data file is too large to load into memory, you can use the Arrow Dataset API. Recipes for using open_dataset() and write_dataset() are in the Reading and Writing Data - Multiple Files chapter. 2.2 Convert data from a data frame to an Arrow Table You want to convert an existing data.frame or tibble object into an Arrow Table. 2.2.1 Solution air_table &lt;- arrow_table(airquality) air_table ## Table ## 153 rows x 6 columns ## $Ozone &lt;int32&gt; ## $Solar.R &lt;int32&gt; ## $Wind &lt;double&gt; ## $Temp &lt;int32&gt; ## $Month &lt;int32&gt; ## $Day &lt;int32&gt; ## ## See $metadata for additional Schema metadata 2.3 Convert data from an Arrow Table to a data frame You want to convert an Arrow Table to a data frame to view the data or work with it in your usual analytics pipeline. 2.3.1 Solution air_df &lt;- as.data.frame(air_table) air_df ## Ozone Solar.R Wind Temp Month Day ## 1 41 190 7.4 67 5 1 ## 2 36 118 8.0 72 5 2 ## 3 12 149 12.6 74 5 3 ## 4 18 313 11.5 62 5 4 ## 5 NA NA 14.3 56 5 5 ## 6 28 NA 14.9 66 5 6 ## 7 23 299 8.6 65 5 7 ## 8 19 99 13.8 59 5 8 ## 9 8 19 20.1 61 5 9 ## 10 NA 194 8.6 69 5 10 ## 11 7 NA 6.9 74 5 11 ## 12 16 256 9.7 69 5 12 ## 13 11 290 9.2 66 5 13 ## 14 14 274 10.9 68 5 14 ## 15 18 65 13.2 58 5 15 ## 16 14 334 11.5 64 5 16 ## 17 34 307 12.0 66 5 17 ## 18 6 78 18.4 57 5 18 ## 19 30 322 11.5 68 5 19 ## 20 11 44 9.7 62 5 20 ## 21 1 8 9.7 59 5 21 ## 22 11 320 16.6 73 5 22 ## 23 4 25 9.7 61 5 23 ## 24 32 92 12.0 61 5 24 ## 25 NA 66 16.6 57 5 25 ## 26 NA 266 14.9 58 5 26 ## 27 NA NA 8.0 57 5 27 ## 28 23 13 12.0 67 5 28 ## 29 45 252 14.9 81 5 29 ## 30 115 223 5.7 79 5 30 ## 31 37 279 7.4 76 5 31 ## 32 NA 286 8.6 78 6 1 ## 33 NA 287 9.7 74 6 2 ## 34 NA 242 16.1 67 6 3 ## 35 NA 186 9.2 84 6 4 ## 36 NA 220 8.6 85 6 5 ## 37 NA 264 14.3 79 6 6 ## 38 29 127 9.7 82 6 7 ## 39 NA 273 6.9 87 6 8 ## 40 71 291 13.8 90 6 9 ## 41 39 323 11.5 87 6 10 ## 42 NA 259 10.9 93 6 11 ## 43 NA 250 9.2 92 6 12 ## 44 23 148 8.0 82 6 13 ## 45 NA 332 13.8 80 6 14 ## 46 NA 322 11.5 79 6 15 ## 47 21 191 14.9 77 6 16 ## 48 37 284 20.7 72 6 17 ## 49 20 37 9.2 65 6 18 ## 50 12 120 11.5 73 6 19 ## 51 13 137 10.3 76 6 20 ## 52 NA 150 6.3 77 6 21 ## 53 NA 59 1.7 76 6 22 ## 54 NA 91 4.6 76 6 23 ## 55 NA 250 6.3 76 6 24 ## 56 NA 135 8.0 75 6 25 ## 57 NA 127 8.0 78 6 26 ## 58 NA 47 10.3 73 6 27 ## 59 NA 98 11.5 80 6 28 ## 60 NA 31 14.9 77 6 29 ## 61 NA 138 8.0 83 6 30 ## 62 135 269 4.1 84 7 1 ## 63 49 248 9.2 85 7 2 ## 64 32 236 9.2 81 7 3 ## 65 NA 101 10.9 84 7 4 ## 66 64 175 4.6 83 7 5 ## 67 40 314 10.9 83 7 6 ## 68 77 276 5.1 88 7 7 ## 69 97 267 6.3 92 7 8 ## 70 97 272 5.7 92 7 9 ## 71 85 175 7.4 89 7 10 ## 72 NA 139 8.6 82 7 11 ## 73 10 264 14.3 73 7 12 ## 74 27 175 14.9 81 7 13 ## 75 NA 291 14.9 91 7 14 ## 76 7 48 14.3 80 7 15 ## 77 48 260 6.9 81 7 16 ## 78 35 274 10.3 82 7 17 ## 79 61 285 6.3 84 7 18 ## 80 79 187 5.1 87 7 19 ## 81 63 220 11.5 85 7 20 ## 82 16 7 6.9 74 7 21 ## 83 NA 258 9.7 81 7 22 ## 84 NA 295 11.5 82 7 23 ## 85 80 294 8.6 86 7 24 ## 86 108 223 8.0 85 7 25 ## 87 20 81 8.6 82 7 26 ## 88 52 82 12.0 86 7 27 ## 89 82 213 7.4 88 7 28 ## 90 50 275 7.4 86 7 29 ## 91 64 253 7.4 83 7 30 ## 92 59 254 9.2 81 7 31 ## 93 39 83 6.9 81 8 1 ## 94 9 24 13.8 81 8 2 ## 95 16 77 7.4 82 8 3 ## 96 78 NA 6.9 86 8 4 ## 97 35 NA 7.4 85 8 5 ## 98 66 NA 4.6 87 8 6 ## 99 122 255 4.0 89 8 7 ## 100 89 229 10.3 90 8 8 ## 101 110 207 8.0 90 8 9 ## 102 NA 222 8.6 92 8 10 ## 103 NA 137 11.5 86 8 11 ## 104 44 192 11.5 86 8 12 ## 105 28 273 11.5 82 8 13 ## 106 65 157 9.7 80 8 14 ## 107 NA 64 11.5 79 8 15 ## 108 22 71 10.3 77 8 16 ## 109 59 51 6.3 79 8 17 ## 110 23 115 7.4 76 8 18 ## 111 31 244 10.9 78 8 19 ## 112 44 190 10.3 78 8 20 ## 113 21 259 15.5 77 8 21 ## 114 9 36 14.3 72 8 22 ## 115 NA 255 12.6 75 8 23 ## 116 45 212 9.7 79 8 24 ## 117 168 238 3.4 81 8 25 ## 118 73 215 8.0 86 8 26 ## 119 NA 153 5.7 88 8 27 ## 120 76 203 9.7 97 8 28 ## 121 118 225 2.3 94 8 29 ## 122 84 237 6.3 96 8 30 ## 123 85 188 6.3 94 8 31 ## 124 96 167 6.9 91 9 1 ## 125 78 197 5.1 92 9 2 ## 126 73 183 2.8 93 9 3 ## 127 91 189 4.6 93 9 4 ## 128 47 95 7.4 87 9 5 ## 129 32 92 15.5 84 9 6 ## 130 20 252 10.9 80 9 7 ## 131 23 220 10.3 78 9 8 ## 132 21 230 10.9 75 9 9 ## 133 24 259 9.7 73 9 10 ## 134 44 236 14.9 81 9 11 ## 135 21 259 15.5 76 9 12 ## 136 28 238 6.3 77 9 13 ## 137 9 24 10.9 71 9 14 ## 138 13 112 11.5 71 9 15 ## 139 46 237 6.9 78 9 16 ## 140 18 224 13.8 67 9 17 ## 141 13 27 10.3 76 9 18 ## 142 24 238 10.3 68 9 19 ## 143 16 201 8.0 82 9 20 ## 144 13 238 12.6 64 9 21 ## 145 23 14 9.2 71 9 22 ## 146 36 139 10.3 81 9 23 ## 147 7 49 10.3 69 9 24 ## 148 14 20 16.6 63 9 25 ## 149 30 193 6.9 70 9 26 ## 150 NA 145 13.2 77 9 27 ## 151 14 191 14.3 75 9 28 ## 152 18 131 8.0 76 9 29 ## 153 20 223 11.5 68 9 30 2.3.2 Discussion You can dplyr::collect() to return a tibble or as.data.frame() to return a data.frame. 2.4 Write a Parquet file You want to write a single Parquet file to disk. 2.4.1 Solution # Create table my_table &lt;- arrow_table(tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) # Write to Parquet write_parquet(my_table, &quot;my_table.parquet&quot;) 2.5 Read a Parquet file You want to read a single Parquet file into memory. 2.5.1 Solution parquet_tbl &lt;- read_parquet(&quot;my_table.parquet&quot;) parquet_tbl ## # A tibble: 3 × 2 ## group score ## &lt;chr&gt; &lt;dbl&gt; ## 1 A 99 ## 2 B 97 ## 3 C 99 As the argument as_data_frame was left set to its default value of TRUE, the file was read in as a tibble. class(parquet_tbl) ## [1] &quot;tbl_df&quot; &quot;tbl&quot; &quot;data.frame&quot; 2.5.2 Discussion If you set as_data_frame to FALSE, the file will be read in as an Arrow Table. my_table_arrow &lt;- read_parquet(&quot;my_table.parquet&quot;, as_data_frame = FALSE) my_table_arrow ## Table ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; class(my_table_arrow) ## [1] &quot;Table&quot; &quot;ArrowTabular&quot; &quot;ArrowObject&quot; &quot;R6&quot; 2.6 Read a Parquet file from S3 You want to read a single Parquet file from S3 into memory. 2.6.1 Solution df &lt;- read_parquet(file = &quot;s3://voltrondata-labs-datasets/nyc-taxi/year=2019/month=6/part-0.parquet&quot;) 2.6.2 See also For more in-depth instructions, including how to work with S3 buckets which require authentication, you can find a guide to reading and writing to/from S3 buckets here: https://arrow.apache.org/docs/r/articles/fs.html. 2.7 Filter columns while reading a Parquet file You want to specify which columns to include when reading in a single Parquet file into memory. 2.7.1 Solution # Create table to read back in dist_time &lt;- arrow_table(data.frame(distance = c(12.2, 15.7, 14.2), time = c(43, 44, 40))) # Write to Parquet write_parquet(dist_time, &quot;dist_time.parquet&quot;) # Read in only the &quot;time&quot; column time_only &lt;- read_parquet(&quot;dist_time.parquet&quot;, col_select = &quot;time&quot;) time_only ## # A tibble: 3 × 1 ## time ## &lt;dbl&gt; ## 1 43 ## 2 44 ## 3 40 2.8 Write a Feather V2/Arrow IPC file You want to write a single Feather V2 file (also called Arrow IPC file). 2.8.1 Solution my_table &lt;- arrow_table(data.frame(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) write_feather(my_table, &quot;my_table.arrow&quot;) 2.8.2 Discussion For legacy support, you can write data in the original Feather format by setting the version parameter to 1. # Create table my_table &lt;- arrow_table(data.frame(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) # Write to Feather format V1 write_feather(mtcars, &quot;my_table.feather&quot;, version = 1) 2.9 Read a Feather/Arrow IPC file You want to read a single Feather V1 or V2 file into memory (also called Arrow IPC file). 2.9.1 Solution my_feather_tbl &lt;- read_feather(&quot;my_table.arrow&quot;) 2.10 Write streaming Arrow IPC files You want to write to the Arrow IPC stream format. 2.10.1 Solution # Create table my_table &lt;- arrow_table( data.frame( group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99) ) ) # Write to IPC stream format write_ipc_stream(my_table, &quot;my_table.arrows&quot;) 2.11 Read streaming Arrow IPC files You want to read from the Arrow IPC stream format. 2.11.1 Solution my_ipc_stream &lt;- arrow::read_ipc_stream(&quot;my_table.arrows&quot;) 2.12 Write a CSV file You want to write Arrow data to a single CSV file. 2.12.1 Solution write_csv_arrow(cars, &quot;cars.csv&quot;) 2.13 Read a CSV file You want to read a single CSV file into memory. 2.13.1 Solution my_csv &lt;- read_csv_arrow(&quot;cars.csv&quot;, as_data_frame = FALSE) 2.14 Read a JSON file You want to read a JSON file into memory. 2.14.1 Solution # Create a file to read back in tf &lt;- tempfile() writeLines(&#39; {&quot;country&quot;: &quot;United Kingdom&quot;, &quot;code&quot;: &quot;GB&quot;, &quot;long&quot;: -3.44, &quot;lat&quot;: 55.38} {&quot;country&quot;: &quot;France&quot;, &quot;code&quot;: &quot;FR&quot;, &quot;long&quot;: 2.21, &quot;lat&quot;: 46.23} {&quot;country&quot;: &quot;Germany&quot;, &quot;code&quot;: &quot;DE&quot;, &quot;long&quot;: 10.45, &quot;lat&quot;: 51.17} &#39;, tf, useBytes = TRUE) # Read in the data countries &lt;- read_json_arrow(tf, col_select = c(&quot;country&quot;, &quot;long&quot;, &quot;lat&quot;)) countries ## # A tibble: 3 × 3 ## country long lat ## &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; ## 1 United Kingdom -3.44 55.4 ## 2 France 2.21 46.2 ## 3 Germany 10.4 51.2 2.15 Write a compressed single data file You want to save a single file, compressed with a specified compression algorithm. 2.15.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data compressed with the gzip algorithm instead of the default write_parquet(iris, file.path(td, &quot;iris.parquet&quot;), compression = &quot;gzip&quot;) 2.15.2 See also Some formats write compressed data by default. For more information on the supported compression algorithms and default settings, see: ?write_parquet() ?write_feather() 2.16 Read compressed data You want to read in a single data file which has been compressed. 2.16.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data which is to be read back in write_parquet(iris, file.path(td, &quot;iris.parquet&quot;), compression = &quot;gzip&quot;) # Read in data ds &lt;- read_parquet(file.path(td, &quot;iris.parquet&quot;)) ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;fct&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows 2.16.2 Discussion Note that Arrow automatically detects the compression and you do not have to supply it in the call to the read_*() or the open_dataset() functions. Although the CSV format does not support compression itself, Arrow supports reading in CSV data which has been compressed, if the file extension is .gz. # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data which is to be read back in write.csv(iris, gzfile(file.path(td, &quot;iris.csv.gz&quot;)), row.names = FALSE, quote = FALSE) # Read in data ds &lt;- read_csv_arrow(file.path(td, &quot;iris.csv.gz&quot;)) ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows "],["reading-and-writing-data---multiple-files.html", "3 Reading and Writing Data - Multiple Files 3.1 Introduction 3.2 Write data to disk - Parquet 3.3 Write partitioned data - Parquet 3.4 Read partitioned data 3.5 Write data to disk - Feather/Arrow IPC format 3.6 Read in Feather/Arrow IPC data as an Arrow Dataset 3.7 Write data to disk - CSV format 3.8 Read in CSV data as an Arrow Dataset 3.9 Read in a CSV dataset (no headers) 3.10 Write compressed partitioned data 3.11 Read compressed data", " 3 Reading and Writing Data - Multiple Files 3.1 Introduction When reading files into R using Apache Arrow, you can read: a single file into memory as a data frame or an Arrow Table a single file that is too large to fit in memory as an Arrow Dataset multiple and partitioned files as an Arrow Dataset This chapter contains recipes related to using Apache Arrow to read and write files too large for memory and multiple or partitioned files as an Arrow Dataset. There are a number of circumstances in which you may want to read in the data as an Arrow Dataset: your single data file is too large to load into memory your data are partitioned among numerous files you want faster performance from your dplyr queries you want to be able to take advantage of Arrow’s compute functions It is possible to read in partitioned data in Parquet, Feather (also known as Arrow IPC), and CSV or other text-delimited formats. If you are choosing a partitioned multiple file format, we recommend Parquet or Feather (Arrow IPC ), both of which can have improved performance when compared to CSVs due to their capabilities around metadata and compression. 3.2 Write data to disk - Parquet You want to write data to disk in a single Parquet file. 3.2.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data&quot;) 3.2.2 Discussion The default format for open_dataset() and write_dataset() is Parquet. 3.3 Write partitioned data - Parquet You want to save multiple Parquet data files to disk in partitions based on columns in the data. 3.3.1 Solution write_dataset(airquality, &quot;airquality_partitioned&quot;, partitioning = c(&quot;Month&quot;)) As you can see, this has created folders based on the supplied partition variable Month. list.files(&quot;airquality_partitioned&quot;) ## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot; 3.3.2 Discussion The data is written to separate folders based on the values in the Month column. The default behaviour is to use Hive-style (i.e. “col_name=value” folder names) partitions. # Take a look at the files in this directory list.files(&quot;airquality_partitioned&quot;, recursive = TRUE) ## [1] &quot;Month=5/part-0.parquet&quot; &quot;Month=6/part-0.parquet&quot; &quot;Month=7/part-0.parquet&quot; ## [4] &quot;Month=8/part-0.parquet&quot; &quot;Month=9/part-0.parquet&quot; You can specify multiple partitioning variables to add extra levels of partitioning. write_dataset(airquality, &quot;airquality_partitioned_deeper&quot;, partitioning = c(&quot;Month&quot;, &quot;Day&quot;)) list.files(&quot;airquality_partitioned_deeper&quot;) ## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot; If you take a look in one of these folders, you will see that the data is then partitioned by the second partition variable, Day. # Take a look at the files in this directory list.files(&quot;airquality_partitioned_deeper/Month=5&quot;, recursive = TRUE) ## [1] &quot;Day=1/part-0.parquet&quot; &quot;Day=10/part-0.parquet&quot; &quot;Day=11/part-0.parquet&quot; ## [4] &quot;Day=12/part-0.parquet&quot; &quot;Day=13/part-0.parquet&quot; &quot;Day=14/part-0.parquet&quot; ## [7] &quot;Day=15/part-0.parquet&quot; &quot;Day=16/part-0.parquet&quot; &quot;Day=17/part-0.parquet&quot; ## [10] &quot;Day=18/part-0.parquet&quot; &quot;Day=19/part-0.parquet&quot; &quot;Day=2/part-0.parquet&quot; ## [13] &quot;Day=20/part-0.parquet&quot; &quot;Day=21/part-0.parquet&quot; &quot;Day=22/part-0.parquet&quot; ## [16] &quot;Day=23/part-0.parquet&quot; &quot;Day=24/part-0.parquet&quot; &quot;Day=25/part-0.parquet&quot; ## [19] &quot;Day=26/part-0.parquet&quot; &quot;Day=27/part-0.parquet&quot; &quot;Day=28/part-0.parquet&quot; ## [22] &quot;Day=29/part-0.parquet&quot; &quot;Day=3/part-0.parquet&quot; &quot;Day=30/part-0.parquet&quot; ## [25] &quot;Day=31/part-0.parquet&quot; &quot;Day=4/part-0.parquet&quot; &quot;Day=5/part-0.parquet&quot; ## [28] &quot;Day=6/part-0.parquet&quot; &quot;Day=7/part-0.parquet&quot; &quot;Day=8/part-0.parquet&quot; ## [31] &quot;Day=9/part-0.parquet&quot; There are two different ways to specify variables to use for partitioning - either via the partitioning variable as above, or by using dplyr::group_by() on your data - the group variables will form the partitions. write_dataset(dataset = group_by(airquality, Month, Day), path = &quot;airquality_groupby&quot;) # Take a look at the files in this directory list.files(&quot;airquality_groupby&quot;, recursive = TRUE) ## [1] &quot;Month=5/Day=1/part-0.parquet&quot; &quot;Month=5/Day=10/part-0.parquet&quot; ## [3] &quot;Month=5/Day=11/part-0.parquet&quot; &quot;Month=5/Day=12/part-0.parquet&quot; ## [5] &quot;Month=5/Day=13/part-0.parquet&quot; &quot;Month=5/Day=14/part-0.parquet&quot; ## [7] &quot;Month=5/Day=15/part-0.parquet&quot; &quot;Month=5/Day=16/part-0.parquet&quot; ## [9] &quot;Month=5/Day=17/part-0.parquet&quot; &quot;Month=5/Day=18/part-0.parquet&quot; ## [11] &quot;Month=5/Day=19/part-0.parquet&quot; &quot;Month=5/Day=2/part-0.parquet&quot; ## [13] &quot;Month=5/Day=20/part-0.parquet&quot; &quot;Month=5/Day=21/part-0.parquet&quot; ## [15] &quot;Month=5/Day=22/part-0.parquet&quot; &quot;Month=5/Day=23/part-0.parquet&quot; ## [17] &quot;Month=5/Day=24/part-0.parquet&quot; &quot;Month=5/Day=25/part-0.parquet&quot; ## [19] &quot;Month=5/Day=26/part-0.parquet&quot; &quot;Month=5/Day=27/part-0.parquet&quot; ## [21] &quot;Month=5/Day=28/part-0.parquet&quot; &quot;Month=5/Day=29/part-0.parquet&quot; ## [23] &quot;Month=5/Day=3/part-0.parquet&quot; &quot;Month=5/Day=30/part-0.parquet&quot; ## [25] &quot;Month=5/Day=31/part-0.parquet&quot; &quot;Month=5/Day=4/part-0.parquet&quot; ## [27] &quot;Month=5/Day=5/part-0.parquet&quot; &quot;Month=5/Day=6/part-0.parquet&quot; ## [29] &quot;Month=5/Day=7/part-0.parquet&quot; &quot;Month=5/Day=8/part-0.parquet&quot; ## [31] &quot;Month=5/Day=9/part-0.parquet&quot; &quot;Month=6/Day=1/part-0.parquet&quot; ## [33] &quot;Month=6/Day=10/part-0.parquet&quot; &quot;Month=6/Day=11/part-0.parquet&quot; ## [35] &quot;Month=6/Day=12/part-0.parquet&quot; &quot;Month=6/Day=13/part-0.parquet&quot; ## [37] &quot;Month=6/Day=14/part-0.parquet&quot; &quot;Month=6/Day=15/part-0.parquet&quot; ## [39] &quot;Month=6/Day=16/part-0.parquet&quot; &quot;Month=6/Day=17/part-0.parquet&quot; ## [41] &quot;Month=6/Day=18/part-0.parquet&quot; &quot;Month=6/Day=19/part-0.parquet&quot; ## [43] &quot;Month=6/Day=2/part-0.parquet&quot; &quot;Month=6/Day=20/part-0.parquet&quot; ## [45] &quot;Month=6/Day=21/part-0.parquet&quot; &quot;Month=6/Day=22/part-0.parquet&quot; ## [47] &quot;Month=6/Day=23/part-0.parquet&quot; &quot;Month=6/Day=24/part-0.parquet&quot; ## [49] &quot;Month=6/Day=25/part-0.parquet&quot; &quot;Month=6/Day=26/part-0.parquet&quot; ## [51] &quot;Month=6/Day=27/part-0.parquet&quot; &quot;Month=6/Day=28/part-0.parquet&quot; ## [53] &quot;Month=6/Day=29/part-0.parquet&quot; &quot;Month=6/Day=3/part-0.parquet&quot; ## [55] &quot;Month=6/Day=30/part-0.parquet&quot; &quot;Month=6/Day=4/part-0.parquet&quot; ## [57] &quot;Month=6/Day=5/part-0.parquet&quot; &quot;Month=6/Day=6/part-0.parquet&quot; ## [59] &quot;Month=6/Day=7/part-0.parquet&quot; &quot;Month=6/Day=8/part-0.parquet&quot; ## [61] &quot;Month=6/Day=9/part-0.parquet&quot; &quot;Month=7/Day=1/part-0.parquet&quot; ## [63] &quot;Month=7/Day=10/part-0.parquet&quot; &quot;Month=7/Day=11/part-0.parquet&quot; ## [65] &quot;Month=7/Day=12/part-0.parquet&quot; &quot;Month=7/Day=13/part-0.parquet&quot; ## [67] &quot;Month=7/Day=14/part-0.parquet&quot; &quot;Month=7/Day=15/part-0.parquet&quot; ## [69] &quot;Month=7/Day=16/part-0.parquet&quot; &quot;Month=7/Day=17/part-0.parquet&quot; ## [71] &quot;Month=7/Day=18/part-0.parquet&quot; &quot;Month=7/Day=19/part-0.parquet&quot; ## [73] &quot;Month=7/Day=2/part-0.parquet&quot; &quot;Month=7/Day=20/part-0.parquet&quot; ## [75] &quot;Month=7/Day=21/part-0.parquet&quot; &quot;Month=7/Day=22/part-0.parquet&quot; ## [77] &quot;Month=7/Day=23/part-0.parquet&quot; &quot;Month=7/Day=24/part-0.parquet&quot; ## [79] &quot;Month=7/Day=25/part-0.parquet&quot; &quot;Month=7/Day=26/part-0.parquet&quot; ## [81] &quot;Month=7/Day=27/part-0.parquet&quot; &quot;Month=7/Day=28/part-0.parquet&quot; ## [83] &quot;Month=7/Day=29/part-0.parquet&quot; &quot;Month=7/Day=3/part-0.parquet&quot; ## [85] &quot;Month=7/Day=30/part-0.parquet&quot; &quot;Month=7/Day=31/part-0.parquet&quot; ## [87] &quot;Month=7/Day=4/part-0.parquet&quot; &quot;Month=7/Day=5/part-0.parquet&quot; ## [89] &quot;Month=7/Day=6/part-0.parquet&quot; &quot;Month=7/Day=7/part-0.parquet&quot; ## [91] &quot;Month=7/Day=8/part-0.parquet&quot; &quot;Month=7/Day=9/part-0.parquet&quot; ## [93] &quot;Month=8/Day=1/part-0.parquet&quot; &quot;Month=8/Day=10/part-0.parquet&quot; ## [95] &quot;Month=8/Day=11/part-0.parquet&quot; &quot;Month=8/Day=12/part-0.parquet&quot; ## [97] &quot;Month=8/Day=13/part-0.parquet&quot; &quot;Month=8/Day=14/part-0.parquet&quot; ## [99] &quot;Month=8/Day=15/part-0.parquet&quot; &quot;Month=8/Day=16/part-0.parquet&quot; ## [101] &quot;Month=8/Day=17/part-0.parquet&quot; &quot;Month=8/Day=18/part-0.parquet&quot; ## [103] &quot;Month=8/Day=19/part-0.parquet&quot; &quot;Month=8/Day=2/part-0.parquet&quot; ## [105] &quot;Month=8/Day=20/part-0.parquet&quot; &quot;Month=8/Day=21/part-0.parquet&quot; ## [107] &quot;Month=8/Day=22/part-0.parquet&quot; &quot;Month=8/Day=23/part-0.parquet&quot; ## [109] &quot;Month=8/Day=24/part-0.parquet&quot; &quot;Month=8/Day=25/part-0.parquet&quot; ## [111] &quot;Month=8/Day=26/part-0.parquet&quot; &quot;Month=8/Day=27/part-0.parquet&quot; ## [113] &quot;Month=8/Day=28/part-0.parquet&quot; &quot;Month=8/Day=29/part-0.parquet&quot; ## [115] &quot;Month=8/Day=3/part-0.parquet&quot; &quot;Month=8/Day=30/part-0.parquet&quot; ## [117] &quot;Month=8/Day=31/part-0.parquet&quot; &quot;Month=8/Day=4/part-0.parquet&quot; ## [119] &quot;Month=8/Day=5/part-0.parquet&quot; &quot;Month=8/Day=6/part-0.parquet&quot; ## [121] &quot;Month=8/Day=7/part-0.parquet&quot; &quot;Month=8/Day=8/part-0.parquet&quot; ## [123] &quot;Month=8/Day=9/part-0.parquet&quot; &quot;Month=9/Day=1/part-0.parquet&quot; ## [125] &quot;Month=9/Day=10/part-0.parquet&quot; &quot;Month=9/Day=11/part-0.parquet&quot; ## [127] &quot;Month=9/Day=12/part-0.parquet&quot; &quot;Month=9/Day=13/part-0.parquet&quot; ## [129] &quot;Month=9/Day=14/part-0.parquet&quot; &quot;Month=9/Day=15/part-0.parquet&quot; ## [131] &quot;Month=9/Day=16/part-0.parquet&quot; &quot;Month=9/Day=17/part-0.parquet&quot; ## [133] &quot;Month=9/Day=18/part-0.parquet&quot; &quot;Month=9/Day=19/part-0.parquet&quot; ## [135] &quot;Month=9/Day=2/part-0.parquet&quot; &quot;Month=9/Day=20/part-0.parquet&quot; ## [137] &quot;Month=9/Day=21/part-0.parquet&quot; &quot;Month=9/Day=22/part-0.parquet&quot; ## [139] &quot;Month=9/Day=23/part-0.parquet&quot; &quot;Month=9/Day=24/part-0.parquet&quot; ## [141] &quot;Month=9/Day=25/part-0.parquet&quot; &quot;Month=9/Day=26/part-0.parquet&quot; ## [143] &quot;Month=9/Day=27/part-0.parquet&quot; &quot;Month=9/Day=28/part-0.parquet&quot; ## [145] &quot;Month=9/Day=29/part-0.parquet&quot; &quot;Month=9/Day=3/part-0.parquet&quot; ## [147] &quot;Month=9/Day=30/part-0.parquet&quot; &quot;Month=9/Day=4/part-0.parquet&quot; ## [149] &quot;Month=9/Day=5/part-0.parquet&quot; &quot;Month=9/Day=6/part-0.parquet&quot; ## [151] &quot;Month=9/Day=7/part-0.parquet&quot; &quot;Month=9/Day=8/part-0.parquet&quot; ## [153] &quot;Month=9/Day=9/part-0.parquet&quot; Each of these folders contains 1 or more Parquet files containing the relevant partition of the data. list.files(&quot;airquality_groupby/Month=5/Day=10&quot;) ## [1] &quot;part-0.parquet&quot; Note that when there was an NA value in the partition column, these values are written to the col_name=__HIVE_DEFAULT_PARTITION__ directory. 3.4 Read partitioned data You want to read partitioned data files as an Arrow Dataset. 3.4.1 Solution # Read data from directory air_data &lt;- open_dataset(&quot;airquality_partitioned_deeper&quot;) # View data air_data ## FileSystemDataset with 153 Parquet files ## Ozone: int32 ## Solar.R: int32 ## Wind: double ## Temp: int32 ## Month: int32 ## Day: int32 ## ## See $metadata for additional Schema metadata 3.4.2 Discussion Partitioning allows you to split data across multiple files and folders, avoiding problems associated with storing all your data in a single file. This can provide further advantages when using Arrow, as Arrow will only read in the necessary partitioned files needed for any given analysis. 3.5 Write data to disk - Feather/Arrow IPC format You want to write data to disk in a single Feather/Arrow IPC file. 3.5.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data_feather&quot;, format = &quot;feather&quot;) 3.6 Read in Feather/Arrow IPC data as an Arrow Dataset You want to read in Feather/Arrow IPC data as an Arrow Dataset 3.6.1 Solution # write Arrow file to use in this example write_dataset(dataset = airquality, path = &quot;airquality_data_arrow&quot;, format = &quot;arrow&quot;) # read into R open_dataset(&quot;airquality_data_arrow&quot;, format = &quot;arrow&quot;) ## FileSystemDataset with 1 Feather file ## Ozone: int32 ## Solar.R: int32 ## Wind: double ## Temp: int32 ## Month: int32 ## Day: int32 ## ## See $metadata for additional Schema metadata 3.7 Write data to disk - CSV format You want to write data to disk in a single CSV file. 3.7.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data_csv&quot;, format = &quot;csv&quot;) 3.8 Read in CSV data as an Arrow Dataset You want to read in CSV data as an Arrow Dataset 3.8.1 Solution # write CSV file to use in this example write_dataset(dataset = airquality, path = &quot;airquality_data_csv&quot;, format = &quot;csv&quot;) # read into R open_dataset(&quot;airquality_data_csv&quot;, format = &quot;csv&quot;) ## FileSystemDataset with 1 csv file ## Ozone: int64 ## Solar.R: int64 ## Wind: double ## Temp: int64 ## Month: int64 ## Day: int64 3.9 Read in a CSV dataset (no headers) You want to read in a dataset containing CSVs with no headers 3.9.1 Solution # write CSV file to use in this example dataset_1 &lt;- airquality[1:40, c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)] dataset_2 &lt;- airquality[41:80, c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)] dir.create(&quot;airquality&quot;) write.table(dataset_1, &quot;airquality/part-1.csv&quot;, sep = &quot;,&quot;, row.names = FALSE, col.names = FALSE) write.table(dataset_2, &quot;airquality/part-2.csv&quot;, sep = &quot;,&quot;, row.names = FALSE, col.names = FALSE) # read into R open_dataset(&quot;airquality&quot;, format = &quot;csv&quot;, column_names = c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)) ## FileSystemDataset with 2 csv files ## Month: int64 ## Day: int64 ## Temp: int64 3.9.2 Discussion If your dataset is made up of headerless CSV files, you must supply the names of each column. You can do this in multiple ways - either via the column_names parameter (as shown above) or via a schema: open_dataset(&quot;airquality&quot;, format = &quot;csv&quot;, schema = schema(&quot;Month&quot; = int32(), &quot;Day&quot; = int32(), &quot;Temp&quot; = int32())) ## FileSystemDataset with 2 csv files ## Month: int32 ## Day: int32 ## Temp: int32 One additional advantage of using a schema is that you also have control of the data types of the columns. If you provide both column names and a schema, the values in column_names must match the schema field names. 3.10 Write compressed partitioned data You want to save partitioned files, compressed with a specified compression algorithm. 3.10.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write dataset to file write_dataset(iris, path = td, compression = &quot;gzip&quot;) # View files in the directory list.files(td, recursive = TRUE) ## [1] &quot;part-0.parquet&quot; 3.10.2 Discussion You can supply the compression argument to write_dataset() as long as the compression algorithm is compatible with the chosen format. See ?write_dataset() for more information on supported compression algorithms and default settings. 3.11 Read compressed data You want to read in data which has been compressed. 3.11.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write dataset to file write_dataset(iris, path = td, compression = &quot;gzip&quot;) # Read in data ds &lt;- open_dataset(td) %&gt;% collect() ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;fct&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows 3.11.2 Discussion Note that Arrow automatically detects the compression and you do not have to supply it in the call to open_dataset() or the read_*() functions. "],["creating-arrow-objects.html", "4 Creating Arrow Objects 4.1 Create an Arrow Array from an R object 4.2 Create a Arrow Table from an R object 4.3 View the contents of an Arrow Table or RecordBatch 4.4 Manually create a RecordBatch from an R object.", " 4 Creating Arrow Objects 4.1 Create an Arrow Array from an R object You want to convert an existing vector in R to an Arrow Array object. 4.1.1 Solution # Create an example vector score = c(99, 97, 99) # Convert to Arrow Array score_array &lt;- Array$create(score) # View Array score_array ## Array ## &lt;double&gt; ## [ ## 99, ## 97, ## 99 ## ] 4.2 Create a Arrow Table from an R object You want to convert an existing data frame in R to an Arrow Table object. 4.2.1 Solution # Create an example data frame my_tibble &lt;- tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99)) # Convert to Arrow Table my_table &lt;- arrow_table(my_tibble) # View table my_table ## Table ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; 4.3 View the contents of an Arrow Table or RecordBatch You want to view the contents of an Arrow Table or RecordBatch. 4.3.1 Solution # View Table dplyr::collect(my_table) ## # A tibble: 3 × 2 ## group score ## &lt;chr&gt; &lt;dbl&gt; ## 1 A 99 ## 2 B 97 ## 3 C 99 4.4 Manually create a RecordBatch from an R object. You want to convert an existing data frame in R to an Arrow RecordBatch object. 4.4.1 Solution # Create an example data frame my_tibble &lt;- tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99)) # Convert to Arrow RecordBatch my_record_batch &lt;- record_batch(my_tibble) # View RecordBatch my_record_batch ## RecordBatch ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; "],["defining-data-types.html", "5 Defining Data Types 5.1 Introduction 5.2 Update data type of an existing Arrow Array 5.3 Update data type of a field in an existing Arrow Table 5.4 Specify data types when creating an Arrow table from an R object 5.5 Specify data types when reading in files", " 5 Defining Data Types 5.1 Introduction As discussed in previous chapters, Arrow automatically infers the most appropriate data type when reading in data or converting R objects to Arrow objects. However, you might want to manually tell Arrow which data types to use, for example, to ensure interoperability with databases and data warehouse systems. This chapter includes recipes for: changing the data types of existing Arrow objects defining data types during the process of creating Arrow objects A table showing the default mappings between R and Arrow data types can be found in R data type to Arrow data type mappings. A table containing Arrow data types, and their R equivalents can be found in Arrow data type to R data type mapping. 5.2 Update data type of an existing Arrow Array You want to change the data type of an existing Arrow Array. 5.2.1 Solution # Create an Array to cast integer_arr &lt;- Array$create(1:5) # Cast to an unsigned int8 type uint_arr &lt;- integer_arr$cast(target_type = uint8()) uint_arr ## Array ## &lt;uint8&gt; ## [ ## 1, ## 2, ## 3, ## 4, ## 5 ## ] 5.2.2 Discussion There are some data types which are not compatible with each other. Errors will occur if you try to cast between incompatible data types. int_arr &lt;- Array$create(1:5) int_arr$cast(target_type = binary()) ## Error: NotImplemented: Unsupported cast from int32 to binary using function cast_binary 5.3 Update data type of a field in an existing Arrow Table You want to change the type of one or more fields in an existing Arrow Table. 5.3.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Convert tibble to an Arrow table oscars_arrow &lt;- arrow_table(oscars) # The default mapping from numeric column &quot;num_awards&quot; is to a double oscars_arrow ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;double&gt; # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # Cast to an int16 oscars_arrow_int &lt;- oscars_arrow$cast(target_schema = oscars_schema) oscars_arrow_int ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;int16&gt; 5.3.2 Discussion There are some Arrow data types which do not have any R equivalent. Attempting to cast to these data types or using a schema which contains them will result in an error. # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Convert tibble to an Arrow table oscars_arrow &lt;- arrow_table(oscars) # Set up schema with &quot;num_awards&quot; as float16 which doesn&#39;t have an R equivalent oscars_schema_invalid &lt;- schema(actor = string(), num_awards = float16()) # The default mapping from numeric column &quot;num_awards&quot; is to a double oscars_arrow$cast(target_schema = oscars_schema_invalid) ## Error: NotImplemented: Unsupported cast from double to halffloat using function cast_half_float 5.4 Specify data types when creating an Arrow table from an R object You want to manually specify Arrow data types when converting an object from a data frame to an Arrow object. 5.4.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # create arrow Table containing data and schema oscars_data_arrow &lt;- arrow_table(oscars, schema = oscars_schema) oscars_data_arrow ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;int16&gt; 5.5 Specify data types when reading in files You want to manually specify Arrow data types when reading in files. 5.5.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # write dataset to disk write_dataset(oscars, path = &quot;oscars_data&quot;) # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # read the dataset in, using the schema instead of inferring the type automatically oscars_dataset_arrow &lt;- open_dataset(&quot;oscars_data&quot;, schema = oscars_schema) oscars_dataset_arrow ## FileSystemDataset with 1 Parquet file ## actor: string ## num_awards: int16 "],["manipulating-data---arrays.html", "6 Manipulating Data - Arrays 6.1 Introduction 6.2 Filter by values matching a predicate or mask 6.3 Compute Mean/Min/Max, etc value of an Array 6.4 Count occurrences of elements in an Array 6.5 Apply arithmetic functions to Arrays. 6.6 Call Arrow compute functions directly on Arrays", " 6 Manipulating Data - Arrays 6.1 Introduction An Arrow Array is roughly equivalent to an R vector - it can be used to represent a single column of data, with all values having the same data type. A number of base R functions which have S3 generic methods have been implemented to work on Arrow Arrays; for example mean, min, and max. 6.2 Filter by values matching a predicate or mask You want to search for values in an Array that match a predicate condition. 6.2.1 Solution my_values &lt;- Array$create(c(1:5, NA)) my_values[my_values &gt; 3] ## Array ## &lt;int32&gt; ## [ ## 4, ## 5, ## null ## ] 6.2.2 Discussion You can refer to items in an Array using the square brackets [] like you can an R vector. 6.3 Compute Mean/Min/Max, etc value of an Array You want to calculate the mean, minimum, or maximum of values in an array. 6.3.1 Solution my_values &lt;- Array$create(c(1:5, NA)) mean(my_values, na.rm = TRUE) ## Scalar ## 3 6.3.2 Discussion Many base R generic functions such as mean(), min(), and max() have been mapped to their Arrow equivalents, and so can be called on Arrow Array objects in the same way. They will return Arrow objects themselves. If you want to use an R function which does not have an Arrow mapping, you can use as.vector() to convert Arrow objects to base R vectors. arrow_array &lt;- Array$create(1:100) # get Tukey&#39;s five-number summary fivenum(as.vector(arrow_array)) ## [1] 1.0 25.5 50.5 75.5 100.0 You can tell if a function is a standard S3 generic function by looking at the body of the function - S3 generic functions call UseMethod() to determine the appropriate version of that function to use for the object. mean ## function (x, ...) ## UseMethod(&quot;mean&quot;) ## &lt;bytecode: 0x55d9fb32d190&gt; ## &lt;environment: namespace:base&gt; You can also use isS3stdGeneric() to determine if a function is an S3 generic. isS3stdGeneric(&quot;mean&quot;) ## mean ## TRUE If you find an S3 generic function which isn’t implemented for Arrow objects but you would like to be able to use, please open an issue on the project JIRA. 6.4 Count occurrences of elements in an Array You want to count repeated values in an Array. 6.4.1 Solution repeated_vals &lt;- Array$create(c(1, 1, 2, 3, 3, 3, 3, 3)) value_counts(repeated_vals) ## StructArray ## &lt;struct&lt;values: double, counts: int64&gt;&gt; ## -- is_valid: all not null ## -- child 0 type: double ## [ ## 1, ## 2, ## 3 ## ] ## -- child 1 type: int64 ## [ ## 2, ## 1, ## 5 ## ] 6.4.2 Discussion Some functions in the Arrow R package do not have base R equivalents. In other cases, the base R equivalents are not generic functions so they cannot be called directly on Arrow Array objects. For example, the value_counts() function in the Arrow R package is loosely equivalent to the base R function table(), which is not a generic function. 6.5 Apply arithmetic functions to Arrays. You want to use the various arithmetic operators on Array objects. 6.5.1 Solution num_array &lt;- Array$create(1:10) num_array + 10 ## Array ## &lt;double&gt; ## [ ## 11, ## 12, ## 13, ## 14, ## 15, ## 16, ## 17, ## 18, ## 19, ## 20 ## ] 6.5.2 Discussion You will get the same result if you pass in the value you’re adding as an Arrow object. num_array + Scalar$create(10) ## Array ## &lt;double&gt; ## [ ## 11, ## 12, ## 13, ## 14, ## 15, ## 16, ## 17, ## 18, ## 19, ## 20 ## ] 6.6 Call Arrow compute functions directly on Arrays You want to call an Arrow compute function directly on an Array. 6.6.1 Solution first_100_numbers &lt;- Array$create(1:100) # Calculate the variance of 1 to 100, setting the delta degrees of freedom to 0. call_function(&quot;variance&quot;, first_100_numbers, options = list(ddof = 0)) ## Scalar ## 833.25 6.6.2 Discussion You can use call_function() to call Arrow compute functions directly on Scalar, Array, and ChunkedArray objects. The returned object will be an Arrow object. 6.6.3 See also For a more in-depth discussion of Arrow compute functions, see the section on using arrow functions in dplyr verbs in arrow "],["manipulating-data---tables.html", "7 Manipulating Data - Tables 7.1 Introduction 7.2 Use dplyr verbs in Arrow 7.3 Use R functions in dplyr verbs in Arrow 7.4 Use Arrow functions in dplyr verbs in Arrow 7.5 Compute Window Aggregates", " 7 Manipulating Data - Tables 7.1 Introduction One of the aims of the Arrow project is to reduce duplication between different data frame implementations. The underlying implementation of a data frame is a conceptually different thing to the code- or the application programming interface (API)-that you write to work with it. You may have seen this before in packages like dbplyr which allow you to use the dplyr API to interact with SQL databases. The Arrow R package has been written so that the underlying Arrow Table-like objects can be manipulated using the dplyr API, which allows you to use dplyr verbs. For example, here’s a short pipeline of data manipulation which uses dplyr exclusively: library(dplyr) starwars %&gt;% filter(species == &quot;Human&quot;) %&gt;% mutate(height_ft = height/30.48) %&gt;% select(name, height_ft) ## # A tibble: 35 × 2 ## name height_ft ## &lt;chr&gt; &lt;dbl&gt; ## 1 Luke Skywalker 5.64 ## 2 Darth Vader 6.63 ## 3 Leia Organa 4.92 ## 4 Owen Lars 5.84 ## 5 Beru Whitesun Lars 5.41 ## 6 Biggs Darklighter 6.00 ## 7 Obi-Wan Kenobi 5.97 ## 8 Anakin Skywalker 6.17 ## 9 Wilhuff Tarkin 5.91 ## 10 Han Solo 5.91 ## # ℹ 25 more rows And the same results as using Arrow with dplyr syntax: arrow_table(starwars) %&gt;% filter(species == &quot;Human&quot;) %&gt;% mutate(height_ft = height/30.48) %&gt;% select(name, height_ft) %&gt;% collect() ## # A tibble: 35 × 2 ## name height_ft ## &lt;chr&gt; &lt;dbl&gt; ## 1 Luke Skywalker 5.64 ## 2 Darth Vader 6.63 ## 3 Leia Organa 4.92 ## 4 Owen Lars 5.84 ## 5 Beru Whitesun Lars 5.41 ## 6 Biggs Darklighter 6.00 ## 7 Obi-Wan Kenobi 5.97 ## 8 Anakin Skywalker 6.17 ## 9 Wilhuff Tarkin 5.91 ## 10 Han Solo 5.91 ## # ℹ 25 more rows You’ll notice we’ve used collect() in the Arrow pipeline above. That’s because one of the ways in which Arrow is efficient is that it works out the instructions for the calculations it needs to perform (expressions) and only runs them using Arrow once you actually pull the data into your R session. This means instead of doing lots of separate operations, it does them all at once in a more optimised way. This is called lazy evaluation. It also means that you are able to manipulate data that is larger than you can fit into memory on the machine you’re running your code on, if you only pull data into R when you have selected the desired subset, or when using functions which can operate on chunks of data. You can also have data which is split across multiple files. For example, you might have files which are stored in multiple Parquet or Feather files, partitioned across different directories. You can open partitioned or multi-file datasets using open_dataset() as discussed in a previous chapter, and then manipulate this data using Arrow before even reading any of the data into R. 7.2 Use dplyr verbs in Arrow You want to use a dplyr verb in Arrow. 7.2.1 Solution library(dplyr) arrow_table(starwars) %&gt;% filter(species == &quot;Human&quot;, homeworld == &quot;Tatooine&quot;) %&gt;% collect() ## # A tibble: 8 × 14 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Luke Sky… 172 77 blond fair blue 19 male mascu… ## 2 Darth Va… 202 136 none white yellow 41.9 male mascu… ## 3 Owen Lars 178 120 brown, gr… light blue 52 male mascu… ## 4 Beru Whi… 165 75 brown light blue 47 fema… femin… ## 5 Biggs Da… 183 84 black light brown 24 male mascu… ## 6 Anakin S… 188 84 blond fair blue 41.9 male mascu… ## 7 Shmi Sky… 163 NA black fair brown 72 fema… femin… ## 8 Cliegg L… 183 NA brown fair blue 82 male mascu… ## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt; 7.2.2 Discussion You can use most of the dplyr verbs directly from Arrow. 7.2.3 See also You can find examples of the various dplyr verbs in “Introduction to dplyr” - run vignette(\"dplyr\", package = \"dplyr\") or view on the pkgdown site. You can see more information about using arrow_table() to create Arrow Tables and collect() to view them as R data frames in Creating Arrow Objects. 7.3 Use R functions in dplyr verbs in Arrow You want to use an R function inside a dplyr verb in Arrow. 7.3.1 Solution arrow_table(starwars) %&gt;% filter(str_detect(name, &quot;Darth&quot;)) %&gt;% collect() ## # A tibble: 2 × 14 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Darth Va… 202 136 none white yellow 41.9 male mascu… ## 2 Darth Ma… 175 80 none red yellow 54 male mascu… ## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt; 7.3.2 Discussion The Arrow R package allows you to use dplyr verbs containing expressions which include base R and many tidyverse functions, but call Arrow functions under the hood. If you find any base R or tidyverse functions which you would like to see a mapping of in Arrow, please open an issue on the project JIRA. The following packages (amongst some from others) have had many function bindings/mappings written in arrow: lubridate stringr dplyr If you try to call a function which does not have arrow mapping, the data will be pulled back into R, and you will see a warning message. library(stringr) arrow_table(starwars) %&gt;% mutate(name_split = str_split_fixed(name, &quot; &quot;, 2)) %&gt;% collect() ## Warning: Expression str_split_fixed(name, &quot; &quot;, 2) not supported in Arrow; ## pulling data into R ## # A tibble: 87 × 15 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Luke Sk… 172 77 blond fair blue 19 male mascu… ## 2 C-3PO 167 75 &lt;NA&gt; gold yellow 112 none mascu… ## 3 R2-D2 96 32 &lt;NA&gt; white, bl… red 33 none mascu… ## 4 Darth V… 202 136 none white yellow 41.9 male mascu… ## 5 Leia Or… 150 49 brown light brown 19 fema… femin… ## 6 Owen La… 178 120 brown, gr… light blue 52 male mascu… ## 7 Beru Wh… 165 75 brown light blue 47 fema… femin… ## 8 R5-D4 97 32 &lt;NA&gt; white, red red NA none mascu… ## 9 Biggs D… 183 84 black light brown 24 male mascu… ## 10 Obi-Wan… 182 77 auburn, w… fair blue-gray 57 male mascu… ## # ℹ 77 more rows ## # ℹ 6 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;, ## # name_split &lt;chr[,2]&gt; 7.4 Use Arrow functions in dplyr verbs in Arrow You want to use a function which is implemented in Arrow’s C++ library but either: it doesn’t have a mapping to a base R or tidyverse equivalent, or it has a mapping but nevertheless you want to call the C++ function directly 7.4.1 Solution arrow_table(starwars) %&gt;% select(name) %&gt;% mutate(padded_name = arrow_ascii_lpad(name, options = list(width = 10, padding = &quot;*&quot;))) %&gt;% collect() ## # A tibble: 87 × 2 ## name padded_name ## &lt;chr&gt; &lt;chr&gt; ## 1 Luke Skywalker Luke Skywalker ## 2 C-3PO *****C-3PO ## 3 R2-D2 *****R2-D2 ## 4 Darth Vader Darth Vader ## 5 Leia Organa Leia Organa ## 6 Owen Lars *Owen Lars ## 7 Beru Whitesun Lars Beru Whitesun Lars ## 8 R5-D4 *****R5-D4 ## 9 Biggs Darklighter Biggs Darklighter ## 10 Obi-Wan Kenobi Obi-Wan Kenobi ## # ℹ 77 more rows 7.4.2 Discussion The vast majority of Arrow C++ compute functions have been mapped to their base R or tidyverse equivalents, and we strongly recommend that you use these mappings where possible, as the original functions are well documented and the mapped versions have been tested to ensure the results returned are as expected. However, there may be circumstances in which you might want to use a compute function from the Arrow C++ library which does not have a base R or tidyverse equivalent. You can find documentation of Arrow C++ compute functions in the C++ documention. This documentation lists all available compute functions, any associated options classes they need, and the valid data types that they can be used with. You can list all available Arrow compute functions from R by calling list_compute_functions(). list_compute_functions() ## [1] &quot;abs&quot; &quot;abs_checked&quot; ## [3] &quot;acos&quot; &quot;acos_checked&quot; ## [5] &quot;add&quot; &quot;add_checked&quot; ## [7] &quot;all&quot; &quot;and&quot; ## [9] &quot;and_kleene&quot; &quot;and_not&quot; ## [11] &quot;and_not_kleene&quot; &quot;any&quot; ## [13] &quot;approximate_median&quot; &quot;array_filter&quot; ## [15] &quot;array_sort_indices&quot; &quot;array_take&quot; ## [17] &quot;ascii_capitalize&quot; &quot;ascii_center&quot; ## [19] &quot;ascii_is_alnum&quot; &quot;ascii_is_alpha&quot; ## [21] &quot;ascii_is_decimal&quot; &quot;ascii_is_lower&quot; ## [23] &quot;ascii_is_printable&quot; &quot;ascii_is_space&quot; ## [25] &quot;ascii_is_title&quot; &quot;ascii_is_upper&quot; ## [27] &quot;ascii_lower&quot; &quot;ascii_lpad&quot; ## [29] &quot;ascii_ltrim&quot; &quot;ascii_ltrim_whitespace&quot; ## [31] &quot;ascii_reverse&quot; &quot;ascii_rpad&quot; ## [33] &quot;ascii_rtrim&quot; &quot;ascii_rtrim_whitespace&quot; ## [35] &quot;ascii_split_whitespace&quot; &quot;ascii_swapcase&quot; ## [37] &quot;ascii_title&quot; &quot;ascii_trim&quot; ## [39] &quot;ascii_trim_whitespace&quot; &quot;ascii_upper&quot; ## [41] &quot;asin&quot; &quot;asin_checked&quot; ## [43] &quot;assume_timezone&quot; &quot;atan&quot; ## [45] &quot;atan2&quot; &quot;binary_join&quot; ## [47] &quot;binary_join_element_wise&quot; &quot;binary_length&quot; ## [49] &quot;binary_repeat&quot; &quot;binary_replace_slice&quot; ## [51] &quot;binary_reverse&quot; &quot;binary_slice&quot; ## [53] &quot;bit_wise_and&quot; &quot;bit_wise_not&quot; ## [55] &quot;bit_wise_or&quot; &quot;bit_wise_xor&quot; ## [57] &quot;case_when&quot; &quot;cast&quot; ## [59] &quot;ceil&quot; &quot;ceil_temporal&quot; ## [61] &quot;choose&quot; &quot;coalesce&quot; ## [63] &quot;cos&quot; &quot;cos_checked&quot; ## [65] &quot;count&quot; &quot;count_all&quot; ## [67] &quot;count_distinct&quot; &quot;count_substring&quot; ## [69] &quot;count_substring_regex&quot; &quot;cumulative_max&quot; ## [71] &quot;cumulative_mean&quot; &quot;cumulative_min&quot; ## [73] &quot;cumulative_prod&quot; &quot;cumulative_prod_checked&quot; ## [75] &quot;cumulative_sum&quot; &quot;cumulative_sum_checked&quot; ## [77] &quot;day&quot; &quot;day_of_week&quot; ## [79] &quot;day_of_year&quot; &quot;day_time_interval_between&quot; ## [81] &quot;days_between&quot; &quot;dictionary_decode&quot; ## [83] &quot;dictionary_encode&quot; &quot;divide&quot; ## [85] &quot;divide_checked&quot; &quot;drop_null&quot; ## [87] &quot;ends_with&quot; &quot;equal&quot; ## [89] &quot;exp&quot; &quot;extract_regex&quot; ## [91] &quot;fill_null_backward&quot; &quot;fill_null_forward&quot; ## [93] &quot;filter&quot; &quot;find_substring&quot; ## [95] &quot;find_substring_regex&quot; &quot;first&quot; ## [97] &quot;first_last&quot; &quot;floor&quot; ## [99] &quot;floor_temporal&quot; &quot;greater&quot; ## [101] &quot;greater_equal&quot; &quot;hour&quot; ## [103] &quot;hours_between&quot; &quot;if_else&quot; ## [105] &quot;index&quot; &quot;index_in&quot; ## [107] &quot;index_in_meta_binary&quot; &quot;indices_nonzero&quot; ## [109] &quot;invert&quot; &quot;is_dst&quot; ## [111] &quot;is_finite&quot; &quot;is_in&quot; ## [113] &quot;is_in_meta_binary&quot; &quot;is_inf&quot; ## [115] &quot;is_leap_year&quot; &quot;is_nan&quot; ## [117] &quot;is_null&quot; &quot;is_valid&quot; ## [119] &quot;iso_calendar&quot; &quot;iso_week&quot; ## [121] &quot;iso_year&quot; &quot;last&quot; ## [123] &quot;less&quot; &quot;less_equal&quot; ## [125] &quot;list_element&quot; &quot;list_flatten&quot; ## [127] &quot;list_parent_indices&quot; &quot;list_slice&quot; ## [129] &quot;list_value_length&quot; &quot;ln&quot; ## [131] &quot;ln_checked&quot; &quot;local_timestamp&quot; ## [133] &quot;log10&quot; &quot;log10_checked&quot; ## [135] &quot;log1p&quot; &quot;log1p_checked&quot; ## [137] &quot;log2&quot; &quot;log2_checked&quot; ## [139] &quot;logb&quot; &quot;logb_checked&quot; ## [141] &quot;make_struct&quot; &quot;map_lookup&quot; ## [143] &quot;match_like&quot; &quot;match_substring&quot; ## [145] &quot;match_substring_regex&quot; &quot;max&quot; ## [147] &quot;max_element_wise&quot; &quot;mean&quot; ## [149] &quot;microsecond&quot; &quot;microseconds_between&quot; ## [151] &quot;millisecond&quot; &quot;milliseconds_between&quot; ## [153] &quot;min&quot; &quot;min_element_wise&quot; ## [155] &quot;min_max&quot; &quot;minute&quot; ## [157] &quot;minutes_between&quot; &quot;mode&quot; ## [159] &quot;month&quot; &quot;month_day_nano_interval_between&quot; ## [161] &quot;month_interval_between&quot; &quot;multiply&quot; ## [163] &quot;multiply_checked&quot; &quot;nanosecond&quot; ## [165] &quot;nanoseconds_between&quot; &quot;negate&quot; ## [167] &quot;negate_checked&quot; &quot;not_equal&quot; ## [169] &quot;or&quot; &quot;or_kleene&quot; ## [171] &quot;pairwise_diff&quot; &quot;pairwise_diff_checked&quot; ## [173] &quot;partition_nth_indices&quot; &quot;power&quot; ## [175] &quot;power_checked&quot; &quot;product&quot; ## [177] &quot;quantile&quot; &quot;quarter&quot; ## [179] &quot;quarters_between&quot; &quot;random&quot; ## [181] &quot;rank&quot; &quot;replace_substring&quot; ## [183] &quot;replace_substring_regex&quot; &quot;replace_with_mask&quot; ## [185] &quot;round&quot; &quot;round_binary&quot; ## [187] &quot;round_temporal&quot; &quot;round_to_multiple&quot; ## [189] &quot;run_end_decode&quot; &quot;run_end_encode&quot; ## [191] &quot;second&quot; &quot;seconds_between&quot; ## [193] &quot;select_k_unstable&quot; &quot;shift_left&quot; ## [195] &quot;shift_left_checked&quot; &quot;shift_right&quot; ## [197] &quot;shift_right_checked&quot; &quot;sign&quot; ## [199] &quot;sin&quot; &quot;sin_checked&quot; ## [201] &quot;sort_indices&quot; &quot;split_pattern&quot; ## [203] &quot;split_pattern_regex&quot; &quot;sqrt&quot; ## [205] &quot;sqrt_checked&quot; &quot;starts_with&quot; ## [207] &quot;stddev&quot; &quot;strftime&quot; ## [209] &quot;string_is_ascii&quot; &quot;strptime&quot; ## [211] &quot;struct_field&quot; &quot;subsecond&quot; ## [213] &quot;subtract&quot; &quot;subtract_checked&quot; ## [215] &quot;sum&quot; &quot;take&quot; ## [217] &quot;tan&quot; &quot;tan_checked&quot; ## [219] &quot;tdigest&quot; &quot;true_unless_null&quot; ## [221] &quot;trunc&quot; &quot;unique&quot; ## [223] &quot;us_week&quot; &quot;us_year&quot; ## [225] &quot;utf8_capitalize&quot; &quot;utf8_center&quot; ## [227] &quot;utf8_is_alnum&quot; &quot;utf8_is_alpha&quot; ## [229] &quot;utf8_is_decimal&quot; &quot;utf8_is_digit&quot; ## [231] &quot;utf8_is_lower&quot; &quot;utf8_is_numeric&quot; ## [233] &quot;utf8_is_printable&quot; &quot;utf8_is_space&quot; ## [235] &quot;utf8_is_title&quot; &quot;utf8_is_upper&quot; ## [237] &quot;utf8_length&quot; &quot;utf8_lower&quot; ## [239] &quot;utf8_lpad&quot; &quot;utf8_ltrim&quot; ## [241] &quot;utf8_ltrim_whitespace&quot; &quot;utf8_normalize&quot; ## [243] &quot;utf8_replace_slice&quot; &quot;utf8_reverse&quot; ## [245] &quot;utf8_rpad&quot; &quot;utf8_rtrim&quot; ## [247] &quot;utf8_rtrim_whitespace&quot; &quot;utf8_slice_codeunits&quot; ## [249] &quot;utf8_split_whitespace&quot; &quot;utf8_swapcase&quot; ## [251] &quot;utf8_title&quot; &quot;utf8_trim&quot; ## [253] &quot;utf8_trim_whitespace&quot; &quot;utf8_upper&quot; ## [255] &quot;value_counts&quot; &quot;variance&quot; ## [257] &quot;week&quot; &quot;weeks_between&quot; ## [259] &quot;xor&quot; &quot;year&quot; ## [261] &quot;year_month_day&quot; &quot;years_between&quot; The majority of functions here have been mapped to their base R or tidyverse equivalent and can be called within a dplyr query as usual. For functions which don’t have a base R or tidyverse equivalent, or you want to supply custom options, you can call them by prefixing their name with “arrow_”. For example, base R’s is.na() function is the equivalent of the Arrow C++ compute function is_null() with the option nan_is_null set to TRUE. A mapping between these functions (with nan_is_null set to TRUE) has been created in arrow. demo_df &lt;- data.frame(x = c(1, 2, 3, NA, NaN)) arrow_table(demo_df) %&gt;% mutate(y = is.na(x)) %&gt;% collect() ## # A tibble: 5 × 2 ## x y ## &lt;dbl&gt; &lt;lgl&gt; ## 1 1 FALSE ## 2 2 FALSE ## 3 3 FALSE ## 4 NA TRUE ## 5 NaN TRUE If you want to call Arrow’s is_null() function but with nan_is_null set to FALSE (so it returns TRUE when a value being examined is NA but FALSE when the value being examined is NaN), you must call is_null() directly and specify the option nan_is_null = FALSE. arrow_table(demo_df) %&gt;% mutate(y = arrow_is_null(x, options = list(nan_is_null = FALSE))) %&gt;% collect() ## # A tibble: 5 × 2 ## x y ## &lt;dbl&gt; &lt;lgl&gt; ## 1 1 FALSE ## 2 2 FALSE ## 3 3 FALSE ## 4 NA TRUE ## 5 NaN FALSE 7.4.2.1 Compute functions with options Although not all Arrow C++ compute functions require options to be specified, most do. For these functions to work in R, they must be linked up with the appropriate libarrow options C++ class via the R package’s C++ code. At the time of writing, all compute functions available in the development version of the Arrow R package had been associated with their options classes. However, as the Arrow C++ library’s functionality extends, compute functions may be added which do not yet have an R binding. If you find a C++ compute function which you wish to use from the R package, please open an issue on the Github project. 7.5 Compute Window Aggregates You want to apply an aggregation (e.g. mean()) on a grouped table or within a rowwise operation like filter(): 7.5.1 Solution arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% left_join( arrow_table(starwars) %&gt;% group_by(hair_color) %&gt;% summarize(mean_height = mean(height, na.rm = TRUE)) ) %&gt;% filter(height &lt; mean_height) %&gt;% select(!mean_height) %&gt;% collect() ## # A tibble: 28 × 4 ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Luke Skywalker 172 77 blond ## 2 Leia Organa 150 49 brown ## 3 Beru Whitesun Lars 165 75 brown ## 4 Wedge Antilles 170 77 brown ## 5 Yoda 66 17 white ## 6 Lobot 175 79 none ## 7 Ackbar 180 83 none ## 8 Wicket Systri Warrick 88 20 brown ## 9 Nien Nunb 160 68 none ## 10 Finis Valorum 170 NA blond ## # ℹ 18 more rows Or using to_duckdb() arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% to_duckdb() %&gt;% group_by(hair_color) %&gt;% filter(height &lt; mean(height, na.rm = TRUE)) %&gt;% to_arrow() %&gt;% collect() ## # A tibble: 28 × 4 ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Yoda 66 17 white ## 2 Luke Skywalker 172 77 blond ## 3 Finis Valorum 170 NA blond ## 4 R4-P17 96 NA none ## 5 Lobot 175 79 none ## 6 Ackbar 180 83 none ## 7 Nien Nunb 160 68 none ## 8 Darth Maul 175 80 none ## 9 Bib Fortuna 180 NA none ## 10 Ayla Secura 178 55 none ## # ℹ 18 more rows 7.5.2 Discusson Arrow does not support window functions, and pulls the data into R. For large tables, this sacrifices performance. arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% group_by(hair_color) %&gt;% filter(height &lt; mean(height, na.rm = TRUE)) ## Warning: Expression height &lt; mean(height, na.rm = TRUE) not supported in Arrow; ## pulling data into R ## # A tibble: 28 × 4 ## # Groups: hair_color [5] ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Luke Skywalker 172 77 blond ## 2 Leia Organa 150 49 brown ## 3 Beru Whitesun Lars 165 75 brown ## 4 Wedge Antilles 170 77 brown ## 5 Yoda 66 17 white ## 6 Lobot 175 79 none ## 7 Ackbar 180 83 none ## 8 Wicket Systri Warrick 88 20 brown ## 9 Nien Nunb 160 68 none ## 10 Finis Valorum 170 NA blond ## # ℹ 18 more rows You can perform these window aggregate operations on Arrow tables by: Computing the aggregation separately, and joining the result Passing the data to DuckDB, and use the DuckDB query engine to perform the operations Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the Arrow blog post. "],["using-pyarrow-from-r.html", "8 Using PyArrow from R 8.1 Introduction 8.2 Create an Arrow object using PyArrow in R 8.3 Call a PyArrow function from R", " 8 Using PyArrow from R 8.1 Introduction For more information on using setting up and installing PyArrow to use in R, see the “Apache Arrow in Python and R with reticulate” vignette. 8.2 Create an Arrow object using PyArrow in R You want to use PyArrow to create an Arrow object in an R session. 8.2.1 Solution library(reticulate) pa &lt;- import(&quot;pyarrow&quot;) pyarrow_scalar &lt;- pa$scalar(42) pyarrow_scalar ## &lt;pyarrow.DoubleScalar: 42.0&gt; 8.3 Call a PyArrow function from R You want to call a PyArrow function from your R session. 8.3.1 Solution table_1 &lt;- arrow_table(mtcars[1:5,]) table_2 &lt;- arrow_table(mtcars[11:15,]) pa$concat_tables(tables = list(table_1, table_2)) %&gt;% collect() ## # A tibble: 10 × 11 ## mpg cyl disp hp drat wt qsec vs am gear carb ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; ## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 ## 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 ## 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 ## 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 ## 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 ## 6 17.8 6 168. 123 3.92 3.44 18.9 1 0 4 4 ## 7 16.4 8 276. 180 3.07 4.07 17.4 0 0 3 3 ## 8 17.3 8 276. 180 3.07 3.73 17.6 0 0 3 3 ## 9 15.2 8 276. 180 3.07 3.78 18 0 0 3 3 ## 10 10.4 8 472 205 2.93 5.25 18.0 0 0 3 4 "],["flight.html", "9 Flight 9.1 Introduction 9.2 Connect to a Flight server 9.3 Send data to a Flight server 9.4 Check what resources exist on a Flight server 9.5 Retrieve data from a Flight server", " 9 Flight 9.1 Introduction Flight is a general-purpose client-server framework for high performance transport of large datasets over network interfaces, built as part of the Apache Arrow project. Flight allows for highly efficient data transfer as it: removes the need for serialization during data transfer allows for parallel data streaming is highly optimized to take advantage of Arrow’s columnar format. The arrow package provides methods for connecting to Flight RPC servers to send and receive data. It should be noted that the Flight implementation in the R package depends on PyArrow which is called via reticulate. This is quite different from the other capabilities in the R package, nearly all of which are all implemented directly. 9.2 Connect to a Flight server You want to connect to a Flight server running on a specified host and port. 9.2.1 Solution local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) 9.2.2 See also For an example of how to set up a Flight server from R, see the Flight vignette. 9.3 Send data to a Flight server You want to send data that you have in memory to a Flight server 9.3.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Send the data flight_put( local_client, data = airquality, path = &quot;pollution_data&quot; ) 9.4 Check what resources exist on a Flight server You want to see what paths are available on a Flight server. 9.4.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Retrieve path listing list_flights(local_client) # [1] &quot;pollution_data&quot; 9.5 Retrieve data from a Flight server You want to retrieve data on a Flight server from a specified path. 9.5.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Retrieve data flight_get( local_client, &quot;pollution_data&quot; ) # Table # 153 rows x 6 columns # $Ozone &lt;int32&gt; # $Solar.R &lt;int32&gt; # $Wind &lt;double&gt; # $Temp &lt;int32&gt; # $Month &lt;int32&gt; # $Day &lt;int32&gt; # # See $metadata for additional Schema metadata "],["404.html", "Page not found", " Page not found The page you requested cannot be found (perhaps it was moved or renamed). You may want to try searching to find the page's new location, or use the table of contents to find the page you are looking for. "]]
diff --git a/dev/r/using-pyarrow-from-r.html b/dev/r/using-pyarrow-from-r.html
new file mode 100644
index 0000000..6988803
--- /dev/null
+++ b/dev/r/using-pyarrow-from-r.html
@@ -0,0 +1,534 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>8 Using PyArrow from R | Apache Arrow R Cookbook</title>
+  <meta name="description" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.38 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="manipulating-data---tables.html"/>
+<link rel="next" href="flight.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="using-pyarrow-from-r" class="section level1 hasAnchor" number="8">
+<h1><span class="header-section-number">8</span> Using PyArrow from R<a href="using-pyarrow-from-r.html#using-pyarrow-from-r" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-5" class="section level2 hasAnchor" number="8.1">
+<h2><span class="header-section-number">8.1</span> Introduction<a href="using-pyarrow-from-r.html#introduction-5" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>For more information on using setting up and installing PyArrow to use in R, see
+<a href="https://arrow.apache.org/docs/r/articles/python.html">the “Apache Arrow in Python and R with reticulate” vignette</a>.</p>
+</div>
+<div id="create-an-arrow-object-using-pyarrow-in-r" class="section level2 hasAnchor" number="8.2">
+<h2><span class="header-section-number">8.2</span> Create an Arrow object using PyArrow in R<a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use PyArrow to create an Arrow object in an R session.</p>
+<div id="solution-42" class="section level3 hasAnchor" number="8.2.1">
+<h3><span class="header-section-number">8.2.1</span> Solution<a href="using-pyarrow-from-r.html#solution-42" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb129"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb129-1"><a href="using-pyarrow-from-r.html#cb129-1" tabindex="-1"></a><span class="fu">library</span>(reticulate)</span>
+<span id="cb129-2"><a href="using-pyarrow-from-r.html#cb129-2" tabindex="-1"></a>pa <span class="ot">&lt;-</span> <span class="fu">import</span>(<span class="st">&quot;pyarrow&quot;</span>)</span>
+<span id="cb129-3"><a href="using-pyarrow-from-r.html#cb129-3" tabindex="-1"></a>pyarrow_scalar <span class="ot">&lt;-</span> pa<span class="sc">$</span><span class="fu">scalar</span>(<span class="dv">42</span>)</span>
+<span id="cb129-4"><a href="using-pyarrow-from-r.html#cb129-4" tabindex="-1"></a>pyarrow_scalar</span></code></pre></div>
+<pre><code>## &lt;pyarrow.DoubleScalar: 42.0&gt;</code></pre>
+</div>
+</div>
+<div id="call-a-pyarrow-function-from-r" class="section level2 hasAnchor" number="8.3">
+<h2><span class="header-section-number">8.3</span> Call a PyArrow function from R<a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to call a PyArrow function from your R session.</p>
+<div id="solution-43" class="section level3 hasAnchor" number="8.3.1">
+<h3><span class="header-section-number">8.3.1</span> Solution<a href="using-pyarrow-from-r.html#solution-43" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb131"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb131-1"><a href="using-pyarrow-from-r.html#cb131-1" tabindex="-1"></a>table_1 <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(mtcars[<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>,])</span>
+<span id="cb131-2"><a href="using-pyarrow-from-r.html#cb131-2" tabindex="-1"></a>table_2 <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(mtcars[<span class="dv">11</span><span class="sc">:</span><span class="dv">15</span>,])</span>
+<span id="cb131-3"><a href="using-pyarrow-from-r.html#cb131-3" tabindex="-1"></a></span>
+<span id="cb131-4"><a href="using-pyarrow-from-r.html#cb131-4" tabindex="-1"></a>pa<span class="sc">$</span><span class="fu">concat_tables</span>(<span class="at">tables =</span> <span class="fu">list</span>(table_1, table_2)) <span class="sc">%&gt;%</span></span>
+<span id="cb131-5"><a href="using-pyarrow-from-r.html#cb131-5" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 10 × 11
+##      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
+##    &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;
+##  1  21       6  160    110  3.9   2.62  16.5     0     1     4     4
+##  2  21       6  160    110  3.9   2.88  17.0     0     1     4     4
+##  3  22.8     4  108     93  3.85  2.32  18.6     1     1     4     1
+##  4  21.4     6  258    110  3.08  3.22  19.4     1     0     3     1
+##  5  18.7     8  360    175  3.15  3.44  17.0     0     0     3     2
+##  6  17.8     6  168.   123  3.92  3.44  18.9     1     0     4     4
+##  7  16.4     8  276.   180  3.07  4.07  17.4     0     0     3     3
+##  8  17.3     8  276.   180  3.07  3.73  17.6     0     0     3     3
+##  9  15.2     8  276.   180  3.07  3.78  18       0     0     3     3
+## 10  10.4     8  472    205  2.93  5.25  18.0     0     0     3     4</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="manipulating-data---tables.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="flight.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/python.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..93e8f7e
--- /dev/null
+++ b/index.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+
+<html>
+	<head>
+		<title>Apache Arrow Cookbook</title>
+		<style>
+			body {
+				color: rgb(51, 51, 51);
+				font-family: sans-serif;
+				line-height: 1.65;
+				padding: 25px;
+				max-width: 900px;
+				margin-left: auto;
+				margin-right: auto;
+			}
+
+			a {
+				color: rgb(0, 91, 129);
+			}
+
+			#logo {
+				width: 50%;
+				margin-left: auto;
+				margin-right: auto;
+			}
+
+			#logo > img {
+				width: 100%;
+			}
+		</style>
+		<!-- Matomo -->
+		<script>
+			var _paq = window._paq = window._paq || [];
+			/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+			/* We explicitly disable cookie tracking to avoid privacy issues */
+			_paq.push(['disableCookies']);
+			_paq.push(['trackPageView']);
+			_paq.push(['enableLinkTracking']);
+			(function() {
+				var u="https://analytics.apache.org/";
+				_paq.push(['setTrackerUrl', u+'matomo.php']);
+				_paq.push(['setSiteId', '20']);
+				var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+				g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+			})();
+		</script>
+		<!-- End Matomo Code -->
+		
+	</head>
+	<body>
+		<div id="logo"><img src="arrow.png"/></div>
+		<h1>Apache Arrow Cookbook</h1>
+		<p>The cookbook is a collection of Apache Arrow recipes for
+		   the languages and platforms supported by Arrow.<br/>
+		   Most recipes will be common to all platforms, 
+		   but some are specific to the language and environment in use.
+		</p>
+		<ul>
+			<li><a href="cpp/index.html">C++ Cookbook</a></li>
+			<li><a href="java/index.html">Java Cookbook</a></li>
+			<li><a href="py/index.html">Python Cookbook</a></li>
+			<li><a href="r/index.html">R Cookbook</a></li>
+			<li><a href="https://github.com/apache/arrow-rs/tree/master/arrow/examples">Rust Examples</a></li>
+		</ul>
+		<p>If you are looking for the Apache Arrow Documentation itself
+		   or the API reference, those are available at
+		   <a href="https://arrow.apache.org/docs/">https://arrow.apache.org/docs/</a>
+		</p>
+	</body>
+</html>
diff --git a/java/_sources/avro.rst.txt b/java/_sources/avro.rst.txt
new file mode 100644
index 0000000..f1b9f2d
--- /dev/null
+++ b/java/_sources/avro.rst.txt
@@ -0,0 +1,72 @@
+.. 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.
+
+.. _arrow-avro:
+
+======
+Avro 
+======
+
+Avro encoded data can be converted into Arrow format.
+
+.. contents::
+
+Avro to Arrow
+=============
+
+The example assumes that the Avro schema is stored separately from the Avro data itself.
+
+.. testcode::
+
+   import org.apache.arrow.AvroToArrow;
+   import org.apache.arrow.AvroToArrowConfig;
+   import org.apache.arrow.AvroToArrowConfigBuilder;
+   import org.apache.arrow.AvroToArrowVectorIterator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.avro.Schema;
+   import org.apache.avro.io.BinaryDecoder;
+   import org.apache.avro.io.DecoderFactory;
+
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.FileNotFoundException;
+   import java.io.IOException;
+
+   try {
+       BinaryDecoder decoder = new DecoderFactory().binaryDecoder(new FileInputStream("./thirdpartydeps/avro/users.avro"), null);
+       Schema schema = new Schema.Parser().parse(new File("./thirdpartydeps/avro/user.avsc"));
+       try (BufferAllocator allocator = new RootAllocator()) {
+           AvroToArrowConfig config = new AvroToArrowConfigBuilder(allocator).build();
+           try (AvroToArrowVectorIterator avroToArrowVectorIterator = AvroToArrow.avroToArrowIterator(schema, decoder, config)) {
+               while(avroToArrowVectorIterator.hasNext()) {
+                   try (VectorSchemaRoot root = avroToArrowVectorIterator.next()) {
+                       System.out.print(root.contentToTSVString());
+                   }
+               }
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   } 
+
+.. testoutput::
+
+   name    favorite_number    favorite_color
+   Alyssa    256    null
+   Ben    7    red
diff --git a/java/_sources/create.rst.txt b/java/_sources/create.rst.txt
new file mode 100644
index 0000000..ae8ab0e
--- /dev/null
+++ b/java/_sources/create.rst.txt
@@ -0,0 +1,234 @@
+.. 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.
+
+.. _arrow-create:
+
+======================
+Creating Arrow Objects
+======================
+
+A vector is the basic unit in the Arrow Java library. Data types
+describe the types of values; ValueVectors are sequences of typed
+values. Vectors represent a one-dimensional sequence of values of
+the same type. They are mutable containers.
+
+Vectors implement the interface `ValueVector`_. The Arrow libraries provide
+implementations of vectors for various data types.
+
+.. contents::
+
+Creating Vectors (arrays)
+=========================
+
+Array of Int
+------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.IntVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVector = new IntVector("intVector", allocator)
+   ) {
+       intVector.allocateNew(3);
+       intVector.set(0, 1);
+       intVector.set(1, 2);
+       intVector.set(2, 3);
+       intVector.setValueCount(3);
+
+       System.out.print(intVector);
+   }
+
+.. testoutput::
+
+   [1, 2, 3]
+
+
+Array of Varchar
+----------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VarCharVector varCharVector = new VarCharVector("varCharVector", allocator);
+   ) {
+       varCharVector.allocateNew(3);
+       varCharVector.set(0, "one".getBytes());
+       varCharVector.set(1, "two".getBytes());
+       varCharVector.set(2, "three".getBytes());
+       varCharVector.setValueCount(3);
+
+       System.out.print(varCharVector);
+   }
+
+.. testoutput::
+
+   [one, two, three]
+
+Dictionary-Encoded Array of Varchar
+-----------------------------------
+
+In some scenarios `dictionary-encoding`_ a column is useful to save memory.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.FieldVector;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.dictionary.Dictionary;
+   import org.apache.arrow.vector.dictionary.DictionaryEncoder;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
+
+   import java.nio.charset.StandardCharsets;
+
+   try (BufferAllocator root = new RootAllocator();
+        VarCharVector countries = new VarCharVector("country-dict", root);
+        VarCharVector appUserCountriesUnencoded = new VarCharVector("app-use-country-dict", root)
+   ) {
+       countries.allocateNew(10);
+       countries.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       countries.set(1, "Cuba".getBytes(StandardCharsets.UTF_8));
+       countries.set(2, "Grecia".getBytes(StandardCharsets.UTF_8));
+       countries.set(3, "Guinea".getBytes(StandardCharsets.UTF_8));
+       countries.set(4, "Islandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(5, "Malta".getBytes(StandardCharsets.UTF_8));
+       countries.set(6, "Tailandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(7, "Uganda".getBytes(StandardCharsets.UTF_8));
+       countries.set(8, "Yemen".getBytes(StandardCharsets.UTF_8));
+       countries.set(9, "Zambia".getBytes(StandardCharsets.UTF_8));
+       countries.setValueCount(10);
+
+       Dictionary countriesDictionary = new Dictionary(countries,
+               new DictionaryEncoding(/*id=*/1L, /*ordered=*/false, /*indexType=*/new ArrowType.Int(8, true)));
+       System.out.println("Dictionary: " + countriesDictionary);
+
+       appUserCountriesUnencoded.allocateNew(5);
+       appUserCountriesUnencoded.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(1, "Guinea".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(2, "Islandia".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(3, "Malta".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(4, "Uganda".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.setValueCount(5);
+       System.out.println("Unencoded data: " + appUserCountriesUnencoded);
+
+       try (FieldVector appUserCountriesDictionaryEncoded = (FieldVector) DictionaryEncoder
+               .encode(appUserCountriesUnencoded, countriesDictionary)) {
+           System.out.println("Dictionary-encoded data: " + appUserCountriesDictionaryEncoded);
+       }
+   }
+
+.. testoutput::
+
+   Dictionary: Dictionary DictionaryEncoding[id=1,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+   Dictionary-encoded data: [0, 3, 4, 5, 7]
+
+Array of List
+-------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.complex.impl.UnionListWriter;
+   import org.apache.arrow.vector.complex.ListVector;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       ListVector listVector = ListVector.empty("listVector", allocator);
+       UnionListWriter listWriter = listVector.getWriter()
+   ) {
+       int[] data = new int[] { 1, 2, 3, 10, 20, 30, 100, 200, 300, 1000, 2000, 3000 };
+       int tmp_index = 0;
+       for(int i = 0; i < 4; i++) {
+           listWriter.setPosition(i);
+           listWriter.startList();
+           for(int j = 0; j < 3; j++) {
+               listWriter.writeInt(data[tmp_index]);
+               tmp_index = tmp_index + 1;
+           }
+           listWriter.setValueCount(3);
+           listWriter.endList();
+       }
+       listVector.setValueCount(4);
+
+       System.out.print(listVector);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   [[1,2,3], [10,20,30], [100,200,300], [1000,2000,3000]]
+
+
+Slicing
+=======
+
+Slicing provides a way of copying a range of rows between two vectors of the same type.
+
+Slicing IntVector
+-----------------
+
+In this example, we copy a portion of the input IntVector to a new IntVector.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.util.TransferPair;
+
+   try (BufferAllocator allocator = new RootAllocator();
+       IntVector vector = new IntVector("intVector", allocator)) {
+       for (int i = 0; i < 10; i++) {
+           vector.setSafe(i, i);
+        }
+       vector.setValueCount(10);
+
+       TransferPair tp = vector.getTransferPair(allocator);
+       tp.splitAndTransfer(0, 5);
+       try (IntVector sliced = (IntVector) tp.getTo()) {
+           System.out.println(sliced);
+       }
+       
+       tp = vector.getTransferPair(allocator);
+       // copy 6 elements from index 2
+       tp.splitAndTransfer(2, 6);
+       try (IntVector sliced = (IntVector) tp.getTo()) {
+           System.out.print(sliced);
+       }
+   }
+
+.. testoutput::
+
+   [0, 1, 2, 3, 4]
+   [2, 3, 4, 5, 6, 7]
+   
+.. _`FieldVector`: https://arrow.apache.org/docs/java/reference/org/apache/arrow/vector/FieldVector.html
+.. _`ValueVector`: https://arrow.apache.org/docs/java/vector.html
+.. _`dictionary-encoding`: https://arrow.apache.org/docs/format/Columnar.html#dictionary-encoded-layout
diff --git a/java/_sources/data.rst.txt b/java/_sources/data.rst.txt
new file mode 100644
index 0000000..a8bc386
--- /dev/null
+++ b/java/_sources/data.rst.txt
@@ -0,0 +1,375 @@
+.. 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.
+
+=================
+Data manipulation
+=================
+
+Recipes related to compare, filtering or transforming data.
+
+.. contents::
+
+Concatenate VectorSchemaRoots
+=============================
+
+In some cases, VectorSchemaRoot needs to be modeled as a container. To accomplish
+this, you can use ``VectorSchemaRootAppender.append``. The following code
+creates two roots, then concatenates them together:
+
+.. testcode::
+
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.IntVector;
+    import org.apache.arrow.vector.VectorSchemaRoot;
+    import org.apache.arrow.vector.types.pojo.ArrowType;
+    import org.apache.arrow.vector.types.pojo.Field;
+    import org.apache.arrow.vector.types.pojo.FieldType;
+    import org.apache.arrow.vector.types.pojo.Schema;
+    import org.apache.arrow.vector.util.VectorSchemaRootAppender;
+
+    import static java.util.Arrays.asList;
+
+    Field column_one = new Field("column-one", FieldType.nullable(new ArrowType.Int(32, true)), null);
+    Schema schema = new Schema(asList(column_one));
+    try (
+        BufferAllocator allocator = new RootAllocator();
+        VectorSchemaRoot rootOne = VectorSchemaRoot.create(schema, allocator);
+        VectorSchemaRoot rootTwo = VectorSchemaRoot.create(schema, allocator);
+        VectorSchemaRoot result = VectorSchemaRoot.create(schema, allocator);
+    ) {
+        IntVector appenderOne = (IntVector) rootOne.getVector(0);
+        rootOne.allocateNew();
+        appenderOne.set(0, 100);
+        appenderOne.set(1, 20);
+        rootOne.setRowCount(2);
+        IntVector appenderTwo = (IntVector) rootTwo.getVector(0);
+        rootTwo.allocateNew();
+        appenderTwo.set(0, 34);
+        appenderTwo.set(1, 75);
+        rootTwo.setRowCount(2);
+        result.allocateNew();
+        VectorSchemaRootAppender.append(result, rootOne, rootTwo);
+        System.out.print(result.contentToTSVString());
+    }
+
+.. testoutput::
+
+    column-one
+    100
+    20
+    34
+    75
+
+Concatenate Value Vectors
+=========================
+
+In some cases, we need to concatenate two value vectors into one. To accomplish
+this, we can use `VectorAppender`_. This mutates the initial ValueVector.
+
+.. testcode::
+
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.IntVector;
+    import org.apache.arrow.vector.ValueVector;
+    import org.apache.arrow.vector.util.VectorAppender;
+
+    try (
+        BufferAllocator allocator = new RootAllocator();
+        IntVector initialValues = new IntVector("initialValues", allocator);
+        IntVector toAppend = new IntVector("toAppend", allocator);
+    ) {
+        initialValues.allocateNew(2);
+        initialValues.set(0, 1);
+        initialValues.set(1, 2);
+        initialValues.setValueCount(2);
+        System.out.println("Initial IntVector: " + initialValues);
+        toAppend.allocateNew(4);
+        toAppend.set(1, 4);
+        toAppend.set(3, 6);
+        toAppend.setValueCount(4);
+        System.out.println("IntVector to Append: " + toAppend);
+        VectorAppender appenderUtil = new VectorAppender(initialValues);
+        toAppend.accept(appenderUtil, null);
+        System.out.println("IntVector Result: " + initialValues);
+    }
+
+.. testoutput::
+
+    Initial IntVector: [1, 2]
+    IntVector to Append: [null, 4, null, 6]
+    IntVector Result: [1, 2, null, 4, null, 6]
+
+Compare Vectors for Field Equality
+==================================
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.compare.TypeEqualsVisitor;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector right = new IntVector("int", allocator);
+   ) {
+       right.allocateNew(3);
+       right.set(0, 10);
+       right.set(1, 20);
+       right.set(2, 30);
+       right.setValueCount(3);
+       IntVector left1 = new IntVector("int", allocator);
+       IntVector left2 = new IntVector("int2", allocator);
+       TypeEqualsVisitor visitor = new TypeEqualsVisitor(right);
+
+       System.out.println(visitor.equals(left1));
+       System.out.println(visitor.equals(left2));
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Compare Vectors Equality
+========================
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.compare.VectorEqualsVisitor;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector vector1 = new IntVector("vector1", allocator);
+       IntVector vector2 = new IntVector("vector1", allocator);
+       IntVector vector3 = new IntVector("vector1", allocator)
+   ) {
+       vector1.allocateNew(1);
+       vector1.set(0, 10);
+       vector1.setValueCount(1);
+
+       vector2.allocateNew(1);
+       vector2.set(0, 10);
+       vector2.setValueCount(1);
+
+       vector3.allocateNew(1);
+       vector3.set(0, 20);
+       vector3.setValueCount(1);
+       VectorEqualsVisitor visitor = new VectorEqualsVisitor();
+
+       System.out.println(visitor.vectorEquals(vector1, vector2));
+       System.out.println(visitor.vectorEquals(vector1, vector3));
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Compare Values on the Array
+===========================
+
+Comparing two values at the given indices in the vectors:
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VarCharVector vec = new VarCharVector("valueindexcomparator", allocator);
+   ) {
+       vec.allocateNew(3);
+       vec.setValueCount(3);
+       vec.set(0, "ba".getBytes());
+       vec.set(1, "abc".getBytes());
+       vec.set(2, "aa".getBytes());
+       VectorValueComparator<VarCharVector> valueComparator = DefaultVectorComparators.createDefaultComparator(vec);
+       valueComparator.attachVector(vec);
+
+       System.out.println(valueComparator.compare(0, 1) > 0);
+       System.out.println(valueComparator.compare(1, 2) < 0);
+   }
+
+.. testoutput::
+
+   true
+   false
+
+Consider that if we need our own comparator we could extend VectorValueComparator
+and override compareNotNull method as needed
+
+Search Values on the Array
+==========================
+
+Linear Search - O(n)
+********************
+
+Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#linearSearch - O(n)
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.search.VectorSearcher;
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector linearSearchVector = new IntVector("linearSearchVector", allocator);
+   ) {
+       linearSearchVector.allocateNew(10);
+       linearSearchVector.setValueCount(10);
+       for (int i = 0; i < 10; i++) {
+           linearSearchVector.set(i, i);
+       }
+       VectorValueComparator<IntVector> comparatorInt = DefaultVectorComparators.createDefaultComparator(linearSearchVector);
+       int result = VectorSearcher.linearSearch(linearSearchVector, comparatorInt, linearSearchVector, 3);
+
+       System.out.println(result);
+   }
+
+.. testoutput::
+
+   3
+
+Binary Search - O(log(n))
+*************************
+
+Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#binarySearch - O(log(n))
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.search.VectorSearcher;
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector binarySearchVector = new IntVector("", allocator);
+   ) {
+       binarySearchVector.allocateNew(10);
+       binarySearchVector.setValueCount(10);
+       for (int i = 0; i < 10; i++) {
+           binarySearchVector.set(i, i);
+       }
+       VectorValueComparator<IntVector> comparatorInt = DefaultVectorComparators.createDefaultComparator(binarySearchVector);
+       int result = VectorSearcher.binarySearch(binarySearchVector, comparatorInt, binarySearchVector, 3);
+
+       System.out.println(result);
+   }
+
+.. testoutput::
+
+   3
+
+Sort Values on the Array
+========================
+
+In-place Sorter - O(nlog(n))
+****************************
+
+Sorting by manipulating the original vector.
+Algorithm: org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter - O(nlog(n))
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVectorNotSorted = new IntVector("intvectornotsorted", allocator);
+   ) {
+       intVectorNotSorted.allocateNew(3);
+       intVectorNotSorted.setValueCount(3);
+       intVectorNotSorted.set(0, 10);
+       intVectorNotSorted.set(1, 8);
+       intVectorNotSorted.setNull(2);
+       FixedWidthInPlaceVectorSorter<IntVector> sorter = new FixedWidthInPlaceVectorSorter<IntVector>();
+       VectorValueComparator<IntVector> comparator = DefaultVectorComparators.createDefaultComparator(intVectorNotSorted);
+       sorter.sortInPlace(intVectorNotSorted, comparator);
+
+       System.out.println(intVectorNotSorted);
+   }
+
+.. testoutput::
+
+   [null, 8, 10]
+
+Out-place Sorter - O(nlog(n))
+*****************************
+
+Sorting by copies vector elements to a new vector in sorted order - O(nlog(n))
+Algorithm: : org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter.
+FixedWidthOutOfPlaceVectorSorter & VariableWidthOutOfPlaceVectorSor
+
+.. testcode::
+
+   import org.apache.arrow.algorithm.sort.DefaultVectorComparators;
+   import org.apache.arrow.algorithm.sort.FixedWidthOutOfPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.OutOfPlaceVectorSorter;
+   import org.apache.arrow.algorithm.sort.VectorValueComparator;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.memory.RootAllocator;
+
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       IntVector intVectorNotSorted = new IntVector("intvectornotsorted", allocator);
+       IntVector intVectorSorted = (IntVector) intVectorNotSorted.getField()
+               .getFieldType().createNewSingleVector("new-out-of-place-sorter",
+                       allocator, null);
+
+   ) {
+       intVectorNotSorted.allocateNew(3);
+       intVectorNotSorted.setValueCount(3);
+       intVectorNotSorted.set(0, 10);
+       intVectorNotSorted.set(1, 8);
+       intVectorNotSorted.setNull(2);
+       OutOfPlaceVectorSorter<IntVector> sorterOutOfPlaceSorter = new FixedWidthOutOfPlaceVectorSorter<>();
+       VectorValueComparator<IntVector> comparatorOutOfPlaceSorter = DefaultVectorComparators.createDefaultComparator(intVectorNotSorted);
+       intVectorSorted.allocateNew(intVectorNotSorted.getValueCount());
+       intVectorSorted.setValueCount(intVectorNotSorted.getValueCount());
+       sorterOutOfPlaceSorter.sortOutOfPlace(intVectorNotSorted, intVectorSorted, comparatorOutOfPlaceSorter);
+
+       System.out.println(intVectorSorted);
+   }
+
+.. testoutput::
+
+   [null, 8, 10]
+
+.. _`VectorAppender`: https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/util/VectorAppender.java
diff --git a/java/_sources/dataset.rst.txt b/java/_sources/dataset.rst.txt
new file mode 100644
index 0000000..f7ee556
--- /dev/null
+++ b/java/_sources/dataset.rst.txt
@@ -0,0 +1,536 @@
+.. 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.
+
+.. _arrow-dataset:
+
+=======
+Dataset
+=======
+
+* `Arrow Java Dataset`_: Java implementation of Arrow Datasets library. Implement Dataset Java API by JNI to C++.
+
+.. contents::
+
+Constructing Datasets
+=====================
+
+We can construct a dataset with an auto-inferred schema.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import java.util.stream.StreamSupport;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       System.out.println(StreamSupport.stream(scanner.scan().spliterator(), false).count());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   1
+
+Let construct our dataset with predefined schema.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import java.util.stream.StreamSupport;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish(datasetFactory.inspect());
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       System.out.println(StreamSupport.stream(scanner.scan().spliterator(), false).count());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   1
+
+Getting the Schema
+==================
+
+During Dataset Construction
+***************************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri)
+   ) {
+       Schema schema = datasetFactory.inspect();
+
+       System.out.println(schema);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Schema<id: Int(32, true), name: Utf8>(metadata: {parquet.avro.schema={"type":"record","name":"User","namespace":"org.apache.arrow.dataset","fields":[{"name":"id","type":["int","null"]},{"name":"name","type":["string","null"]}]}, writer.model.name=avro})
+
+From a Dataset
+**************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options)
+   ) {
+       Schema schema = scanner.schema();
+
+       System.out.println(schema);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Schema<id: Int(32, true), name: Utf8>(metadata: {parquet.avro.schema={"type":"record","name":"User","namespace":"org.apache.arrow.dataset","fields":[{"name":"id","type":["int","null"]},{"name":"name","type":["string","null"]}]}, writer.model.name=avro})
+
+Query Parquet File
+==================
+
+Let query information for a parquet file.
+
+Query Data Content For File
+***************************
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.print(root.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   id    name
+   1    David
+   2    Gladis
+   3    Juan
+
+Let's try to read a Parquet file with gzip compression and 3 row groups:
+
+.. code-block::
+
+   $ parquet-tools meta data4_3rg_gzip.parquet
+
+   file schema: schema
+   age:         OPTIONAL INT64 R:0 D:1
+   name:        OPTIONAL BINARY L:STRING R:0 D:1
+   row group 1: RC:4 TS:182 OFFSET:4
+   row group 2: RC:4 TS:190 OFFSET:420
+   row group 3: RC:3 TS:179 OFFSET:838
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data4_3rg_gzip.parquet";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+               System.out.println("Number of rows per batch["+ count++ +"]: " + root.getRowCount());
+               System.out.print(root.contentToTSVString());
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Number of rows per batch[1]: 4
+   age    name
+   10    Jean
+   10    Lu
+   10    Kei
+   10    Sophia
+   Number of rows per batch[2]: 4
+   age    name
+   10    Mara
+   20    Arit
+   20    Neil
+   20    Jason
+   Number of rows per batch[3]: 3
+   age    name
+   20    John
+   20    Peter
+   20    Ismael
+   Total batch size: 11
+
+Query Data Content For Directory
+********************************
+
+Consider that we have these files: data1: 3 rows, data2: 3 rows and data3: 250 rows.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 100);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.println("Batch: " + count++ + ", RowCount: " + root.getRowCount());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Batch: 1, RowCount: 3
+   Batch: 2, RowCount: 3
+   Batch: 3, RowCount: 100
+   Batch: 4, RowCount: 100
+   Batch: 5, RowCount: 50
+   Batch: 6, RowCount: 4
+   Batch: 7, RowCount: 4
+   Batch: 8, RowCount: 3
+
+Query Data Content with Projection
+**********************************
+
+In case we need to project only certain columns we could configure ScanOptions with projections needed.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/parquetfiles/data1.parquet";
+   String[] projection = new String[] {"name"};
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768, Optional.of(projection));
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.PARQUET, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.print(root.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name
+   David
+   Gladis
+   Juan
+
+Query Arrow Files
+=================
+
+
+Query Data Content For File
+***************************
+
+Let's read an Arrow file with 3 record batches, each with 3 rows.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   import java.io.IOException;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/arrowfiles/random_access.arrow";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.ARROW_IPC, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int count = 1;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               System.out.println("Number of rows per batch["+ count++ +"]: " + root.getRowCount());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Number of rows per batch[1]: 3
+   Number of rows per batch[2]: 3
+   Number of rows per batch[3]: 3
+
+Query ORC File
+==============
+
+Query Data Content For File
+***************************
+
+Let's read an ORC file with zlib compression 385 stripes, each with 5000 rows.
+
+.. code-block::
+
+   $ orc-metadata demo-11-zlib.orc | more
+
+   { "name": "demo-11-zlib.orc",
+     "type": "struct<_col0:int,_col1:string,_col2:string,_col3:string,_col4:int,_col5:string,_col6:int,_col7:int,_col8:int>",
+     "stripe count": 385,
+     "compression": "zlib", "compression block": 262144,
+     "stripes": [
+       { "stripe": 0, "rows": 5000,
+         "offset": 3, "length": 1031,
+         "index": 266, "data": 636, "footer": 129
+       },
+   ...
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/orc/data1-zlib.orc";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.ORC, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Total batch size: 1920800
+
+Query CSV File
+==============
+
+Query Data Content For File
+***************************
+
+Let's read a CSV file.
+
+.. testcode::
+
+   import org.apache.arrow.dataset.file.FileFormat;
+   import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+   import org.apache.arrow.dataset.jni.NativeMemoryPool;
+   import org.apache.arrow.dataset.scanner.ScanOptions;
+   import org.apache.arrow.dataset.scanner.Scanner;
+   import org.apache.arrow.dataset.source.Dataset;
+   import org.apache.arrow.dataset.source.DatasetFactory;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.ipc.ArrowReader;
+
+   String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/csv/tech_acquisitions.csv";
+   ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+   try (
+       BufferAllocator allocator = new RootAllocator();
+       DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(), FileFormat.CSV, uri);
+       Dataset dataset = datasetFactory.finish();
+       Scanner scanner = dataset.newScan(options);
+       ArrowReader reader = scanner.scanBatches()
+   ) {
+       int totalBatchSize = 0;
+       while (reader.loadNextBatch()) {
+           try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) {
+               totalBatchSize += root.getRowCount();
+               System.out.print(root.contentToTSVString());
+           }
+       }
+       System.out.println("Total batch size: " + totalBatchSize);
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Acquirer    Acquiree    Amount in billions (USD)    Date of acquisition
+   NVIDIA    Mellanox    6.9    04/05/2020
+   AMD    Xilinx    35.0    27/10/2020
+   Salesforce    Slack    27.7    01/12/2020
+   Total batch size: 3
+
+.. _Arrow Java Dataset: https://arrow.apache.org/docs/dev/java/dataset.html
\ No newline at end of file
diff --git a/java/_sources/flight.rst.txt b/java/_sources/flight.rst.txt
new file mode 100644
index 0000000..7d8fc79
--- /dev/null
+++ b/java/_sources/flight.rst.txt
@@ -0,0 +1,554 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+This section contains a number of recipes for working with Arrow Flight.
+For more detail about Flight please take a look at `Arrow Flight RPC`_.
+
+.. contents::
+
+Simple Key-Value Storage Service with Arrow Flight
+==================================================
+
+We'll implement a service that provides a key-value store for data, using Flight to handle uploads/requests
+and data in memory to store the actual data.
+
+Flight Client and Server
+************************
+
+.. testcode::
+
+   import org.apache.arrow.flight.Action;
+   import org.apache.arrow.flight.AsyncPutListener;
+   import org.apache.arrow.flight.CallStatus;
+   import org.apache.arrow.flight.Criteria;
+   import org.apache.arrow.flight.FlightClient;
+   import org.apache.arrow.flight.FlightDescriptor;
+   import org.apache.arrow.flight.FlightEndpoint;
+   import org.apache.arrow.flight.FlightInfo;
+   import org.apache.arrow.flight.FlightServer;
+   import org.apache.arrow.flight.FlightStream;
+   import org.apache.arrow.flight.Location;
+   import org.apache.arrow.flight.NoOpFlightProducer;
+   import org.apache.arrow.flight.PutResult;
+   import org.apache.arrow.flight.Result;
+   import org.apache.arrow.flight.Ticket;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.util.AutoCloseables;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorLoader;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.VectorUnloader;
+   import org.apache.arrow.vector.ipc.message.ArrowRecordBatch;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   import java.io.IOException;
+   import java.nio.charset.StandardCharsets;
+   import java.util.ArrayList;
+   import java.util.Arrays;
+   import java.util.Collections;
+   import java.util.Iterator;
+   import java.util.List;
+   import java.util.concurrent.ConcurrentHashMap;
+
+   class Dataset implements AutoCloseable {
+       private final List<ArrowRecordBatch> batches;
+       private final Schema schema;
+       private final long rows;
+       public Dataset(List<ArrowRecordBatch> batches, Schema schema, long rows) {
+           this.batches = batches;
+           this.schema = schema;
+           this.rows = rows;
+       }
+       public List<ArrowRecordBatch> getBatches() {
+           return batches;
+       }
+       public Schema getSchema() {
+           return schema;
+       }
+       public long getRows() {
+           return rows;
+       }
+       @Override
+       public void close() throws Exception {
+           AutoCloseables.close(batches);
+       }
+   }
+   class CookbookProducer extends NoOpFlightProducer implements AutoCloseable {
+       private final BufferAllocator allocator;
+       private final Location location;
+       private final ConcurrentMap<FlightDescriptor, Dataset> datasets;
+       public CookbookProducer(BufferAllocator allocator, Location location) {
+           this.allocator = allocator;
+           this.location = location;
+           this.datasets = new ConcurrentHashMap<>();
+       }
+       @Override
+       public Runnable acceptPut(CallContext context, FlightStream flightStream, StreamListener<PutResult> ackStream) {
+           List<ArrowRecordBatch> batches = new ArrayList<>();
+           return () -> {
+               long rows = 0;
+               VectorUnloader unloader;
+               while (flightStream.next()) {
+                   unloader = new VectorUnloader(flightStream.getRoot());
+                   final ArrowRecordBatch arb = unloader.getRecordBatch();
+                   batches.add(arb);
+                   rows += flightStream.getRoot().getRowCount();
+               }
+               Dataset dataset = new Dataset(batches, flightStream.getSchema(), rows);
+               datasets.put(flightStream.getDescriptor(), dataset);
+               ackStream.onCompleted();
+           };
+       }
+
+       @Override
+       public void getStream(CallContext context, Ticket ticket, ServerStreamListener listener) {
+           FlightDescriptor flightDescriptor = FlightDescriptor.path(
+                   new String(ticket.getBytes(), StandardCharsets.UTF_8));
+           Dataset dataset = this.datasets.get(flightDescriptor);
+           if (dataset == null) {
+               throw CallStatus.NOT_FOUND.withDescription("Unknown descriptor").toRuntimeException();
+           }
+           try (VectorSchemaRoot root = VectorSchemaRoot.create(
+                    this.datasets.get(flightDescriptor).getSchema(), allocator)) {
+               VectorLoader loader = new VectorLoader(root);
+               listener.start(root);
+               for (ArrowRecordBatch arrowRecordBatch : this.datasets.get(flightDescriptor).getBatches()) {
+                   loader.load(arrowRecordBatch);
+                   listener.putNext();
+               }
+               listener.completed();
+           }
+       }
+
+       @Override
+       public void doAction(CallContext context, Action action, StreamListener<Result> listener) {
+           FlightDescriptor flightDescriptor = FlightDescriptor.path(
+                   new String(action.getBody(), StandardCharsets.UTF_8));
+           switch (action.getType()) {
+               case "DELETE": {
+                   Dataset removed = datasets.remove(flightDescriptor);
+                   if (removed != null) {
+                       try {
+                           removed.close();
+                       } catch (Exception e) {
+                           listener.onError(CallStatus.INTERNAL
+                               .withDescription(e.toString())
+                               .toRuntimeException());
+                           return;
+                       }
+                       Result result = new Result("Delete completed".getBytes(StandardCharsets.UTF_8));
+                       listener.onNext(result);
+                   } else {
+                       Result result = new Result("Delete not completed. Reason: Key did not exist."
+                               .getBytes(StandardCharsets.UTF_8));
+                       listener.onNext(result);
+                   }
+                   listener.onCompleted();
+               }
+           }
+       }
+
+       @Override
+       public FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor) {
+           FlightEndpoint flightEndpoint = new FlightEndpoint(
+                   new Ticket(descriptor.getPath().get(0).getBytes(StandardCharsets.UTF_8)), location);
+           return new FlightInfo(
+                   datasets.get(descriptor).getSchema(),
+                   descriptor,
+                   Collections.singletonList(flightEndpoint),
+                   /*bytes=*/-1,
+                   datasets.get(descriptor).getRows()
+           );
+       }
+
+       @Override
+       public void listFlights(CallContext context, Criteria criteria, StreamListener<FlightInfo> listener) {
+           datasets.forEach((k, v) -> { listener.onNext(getFlightInfo(null, k)); });
+           listener.onCompleted();
+       }
+
+       @Override
+       public void close() throws Exception {
+           AutoCloseables.close(datasets.values());
+       }
+   }
+   Location location = Location.forGrpcInsecure("0.0.0.0", 33333);
+   try (BufferAllocator allocator = new RootAllocator()){
+       // Server
+       try(final CookbookProducer producer = new CookbookProducer(allocator, location);
+           final FlightServer flightServer = FlightServer.builder(allocator, location, producer).build()) {
+           try {
+               flightServer.start();
+               System.out.println("S1: Server (Location): Listening on port " + flightServer.getPort());
+           } catch (IOException e) {
+               throw new RuntimeException(e);
+           }
+
+           // Client
+           try (FlightClient flightClient = FlightClient.builder(allocator, location).build()) {
+               System.out.println("C1: Client (Location): Connected to " + location.getUri());
+
+               // Populate data
+               Schema schema = new Schema(Arrays.asList(
+                       new Field("name", FieldType.nullable(new ArrowType.Utf8()), null)));
+               try(VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema, allocator);
+                   VarCharVector varCharVector = (VarCharVector) vectorSchemaRoot.getVector("name")) {
+                   varCharVector.allocateNew(3);
+                   varCharVector.set(0, "Ronald".getBytes());
+                   varCharVector.set(1, "David".getBytes());
+                   varCharVector.set(2, "Francisco".getBytes());
+                   vectorSchemaRoot.setRowCount(3);
+                   FlightClient.ClientStreamListener listener = flightClient.startPut(
+                           FlightDescriptor.path("profiles"),
+                           vectorSchemaRoot, new AsyncPutListener());
+                   listener.putNext();
+                   varCharVector.set(0, "Manuel".getBytes());
+                   varCharVector.set(1, "Felipe".getBytes());
+                   varCharVector.set(2, "JJ".getBytes());
+                   vectorSchemaRoot.setRowCount(3);
+                   listener.putNext();
+                   listener.completed();
+                   listener.getResult();
+                   System.out.println("C2: Client (Populate Data): Wrote 2 batches with 3 rows each");
+               }
+
+               // Get metadata information
+               FlightInfo flightInfo = flightClient.getInfo(FlightDescriptor.path("profiles"));
+               System.out.println("C3: Client (Get Metadata): " + flightInfo);
+
+               // Get data information
+               try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
+                   int batch = 0;
+                   try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
+                       System.out.println("C4: Client (Get Stream):");
+                       while (flightStream.next()) {
+                           batch++;
+                           System.out.println("Client Received batch #" + batch + ", Data:");
+                           System.out.print(vectorSchemaRootReceived.contentToTSVString());
+                       }
+                   }
+               } catch (Exception e) {
+                   e.printStackTrace();
+               }
+
+               // Get all metadata information
+               Iterable<FlightInfo> flightInfosBefore = flightClient.listFlights(Criteria.ALL);
+               System.out.print("C5: Client (List Flights Info): ");
+               flightInfosBefore.forEach(t -> System.out.println(t));
+
+               // Do delete action
+               Iterator<Result> deleteActionResult = flightClient.doAction(new Action("DELETE",
+                       FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)));
+               while (deleteActionResult.hasNext()) {
+                   Result result = deleteActionResult.next();
+                   System.out.println("C6: Client (Do Delete Action): " +
+                           new String(result.getBody(), StandardCharsets.UTF_8));
+               }
+
+               // Get all metadata information (to validate detele action)
+               Iterable<FlightInfo> flightInfos = flightClient.listFlights(Criteria.ALL);
+               flightInfos.forEach(t -> System.out.println(t));
+               System.out.println("C7: Client (List Flights Info): After delete - No records");
+
+               // Server shut down
+               flightServer.shutdown();
+               System.out.println("C8: Server shut down successfully");
+           }
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
+   }
+
+.. testoutput::
+
+   S1: Server (Location): Listening on port 33333
+   C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+   C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+   C3: Client (Get Metadata): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6, ordered=false}
+   C4: Client (Get Stream):
+   Client Received batch #1, Data:
+   name
+   Ronald
+   David
+   Francisco
+   Client Received batch #2, Data:
+   name
+   Manuel
+   Felipe
+   JJ
+   C5: Client (List Flights Info): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6, ordered=false}
+   C6: Client (Do Delete Action): Delete completed
+   C7: Client (List Flights Info): After delete - No records
+   C8: Server shut down successfully
+
+Let explain our code in more detail.
+
+Start Flight Server
+*******************
+
+First, we'll start our server:
+
+.. code-block:: java
+
+   try(FlightServer flightServer = FlightServer.builder(allocator, location,
+           new CookbookProducer(allocator, location)).build()) {
+       try {
+           flightServer.start();
+           System.out.println("S1: Server (Location): Listening on port " + flightServer.getPort());
+       } catch (IOException e) {
+           e.printStackTrace();
+       }
+
+.. code-block:: shell
+
+   S1: Server (Location): Listening on port 33333
+
+Connect to Flight Server
+************************
+
+We can then create a client and connect to the server:
+
+.. code-block:: java
+
+   try (FlightClient flightClient = FlightClient.builder(allocator, location).build()) {
+       System.out.println("C1: Client (Location): Connected to " + location.getUri());
+
+.. code-block:: shell
+
+   C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+
+Put Data
+********
+
+First, we'll create and upload a vector schema root, which will get stored in a
+memory by the server.
+
+.. code-block:: java
+
+   // Server
+   public Runnable acceptPut(CallContext context, FlightStream flightStream, StreamListener<PutResult> ackStream) {
+       List<ArrowRecordBatch> batches = new ArrayList<>();
+       return () -> {
+           long rows = 0;
+           VectorUnloader unloader;
+           while (flightStream.next()) {
+               unloader = new VectorUnloader(flightStream.getRoot());
+               try (final ArrowRecordBatch arb = unloader.getRecordBatch()) {
+                   batches.add(arb);
+                   rows += flightStream.getRoot().getRowCount();
+               }
+           }
+           Dataset dataset = new Dataset(batches, flightStream.getSchema(), rows);
+           datasets.put(flightStream.getDescriptor(), dataset);
+           ackStream.onCompleted();
+       };
+   }
+
+   // Client
+   Schema schema = new Schema(Arrays.asList(
+           new Field("name", FieldType.nullable(new ArrowType.Utf8()), null)));
+   try(VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schema, allocator);
+       VarCharVector varCharVector = (VarCharVector) vectorSchemaRoot.getVector("name")) {
+       varCharVector.allocateNew(3);
+       varCharVector.set(0, "Ronald".getBytes());
+       varCharVector.set(1, "David".getBytes());
+       varCharVector.set(2, "Francisco".getBytes());
+       vectorSchemaRoot.setRowCount(3);
+       FlightClient.ClientStreamListener listener = flightClient.startPut(
+               FlightDescriptor.path("profiles"),
+               vectorSchemaRoot, new AsyncPutListener());
+       listener.putNext();
+       varCharVector.set(0, "Manuel".getBytes());
+       varCharVector.set(1, "Felipe".getBytes());
+       varCharVector.set(2, "JJ".getBytes());
+       vectorSchemaRoot.setRowCount(3);
+       listener.putNext();
+       listener.completed();
+       listener.getResult();
+       System.out.println("C2: Client (Populate Data): Wrote 2 batches with 3 rows each");
+   }
+
+.. code-block:: shell
+
+   C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+
+Get Metadata
+************
+
+Once we do so, we can retrieve the metadata for that dataset.
+
+.. code-block:: java
+
+   // Server
+   public FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor) {
+       FlightEndpoint flightEndpoint = new FlightEndpoint(
+               new Ticket(descriptor.getPath().get(0).getBytes(StandardCharsets.UTF_8)), location);
+       return new FlightInfo(
+               datasets.get(descriptor).getSchema(),
+               descriptor,
+               Collections.singletonList(flightEndpoint),
+               /*bytes=*/-1,
+               datasets.get(descriptor).getRows()
+       );
+   }
+
+   // Client
+   FlightInfo flightInfo = flightClient.getInfo(FlightDescriptor.path("profiles"));
+   System.out.println("C3: Client (Get Metadata): " + flightInfo);
+
+.. code-block:: shell
+
+   C3: Client (Get Metadata): FlightInfo{schema=Schema<name: Utf8>, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6}
+
+Get Data
+********
+
+And get the data back:
+
+.. code-block:: java
+
+   // Server
+   public void getStream(CallContext context, Ticket ticket, ServerStreamListener listener) {
+       FlightDescriptor flightDescriptor = FlightDescriptor.path(
+               new String(ticket.getBytes(), StandardCharsets.UTF_8));
+       Dataset dataset = this.datasets.get(flightDescriptor);
+       if (dataset == null) {
+           throw CallStatus.NOT_FOUND.withDescription("Unknown descriptor").toRuntimeException();
+       } else {
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(
+                   this.datasets.get(flightDescriptor).getSchema(), allocator);
+           listener.start(vectorSchemaRoot);
+           for (ArrowRecordBatch arrowRecordBatch : this.datasets.get(flightDescriptor).getBatches()) {
+               VectorLoader loader = new VectorLoader(vectorSchemaRoot);
+               loader.load(arrowRecordBatch.cloneWithTransfer(allocator));
+               listener.putNext();
+           }
+           listener.completed();
+       }
+   }
+
+   // Client
+   try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
+       int batch = 0;
+       try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
+           System.out.println("C4: Client (Get Stream):");
+           while (flightStream.next()) {
+               batch++;
+               System.out.println("Client Received batch #" + batch + ", Data:");
+               System.out.print(vectorSchemaRootReceived.contentToTSVString());
+           }
+       }
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. code-block:: shell
+
+   C4: Client (Get Stream):
+   Client Received batch #1, Data:
+   name
+   Ronald
+   David
+   Francisco
+   Client Received batch #2, Data:
+   name
+   Manuel
+   Felipe
+   JJ
+
+Delete data
+***********
+
+Then, we'll delete the dataset:
+
+.. code-block:: java
+
+   // Server
+   public void doAction(CallContext context, Action action, StreamListener<Result> listener) {
+       FlightDescriptor flightDescriptor = FlightDescriptor.path(
+               new String(action.getBody(), StandardCharsets.UTF_8));
+       switch (action.getType()) {
+           case "DELETE":
+               if (datasets.remove(flightDescriptor) != null) {
+                   Result result = new Result("Delete completed".getBytes(StandardCharsets.UTF_8));
+                   listener.onNext(result);
+               } else {
+                   Result result = new Result("Delete not completed. Reason: Key did not exist."
+                           .getBytes(StandardCharsets.UTF_8));
+                   listener.onNext(result);
+               }
+               listener.onCompleted();
+       }
+   }
+
+   // Client
+   Iterator<Result> deleteActionResult = flightClient.doAction(new Action("DELETE",
+           FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)));
+   while (deleteActionResult.hasNext()) {
+       Result result = deleteActionResult.next();
+       System.out.println("C6: Client (Do Delete Action): " +
+               new String(result.getBody(), StandardCharsets.UTF_8));
+   }
+
+.. code-block:: shell
+
+   C6: Client (Do Delete Action): Delete completed
+
+Validate Delete Data
+********************
+
+And confirm that it's been deleted:
+
+.. code-block:: java
+
+   // Server
+   public void listFlights(CallContext context, Criteria criteria, StreamListener<FlightInfo> listener) {
+       datasets.forEach((k, v) -> { listener.onNext(getFlightInfo(null, k)); });
+       listener.onCompleted();
+   }
+
+   // Client
+   Iterable<FlightInfo> flightInfos = flightClient.listFlights(Criteria.ALL);
+   flightInfos.forEach(t -> System.out.println(t));
+   System.out.println("C7: Client (List Flights Info): After delete - No records");
+
+.. code-block:: shell
+
+   C7: Client (List Flights Info): After delete - No records
+
+Stop Flight Server
+******************
+
+.. code-block:: java
+
+   // Server
+   flightServer.shutdown();
+   System.out.println("C8: Server shut down successfully");
+
+.. code-block:: shell
+
+   C8: Server shut down successfully
+
+_`Arrow Flight RPC`: https://arrow.apache.org/docs/format/Flight.html
diff --git a/java/_sources/index.rst.txt b/java/_sources/index.rst.txt
new file mode 100644
index 0000000..63f94c0
--- /dev/null
+++ b/java/_sources/index.rst.txt
@@ -0,0 +1,52 @@
+.. 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.
+
+.. java arrow documentation master file, created by
+   sphinx-quickstart on Wed Jan 19 08:34:06 2022.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Apache Arrow Java Cookbook
+==========================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate how to solve many common tasks that users might need to perform when working with Arrow data. The examples in this cookbook will also serve as robust and well performing solutions to those tasks.
+
+To get started with Apache Arrow in Java, see the
+`Installation Instructions <https://arrow.apache.org/docs/java/install.html>`_.
+
+This cookbook is tested with Apache Arrow |version|.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   create
+   schema
+   io
+   flight
+   dataset
+   substrait
+   data
+   avro
+   jdbc
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/java/_sources/io.rst.txt b/java/_sources/io.rst.txt
new file mode 100644
index 0000000..74f74d1
--- /dev/null
+++ b/java/_sources/io.rst.txt
@@ -0,0 +1,581 @@
+.. 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.
+
+.. _arrow-io:
+
+========================
+Reading and writing data
+========================
+
+The `Arrow IPC format <https://arrow.apache.org/docs/java/ipc.html>`_ defines two types of binary formats
+for serializing Arrow data: the streaming format and the file format (or random access format). Such files can
+be directly memory-mapped when read.
+
+.. contents::
+
+Writing
+=======
+
+Both writing file and streaming formats use the same API.
+
+Writing Random Access Files
+***************************
+
+Write - Out to File
+-------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import java.io.File;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+
+   try (BufferAllocator allocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, allocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           File file = new File("randon_access_to_file.arrow");
+           try (
+               FileOutputStream fileOutputStream = new FileOutputStream(file);
+               ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, null, fileOutputStream.getChannel())
+           ) {
+               writer.start();
+               writer.writeBatch();
+               writer.end();
+               System.out.println("Record batches written: " + writer.getRecordBlocks().size() + ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Record batches written: 1. Number of rows written: 3
+
+Write - Out to Buffer
+---------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import java.io.ByteArrayOutputStream;
+   import java.io.IOException;
+   import java.nio.channels.Channels;
+
+   try (BufferAllocator allocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, allocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           try (
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+                ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, null, Channels.newChannel(out))
+           ) {
+               writer.start();
+               writer.writeBatch();
+
+               System.out.println("Record batches written: " + writer.getRecordBlocks().size() +
+                       ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Record batches written: 1. Number of rows written: 3
+
+Writing Streaming Format
+************************
+
+Write - Out to File
+-------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.ipc.ArrowStreamWriter;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import java.io.File;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+
+   try (BufferAllocator rootAllocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, rootAllocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           File file = new File("streaming_to_file.arrow");
+           try (
+               FileOutputStream fileOutputStream = new FileOutputStream(file);
+               ArrowStreamWriter writer = new ArrowStreamWriter(vectorSchemaRoot, null, fileOutputStream.getChannel())
+           ){
+               writer.start();
+               writer.writeBatch();
+               System.out.println("Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Number of rows written: 3
+
+Write - Out to Buffer
+---------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.ipc.ArrowStreamWriter;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import static java.util.Arrays.asList;
+   import java.io.ByteArrayOutputStream;
+   import java.io.IOException;
+   import java.nio.channels.Channels;
+
+   try (BufferAllocator rootAllocator = new RootAllocator()) {
+       Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+       Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+       Schema schemaPerson = new Schema(asList(name, age));
+       try(
+           VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.create(schemaPerson, rootAllocator)
+       ){
+           VarCharVector nameVector = (VarCharVector) vectorSchemaRoot.getVector("name");
+           nameVector.allocateNew(3);
+           nameVector.set(0, "David".getBytes());
+           nameVector.set(1, "Gladis".getBytes());
+           nameVector.set(2, "Juan".getBytes());
+           IntVector ageVector = (IntVector) vectorSchemaRoot.getVector("age");
+           ageVector.allocateNew(3);
+           ageVector.set(0, 10);
+           ageVector.set(1, 20);
+           ageVector.set(2, 30);
+           vectorSchemaRoot.setRowCount(3);
+           try (
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               ArrowStreamWriter writer = new ArrowStreamWriter(vectorSchemaRoot, null, Channels.newChannel(out))
+           ){
+               writer.start();
+               writer.writeBatch();
+               System.out.println("Number of rows written: " + vectorSchemaRoot.getRowCount());
+           } catch (IOException e) {
+               e.printStackTrace();
+           }
+       }
+   }
+
+.. testoutput::
+
+   Number of rows written: 3
+
+Reading
+=======
+
+Reading the random access format and streaming format both offer the same API,
+with the difference that random access files also offer access to any record batch by index.
+
+Reading Random Access Files
+***************************
+
+Read - From File
+----------------
+
+We are providing a path with auto generated arrow files for testing purposes, change that at your convenience.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.IOException;
+
+   File file = new File("./thirdpartydeps/arrowfiles/random_access.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       FileInputStream fileInputStream = new FileInputStream(file);
+       ArrowFileReader reader = new ArrowFileReader(fileInputStream.getChannel(), rootAllocator)
+   ){
+       System.out.println("Record batches in file: " + reader.getRecordBlocks().size());
+       for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+           reader.loadRecordBatch(arrowBlock);
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Record batches in file: 3
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Read - From Buffer
+------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.SeekableReadChannel;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.util.ByteArrayReadableSeekableByteChannel;
+   import java.io.IOException;
+   import java.nio.file.Files;
+   import java.nio.file.Path;
+   import java.nio.file.Paths;
+
+   Path path = Paths.get("./thirdpartydeps/arrowfiles/random_access.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       ArrowFileReader reader = new ArrowFileReader(new SeekableReadChannel(new ByteArrayReadableSeekableByteChannel(
+                                           Files.readAllBytes(path))), rootAllocator)
+   ) {
+       System.out.println("Record batches in file: " + reader.getRecordBlocks().size());
+       for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+           reader.loadRecordBatch(arrowBlock);
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   Record batches in file: 3
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Reading Streaming Format
+************************
+
+Read - From File
+----------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowStreamReader;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.IOException;
+
+   File file = new File("./thirdpartydeps/arrowfiles/streaming.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       FileInputStream fileInputStreamForStream = new FileInputStream(file);
+       ArrowStreamReader reader = new ArrowStreamReader(fileInputStreamForStream, rootAllocator)
+   ) {
+       while (reader.loadNextBatch()) {
+           VectorSchemaRoot vectorSchemaRootRecover = reader.getVectorSchemaRoot();
+           System.out.print(vectorSchemaRootRecover.contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Read - From Buffer
+------------------
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.ipc.ArrowStreamReader;
+   import java.io.ByteArrayInputStream;
+   import java.io.IOException;
+   import java.nio.file.Files;
+   import java.nio.file.Path;
+   import java.nio.file.Paths;
+
+   Path path = Paths.get("./thirdpartydeps/arrowfiles/streaming.arrow");
+   try(
+       BufferAllocator rootAllocator = new RootAllocator();
+       ArrowStreamReader reader = new ArrowStreamReader(new ByteArrayInputStream(
+                                       Files.readAllBytes(path)), rootAllocator)
+   ) {
+       while(reader.loadNextBatch()){
+           System.out.print(reader.getVectorSchemaRoot().contentToTSVString());
+       }
+   } catch (IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age
+   David    10
+   Gladis    20
+   Juan    30
+   name    age
+   Nidia    15
+   Alexa    20
+   Mara    15
+   name    age
+   Raul    34
+   Jhon    29
+   Thomy    33
+
+Reading Parquet File
+********************
+
+Please check :doc:`Dataset <./dataset>`
+
+Handling Data with Dictionaries
+*******************************
+
+Reading and writing dictionary-encoded data requires separately tracking the dictionaries.
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.FieldVector;
+   import org.apache.arrow.vector.ValueVector;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.dictionary.Dictionary;
+   import org.apache.arrow.vector.dictionary.DictionaryEncoder;
+   import org.apache.arrow.vector.dictionary.DictionaryProvider;
+   import org.apache.arrow.vector.ipc.ArrowFileReader;
+   import org.apache.arrow.vector.ipc.ArrowFileWriter;
+   import org.apache.arrow.vector.ipc.message.ArrowBlock;
+   import org.apache.arrow.vector.types.Types;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.DictionaryEncoding;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   import java.io.File;
+   import java.io.FileInputStream;
+   import java.io.FileNotFoundException;
+   import java.io.FileOutputStream;
+   import java.io.IOException;
+   import java.nio.charset.StandardCharsets;
+
+   DictionaryEncoding dictionaryEncoding = new DictionaryEncoding(
+           /*id=*/666L, /*ordered=*/false, /*indexType=*/
+           new ArrowType.Int(8, true)
+   );
+   try (BufferAllocator root = new RootAllocator();
+        VarCharVector countries = new VarCharVector("country-dict", root);
+        VarCharVector appUserCountriesUnencoded = new VarCharVector(
+                "app-use-country-dict",
+                new FieldType(true, Types.MinorType.VARCHAR.getType(), dictionaryEncoding),
+                root)
+   ) {
+       countries.allocateNew(10);
+       countries.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       countries.set(1, "Cuba".getBytes(StandardCharsets.UTF_8));
+       countries.set(2, "Grecia".getBytes(StandardCharsets.UTF_8));
+       countries.set(3, "Guinea".getBytes(StandardCharsets.UTF_8));
+       countries.set(4, "Islandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(5, "Malta".getBytes(StandardCharsets.UTF_8));
+       countries.set(6, "Tailandia".getBytes(StandardCharsets.UTF_8));
+       countries.set(7, "Uganda".getBytes(StandardCharsets.UTF_8));
+       countries.set(8, "Yemen".getBytes(StandardCharsets.UTF_8));
+       countries.set(9, "Zambia".getBytes(StandardCharsets.UTF_8));
+       countries.setValueCount(10);
+
+       Dictionary countriesDictionary = new Dictionary(countries, dictionaryEncoding);
+       System.out.println("Dictionary: " + countriesDictionary);
+
+       appUserCountriesUnencoded.allocateNew(5);
+       appUserCountriesUnencoded.set(0, "Andorra".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(1, "Guinea".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(2, "Islandia".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(3, "Malta".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.set(4, "Uganda".getBytes(StandardCharsets.UTF_8));
+       appUserCountriesUnencoded.setValueCount(5);
+       System.out.println("Unencoded data: " + appUserCountriesUnencoded);
+
+       File file = new File("random_access_file_with_dictionary.arrow");
+       DictionaryProvider.MapDictionaryProvider provider = new DictionaryProvider.MapDictionaryProvider();
+       provider.put(countriesDictionary);
+       try (FieldVector appUseCountryDictionaryEncoded = (FieldVector) DictionaryEncoder
+               .encode(appUserCountriesUnencoded, countriesDictionary);
+            VectorSchemaRoot vectorSchemaRoot = VectorSchemaRoot.of(appUseCountryDictionaryEncoded);
+            FileOutputStream fileOutputStream = new FileOutputStream(file);
+            ArrowFileWriter writer = new ArrowFileWriter(vectorSchemaRoot, provider, fileOutputStream.getChannel())
+       ) {
+           System.out.println("Dictionary-encoded data: " +appUseCountryDictionaryEncoded);
+           System.out.println("Dictionary-encoded ID: " +appUseCountryDictionaryEncoded.getField().getDictionary().getId());
+           writer.start();
+           writer.writeBatch();
+           writer.end();
+           System.out.println("Record batches written: " + writer.getRecordBlocks().size() + ". Number of rows written: " + vectorSchemaRoot.getRowCount());
+           try(
+               BufferAllocator rootAllocator = new RootAllocator();
+               FileInputStream fileInputStream = new FileInputStream(file);
+               ArrowFileReader reader = new ArrowFileReader(fileInputStream.getChannel(), rootAllocator)
+           ){
+               for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
+                   reader.loadRecordBatch(arrowBlock);
+                   FieldVector appUseCountryDictionaryEncodedRead = reader.getVectorSchemaRoot().getVector("app-use-country-dict");
+                   DictionaryEncoding dictionaryEncodingRead = appUseCountryDictionaryEncodedRead.getField().getDictionary();
+                   System.out.println("Dictionary-encoded ID recovered: " + dictionaryEncodingRead.getId());
+                   Dictionary appUseCountryDictionaryRead = reader.getDictionaryVectors().get(dictionaryEncodingRead.getId());
+                   System.out.println("Dictionary-encoded data recovered: " + appUseCountryDictionaryEncodedRead);
+                   System.out.println("Dictionary recovered: " + appUseCountryDictionaryRead);
+                   try (ValueVector readVector = DictionaryEncoder.decode(appUseCountryDictionaryEncodedRead, appUseCountryDictionaryRead)) {
+                       System.out.println("Decoded data: " + readVector);
+                   }
+               }
+           }
+       } catch (FileNotFoundException e) {
+           e.printStackTrace();
+       } catch (IOException e) {
+           e.printStackTrace();
+       }
+   }
+
+.. testoutput::
+
+   Dictionary: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+   Dictionary-encoded data: [0, 3, 4, 5, 7]
+   Dictionary-encoded ID: 666
+   Record batches written: 1. Number of rows written: 5
+   Dictionary-encoded ID recovered: 666
+   Dictionary-encoded data recovered: [0, 3, 4, 5, 7]
+   Dictionary recovered: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+   Decoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
diff --git a/java/_sources/jdbc.rst.txt b/java/_sources/jdbc.rst.txt
new file mode 100644
index 0000000..78f78f2
--- /dev/null
+++ b/java/_sources/jdbc.rst.txt
@@ -0,0 +1,309 @@
+.. 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.
+
+.. _arrow-jdbc:
+
+==================
+Arrow JDBC Adapter
+==================
+
+The `Arrow Java JDBC module <https://arrow.apache.org/docs/java/jdbc.html>`_
+converts JDBC ResultSets into Arrow VectorSchemaRoots.
+
+.. contents::
+
+ResultSet to VectorSchemaRoot Conversion
+========================================
+
+The main class to help us to convert ResultSet to VectorSchemaRoot is
+`JdbcToArrow <https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrow.html>`_
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, allocator)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5
+   101    true    1000000000300
+   102    true    100000000030
+   103    true    10000000003
+
+Configuring Array subtypes
+==========================
+
+JdbcToArrow accepts configuration through `JdbcToArrowConfig
+<https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrowConfig.html>`_.
+For example, the type of the elements of array columns can be specified by
+``setArraySubTypeByColumnNameMap``.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300    some char text      [1,2,3]
+   102    true    100000000030    some char text      [1,2]
+   103    true    10000000003    some char text      [1]
+
+Configuring batch size
+======================
+
+By default, the adapter will read up to 1024 rows in a batch. This
+can be customized via ``setTargetBatchSize``.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setTargetBatchSize(2)
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300    some char text      [1,2,3]
+   102    true    100000000030    some char text      [1,2]
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   103    true    10000000003    some char text      [1]
+
+Configuring numeric (decimal) precision and scale
+=================================================
+
+By default, the scale of any decimal values must exactly match the defined
+scale of the Arrow type of the column, or else an UnsupportedOperationException
+will be thrown with a message like ``BigDecimal scale must equal that in the Arrow
+vector``.
+
+This can happen because Arrow infers the type from the ResultSet metadata, which
+is not accurate for all database drivers. The JDBC adapter lets you avoid this
+by either overriding the decimal scale, or by providing a RoundingMode via
+``setBigDecimalRoundingMode`` to convert values to the expected scale.
+
+In this example, we have a BigInt column. By default, the inferred scale
+is 0. We override the scale to 7 and then set a RoundingMode to convert
+values to the given scale.
+
+.. testcode::
+
+   import org.apache.arrow.adapter.jdbc.ArrowVectorIterator;
+   import org.apache.arrow.adapter.jdbc.JdbcFieldInfo;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrow;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfig;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder;
+   import org.apache.arrow.adapter.jdbc.JdbcToArrowUtils;
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.ibatis.jdbc.ScriptRunner;
+
+   import java.io.BufferedReader;
+   import java.io.FileReader;
+   import java.io.IOException;
+   import java.math.RoundingMode;
+   import java.sql.Connection;
+   import java.sql.DriverManager;
+   import java.sql.ResultSet;
+   import java.sql.SQLException;
+   import java.sql.Types;
+   import java.util.HashMap;
+
+   try (BufferAllocator allocator = new RootAllocator();
+        Connection connection = DriverManager.getConnection(
+                "jdbc:h2:mem:h2-jdbc-adapter")) {
+       ScriptRunner runnerDDLDML = new ScriptRunner(connection);
+       runnerDDLDML.setLogWriter(null);
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-ddl.sql")));
+       runnerDDLDML.runScript(new BufferedReader(
+               new FileReader("./thirdpartydeps/jdbc/h2-dml.sql")));
+       JdbcToArrowConfig config = new JdbcToArrowConfigBuilder(allocator,
+               JdbcToArrowUtils.getUtcCalendar())
+               .setTargetBatchSize(2)
+               .setArraySubTypeByColumnNameMap(
+                       new HashMap<>() {{
+                           put("LIST_FIELD19",
+                                   new JdbcFieldInfo(Types.INTEGER));
+                       }}
+               )
+               .setExplicitTypesByColumnName(
+                       new HashMap<>() {{
+                           put("BIGINT_FIELD5",
+                                   new JdbcFieldInfo(Types.DECIMAL, 20, 7));
+                       }}
+               )
+               .setBigDecimalRoundingMode(RoundingMode.UNNECESSARY)
+               .build();
+       try (ResultSet resultSet = connection.createStatement().executeQuery(
+               "SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1");
+            ArrowVectorIterator iterator = JdbcToArrow.sqlToArrowVectorIterator(
+                    resultSet, config)) {
+           while (iterator.hasNext()) {
+               try (VectorSchemaRoot root = iterator.next()) {
+                   System.out.print(root.contentToTSVString());
+               }
+           }
+       }
+   } catch (SQLException | IOException e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   101    true    1000000000300.0000000    some char text      [1,2,3]
+   102    true    100000000030.0000000    some char text      [1,2]
+   INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+   103    true    10000000003.0000000    some char text      [1]
diff --git a/java/_sources/schema.rst.txt b/java/_sources/schema.rst.txt
new file mode 100644
index 0000000..f5c33f3
--- /dev/null
+++ b/java/_sources/schema.rst.txt
@@ -0,0 +1,245 @@
+.. 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.
+
+===================
+Working with Schema
+===================
+
+Let's start talking about tabular data. Data often comes in the form of two-dimensional
+sets of heterogeneous data (such as database tables, CSV files...). Arrow provides
+several abstractions to handle such data conveniently and efficiently.
+
+.. contents::
+
+Creating Fields
+===============
+
+Fields are used to denote the particular columns of tabular data.
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   System.out.print(name);
+
+.. testoutput::
+
+   name: Utf8
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   System.out.print(age);
+
+.. testoutput::
+
+   age: Int(32, true)
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+
+   System.out.print(points);
+
+.. testoutput::
+
+   points: List<intCol: Int(32, true)>
+
+Creating the Schema
+===================
+
+A schema describes a sequence of columns in tabular data, and consists
+of a list of fields.
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.List;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), /*dictionary=*/null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), /*dictionary=*/null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Schema schemaPerson = new Schema(asList(name, document, age, points));
+
+   System.out.print(schemaPerson);
+
+.. testoutput::
+
+   Schema<name: Utf8, document: Utf8, age: Int(32, true), points: List<intCol: Int(32, true)>>
+
+Adding Metadata to Fields and Schemas
+=====================================
+
+In case we need to add metadata to our Field we could use:
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+
+   Map<String, String> metadata = new HashMap<>();
+   metadata.put("A", "Id card");
+   metadata.put("B", "Passport");
+   metadata.put("C", "Visa");
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null, metadata), null);
+
+   System.out.print(document.getMetadata());
+
+.. testoutput::
+
+   {A=Id card, B=Passport, C=Visa}
+
+In case we need to add metadata to our Schema we could use:
+
+.. testcode::
+
+   import org.apache.arrow.vector.types.pojo.Schema;
+
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.HashMap;
+   import java.util.List;
+   import java.util.Map;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field document = new Field("document", new FieldType(true, new ArrowType.Utf8(), null), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), /*dictionary=*/null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), /*dictionary=*/null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Map<String, String> metadataSchema = new HashMap<>();
+   metadataSchema.put("Key-1", "Value-1");
+   Schema schemaPerson = new Schema(asList(name, document, age, points), metadataSchema);
+
+   System.out.print(schemaPerson);
+
+.. testoutput::
+
+   Schema<name: Utf8, document: Utf8, age: Int(32, true), points: List<intCol: Int(32, true)>>(metadata: {Key-1=Value-1})
+
+Creating VectorSchemaRoot
+=========================
+
+``VectorSchemaRoot`` is somewhat analogous to tables and record batches in the
+other Arrow implementations in that they all are 2D datasets, but the usage is different.
+
+Let's populate a ``VectorSchemaRoot`` with a small batch of records:
+
+.. testcode::
+
+   import org.apache.arrow.memory.BufferAllocator;
+   import org.apache.arrow.memory.RootAllocator;
+   import org.apache.arrow.vector.VarCharVector;
+   import org.apache.arrow.vector.VectorSchemaRoot;
+   import org.apache.arrow.vector.complex.ListVector;
+   import org.apache.arrow.vector.IntVector;
+   import org.apache.arrow.vector.complex.impl.UnionListWriter;
+   import org.apache.arrow.vector.types.pojo.Schema;
+   import org.apache.arrow.vector.types.pojo.ArrowType;
+   import org.apache.arrow.vector.types.pojo.Field;
+   import org.apache.arrow.vector.types.pojo.FieldType;
+   import java.util.ArrayList;
+   import java.util.List;
+   import static java.util.Arrays.asList;
+
+   Field name = new Field("name", FieldType.nullable(new ArrowType.Utf8()), null);
+   Field age = new Field("age", FieldType.nullable(new ArrowType.Int(32, true)), null);
+   FieldType intType = new FieldType(true, new ArrowType.Int(32, true), null);
+   FieldType listType = new FieldType(true, new ArrowType.List(), null);
+   Field childField = new Field("intCol", intType, null);
+   List<Field> childFields = new ArrayList<>();
+   childFields.add(childField);
+   Field points = new Field("points", listType, childFields);
+   Schema schema = new Schema(asList(name, age, points));
+   try(
+       BufferAllocator allocator = new RootAllocator();
+       VectorSchemaRoot root = VectorSchemaRoot.create(schema, allocator)
+   ){
+       VarCharVector nameVector = (VarCharVector) root.getVector("name");
+       nameVector.allocateNew(3);
+       nameVector.set(0, "David".getBytes());
+       nameVector.set(1, "Gladis".getBytes());
+       nameVector.set(2, "Juan".getBytes());
+       nameVector.setValueCount(3);
+       IntVector ageVector = (IntVector) root.getVector("age");
+       ageVector.allocateNew(3);
+       ageVector.set(0, 10);
+       ageVector.set(1, 20);
+       ageVector.set(2, 30);
+       ageVector.setValueCount(3);
+       ListVector listVector = (ListVector) root.getVector("points");
+       UnionListWriter listWriter = listVector.getWriter();
+       int[] data = new int[] { 4, 8, 12, 10, 20, 30, 5, 10, 15 };
+       int tmp_index = 0;
+       for(int i = 0; i < 3; i++) {
+           listWriter.setPosition(i);
+           listWriter.startList();
+           for(int j = 0; j < 3; j++) {
+               listWriter.writeInt(data[tmp_index]);
+               tmp_index = tmp_index + 1;
+           }
+           listWriter.setValueCount(2);
+           listWriter.endList();
+       }
+       listVector.setValueCount(3);
+       root.setRowCount(3);
+
+       System.out.print(root.contentToTSVString());
+   } catch (Exception e) {
+       e.printStackTrace();
+   }
+
+.. testoutput::
+
+   name    age    points
+   David    10    [4,8,12]
+   Gladis    20    [10,20,30]
+   Juan    30    [5,10,15]
\ No newline at end of file
diff --git a/java/_sources/substrait.rst.txt b/java/_sources/substrait.rst.txt
new file mode 100644
index 0000000..ee87371
--- /dev/null
+++ b/java/_sources/substrait.rst.txt
@@ -0,0 +1,206 @@
+.. 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.
+
+.. _arrow-substrait:
+
+=========
+Substrait
+=========
+
+Arrow can use `Substrait`_ to integrate with other languages.
+
+.. contents::
+
+Querying Datasets
+=================
+
+The Substrait support in Arrow combines :doc:`Dataset <dataset>` and
+`substrait-java`_ to query datasets using `Acero`_ as a backend.
+
+Acero currently supports:
+
+- Reading Arrow, CSV, ORC, and Parquet files
+- Filters
+- Projections
+- Joins
+- Aggregates
+
+Here is an example of a Java program that queries a Parquet file:
+
+.. testcode::
+
+    import com.google.common.collect.ImmutableList;
+    import io.substrait.isthmus.SqlToSubstrait;
+    import io.substrait.proto.Plan;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.dataset.substrait.AceroSubstraitConsumer;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    import java.nio.ByteBuffer;
+    import java.util.HashMap;
+    import java.util.Map;
+
+    static Plan queryTableNation() throws SqlParseException {
+       String sql = "SELECT * FROM NATION WHERE N_NATIONKEY = 17";
+       String nation = "CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, N_NAME CHAR(25), " +
+               "N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))";
+       SqlToSubstrait sqlToSubstrait = new SqlToSubstrait();
+       Plan plan = sqlToSubstrait.execute(sql, ImmutableList.of(nation));
+       return plan;
+    }
+
+    static void queryDatasetThruSubstraitPlanDefinition() {
+       String uri = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+       ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+       try (
+           BufferAllocator allocator = new RootAllocator();
+           DatasetFactory datasetFactory = new FileSystemDatasetFactory(allocator, NativeMemoryPool.getDefault(),
+                   FileFormat.PARQUET, uri);
+           Dataset dataset = datasetFactory.finish();
+           Scanner scanner = dataset.newScan(options);
+           ArrowReader reader = scanner.scanBatches()
+       ) {
+           Map<String, ArrowReader> mapTableToArrowReader = new HashMap<>();
+           mapTableToArrowReader.put("NATION", reader);
+           // get binary plan
+           Plan plan = queryTableNation();
+           ByteBuffer substraitPlan = ByteBuffer.allocateDirect(plan.toByteArray().length);
+           substraitPlan.put(plan.toByteArray());
+           // run query
+           try (ArrowReader arrowReader = new AceroSubstraitConsumer(allocator).runQuery(
+               substraitPlan,
+               mapTableToArrowReader
+           )) {
+               while (arrowReader.loadNextBatch()) {
+                   System.out.print(arrowReader.getVectorSchemaRoot().contentToTSVString());
+               }
+           }
+       } catch (Exception e) {
+           e.printStackTrace();
+       }
+    }
+
+    queryDatasetThruSubstraitPlanDefinition();
+
+.. testoutput::
+
+    N_NATIONKEY    N_NAME    N_REGIONKEY    N_COMMENT
+    17    PERU    1    platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+
+It is also possible to query multiple datasets and join them based on some criteria.
+For example, we can join the nation and customer tables from the TPC-H benchmark:
+
+.. testcode::
+
+    import com.google.common.collect.ImmutableList;
+    import io.substrait.isthmus.SqlToSubstrait;
+    import io.substrait.proto.Plan;
+    import org.apache.arrow.dataset.file.FileFormat;
+    import org.apache.arrow.dataset.file.FileSystemDatasetFactory;
+    import org.apache.arrow.dataset.jni.NativeMemoryPool;
+    import org.apache.arrow.dataset.scanner.ScanOptions;
+    import org.apache.arrow.dataset.scanner.Scanner;
+    import org.apache.arrow.dataset.source.Dataset;
+    import org.apache.arrow.dataset.source.DatasetFactory;
+    import org.apache.arrow.dataset.substrait.AceroSubstraitConsumer;
+    import org.apache.arrow.memory.BufferAllocator;
+    import org.apache.arrow.memory.RootAllocator;
+    import org.apache.arrow.vector.ipc.ArrowReader;
+    import org.apache.calcite.sql.parser.SqlParseException;
+
+    import java.nio.ByteBuffer;
+    import java.util.HashMap;
+    import java.util.Map;
+
+    static Plan queryTableNationJoinCustomer() throws SqlParseException {
+        String sql = "SELECT n.n_name, COUNT(*) AS NUMBER_CUSTOMER FROM NATION n JOIN CUSTOMER c " +
+            "ON n.n_nationkey = c.c_nationkey WHERE n.n_nationkey = 17 " +
+            "GROUP BY n.n_name";
+        String nation = "CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, " +
+            "N_NAME CHAR(25), N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))";
+        String customer = "CREATE TABLE CUSTOMER (C_CUSTKEY BIGINT NOT NULL, " +
+            "C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY BIGINT NOT NULL, " +
+            "C_PHONE CHAR(15), C_ACCTBAL DECIMAL, C_MKTSEGMENT CHAR(10), " +
+            "C_COMMENT VARCHAR(117) )";
+        SqlToSubstrait sqlToSubstrait = new SqlToSubstrait();
+        Plan plan = sqlToSubstrait.execute(sql,
+            ImmutableList.of(nation, customer));
+        return plan;
+    }
+
+    static void queryTwoDatasetsThruSubstraitPlanDefinition() {
+        String uriNation = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/nation.parquet";
+        String uriCustomer = "file:" + System.getProperty("user.dir") + "/thirdpartydeps/tpch/customer.parquet";
+        ScanOptions options = new ScanOptions(/*batchSize*/ 32768);
+        try (
+            BufferAllocator allocator = new RootAllocator();
+            DatasetFactory datasetFactory = new FileSystemDatasetFactory(
+                allocator, NativeMemoryPool.getDefault(),
+                FileFormat.PARQUET, uriNation);
+            Dataset dataset = datasetFactory.finish();
+            Scanner scanner = dataset.newScan(options);
+            ArrowReader readerNation = scanner.scanBatches();
+            DatasetFactory datasetFactoryCustomer = new FileSystemDatasetFactory(
+                allocator, NativeMemoryPool.getDefault(),
+                FileFormat.PARQUET, uriCustomer);
+            Dataset datasetCustomer = datasetFactoryCustomer.finish();
+            Scanner scannerCustomer = datasetCustomer.newScan(options);
+            ArrowReader readerCustomer = scannerCustomer.scanBatches()
+        ) {
+            // map table to reader
+            Map<String, ArrowReader> mapTableToArrowReader = new HashMap<>();
+            mapTableToArrowReader.put("NATION", readerNation);
+            mapTableToArrowReader.put("CUSTOMER", readerCustomer);
+            // get binary plan
+            Plan plan = queryTableNationJoinCustomer();
+            ByteBuffer substraitPlan = ByteBuffer.allocateDirect(
+                plan.toByteArray().length);
+            substraitPlan.put(plan.toByteArray());
+            // run query
+            try (ArrowReader arrowReader = new AceroSubstraitConsumer(
+                allocator).runQuery(
+                substraitPlan,
+                mapTableToArrowReader
+            )) {
+                while (arrowReader.loadNextBatch()) {
+                    System.out.print(arrowReader.getVectorSchemaRoot().contentToTSVString());
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    queryTwoDatasetsThruSubstraitPlanDefinition();
+
+.. testoutput::
+
+    N_NAME    NUMBER_CUSTOMER
+    PERU    573
+
+.. _`Substrait`: https://substrait.io/
+.. _`substrait-java`: https://github.com/substrait-io/substrait-java
+.. _`Acero`: https://arrow.apache.org/docs/cpp/streaming_execution.html
\ No newline at end of file
diff --git a/java/_static/alabaster.css b/java/_static/alabaster.css
new file mode 100644
index 0000000..cfaa100
--- /dev/null
+++ b/java/_static/alabaster.css
@@ -0,0 +1,703 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Make nested-list/multi-paragraph items look better in Releases changelog
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
+ * formatting between different release sub-lists.
+ */
+div#changelog > div.section > ul > li > p:only-child {
+    margin-bottom: 0;
+}
+
+/* Hide fugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/java/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/java/_static/basic.css b/java/_static/basic.css
new file mode 100644
index 0000000..30fee9d
--- /dev/null
+++ b/java/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: 360px;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/java/_static/custom.css b/java/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/java/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/java/_static/doctools.js b/java/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/java/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/java/_static/documentation_options.js b/java/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/java/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/java/_static/favicon.ico b/java/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/java/_static/favicon.ico
Binary files differ
diff --git a/java/_static/file.png b/java/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/java/_static/file.png
Binary files differ
diff --git a/java/_static/language_data.js b/java/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/java/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/java/_static/minus.png b/java/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/java/_static/minus.png
Binary files differ
diff --git a/java/_static/plus.png b/java/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/java/_static/plus.png
Binary files differ
diff --git a/java/_static/pygments.css b/java/_static/pygments.css
new file mode 100644
index 0000000..57c7df3
--- /dev/null
+++ b/java/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/java/_static/searchtools.js b/java/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/java/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/java/_static/sphinx_highlight.js b/java/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/java/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/java/avro.html b/java/avro.html
new file mode 100644
index 0000000..8392fd2
--- /dev/null
+++ b/java/avro.html
@@ -0,0 +1,212 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Avro &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow JDBC Adapter" href="jdbc.html" />
+    <link rel="prev" title="Data manipulation" href="data.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="avro">
+<span id="arrow-avro"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Avro</a><a class="headerlink" href="#avro" title="Link to this heading">¶</a></h1>
+<p>Avro encoded data can be converted into Arrow format.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#avro" id="id1">Avro</a></p>
+<ul>
+<li><p><a class="reference internal" href="#avro-to-arrow" id="id2">Avro to Arrow</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="avro-to-arrow">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Avro to Arrow</a><a class="headerlink" href="#avro-to-arrow" title="Link to this heading">¶</a></h2>
+<p>The example assumes that the Avro schema is stored separately from the Avro data itself.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.AvroToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.AvroToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.AvroToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.AvroToArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.io.BinaryDecoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.avro.io.DecoderFactory</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileNotFoundException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">BinaryDecoder</span><span class="w"> </span><span class="n">decoder</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DecoderFactory</span><span class="p">().</span><span class="na">binaryDecoder</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/avro/users.avro&quot;</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">.</span><span class="na">Parser</span><span class="p">().</span><span class="na">parse</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/avro/user.avsc&quot;</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AvroToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AvroToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">).</span><span class="na">build</span><span class="p">();</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">AvroToArrowVectorIterator</span><span class="w"> </span><span class="n">avroToArrowVectorIterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AvroToArrow</span><span class="p">.</span><span class="na">avroToArrowIterator</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">decoder</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">while</span><span class="p">(</span><span class="n">avroToArrowVectorIterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">avroToArrowVectorIterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    favorite_number    favorite_color
+Alyssa    256    null
+Ben    7    red
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Avro</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#avro-to-arrow">Avro to Arrow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="data.html" title="previous chapter">Data manipulation</a></li>
+      <li>Next: <a href="jdbc.html" title="next chapter">Arrow JDBC Adapter</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/avro.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/create.html b/java/create.html
new file mode 100644
index 0000000..b4d7ba0
--- /dev/null
+++ b/java/create.html
@@ -0,0 +1,370 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with Schema" href="schema.html" />
+    <link rel="prev" title="Apache Arrow Java Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<span id="arrow-create"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>A vector is the basic unit in the Arrow Java library. Data types
+describe the types of values; ValueVectors are sequences of typed
+values. Vectors represent a one-dimensional sequence of values of
+the same type. They are mutable containers.</p>
+<p>Vectors implement the interface <a class="reference external" href="https://arrow.apache.org/docs/java/vector.html">ValueVector</a>. The Arrow libraries provide
+implementations of vectors for various data types.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id1">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-vectors-arrays" id="id2">Creating Vectors (arrays)</a></p>
+<ul>
+<li><p><a class="reference internal" href="#array-of-int" id="id3">Array of Int</a></p></li>
+<li><p><a class="reference internal" href="#array-of-varchar" id="id4">Array of Varchar</a></p></li>
+<li><p><a class="reference internal" href="#dictionary-encoded-array-of-varchar" id="id5">Dictionary-Encoded Array of Varchar</a></p></li>
+<li><p><a class="reference internal" href="#array-of-list" id="id6">Array of List</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#slicing" id="id7">Slicing</a></p>
+<ul>
+<li><p><a class="reference internal" href="#slicing-intvector" id="id8">Slicing IntVector</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-vectors-arrays">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Vectors (arrays)</a><a class="headerlink" href="#creating-vectors-arrays" title="Link to this heading">¶</a></h2>
+<section id="array-of-int">
+<h3><a class="toc-backref" href="#id3" role="doc-backlink">Array of Int</a><a class="headerlink" href="#array-of-int" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">intVector</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[1, 2, 3]
+</pre></div>
+</div>
+</section>
+<section id="array-of-varchar">
+<h3><a class="toc-backref" href="#id4" role="doc-backlink">Array of Varchar</a><a class="headerlink" href="#array-of-varchar" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;varCharVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;one&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;two&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;three&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">varCharVector</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[one, two, three]
+</pre></div>
+</div>
+</section>
+<section id="dictionary-encoded-array-of-varchar">
+<h3><a class="toc-backref" href="#id5" role="doc-backlink">Dictionary-Encoded Array of Varchar</a><a class="headerlink" href="#dictionary-encoded-array-of-varchar" title="Link to this heading">¶</a></h3>
+<p>In some scenarios <a class="reference external" href="https://arrow.apache.org/docs/format/Columnar.html#dictionary-encoded-layout">dictionary-encoding</a> a column is useful to save memory.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.FieldVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.Dictionary</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryEncoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.DictionaryEncoding</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">countries</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Cuba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Grecia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Tailandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Yemen&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Zambia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dictionary</span><span class="p">(</span><span class="n">countries</span><span class="p">,</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryEncoding</span><span class="p">(</span><span class="cm">/*id=*/</span><span class="mi">1L</span><span class="p">,</span><span class="w"> </span><span class="cm">/*ordered=*/</span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="cm">/*indexType=*/</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Unencoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="p">);</span>
+
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUserCountriesDictionaryEncoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="p">)</span><span class="w"> </span><span class="n">DictionaryEncoder</span>
+<span class="w">            </span><span class="p">.</span><span class="na">encode</span><span class="p">(</span><span class="n">appUserCountriesUnencoded</span><span class="p">,</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesDictionaryEncoded</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Dictionary: Dictionary DictionaryEncoding[id=1,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+Dictionary-encoded data: [0, 3, 4, 5, 7]
+</pre></div>
+</div>
+</section>
+<section id="array-of-list">
+<h3><a class="toc-backref" href="#id6" role="doc-backlink">Array of List</a><a class="headerlink" href="#array-of-list" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.impl.UnionListWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.ListVector</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ListVector</span><span class="w"> </span><span class="n">listVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ListVector</span><span class="p">.</span><span class="na">empty</span><span class="p">(</span><span class="s">&quot;listVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">UnionListWriter</span><span class="w"> </span><span class="n">listWriter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listVector</span><span class="p">.</span><span class="na">getWriter</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">,</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w"> </span><span class="mi">300</span><span class="p">,</span><span class="w"> </span><span class="mi">1000</span><span class="p">,</span><span class="w"> </span><span class="mi">2000</span><span class="p">,</span><span class="w"> </span><span class="mi">3000</span><span class="w"> </span><span class="p">};</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setPosition</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">startList</span><span class="p">();</span>
+<span class="w">        </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">listWriter</span><span class="p">.</span><span class="na">writeInt</span><span class="p">(</span><span class="n">data</span><span class="o">[</span><span class="n">tmp_index</span><span class="o">]</span><span class="p">);</span>
+<span class="w">            </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">endList</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">listVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">listVector</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[[1,2,3], [10,20,30], [100,200,300], [1000,2000,3000]]
+</pre></div>
+</div>
+</section>
+</section>
+<section id="slicing">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Slicing</a><a class="headerlink" href="#slicing" title="Link to this heading">¶</a></h2>
+<p>Slicing provides a way of copying a range of rows between two vectors of the same type.</p>
+<section id="slicing-intvector">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Slicing IntVector</a><a class="headerlink" href="#slicing-intvector" title="Link to this heading">¶</a></h3>
+<p>In this example, we copy a portion of the input IntVector to a new IntVector.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.TransferPair</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">vector</span><span class="p">.</span><span class="na">setSafe</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">     </span><span class="p">}</span>
+<span class="w">    </span><span class="n">vector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">TransferPair</span><span class="w"> </span><span class="n">tp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vector</span><span class="p">.</span><span class="na">getTransferPair</span><span class="p">(</span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">tp</span><span class="p">.</span><span class="na">splitAndTransfer</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="w"> </span><span class="n">sliced</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">tp</span><span class="p">.</span><span class="na">getTo</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">sliced</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="n">tp</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">vector</span><span class="p">.</span><span class="na">getTransferPair</span><span class="p">(</span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="c1">// copy 6 elements from index 2</span>
+<span class="w">    </span><span class="n">tp</span><span class="p">.</span><span class="na">splitAndTransfer</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="w"> </span><span class="n">sliced</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">tp</span><span class="p">.</span><span class="na">getTo</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">sliced</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[0, 1, 2, 3, 4]
+[2, 3, 4, 5, 6, 7]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-vectors-arrays">Creating Vectors (arrays)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#slicing">Slicing</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow Java Cookbook</a></li>
+      <li>Next: <a href="schema.html" title="next chapter">Working with Schema</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/data.html b/java/data.html
new file mode 100644
index 0000000..f0b7ce8
--- /dev/null
+++ b/java/data.html
@@ -0,0 +1,514 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Data manipulation &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Avro" href="avro.html" />
+    <link rel="prev" title="Substrait" href="substrait.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="data-manipulation">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Data manipulation</a><a class="headerlink" href="#data-manipulation" title="Link to this heading">¶</a></h1>
+<p>Recipes related to compare, filtering or transforming data.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#data-manipulation" id="id1">Data manipulation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#concatenate-vectorschemaroots" id="id2">Concatenate VectorSchemaRoots</a></p></li>
+<li><p><a class="reference internal" href="#concatenate-value-vectors" id="id3">Concatenate Value Vectors</a></p></li>
+<li><p><a class="reference internal" href="#compare-vectors-for-field-equality" id="id4">Compare Vectors for Field Equality</a></p></li>
+<li><p><a class="reference internal" href="#compare-vectors-equality" id="id5">Compare Vectors Equality</a></p></li>
+<li><p><a class="reference internal" href="#compare-values-on-the-array" id="id6">Compare Values on the Array</a></p></li>
+<li><p><a class="reference internal" href="#search-values-on-the-array" id="id7">Search Values on the Array</a></p>
+<ul>
+<li><p><a class="reference internal" href="#linear-search-o-n" id="id8">Linear Search - O(n)</a></p></li>
+<li><p><a class="reference internal" href="#binary-search-o-log-n" id="id9">Binary Search - O(log(n))</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#sort-values-on-the-array" id="id10">Sort Values on the Array</a></p>
+<ul>
+<li><p><a class="reference internal" href="#in-place-sorter-o-nlog-n" id="id11">In-place Sorter - O(nlog(n))</a></p></li>
+<li><p><a class="reference internal" href="#out-place-sorter-o-nlog-n" id="id12">Out-place Sorter - O(nlog(n))</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="concatenate-vectorschemaroots">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Concatenate VectorSchemaRoots</a><a class="headerlink" href="#concatenate-vectorschemaroots" title="Link to this heading">¶</a></h2>
+<p>In some cases, VectorSchemaRoot needs to be modeled as a container. To accomplish
+this, you can use <code class="docutils literal notranslate"><span class="pre">VectorSchemaRootAppender.append</span></code>. The following code
+creates two roots, then concatenates them together:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.VectorSchemaRootAppender</span><span class="p">;</span>
+
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">column_one</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;column-one&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">column_one</span><span class="p">));</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">rootOne</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">rootTwo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">appenderOne</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">rootOne</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootOne</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">appenderOne</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">100</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appenderOne</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootOne</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">appenderTwo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">appenderTwo</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">34</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appenderTwo</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">75</span><span class="p">);</span>
+<span class="w">    </span><span class="n">rootTwo</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">result</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRootAppender</span><span class="p">.</span><span class="na">append</span><span class="p">(</span><span class="n">result</span><span class="p">,</span><span class="w"> </span><span class="n">rootOne</span><span class="p">,</span><span class="w"> </span><span class="n">rootTwo</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>column-one
+100
+20
+34
+75
+</pre></div>
+</div>
+</section>
+<section id="concatenate-value-vectors">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Concatenate Value Vectors</a><a class="headerlink" href="#concatenate-value-vectors" title="Link to this heading">¶</a></h2>
+<p>In some cases, we need to concatenate two value vectors into one. To accomplish
+this, we can use <a class="reference external" href="https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/util/VectorAppender.java">VectorAppender</a>. This mutates the initial ValueVector.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ValueVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.VectorAppender</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">initialValues</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;initialValues&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">toAppend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;toAppend&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">initialValues</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Initial IntVector: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">initialValues</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="mi">6</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;IntVector to Append: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">toAppend</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorAppender</span><span class="w"> </span><span class="n">appenderUtil</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorAppender</span><span class="p">(</span><span class="n">initialValues</span><span class="p">);</span>
+<span class="w">    </span><span class="n">toAppend</span><span class="p">.</span><span class="na">accept</span><span class="p">(</span><span class="n">appenderUtil</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;IntVector Result: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">initialValues</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Initial IntVector: [1, 2]
+IntVector to Append: [null, 4, null, 6]
+IntVector Result: [1, 2, null, 4, null, 6]
+</pre></div>
+</div>
+</section>
+<section id="compare-vectors-for-field-equality">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Compare Vectors for Field Equality</a><a class="headerlink" href="#compare-vectors-for-field-equality" title="Link to this heading">¶</a></h2>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.compare.TypeEqualsVisitor</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">right</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">    </span><span class="n">right</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">left1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">left2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;int2&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">TypeEqualsVisitor</span><span class="w"> </span><span class="n">visitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">TypeEqualsVisitor</span><span class="p">(</span><span class="n">right</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">equals</span><span class="p">(</span><span class="n">left1</span><span class="p">));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">equals</span><span class="p">(</span><span class="n">left2</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+</section>
+<section id="compare-vectors-equality">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Compare Vectors Equality</a><a class="headerlink" href="#compare-vectors-equality" title="Link to this heading">¶</a></h2>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.compare.VectorEqualsVisitor</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector1</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector2</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">vector3</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;vector1&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector1</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector2</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vector3</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VectorEqualsVisitor</span><span class="w"> </span><span class="n">visitor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorEqualsVisitor</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">vectorEquals</span><span class="p">(</span><span class="n">vector1</span><span class="p">,</span><span class="w"> </span><span class="n">vector2</span><span class="p">));</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">visitor</span><span class="p">.</span><span class="na">vectorEquals</span><span class="p">(</span><span class="n">vector1</span><span class="p">,</span><span class="w"> </span><span class="n">vector3</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+</section>
+<section id="compare-values-on-the-array">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Compare Values on the Array</a><a class="headerlink" href="#compare-values-on-the-array" title="Link to this heading">¶</a></h2>
+<p>Comparing two values at the given indices in the vectors:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">vec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;valueindexcomparator&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;ba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;abc&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vec</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;aa&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">VarCharVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">valueComparator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">vec</span><span class="p">);</span>
+<span class="w">    </span><span class="n">valueComparator</span><span class="p">.</span><span class="na">attachVector</span><span class="p">(</span><span class="n">vec</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">valueComparator</span><span class="p">.</span><span class="na">compare</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="o">&gt;</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">valueComparator</span><span class="p">.</span><span class="na">compare</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>true
+false
+</pre></div>
+</div>
+<p>Consider that if we need our own comparator we could extend VectorValueComparator
+and override compareNotNull method as needed</p>
+</section>
+<section id="search-values-on-the-array">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Search Values on the Array</a><a class="headerlink" href="#search-values-on-the-array" title="Link to this heading">¶</a></h2>
+<section id="linear-search-o-n">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Linear Search - O(n)</a><a class="headerlink" href="#linear-search-o-n" title="Link to this heading">¶</a></h3>
+<p>Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#linearSearch - O(n)</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.search.VectorSearcher</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">linearSearchVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;linearSearchVector&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">linearSearchVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorInt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">linearSearchVector</span><span class="p">);</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSearcher</span><span class="p">.</span><span class="na">linearSearch</span><span class="p">(</span><span class="n">linearSearchVector</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorInt</span><span class="p">,</span><span class="w"> </span><span class="n">linearSearchVector</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>3
+</pre></div>
+</div>
+</section>
+<section id="binary-search-o-log-n">
+<h3><a class="toc-backref" href="#id9" role="doc-backlink">Binary Search - O(log(n))</a><a class="headerlink" href="#binary-search-o-log-n" title="Link to this heading">¶</a></h3>
+<p>Algorithm: org.apache.arrow.algorithm.search.VectorSearcher#binarySearch - O(log(n))</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.search.VectorSearcher</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">binarySearchVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">10</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">binarySearchVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorInt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">binarySearchVector</span><span class="p">);</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSearcher</span><span class="p">.</span><span class="na">binarySearch</span><span class="p">(</span><span class="n">binarySearchVector</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorInt</span><span class="p">,</span><span class="w"> </span><span class="n">binarySearchVector</span><span class="p">,</span><span class="w"> </span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="sort-values-on-the-array">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Sort Values on the Array</a><a class="headerlink" href="#sort-values-on-the-array" title="Link to this heading">¶</a></h2>
+<section id="in-place-sorter-o-nlog-n">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">In-place Sorter - O(nlog(n))</a><a class="headerlink" href="#in-place-sorter-o-nlog-n" title="Link to this heading">¶</a></h3>
+<p>Sorting by manipulating the original vector.
+Algorithm: org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter - O(nlog(n))</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intvectornotsorted&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setNull</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">FixedWidthInPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">sorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FixedWidthInPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="w">    </span><span class="n">sorter</span><span class="p">.</span><span class="na">sortInPlace</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">,</span><span class="w"> </span><span class="n">comparator</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[null, 8, 10]
+</pre></div>
+</div>
+</section>
+<section id="out-place-sorter-o-nlog-n">
+<h3><a class="toc-backref" href="#id12" role="doc-backlink">Out-place Sorter - O(nlog(n))</a><a class="headerlink" href="#out-place-sorter-o-nlog-n" title="Link to this heading">¶</a></h3>
+<p>Sorting by copies vector elements to a new vector in sorted order - O(nlog(n))
+Algorithm: : org.apache.arrow.algorithm.sort.FixedWidthInPlaceVectorSorter.
+FixedWidthOutOfPlaceVectorSorter &amp; VariableWidthOutOfPlaceVectorSor</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.DefaultVectorComparators</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.FixedWidthOutOfPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.OutOfPlaceVectorSorter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.algorithm.sort.VectorValueComparator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">IntVector</span><span class="p">(</span><span class="s">&quot;intvectornotsorted&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">intVectorSorted</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getField</span><span class="p">()</span>
+<span class="w">            </span><span class="p">.</span><span class="na">getFieldType</span><span class="p">().</span><span class="na">createNewSingleVector</span><span class="p">(</span><span class="s">&quot;new-out-of-place-sorter&quot;</span><span class="p">,</span>
+<span class="w">                    </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">setNull</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">    </span><span class="n">OutOfPlaceVectorSorter</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">sorterOutOfPlaceSorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FixedWidthOutOfPlaceVectorSorter</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorValueComparator</span><span class="o">&lt;</span><span class="n">IntVector</span><span class="o">&gt;</span><span class="w"> </span><span class="n">comparatorOutOfPlaceSorter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DefaultVectorComparators</span><span class="p">.</span><span class="na">createDefaultComparator</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">);</span>
+<span class="w">    </span><span class="n">intVectorSorted</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getValueCount</span><span class="p">());</span>
+<span class="w">    </span><span class="n">intVectorSorted</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">.</span><span class="na">getValueCount</span><span class="p">());</span>
+<span class="w">    </span><span class="n">sorterOutOfPlaceSorter</span><span class="p">.</span><span class="na">sortOutOfPlace</span><span class="p">(</span><span class="n">intVectorNotSorted</span><span class="p">,</span><span class="w"> </span><span class="n">intVectorSorted</span><span class="p">,</span><span class="w"> </span><span class="n">comparatorOutOfPlaceSorter</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">intVectorSorted</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[null, 8, 10]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Data manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#concatenate-vectorschemaroots">Concatenate VectorSchemaRoots</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#concatenate-value-vectors">Concatenate Value Vectors</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-vectors-for-field-equality">Compare Vectors for Field Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-vectors-equality">Compare Vectors Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#compare-values-on-the-array">Compare Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#search-values-on-the-array">Search Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#sort-values-on-the-array">Sort Values on the Array</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="substrait.html" title="previous chapter">Substrait</a></li>
+      <li>Next: <a href="avro.html" title="next chapter">Avro</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/data.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/dataset.html b/java/dataset.html
new file mode 100644
index 0000000..d42b4e8
--- /dev/null
+++ b/java/dataset.html
@@ -0,0 +1,678 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Dataset &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Substrait" href="substrait.html" />
+    <link rel="prev" title="Arrow Flight" href="flight.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="dataset">
+<span id="arrow-dataset"></span><h1><a class="toc-backref" href="#id4" role="doc-backlink">Dataset</a><a class="headerlink" href="#dataset" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference external" href="https://arrow.apache.org/docs/dev/java/dataset.html">Arrow Java Dataset</a>: Java implementation of Arrow Datasets library. Implement Dataset Java API by JNI to C++.</p></li>
+</ul>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#dataset" id="id4">Dataset</a></p>
+<ul>
+<li><p><a class="reference internal" href="#constructing-datasets" id="id5">Constructing Datasets</a></p></li>
+<li><p><a class="reference internal" href="#getting-the-schema" id="id6">Getting the Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#during-dataset-construction" id="id7">During Dataset Construction</a></p></li>
+<li><p><a class="reference internal" href="#from-a-dataset" id="id8">From a Dataset</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-parquet-file" id="id9">Query Parquet File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#query-data-content-for-file" id="id10">Query Data Content For File</a></p></li>
+<li><p><a class="reference internal" href="#query-data-content-for-directory" id="id11">Query Data Content For Directory</a></p></li>
+<li><p><a class="reference internal" href="#query-data-content-with-projection" id="id12">Query Data Content with Projection</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-arrow-files" id="id13">Query Arrow Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id1" id="id14">Query Data Content For File</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-orc-file" id="id15">Query ORC File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id2" id="id16">Query Data Content For File</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#query-csv-file" id="id17">Query CSV File</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id3" id="id18">Query Data Content For File</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="constructing-datasets">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Constructing Datasets</a><a class="headerlink" href="#constructing-datasets" title="Link to this heading">¶</a></h2>
+<p>We can construct a dataset with an auto-inferred schema.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.stream.StreamSupport</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">StreamSupport</span><span class="p">.</span><span class="na">stream</span><span class="p">(</span><span class="n">scanner</span><span class="p">.</span><span class="na">scan</span><span class="p">().</span><span class="na">spliterator</span><span class="p">(),</span><span class="w"> </span><span class="kc">false</span><span class="p">).</span><span class="na">count</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>1
+</pre></div>
+</div>
+<p>Let construct our dataset with predefined schema.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.stream.StreamSupport</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">(</span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">inspect</span><span class="p">());</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">StreamSupport</span><span class="p">.</span><span class="na">stream</span><span class="p">(</span><span class="n">scanner</span><span class="p">.</span><span class="na">scan</span><span class="p">().</span><span class="na">spliterator</span><span class="p">(),</span><span class="w"> </span><span class="kc">false</span><span class="p">).</span><span class="na">count</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>1
+</pre></div>
+</div>
+</section>
+<section id="getting-the-schema">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Getting the Schema</a><a class="headerlink" href="#getting-the-schema" title="Link to this heading">¶</a></h2>
+<section id="during-dataset-construction">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">During Dataset Construction</a><a class="headerlink" href="#during-dataset-construction" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">inspect</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;id: Int(32, true), name: Utf8&gt;(metadata: {parquet.avro.schema={&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;User&quot;,&quot;namespace&quot;:&quot;org.apache.arrow.dataset&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;id&quot;,&quot;type&quot;:[&quot;int&quot;,&quot;null&quot;]},{&quot;name&quot;:&quot;name&quot;,&quot;type&quot;:[&quot;string&quot;,&quot;null&quot;]}]}, writer.model.name=avro})
+</pre></div>
+</div>
+</section>
+<section id="from-a-dataset">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">From a Dataset</a><a class="headerlink" href="#from-a-dataset" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">schema</span><span class="p">();</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">schema</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;id: Int(32, true), name: Utf8&gt;(metadata: {parquet.avro.schema={&quot;type&quot;:&quot;record&quot;,&quot;name&quot;:&quot;User&quot;,&quot;namespace&quot;:&quot;org.apache.arrow.dataset&quot;,&quot;fields&quot;:[{&quot;name&quot;:&quot;id&quot;,&quot;type&quot;:[&quot;int&quot;,&quot;null&quot;]},{&quot;name&quot;:&quot;name&quot;,&quot;type&quot;:[&quot;string&quot;,&quot;null&quot;]}]}, writer.model.name=avro})
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-parquet-file">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Query Parquet File</a><a class="headerlink" href="#query-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Let query information for a parquet file.</p>
+<section id="query-data-content-for-file">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#query-data-content-for-file" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>id    name
+1    David
+2    Gladis
+3    Juan
+</pre></div>
+</div>
+<p>Let’s try to read a Parquet file with gzip compression and 3 row groups:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ parquet-tools meta data4_3rg_gzip.parquet
+
+file schema: schema
+age:         OPTIONAL INT64 R:0 D:1
+name:        OPTIONAL BINARY L:STRING R:0 D:1
+row group 1: RC:4 TS:182 OFFSET:4
+row group 2: RC:4 TS:190 OFFSET:420
+row group 3: RC:3 TS:179 OFFSET:838
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data4_3rg_gzip.parquet&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows per batch[&quot;</span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="s">&quot;]: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows per batch[1]: 4
+age    name
+10    Jean
+10    Lu
+10    Kei
+10    Sophia
+Number of rows per batch[2]: 4
+age    name
+10    Mara
+20    Arit
+20    Neil
+20    Jason
+Number of rows per batch[3]: 3
+age    name
+20    John
+20    Peter
+20    Ismael
+Total batch size: 11
+</pre></div>
+</div>
+</section>
+<section id="query-data-content-for-directory">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Query Data Content For Directory</a><a class="headerlink" href="#query-data-content-for-directory" title="Link to this heading">¶</a></h3>
+<p>Consider that we have these files: data1: 3 rows, data2: 3 rows and data3: 250 rows.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">100</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Batch: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, RowCount: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Batch: 1, RowCount: 3
+Batch: 2, RowCount: 3
+Batch: 3, RowCount: 100
+Batch: 4, RowCount: 100
+Batch: 5, RowCount: 50
+Batch: 6, RowCount: 4
+Batch: 7, RowCount: 4
+Batch: 8, RowCount: 3
+</pre></div>
+</div>
+</section>
+<section id="query-data-content-with-projection">
+<h3><a class="toc-backref" href="#id12" role="doc-backlink">Query Data Content with Projection</a><a class="headerlink" href="#query-data-content-with-projection" title="Link to this heading">¶</a></h3>
+<p>In case we need to project only certain columns we could configure ScanOptions with projections needed.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/parquetfiles/data1.parquet&quot;</span><span class="p">;</span>
+<span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="n">projection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="s">&quot;name&quot;</span><span class="p">};</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">,</span><span class="w"> </span><span class="n">Optional</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">projection</span><span class="p">));</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name
+David
+Gladis
+Juan
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-arrow-files">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Query Arrow Files</a><a class="headerlink" href="#query-arrow-files" title="Link to this heading">¶</a></h2>
+<section id="id1">
+<h3><a class="toc-backref" href="#id14" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
+<p>Let’s read an Arrow file with 3 record batches, each with 3 rows.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">ARROW_IPC</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">count</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows per batch[&quot;</span><span class="o">+</span><span class="w"> </span><span class="n">count</span><span class="o">++</span><span class="w"> </span><span class="o">+</span><span class="s">&quot;]: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows per batch[1]: 3
+Number of rows per batch[2]: 3
+Number of rows per batch[3]: 3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-orc-file">
+<h2><a class="toc-backref" href="#id15" role="doc-backlink">Query ORC File</a><a class="headerlink" href="#query-orc-file" title="Link to this heading">¶</a></h2>
+<section id="id2">
+<h3><a class="toc-backref" href="#id16" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h3>
+<p>Let’s read an ORC file with zlib compression 385 stripes, each with 5000 rows.</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ orc-metadata demo-11-zlib.orc | more
+
+{ &quot;name&quot;: &quot;demo-11-zlib.orc&quot;,
+  &quot;type&quot;: &quot;struct&lt;_col0:int,_col1:string,_col2:string,_col3:string,_col4:int,_col5:string,_col6:int,_col7:int,_col8:int&gt;&quot;,
+  &quot;stripe count&quot;: 385,
+  &quot;compression&quot;: &quot;zlib&quot;, &quot;compression block&quot;: 262144,
+  &quot;stripes&quot;: [
+    { &quot;stripe&quot;: 0, &quot;rows&quot;: 5000,
+      &quot;offset&quot;: 3, &quot;length&quot;: 1031,
+      &quot;index&quot;: 266, &quot;data&quot;: 636, &quot;footer&quot;: 129
+    },
+...
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/orc/data1-zlib.orc&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">ORC</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Total batch size: 1920800
+</pre></div>
+</div>
+</section>
+</section>
+<section id="query-csv-file">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Query CSV File</a><a class="headerlink" href="#query-csv-file" title="Link to this heading">¶</a></h2>
+<section id="id3">
+<h3><a class="toc-backref" href="#id18" role="doc-backlink">Query Data Content For File</a><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3>
+<p>Let’s read a CSV file.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+
+<span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/csv/tech_acquisitions.csv&quot;</span><span class="p">;</span>
+<span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span><span class="w"> </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">CSV</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">totalBatchSize</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Total batch size: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">totalBatchSize</span><span class="p">);</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Acquirer    Acquiree    Amount in billions (USD)    Date of acquisition
+NVIDIA    Mellanox    6.9    04/05/2020
+AMD    Xilinx    35.0    27/10/2020
+Salesforce    Slack    27.7    01/12/2020
+Total batch size: 3
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Dataset</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#constructing-datasets">Constructing Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#getting-the-schema">Getting the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-parquet-file">Query Parquet File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-arrow-files">Query Arrow Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-orc-file">Query ORC File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#query-csv-file">Query CSV File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="flight.html" title="previous chapter">Arrow Flight</a></li>
+      <li>Next: <a href="substrait.html" title="next chapter">Substrait</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/dataset.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/flight.html b/java/flight.html
new file mode 100644
index 0000000..14fc737
--- /dev/null
+++ b/java/flight.html
@@ -0,0 +1,683 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Dataset" href="dataset.html" />
+    <link rel="prev" title="Reading and writing data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>This section contains a number of recipes for working with Arrow Flight.
+For more detail about Flight please take a look at <a class="reference internal" href="#arrow-flight-rpc">Arrow Flight RPC</a>.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id1">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-key-value-storage-service-with-arrow-flight" id="id2">Simple Key-Value Storage Service with Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#flight-client-and-server" id="id3">Flight Client and Server</a></p></li>
+<li><p><a class="reference internal" href="#start-flight-server" id="id4">Start Flight Server</a></p></li>
+<li><p><a class="reference internal" href="#connect-to-flight-server" id="id5">Connect to Flight Server</a></p></li>
+<li><p><a class="reference internal" href="#put-data" id="id6">Put Data</a></p></li>
+<li><p><a class="reference internal" href="#get-metadata" id="id7">Get Metadata</a></p></li>
+<li><p><a class="reference internal" href="#get-data" id="id8">Get Data</a></p></li>
+<li><p><a class="reference internal" href="#delete-data" id="id9">Delete data</a></p></li>
+<li><p><a class="reference internal" href="#validate-delete-data" id="id10">Validate Delete Data</a></p></li>
+<li><p><a class="reference internal" href="#stop-flight-server" id="id11">Stop Flight Server</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-key-value-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Simple Key-Value Storage Service with Arrow Flight</a><a class="headerlink" href="#simple-key-value-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>We’ll implement a service that provides a key-value store for data, using Flight to handle uploads/requests
+and data in memory to store the actual data.</p>
+<section id="flight-client-and-server">
+<h3><a class="toc-backref" href="#id3" role="doc-backlink">Flight Client and Server</a><a class="headerlink" href="#flight-client-and-server" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Action</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.AsyncPutListener</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.CallStatus</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Criteria</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightClient</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightDescriptor</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightEndpoint</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightServer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.FlightStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Location</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.NoOpFlightProducer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.PutResult</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Result</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.flight.Ticket</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.util.AutoCloseables</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorLoader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorUnloader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowRecordBatch</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Arrays</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Collections</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Iterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.concurrent.ConcurrentHashMap</span><span class="p">;</span>
+
+<span class="kd">class</span> <span class="nc">Dataset</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">AutoCloseable</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="nf">Dataset</span><span class="p">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="nf">getBatches</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">batches</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">Schema</span><span class="w"> </span><span class="nf">getSchema</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">schema</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">long</span><span class="w"> </span><span class="nf">getRows</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="n">rows</span><span class="p">;</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">close</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">Exception</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AutoCloseables</span><span class="p">.</span><span class="na">close</span><span class="p">(</span><span class="n">batches</span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+<span class="kd">class</span> <span class="nc">CookbookProducer</span><span class="w"> </span><span class="kd">extends</span><span class="w"> </span><span class="n">NoOpFlightProducer</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">AutoCloseable</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">private</span><span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">ConcurrentMap</span><span class="o">&lt;</span><span class="n">FlightDescriptor</span><span class="p">,</span><span class="w"> </span><span class="n">Dataset</span><span class="o">&gt;</span><span class="w"> </span><span class="n">datasets</span><span class="p">;</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="nf">CookbookProducer</span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">allocator</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">location</span><span class="p">;</span>
+<span class="w">        </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ConcurrentHashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">Runnable</span><span class="w"> </span><span class="nf">acceptPut</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">PutResult</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ackStream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">            </span><span class="n">VectorUnloader</span><span class="w"> </span><span class="n">unloader</span><span class="p">;</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">unloader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorUnloader</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">());</span>
+<span class="w">                </span><span class="kd">final</span><span class="w"> </span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unloader</span><span class="p">.</span><span class="na">getRecordBatch</span><span class="p">();</span>
+<span class="w">                </span><span class="n">batches</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">arb</span><span class="p">);</span>
+<span class="w">                </span><span class="n">rows</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">().</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dataset</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">rows</span><span class="p">);</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getDescriptor</span><span class="p">(),</span><span class="w"> </span><span class="n">dataset</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ackStream</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">        </span><span class="p">};</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">getStream</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Ticket</span><span class="w"> </span><span class="n">ticket</span><span class="p">,</span><span class="w"> </span><span class="n">ServerStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">ticket</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dataset</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">throw</span><span class="w"> </span><span class="n">CallStatus</span><span class="p">.</span><span class="na">NOT_FOUND</span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="s">&quot;Unknown descriptor&quot;</span><span class="p">).</span><span class="na">toRuntimeException</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span>
+<span class="w">                 </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">VectorLoader</span><span class="w"> </span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorLoader</span><span class="p">(</span><span class="n">root</span><span class="p">);</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">start</span><span class="p">(</span><span class="n">root</span><span class="p">);</span>
+<span class="w">            </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arrowRecordBatch</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">loader</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">arrowRecordBatch</span><span class="p">);</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">doAction</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">        </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getType</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">case</span><span class="w"> </span><span class="s">&quot;DELETE&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Dataset</span><span class="w"> </span><span class="n">removed</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasets</span><span class="p">.</span><span class="na">remove</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">removed</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">removed</span><span class="p">.</span><span class="na">close</span><span class="p">();</span>
+<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">listener</span><span class="p">.</span><span class="na">onError</span><span class="p">(</span><span class="n">CallStatus</span><span class="p">.</span><span class="na">INTERNAL</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="n">e</span><span class="p">.</span><span class="na">toString</span><span class="p">())</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">toRuntimeException</span><span class="p">());</span>
+<span class="w">                        </span><span class="k">return</span><span class="p">;</span>
+<span class="w">                    </span><span class="p">}</span>
+<span class="w">                    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete completed&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                    </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete not completed. Reason: Key did not exist.&quot;</span>
+<span class="w">                            </span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                    </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="n">FlightInfo</span><span class="w"> </span><span class="nf">getFlightInfo</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">flightEndpoint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightEndpoint</span><span class="p">(</span>
+<span class="w">                </span><span class="k">new</span><span class="w"> </span><span class="n">Ticket</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)),</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">        </span><span class="k">return</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightInfo</span><span class="p">(</span>
+<span class="w">                </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span>
+<span class="w">                </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="w">                </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">flightEndpoint</span><span class="p">),</span>
+<span class="w">                </span><span class="cm">/*bytes=*/</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+<span class="w">                </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getRows</span><span class="p">()</span>
+<span class="w">        </span><span class="p">);</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">listFlights</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Criteria</span><span class="w"> </span><span class="n">criteria</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">datasets</span><span class="p">.</span><span class="na">forEach</span><span class="p">((</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">getFlightInfo</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">));</span><span class="w"> </span><span class="p">});</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+
+<span class="w">    </span><span class="nd">@Override</span>
+<span class="w">    </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">close</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">Exception</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">AutoCloseables</span><span class="p">.</span><span class="na">close</span><span class="p">(</span><span class="n">datasets</span><span class="p">.</span><span class="na">values</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+<span class="n">Location</span><span class="w"> </span><span class="n">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Location</span><span class="p">.</span><span class="na">forGrpcInsecure</span><span class="p">(</span><span class="s">&quot;0.0.0.0&quot;</span><span class="p">,</span><span class="w"> </span><span class="mi">33333</span><span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">()){</span>
+<span class="w">    </span><span class="c1">// Server</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="w"> </span><span class="n">producer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">        </span><span class="kd">final</span><span class="w"> </span><span class="n">FlightServer</span><span class="w"> </span><span class="n">flightServer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightServer</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">,</span><span class="w"> </span><span class="n">producer</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">flightServer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;S1: Server (Location): Listening on port &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightServer</span><span class="p">.</span><span class="na">getPort</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">throw</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RuntimeException</span><span class="p">(</span><span class="n">e</span><span class="p">);</span>
+<span class="w">        </span><span class="p">}</span>
+
+<span class="w">        </span><span class="c1">// Client</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FlightClient</span><span class="w"> </span><span class="n">flightClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C1: Client (Location): Connected to &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="na">getUri</span><span class="p">());</span>
+
+<span class="w">            </span><span class="c1">// Populate data</span>
+<span class="w">            </span><span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">Arrays</span><span class="p">.</span><span class="na">asList</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">)));</span>
+<span class="w">            </span><span class="k">try</span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">                </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Ronald&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Francisco&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">ClientStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">startPut</span><span class="p">(</span>
+<span class="w">                        </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">),</span>
+<span class="w">                        </span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AsyncPutListener</span><span class="p">());</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Manuel&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Felipe&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;JJ&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">                </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">getResult</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C2: Client (Populate Data): Wrote 2 batches with 3 rows each&quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get metadata information</span>
+<span class="w">            </span><span class="n">FlightInfo</span><span class="w"> </span><span class="n">flightInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getInfo</span><span class="p">(</span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">));</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C3: Client (Get Metadata): &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightInfo</span><span class="p">);</span>
+
+<span class="w">            </span><span class="c1">// Get data information</span>
+<span class="w">            </span><span class="k">try</span><span class="p">(</span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getStream</span><span class="p">(</span><span class="n">flightInfo</span><span class="p">.</span><span class="na">getEndpoints</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getTicket</span><span class="p">()))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="kt">int</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootReceived</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C4: Client (Get Stream):&quot;</span><span class="p">);</span>
+<span class="w">                    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                        </span><span class="n">batch</span><span class="o">++</span><span class="p">;</span>
+<span class="w">                        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Client Received batch #&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, Data:&quot;</span><span class="p">);</span>
+<span class="w">                        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootReceived</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">                    </span><span class="p">}</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get all metadata information</span>
+<span class="w">            </span><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfosBefore</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="s">&quot;C5: Client (List Flights Info): &quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="n">flightInfosBefore</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+
+<span class="w">            </span><span class="c1">// Do delete action</span>
+<span class="w">            </span><span class="n">Iterator</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">doAction</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">Action</span><span class="p">(</span><span class="s">&quot;DELETE&quot;</span><span class="p">,</span>
+<span class="w">                    </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">).</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)));</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">next</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C6: Client (Do Delete Action): &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">                        </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">            </span><span class="p">}</span>
+
+<span class="w">            </span><span class="c1">// Get all metadata information (to validate detele action)</span>
+<span class="w">            </span><span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="w">            </span><span class="n">flightInfos</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C7: Client (List Flights Info): After delete - No records&quot;</span><span class="p">);</span>
+
+<span class="w">            </span><span class="c1">// Server shut down</span>
+<span class="w">            </span><span class="n">flightServer</span><span class="p">.</span><span class="na">shutdown</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C8: Server shut down successfully&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>S1: Server (Location): Listening on port 33333
+C1: Client (Location): Connected to grpc+tcp://0.0.0.0:33333
+C2: Client (Populate Data): Wrote 2 batches with 3 rows each
+C3: Client (Get Metadata): FlightInfo{schema=Schema&lt;name: Utf8&gt;, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6, ordered=false}
+C4: Client (Get Stream):
+Client Received batch #1, Data:
+name
+Ronald
+David
+Francisco
+Client Received batch #2, Data:
+name
+Manuel
+Felipe
+JJ
+C5: Client (List Flights Info): FlightInfo{schema=Schema&lt;name: Utf8&gt;, descriptor=profiles, endpoints=[FlightEndpoint{locations=[Location{uri=grpc+tcp://0.0.0.0:33333}], ticket=org.apache.arrow.flight.Ticket@58871b0a, expirationTime=(none)}], bytes=-1, records=6, ordered=false}
+C6: Client (Do Delete Action): Delete completed
+C7: Client (List Flights Info): After delete - No records
+C8: Server shut down successfully
+</pre></div>
+</div>
+<p>Let explain our code in more detail.</p>
+</section>
+<section id="start-flight-server">
+<h3><a class="toc-backref" href="#id4" role="doc-backlink">Start Flight Server</a><a class="headerlink" href="#start-flight-server" title="Link to this heading">¶</a></h3>
+<p>First, we’ll start our server:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">(</span><span class="n">FlightServer</span><span class="w"> </span><span class="n">flightServer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightServer</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">,</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">CookbookProducer</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">)).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">flightServer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;S1: Server (Location): Listening on port &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightServer</span><span class="p">.</span><span class="na">getPort</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>S1:<span class="w"> </span>Server<span class="w"> </span><span class="o">(</span>Location<span class="o">)</span>:<span class="w"> </span>Listening<span class="w"> </span>on<span class="w"> </span>port<span class="w"> </span><span class="m">33333</span>
+</pre></div>
+</div>
+</section>
+<section id="connect-to-flight-server">
+<h3><a class="toc-backref" href="#id5" role="doc-backlink">Connect to Flight Server</a><a class="headerlink" href="#connect-to-flight-server" title="Link to this heading">¶</a></h3>
+<p>We can then create a client and connect to the server:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FlightClient</span><span class="w"> </span><span class="n">flightClient</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">builder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">).</span><span class="na">build</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C1: Client (Location): Connected to &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">location</span><span class="p">.</span><span class="na">getUri</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C1:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Location<span class="o">)</span>:<span class="w"> </span>Connected<span class="w"> </span>to<span class="w"> </span>grpc+tcp://0.0.0.0:33333
+</pre></div>
+</div>
+</section>
+<section id="put-data">
+<h3><a class="toc-backref" href="#id6" role="doc-backlink">Put Data</a><a class="headerlink" href="#put-data" title="Link to this heading">¶</a></h3>
+<p>First, we’ll create and upload a vector schema root, which will get stored in a
+memory by the server.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="n">Runnable</span><span class="w"> </span><span class="nf">acceptPut</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">PutResult</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ackStream</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">List</span><span class="o">&lt;</span><span class="n">ArrowRecordBatch</span><span class="o">&gt;</span><span class="w"> </span><span class="n">batches</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="p">()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="kt">long</span><span class="w"> </span><span class="n">rows</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">        </span><span class="n">VectorUnloader</span><span class="w"> </span><span class="n">unloader</span><span class="p">;</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">unloader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorUnloader</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">());</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arb</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">unloader</span><span class="p">.</span><span class="na">getRecordBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">batches</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">arb</span><span class="p">);</span>
+<span class="w">                </span><span class="n">rows</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">().</span><span class="na">getRowCount</span><span class="p">();</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dataset</span><span class="p">(</span><span class="n">batches</span><span class="p">,</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">rows</span><span class="p">);</span>
+<span class="w">        </span><span class="n">datasets</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">getDescriptor</span><span class="p">(),</span><span class="w"> </span><span class="n">dataset</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ackStream</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">};</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">Arrays</span><span class="p">.</span><span class="na">asList</span><span class="p">(</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">)));</span>
+<span class="k">try</span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">varCharVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Ronald&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Francisco&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">FlightClient</span><span class="p">.</span><span class="na">ClientStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">startPut</span><span class="p">(</span>
+<span class="w">            </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">),</span>
+<span class="w">            </span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AsyncPutListener</span><span class="p">());</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Manuel&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Felipe&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">varCharVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;JJ&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">getResult</span><span class="p">();</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C2: Client (Populate Data): Wrote 2 batches with 3 rows each&quot;</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C2:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Populate<span class="w"> </span>Data<span class="o">)</span>:<span class="w"> </span>Wrote<span class="w"> </span><span class="m">2</span><span class="w"> </span>batches<span class="w"> </span>with<span class="w"> </span><span class="m">3</span><span class="w"> </span>rows<span class="w"> </span>each
+</pre></div>
+</div>
+</section>
+<section id="get-metadata">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">Get Metadata</a><a class="headerlink" href="#get-metadata" title="Link to this heading">¶</a></h3>
+<p>Once we do so, we can retrieve the metadata for that dataset.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="n">FlightInfo</span><span class="w"> </span><span class="nf">getFlightInfo</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">descriptor</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightEndpoint</span><span class="w"> </span><span class="n">flightEndpoint</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightEndpoint</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">Ticket</span><span class="p">(</span><span class="n">descriptor</span><span class="p">.</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)),</span><span class="w"> </span><span class="n">location</span><span class="p">);</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FlightInfo</span><span class="p">(</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">descriptor</span><span class="p">,</span>
+<span class="w">            </span><span class="n">Collections</span><span class="p">.</span><span class="na">singletonList</span><span class="p">(</span><span class="n">flightEndpoint</span><span class="p">),</span>
+<span class="w">            </span><span class="cm">/*bytes=*/</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span>
+<span class="w">            </span><span class="n">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">descriptor</span><span class="p">).</span><span class="na">getRows</span><span class="p">()</span>
+<span class="w">    </span><span class="p">);</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">FlightInfo</span><span class="w"> </span><span class="n">flightInfo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getInfo</span><span class="p">(</span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">));</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C3: Client (Get Metadata): &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">flightInfo</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C3:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Get<span class="w"> </span>Metadata<span class="o">)</span>:<span class="w"> </span>FlightInfo<span class="o">{</span><span class="nv">schema</span><span class="o">=</span>Schema&lt;name:<span class="w"> </span>Utf8&gt;,<span class="w"> </span><span class="nv">descriptor</span><span class="o">=</span>profiles,<span class="w"> </span><span class="nv">endpoints</span><span class="o">=[</span>FlightEndpoint<span class="o">{</span><span class="nv">locations</span><span class="o">=[</span>Location<span class="o">{</span><span class="nv">uri</span><span class="o">=</span>grpc+tcp://0.0.0.0:33333<span class="o">}]</span>,<span class="w"> </span><span class="nv">ticket</span><span class="o">=</span>org.apache.arrow.flight.Ticket@58871b0a,<span class="w"> </span><span class="nv">expirationTime</span><span class="o">=(</span>none<span class="o">)}]</span>,<span class="w"> </span><span class="nv">bytes</span><span class="o">=</span>-1,<span class="w"> </span><span class="nv">records</span><span class="o">=</span><span class="m">6</span><span class="o">}</span>
+</pre></div>
+</div>
+</section>
+<section id="get-data">
+<h3><a class="toc-backref" href="#id8" role="doc-backlink">Get Data</a><a class="headerlink" href="#get-data" title="Link to this heading">¶</a></h3>
+<p>And get the data back:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">getStream</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Ticket</span><span class="w"> </span><span class="n">ticket</span><span class="p">,</span><span class="w"> </span><span class="n">ServerStreamListener</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">ticket</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">);</span>
+<span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">dataset</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">throw</span><span class="w"> </span><span class="n">CallStatus</span><span class="p">.</span><span class="na">NOT_FOUND</span><span class="p">.</span><span class="na">withDescription</span><span class="p">(</span><span class="s">&quot;Unknown descriptor&quot;</span><span class="p">).</span><span class="na">toRuntimeException</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span>
+<span class="w">                </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getSchema</span><span class="p">(),</span><span class="w"> </span><span class="n">allocator</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">start</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">);</span>
+<span class="w">        </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowRecordBatch</span><span class="w"> </span><span class="n">arrowRecordBatch</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">datasets</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">).</span><span class="na">getBatches</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">VectorLoader</span><span class="w"> </span><span class="n">loader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VectorLoader</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">);</span>
+<span class="w">            </span><span class="n">loader</span><span class="p">.</span><span class="na">load</span><span class="p">(</span><span class="n">arrowRecordBatch</span><span class="p">.</span><span class="na">cloneWithTransfer</span><span class="p">(</span><span class="n">allocator</span><span class="p">));</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">putNext</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listener</span><span class="p">.</span><span class="na">completed</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="k">try</span><span class="p">(</span><span class="n">FlightStream</span><span class="w"> </span><span class="n">flightStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">getStream</span><span class="p">(</span><span class="n">flightInfo</span><span class="p">.</span><span class="na">getEndpoints</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getTicket</span><span class="p">()))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootReceived</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightStream</span><span class="p">.</span><span class="na">getRoot</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C4: Client (Get Stream):&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">flightStream</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">batch</span><span class="o">++</span><span class="p">;</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Client Received batch #&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">batch</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;, Data:&quot;</span><span class="p">);</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootReceived</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C4:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Get<span class="w"> </span>Stream<span class="o">)</span>:
+Client<span class="w"> </span>Received<span class="w"> </span>batch<span class="w"> </span><span class="c1">#1, Data:</span>
+name
+Ronald
+David
+Francisco
+Client<span class="w"> </span>Received<span class="w"> </span>batch<span class="w"> </span><span class="c1">#2, Data:</span>
+name
+Manuel
+Felipe
+JJ
+</pre></div>
+</div>
+</section>
+<section id="delete-data">
+<h3><a class="toc-backref" href="#id9" role="doc-backlink">Delete data</a><a class="headerlink" href="#delete-data" title="Link to this heading">¶</a></h3>
+<p>Then, we’ll delete the dataset:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">doAction</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Action</span><span class="w"> </span><span class="n">action</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">FlightDescriptor</span><span class="w"> </span><span class="n">flightDescriptor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="k">switch</span><span class="w"> </span><span class="p">(</span><span class="n">action</span><span class="p">.</span><span class="na">getType</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">case</span><span class="w"> </span><span class="s">&quot;DELETE&quot;</span><span class="p">:</span>
+<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">datasets</span><span class="p">.</span><span class="na">remove</span><span class="p">(</span><span class="n">flightDescriptor</span><span class="p">)</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="kc">null</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete completed&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Result</span><span class="p">(</span><span class="s">&quot;Delete not completed. Reason: Key did not exist.&quot;</span>
+<span class="w">                        </span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">                </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">result</span><span class="p">);</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">            </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Iterator</span><span class="o">&lt;</span><span class="n">Result</span><span class="o">&gt;</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">doAction</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">Action</span><span class="p">(</span><span class="s">&quot;DELETE&quot;</span><span class="p">,</span>
+<span class="w">        </span><span class="n">FlightDescriptor</span><span class="p">.</span><span class="na">path</span><span class="p">(</span><span class="s">&quot;profiles&quot;</span><span class="p">).</span><span class="na">getPath</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">)));</span>
+<span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Result</span><span class="w"> </span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">deleteActionResult</span><span class="p">.</span><span class="na">next</span><span class="p">();</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C6: Client (Do Delete Action): &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">String</span><span class="p">(</span><span class="n">result</span><span class="p">.</span><span class="na">getBody</span><span class="p">(),</span><span class="w"> </span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C6:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>Do<span class="w"> </span>Delete<span class="w"> </span>Action<span class="o">)</span>:<span class="w"> </span>Delete<span class="w"> </span>completed
+</pre></div>
+</div>
+</section>
+<section id="validate-delete-data">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Validate Delete Data</a><a class="headerlink" href="#validate-delete-data" title="Link to this heading">¶</a></h3>
+<p>And confirm that it’s been deleted:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">listFlights</span><span class="p">(</span><span class="n">CallContext</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">Criteria</span><span class="w"> </span><span class="n">criteria</span><span class="p">,</span><span class="w"> </span><span class="n">StreamListener</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">listener</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">datasets</span><span class="p">.</span><span class="na">forEach</span><span class="p">((</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">listener</span><span class="p">.</span><span class="na">onNext</span><span class="p">(</span><span class="n">getFlightInfo</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">));</span><span class="w"> </span><span class="p">});</span>
+<span class="w">    </span><span class="n">listener</span><span class="p">.</span><span class="na">onCompleted</span><span class="p">();</span>
+<span class="p">}</span>
+
+<span class="c1">// Client</span>
+<span class="n">Iterable</span><span class="o">&lt;</span><span class="n">FlightInfo</span><span class="o">&gt;</span><span class="w"> </span><span class="n">flightInfos</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">flightClient</span><span class="p">.</span><span class="na">listFlights</span><span class="p">(</span><span class="n">Criteria</span><span class="p">.</span><span class="na">ALL</span><span class="p">);</span>
+<span class="n">flightInfos</span><span class="p">.</span><span class="na">forEach</span><span class="p">(</span><span class="n">t</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">t</span><span class="p">));</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C7: Client (List Flights Info): After delete - No records&quot;</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C7:<span class="w"> </span>Client<span class="w"> </span><span class="o">(</span>List<span class="w"> </span>Flights<span class="w"> </span>Info<span class="o">)</span>:<span class="w"> </span>After<span class="w"> </span>delete<span class="w"> </span>-<span class="w"> </span>No<span class="w"> </span>records
+</pre></div>
+</div>
+</section>
+<section id="stop-flight-server">
+<h3><a class="toc-backref" href="#id11" role="doc-backlink">Stop Flight Server</a><a class="headerlink" href="#stop-flight-server" title="Link to this heading">¶</a></h3>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="c1">// Server</span>
+<span class="n">flightServer</span><span class="p">.</span><span class="na">shutdown</span><span class="p">();</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;C8: Server shut down successfully&quot;</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>C8:<span class="w"> </span>Server<span class="w"> </span>shut<span class="w"> </span>down<span class="w"> </span>successfully
+</pre></div>
+</div>
+<p><span class="target" id="arrow-flight-rpc">Arrow Flight RPC</span>: <a class="reference external" href="https://arrow.apache.org/docs/format/Flight.html">https://arrow.apache.org/docs/format/Flight.html</a></p>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-key-value-storage-service-with-arrow-flight">Simple Key-Value Storage Service with Arrow Flight</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="io.html" title="previous chapter">Reading and writing data</a></li>
+      <li>Next: <a href="dataset.html" title="next chapter">Dataset</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/genindex.html b/java/genindex.html
new file mode 100644
index 0000000..b8e2eec
--- /dev/null
+++ b/java/genindex.html
@@ -0,0 +1,150 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/index.html b/java/index.html
new file mode 100644
index 0000000..0cf1d81
--- /dev/null
+++ b/java/index.html
@@ -0,0 +1,225 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow Java Cookbook &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-java-cookbook">
+<h1>Apache Arrow Java Cookbook<a class="headerlink" href="#apache-arrow-java-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate how to solve many common tasks that users might need to perform when working with Arrow data. The examples in this cookbook will also serve as robust and well performing solutions to those tasks.</p>
+<p>To get started with Apache Arrow in Java, see the
+<a class="reference external" href="https://arrow.apache.org/docs/java/install.html">Installation Instructions</a>.</p>
+<p>This cookbook is tested with Apache Arrow 14.0.0.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-vectors-arrays">Creating Vectors (arrays)</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#slicing">Slicing</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-fields">Creating Fields</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-the-schema">Creating the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#adding-metadata-to-fields-and-schemas">Adding Metadata to Fields and Schemas</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#creating-vectorschemaroot">Creating VectorSchemaRoot</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing">Writing</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading">Reading</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-key-value-storage-service-with-arrow-flight">Simple Key-Value Storage Service with Arrow Flight</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#constructing-datasets">Constructing Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#getting-the-schema">Getting the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-parquet-file">Query Parquet File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-arrow-files">Query Arrow Files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-orc-file">Query ORC File</a></li>
+<li class="toctree-l2"><a class="reference internal" href="dataset.html#query-csv-file">Query CSV File</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="substrait.html#querying-datasets">Querying Datasets</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="data.html#concatenate-vectorschemaroots">Concatenate VectorSchemaRoots</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#concatenate-value-vectors">Concatenate Value Vectors</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-vectors-for-field-equality">Compare Vectors for Field Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-vectors-equality">Compare Vectors Equality</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#compare-values-on-the-array">Compare Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#search-values-on-the-array">Search Values on the Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#sort-values-on-the-array">Sort Values on the Array</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="avro.html#avro-to-arrow">Avro to Arrow</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#resultset-to-vectorschemaroot-conversion">ResultSet to VectorSchemaRoot Conversion</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-array-subtypes">Configuring Array subtypes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-batch-size">Configuring batch size</a></li>
+<li class="toctree-l2"><a class="reference internal" href="jdbc.html#configuring-numeric-decimal-precision-and-scale">Configuring numeric (decimal) precision and scale</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/io.html b/java/io.html
new file mode 100644
index 0000000..0f633d6
--- /dev/null
+++ b/java/io.html
@@ -0,0 +1,735 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and writing data &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Working with Schema" href="schema.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-data">
+<span id="arrow-io"></span><h1><a class="toc-backref" href="#id5" role="doc-backlink">Reading and writing data</a><a class="headerlink" href="#reading-and-writing-data" title="Link to this heading">¶</a></h1>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/java/ipc.html">Arrow IPC format</a> defines two types of binary formats
+for serializing Arrow data: the streaming format and the file format (or random access format). Such files can
+be directly memory-mapped when read.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-data" id="id5">Reading and writing data</a></p>
+<ul>
+<li><p><a class="reference internal" href="#writing" id="id6">Writing</a></p>
+<ul>
+<li><p><a class="reference internal" href="#writing-random-access-files" id="id7">Writing Random Access Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#write-out-to-file" id="id8">Write - Out to File</a></p></li>
+<li><p><a class="reference internal" href="#write-out-to-buffer" id="id9">Write - Out to Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#writing-streaming-format" id="id10">Writing Streaming Format</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id1" id="id11">Write - Out to File</a></p></li>
+<li><p><a class="reference internal" href="#id2" id="id12">Write - Out to Buffer</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading" id="id13">Reading</a></p>
+<ul>
+<li><p><a class="reference internal" href="#reading-random-access-files" id="id14">Reading Random Access Files</a></p>
+<ul>
+<li><p><a class="reference internal" href="#read-from-file" id="id15">Read - From File</a></p></li>
+<li><p><a class="reference internal" href="#read-from-buffer" id="id16">Read - From Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading-streaming-format" id="id17">Reading Streaming Format</a></p>
+<ul>
+<li><p><a class="reference internal" href="#id3" id="id18">Read - From File</a></p></li>
+<li><p><a class="reference internal" href="#id4" id="id19">Read - From Buffer</a></p></li>
+</ul>
+</li>
+<li><p><a class="reference internal" href="#reading-parquet-file" id="id20">Reading Parquet File</a></p></li>
+<li><p><a class="reference internal" href="#handling-data-with-dictionaries" id="id21">Handling Data with Dictionaries</a></p></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="writing">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Writing</a><a class="headerlink" href="#writing" title="Link to this heading">¶</a></h2>
+<p>Both writing file and streaming formats use the same API.</p>
+<section id="writing-random-access-files">
+<h3><a class="toc-backref" href="#id7" role="doc-backlink">Writing Random Access Files</a><a class="headerlink" href="#writing-random-access-files" title="Link to this heading">¶</a></h3>
+<section id="write-out-to-file">
+<h4><a class="toc-backref" href="#id8" role="doc-backlink">Write - Out to File</a><a class="headerlink" href="#write-out-to-file" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;randon_access_to_file.arrow&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">        </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">end</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches written: 1. Number of rows written: 3
+</pre></div>
+</div>
+</section>
+<section id="write-out-to-buffer">
+<h4><a class="toc-backref" href="#id9" role="doc-backlink">Write - Out to Buffer</a><a class="headerlink" href="#write-out-to-buffer" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.channels.Channels</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">ByteArrayOutputStream</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayOutputStream</span><span class="p">();</span>
+<span class="w">             </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">Channels</span><span class="p">.</span><span class="na">newChannel</span><span class="p">(</span><span class="n">out</span><span class="p">))</span>
+<span class="w">        </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span>
+<span class="w">                    </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches written: 1. Number of rows written: 3
+</pre></div>
+</div>
+</section>
+</section>
+<section id="writing-streaming-format">
+<h3><a class="toc-backref" href="#id10" role="doc-backlink">Writing Streaming Format</a><a class="headerlink" href="#writing-streaming-format" title="Link to this heading">¶</a></h3>
+<section id="id1">
+<h4><a class="toc-backref" href="#id11" role="doc-backlink">Write - Out to File</a><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;streaming_to_file.arrow&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowStreamWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows written: 3
+</pre></div>
+</div>
+</section>
+<section id="id2">
+<h4><a class="toc-backref" href="#id12" role="doc-backlink">Write - Out to Buffer</a><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.channels.Channels</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">));</span>
+<span class="w">    </span><span class="k">try</span><span class="p">(</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">    </span><span class="p">){</span>
+<span class="w">        </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">        </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">        </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">            </span><span class="n">ByteArrayOutputStream</span><span class="w"> </span><span class="n">out</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayOutputStream</span><span class="p">();</span>
+<span class="w">            </span><span class="n">ArrowStreamWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">Channels</span><span class="p">.</span><span class="na">newChannel</span><span class="p">(</span><span class="n">out</span><span class="p">))</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">            </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">            </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Number of rows written: 3
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+<section id="reading">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Reading</a><a class="headerlink" href="#reading" title="Link to this heading">¶</a></h2>
+<p>Reading the random access format and streaming format both offer the same API,
+with the difference that random access files also offer access to any record batch by index.</p>
+<section id="reading-random-access-files">
+<h3><a class="toc-backref" href="#id14" role="doc-backlink">Reading Random Access Files</a><a class="headerlink" href="#reading-random-access-files" title="Link to this heading">¶</a></h3>
+<section id="read-from-file">
+<h4><a class="toc-backref" href="#id15" role="doc-backlink">Read - From File</a><a class="headerlink" href="#read-from-file" title="Link to this heading">¶</a></h4>
+<p>We are providing a path with auto generated arrow files for testing purposes, change that at your convenience.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="n">fileInputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">(),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">){</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches in file: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">());</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches in file: 3
+name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+<section id="read-from-buffer">
+<h4><a class="toc-backref" href="#id16" role="doc-backlink">Read - From Buffer</a><a class="headerlink" href="#read-from-buffer" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.SeekableReadChannel</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.util.ByteArrayReadableSeekableByteChannel</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Files</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Path</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Paths</span><span class="p">;</span>
+
+<span class="n">Path</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Paths</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/random_access.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">SeekableReadChannel</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayReadableSeekableByteChannel</span><span class="p">(</span>
+<span class="w">                                        </span><span class="n">Files</span><span class="p">.</span><span class="na">readAllBytes</span><span class="p">(</span><span class="n">path</span><span class="p">))),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches in file: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">());</span>
+<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Record batches in file: 3
+name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+</section>
+<section id="reading-streaming-format">
+<h3><a class="toc-backref" href="#id17" role="doc-backlink">Reading Streaming Format</a><a class="headerlink" href="#reading-streaming-format" title="Link to this heading">¶</a></h3>
+<section id="id3">
+<h4><a class="toc-backref" href="#id18" role="doc-backlink">Read - From File</a><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+
+<span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/streaming.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStreamForStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ArrowStreamReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamReader</span><span class="p">(</span><span class="n">fileInputStreamForStream</span><span class="p">,</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRootRecover</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">vectorSchemaRootRecover</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+<section id="id4">
+<h4><a class="toc-backref" href="#id19" role="doc-backlink">Read - From Buffer</a><a class="headerlink" href="#id4" title="Link to this heading">¶</a></h4>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowStreamReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.ByteArrayInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Files</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Path</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.file.Paths</span><span class="p">;</span>
+
+<span class="n">Path</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Paths</span><span class="p">.</span><span class="na">get</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/arrowfiles/streaming.arrow&quot;</span><span class="p">);</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">ArrowStreamReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowStreamReader</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ByteArrayInputStream</span><span class="p">(</span>
+<span class="w">                                    </span><span class="n">Files</span><span class="p">.</span><span class="na">readAllBytes</span><span class="p">(</span><span class="n">path</span><span class="p">)),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="k">while</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">()){</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age
+David    10
+Gladis    20
+Juan    30
+name    age
+Nidia    15
+Alexa    20
+Mara    15
+name    age
+Raul    34
+Jhon    29
+Thomy    33
+</pre></div>
+</div>
+</section>
+</section>
+<section id="reading-parquet-file">
+<h3><a class="toc-backref" href="#id20" role="doc-backlink">Reading Parquet File</a><a class="headerlink" href="#reading-parquet-file" title="Link to this heading">¶</a></h3>
+<p>Please check <a class="reference internal" href="dataset.html"><span class="doc">Dataset</span></a></p>
+</section>
+<section id="handling-data-with-dictionaries">
+<h3><a class="toc-backref" href="#id21" role="doc-backlink">Handling Data with Dictionaries</a><a class="headerlink" href="#handling-data-with-dictionaries" title="Link to this heading">¶</a></h3>
+<p>Reading and writing dictionary-encoded data requires separately tracking the dictionaries.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.FieldVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ValueVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.Dictionary</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryEncoder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.dictionary.DictionaryProvider</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowFileWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.message.ArrowBlock</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.DictionaryEncoding</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.File</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileInputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileNotFoundException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileOutputStream</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.charset.StandardCharsets</span><span class="p">;</span>
+
+<span class="n">DictionaryEncoding</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryEncoding</span><span class="p">(</span>
+<span class="w">        </span><span class="cm">/*id=*/</span><span class="mi">666L</span><span class="p">,</span><span class="w"> </span><span class="cm">/*ordered=*/</span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="cm">/*indexType=*/</span>
+<span class="w">        </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)</span>
+<span class="p">);</span>
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">countries</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span><span class="s">&quot;country-dict&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">root</span><span class="p">);</span>
+<span class="w">     </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">VarCharVector</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">,</span>
+<span class="w">             </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="n">Types</span><span class="p">.</span><span class="na">MinorType</span><span class="p">.</span><span class="na">VARCHAR</span><span class="p">.</span><span class="na">getType</span><span class="p">(),</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="p">),</span>
+<span class="w">             </span><span class="n">root</span><span class="p">)</span>
+<span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Cuba&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Grecia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Tailandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Yemen&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Zambia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">countries</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Dictionary</span><span class="p">(</span><span class="n">countries</span><span class="p">,</span><span class="w"> </span><span class="n">dictionaryEncoding</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Andorra&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Guinea&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Islandia&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Malta&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Uganda&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">(</span><span class="n">StandardCharsets</span><span class="p">.</span><span class="na">UTF_8</span><span class="p">));</span>
+<span class="w">    </span><span class="n">appUserCountriesUnencoded</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Unencoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUserCountriesUnencoded</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">File</span><span class="w"> </span><span class="n">file</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">File</span><span class="p">(</span><span class="s">&quot;random_access_file_with_dictionary.arrow&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">DictionaryProvider</span><span class="p">.</span><span class="na">MapDictionaryProvider</span><span class="w"> </span><span class="n">provider</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DictionaryProvider</span><span class="p">.</span><span class="na">MapDictionaryProvider</span><span class="p">();</span>
+<span class="w">    </span><span class="n">provider</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">countriesDictionary</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncoded</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">FieldVector</span><span class="p">)</span><span class="w"> </span><span class="n">DictionaryEncoder</span>
+<span class="w">            </span><span class="p">.</span><span class="na">encode</span><span class="p">(</span><span class="n">appUserCountriesUnencoded</span><span class="p">,</span><span class="w"> </span><span class="n">countriesDictionary</span><span class="p">);</span>
+<span class="w">         </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">);</span>
+<span class="w">         </span><span class="n">FileOutputStream</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowFileWriter</span><span class="w"> </span><span class="n">writer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileWriter</span><span class="p">(</span><span class="n">vectorSchemaRoot</span><span class="p">,</span><span class="w"> </span><span class="n">provider</span><span class="p">,</span><span class="w"> </span><span class="n">fileOutputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">())</span>
+<span class="w">    </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">);</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded ID: &quot;</span><span class="w"> </span><span class="o">+</span><span class="n">appUseCountryDictionaryEncoded</span><span class="p">.</span><span class="na">getField</span><span class="p">().</span><span class="na">getDictionary</span><span class="p">().</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">start</span><span class="p">();</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">writeBatch</span><span class="p">();</span>
+<span class="w">        </span><span class="n">writer</span><span class="p">.</span><span class="na">end</span><span class="p">();</span>
+<span class="w">        </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Record batches written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">writer</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">().</span><span class="na">size</span><span class="p">()</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;. Number of rows written: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">vectorSchemaRoot</span><span class="p">.</span><span class="na">getRowCount</span><span class="p">());</span>
+<span class="w">        </span><span class="k">try</span><span class="p">(</span>
+<span class="w">            </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">rootAllocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">            </span><span class="n">FileInputStream</span><span class="w"> </span><span class="n">fileInputStream</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileInputStream</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
+<span class="w">            </span><span class="n">ArrowFileReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowFileReader</span><span class="p">(</span><span class="n">fileInputStream</span><span class="p">.</span><span class="na">getChannel</span><span class="p">(),</span><span class="w"> </span><span class="n">rootAllocator</span><span class="p">)</span>
+<span class="w">        </span><span class="p">){</span>
+<span class="w">            </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowBlock</span><span class="w"> </span><span class="n">arrowBlock</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getRecordBlocks</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">reader</span><span class="p">.</span><span class="na">loadRecordBatch</span><span class="p">(</span><span class="n">arrowBlock</span><span class="p">);</span>
+<span class="w">                </span><span class="n">FieldVector</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;app-use-country-dict&quot;</span><span class="p">);</span>
+<span class="w">                </span><span class="n">DictionaryEncoding</span><span class="w"> </span><span class="n">dictionaryEncodingRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">.</span><span class="na">getField</span><span class="p">().</span><span class="na">getDictionary</span><span class="p">();</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded ID recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">dictionaryEncodingRead</span><span class="p">.</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">                </span><span class="n">Dictionary</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">reader</span><span class="p">.</span><span class="na">getDictionaryVectors</span><span class="p">().</span><span class="na">get</span><span class="p">(</span><span class="n">dictionaryEncodingRead</span><span class="p">.</span><span class="na">getId</span><span class="p">());</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary-encoded data recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">);</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Dictionary recovered: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="p">);</span>
+<span class="w">                </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ValueVector</span><span class="w"> </span><span class="n">readVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DictionaryEncoder</span><span class="p">.</span><span class="na">decode</span><span class="p">(</span><span class="n">appUseCountryDictionaryEncodedRead</span><span class="p">,</span><span class="w"> </span><span class="n">appUseCountryDictionaryRead</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="s">&quot;Decoded data: &quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">readVector</span><span class="p">);</span>
+<span class="w">                </span><span class="p">}</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">FileNotFoundException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Dictionary: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Unencoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+Dictionary-encoded data: [0, 3, 4, 5, 7]
+Dictionary-encoded ID: 666
+Record batches written: 1. Number of rows written: 5
+Dictionary-encoded ID recovered: 666
+Dictionary-encoded data recovered: [0, 3, 4, 5, 7]
+Dictionary recovered: Dictionary DictionaryEncoding[id=666,ordered=false,indexType=Int(8, true)] [Andorra, Cuba, Grecia, Guinea, Islandia, Malta, Tailandia, Uganda, Yemen, Zambia]
+Decoded data: [Andorra, Guinea, Islandia, Malta, Uganda]
+</pre></div>
+</div>
+</section>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and writing data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#writing">Writing</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading">Reading</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="schema.html" title="previous chapter">Working with Schema</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/io.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/jdbc.html b/java/jdbc.html
new file mode 100644
index 0000000..117a421
--- /dev/null
+++ b/java/jdbc.html
@@ -0,0 +1,441 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow JDBC Adapter &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Avro" href="avro.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-jdbc-adapter">
+<span id="arrow-jdbc"></span><h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow JDBC Adapter</a><a class="headerlink" href="#arrow-jdbc-adapter" title="Link to this heading">¶</a></h1>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/java/jdbc.html">Arrow Java JDBC module</a>
+converts JDBC ResultSets into Arrow VectorSchemaRoots.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-jdbc-adapter" id="id1">Arrow JDBC Adapter</a></p>
+<ul>
+<li><p><a class="reference internal" href="#resultset-to-vectorschemaroot-conversion" id="id2">ResultSet to VectorSchemaRoot Conversion</a></p></li>
+<li><p><a class="reference internal" href="#configuring-array-subtypes" id="id3">Configuring Array subtypes</a></p></li>
+<li><p><a class="reference internal" href="#configuring-batch-size" id="id4">Configuring batch size</a></p></li>
+<li><p><a class="reference internal" href="#configuring-numeric-decimal-precision-and-scale" id="id5">Configuring numeric (decimal) precision and scale</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="resultset-to-vectorschemaroot-conversion">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">ResultSet to VectorSchemaRoot Conversion</a><a class="headerlink" href="#resultset-to-vectorschemaroot-conversion" title="Link to this heading">¶</a></h2>
+<p>The main class to help us to convert ResultSet to VectorSchemaRoot is
+<a class="reference external" href="https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrow.html">JdbcToArrow</a></p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5
+101    true    1000000000300
+102    true    100000000030
+103    true    10000000003
+</pre></div>
+</div>
+</section>
+<section id="configuring-array-subtypes">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Configuring Array subtypes</a><a class="headerlink" href="#configuring-array-subtypes" title="Link to this heading">¶</a></h2>
+<p>JdbcToArrow accepts configuration through <a class="reference external" href="https://arrow.apache.org/docs/java/reference/org/apache/arrow/adapter/jdbc/JdbcToArrowConfig.html">JdbcToArrowConfig</a>.
+For example, the type of the elements of array columns can be specified by
+<code class="docutils literal notranslate"><span class="pre">setArraySubTypeByColumnNameMap</span></code>.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300    some char text      [1,2,3]
+102    true    100000000030    some char text      [1,2]
+103    true    10000000003    some char text      [1]
+</pre></div>
+</div>
+</section>
+<section id="configuring-batch-size">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Configuring batch size</a><a class="headerlink" href="#configuring-batch-size" title="Link to this heading">¶</a></h2>
+<p>By default, the adapter will read up to 1024 rows in a batch. This
+can be customized via <code class="docutils literal notranslate"><span class="pre">setTargetBatchSize</span></code>.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setTargetBatchSize</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300    some char text      [1,2,3]
+102    true    100000000030    some char text      [1,2]
+INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+103    true    10000000003    some char text      [1]
+</pre></div>
+</div>
+</section>
+<section id="configuring-numeric-decimal-precision-and-scale">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Configuring numeric (decimal) precision and scale</a><a class="headerlink" href="#configuring-numeric-decimal-precision-and-scale" title="Link to this heading">¶</a></h2>
+<p>By default, the scale of any decimal values must exactly match the defined
+scale of the Arrow type of the column, or else an UnsupportedOperationException
+will be thrown with a message like <code class="docutils literal notranslate"><span class="pre">BigDecimal</span> <span class="pre">scale</span> <span class="pre">must</span> <span class="pre">equal</span> <span class="pre">that</span> <span class="pre">in</span> <span class="pre">the</span> <span class="pre">Arrow</span>
+<span class="pre">vector</span></code>.</p>
+<p>This can happen because Arrow infers the type from the ResultSet metadata, which
+is not accurate for all database drivers. The JDBC adapter lets you avoid this
+by either overriding the decimal scale, or by providing a RoundingMode via
+<code class="docutils literal notranslate"><span class="pre">setBigDecimalRoundingMode</span></code> to convert values to the expected scale.</p>
+<p>In this example, we have a BigInt column. By default, the inferred scale
+is 0. We override the scale to 7 and then set a RoundingMode to convert
+values to the given scale.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.ArrowVectorIterator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcFieldInfo</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrow</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfig</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowConfigBuilder</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.adapter.jdbc.JdbcToArrowUtils</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.ibatis.jdbc.ScriptRunner</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.BufferedReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.FileReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.io.IOException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.math.RoundingMode</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Connection</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.DriverManager</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.ResultSet</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.SQLException</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.sql.Types</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+
+<span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">     </span><span class="n">Connection</span><span class="w"> </span><span class="n">connection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">DriverManager</span><span class="p">.</span><span class="na">getConnection</span><span class="p">(</span>
+<span class="w">             </span><span class="s">&quot;jdbc:h2:mem:h2-jdbc-adapter&quot;</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">ScriptRunner</span><span class="w"> </span><span class="n">runnerDDLDML</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScriptRunner</span><span class="p">(</span><span class="n">connection</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">setLogWriter</span><span class="p">(</span><span class="kc">null</span><span class="p">);</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-ddl.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">runnerDDLDML</span><span class="p">.</span><span class="na">runScript</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">BufferedReader</span><span class="p">(</span>
+<span class="w">            </span><span class="k">new</span><span class="w"> </span><span class="n">FileReader</span><span class="p">(</span><span class="s">&quot;./thirdpartydeps/jdbc/h2-dml.sql&quot;</span><span class="p">)));</span>
+<span class="w">    </span><span class="n">JdbcToArrowConfig</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcToArrowConfigBuilder</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span>
+<span class="w">            </span><span class="n">JdbcToArrowUtils</span><span class="p">.</span><span class="na">getUtcCalendar</span><span class="p">())</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setTargetBatchSize</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setArraySubTypeByColumnNameMap</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;LIST_FIELD19&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">INTEGER</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setExplicitTypesByColumnName</span><span class="p">(</span>
+<span class="w">                    </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{{</span>
+<span class="w">                        </span><span class="n">put</span><span class="p">(</span><span class="s">&quot;BIGINT_FIELD5&quot;</span><span class="p">,</span>
+<span class="w">                                </span><span class="k">new</span><span class="w"> </span><span class="n">JdbcFieldInfo</span><span class="p">(</span><span class="n">Types</span><span class="p">.</span><span class="na">DECIMAL</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">7</span><span class="p">));</span>
+<span class="w">                    </span><span class="p">}}</span>
+<span class="w">            </span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">setBigDecimalRoundingMode</span><span class="p">(</span><span class="n">RoundingMode</span><span class="p">.</span><span class="na">UNNECESSARY</span><span class="p">)</span>
+<span class="w">            </span><span class="p">.</span><span class="na">build</span><span class="p">();</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ResultSet</span><span class="w"> </span><span class="n">resultSet</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">connection</span><span class="p">.</span><span class="na">createStatement</span><span class="p">().</span><span class="na">executeQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="s">&quot;SELECT int_field1, bool_field2, bigint_field5, char_field16, list_field19 FROM TABLE1&quot;</span><span class="p">);</span>
+<span class="w">         </span><span class="n">ArrowVectorIterator</span><span class="w"> </span><span class="n">iterator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">JdbcToArrow</span><span class="p">.</span><span class="na">sqlToArrowVectorIterator</span><span class="p">(</span>
+<span class="w">                 </span><span class="n">resultSet</span><span class="p">,</span><span class="w"> </span><span class="n">config</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">iterator</span><span class="p">.</span><span class="na">hasNext</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">iterator</span><span class="p">.</span><span class="na">next</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">SQLException</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">IOException</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+101    true    1000000000300.0000000    some char text      [1,2,3]
+102    true    100000000030.0000000    some char text      [1,2]
+INT_FIELD1    BOOL_FIELD2    BIGINT_FIELD5    CHAR_FIELD16    LIST_FIELD19
+103    true    10000000003.0000000    some char text      [1]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow JDBC Adapter</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#resultset-to-vectorschemaroot-conversion">ResultSet to VectorSchemaRoot Conversion</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-array-subtypes">Configuring Array subtypes</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-batch-size">Configuring batch size</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#configuring-numeric-decimal-precision-and-scale">Configuring numeric (decimal) precision and scale</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="avro.html" title="previous chapter">Avro</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/jdbc.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/objects.inv b/java/objects.inv
new file mode 100644
index 0000000..17bf37f
--- /dev/null
+++ b/java/objects.inv
Binary files differ
diff --git a/java/schema.html b/java/schema.html
new file mode 100644
index 0000000..98e9b8b
--- /dev/null
+++ b/java/schema.html
@@ -0,0 +1,376 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with Schema &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and writing data" href="io.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-schema">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Working with Schema</a><a class="headerlink" href="#working-with-schema" title="Link to this heading">¶</a></h1>
+<p>Let’s start talking about tabular data. Data often comes in the form of two-dimensional
+sets of heterogeneous data (such as database tables, CSV files…). Arrow provides
+several abstractions to handle such data conveniently and efficiently.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-schema" id="id1">Working with Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-fields" id="id2">Creating Fields</a></p></li>
+<li><p><a class="reference internal" href="#creating-the-schema" id="id3">Creating the Schema</a></p></li>
+<li><p><a class="reference internal" href="#adding-metadata-to-fields-and-schemas" id="id4">Adding Metadata to Fields and Schemas</a></p></li>
+<li><p><a class="reference internal" href="#creating-vectorschemaroot" id="id5">Creating VectorSchemaRoot</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-fields">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Fields</a><a class="headerlink" href="#creating-fields" title="Link to this heading">¶</a></h2>
+<p>Fields are used to denote the particular columns of tabular data.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">name</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name: Utf8
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">age</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>age: Int(32, true)
+</pre></div>
+</div>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">points</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>points: List&lt;intCol: Int(32, true)&gt;
+</pre></div>
+</div>
+</section>
+<section id="creating-the-schema">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Creating the Schema</a><a class="headerlink" href="#creating-the-schema" title="Link to this heading">¶</a></h2>
+<p>A schema describes a sequence of columns in tabular data, and consists
+of a list of fields.</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">));</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;name: Utf8, document: Utf8, age: Int(32, true), points: List&lt;intCol: Int(32, true)&gt;&gt;
+</pre></div>
+</div>
+</section>
+<section id="adding-metadata-to-fields-and-schemas">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Adding Metadata to Fields and Schemas</a><a class="headerlink" href="#adding-metadata-to-fields-and-schemas" title="Link to this heading">¶</a></h2>
+<p>In case we need to add metadata to our Field we could use:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+
+<span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadata</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;A&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Id card&quot;</span><span class="p">);</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;B&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Passport&quot;</span><span class="p">);</span>
+<span class="n">metadata</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;C&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Visa&quot;</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">,</span><span class="w"> </span><span class="n">metadata</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">document</span><span class="p">.</span><span class="na">getMetadata</span><span class="p">());</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>{A=Id card, B=Passport, C=Visa}
+</pre></div>
+</div>
+<p>In case we need to add metadata to our Schema we could use:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">document</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;document&quot;</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="cm">/*dictionary=*/</span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">String</span><span class="o">&gt;</span><span class="w"> </span><span class="n">metadataSchema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">metadataSchema</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;Key-1&quot;</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Value-1&quot;</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schemaPerson</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">document</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">),</span><span class="w"> </span><span class="n">metadataSchema</span><span class="p">);</span>
+
+<span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">schemaPerson</span><span class="p">);</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Schema&lt;name: Utf8, document: Utf8, age: Int(32, true), points: List&lt;intCol: Int(32, true)&gt;&gt;(metadata: {Key-1=Value-1})
+</pre></div>
+</div>
+</section>
+<section id="creating-vectorschemaroot">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Creating VectorSchemaRoot</a><a class="headerlink" href="#creating-vectorschemaroot" title="Link to this heading">¶</a></h2>
+<p><code class="docutils literal notranslate"><span class="pre">VectorSchemaRoot</span></code> is somewhat analogous to tables and record batches in the
+other Arrow implementations in that they all are 2D datasets, but the usage is different.</p>
+<p>Let’s populate a <code class="docutils literal notranslate"><span class="pre">VectorSchemaRoot</span></code> with a small batch of records:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VarCharVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.VectorSchemaRoot</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.ListVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.IntVector</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.complex.impl.UnionListWriter</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Schema</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.ArrowType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.Field</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.types.pojo.FieldType</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.ArrayList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.List</span><span class="p">;</span>
+<span class="kn">import static</span><span class="w"> </span><span class="nn">java.util.Arrays.asList</span><span class="p">;</span>
+
+<span class="n">Field</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Utf8</span><span class="p">()),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">FieldType</span><span class="p">.</span><span class="na">nullable</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">intType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">Int</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">FieldType</span><span class="w"> </span><span class="n">listType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FieldType</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrowType</span><span class="p">.</span><span class="na">List</span><span class="p">(),</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">childField</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;intCol&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">intType</span><span class="p">,</span><span class="w"> </span><span class="kc">null</span><span class="p">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="n">childFields</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="n">childFields</span><span class="p">.</span><span class="na">add</span><span class="p">(</span><span class="n">childField</span><span class="p">);</span>
+<span class="n">Field</span><span class="w"> </span><span class="n">points</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Field</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">listType</span><span class="p">,</span><span class="w"> </span><span class="n">childFields</span><span class="p">);</span>
+<span class="n">Schema</span><span class="w"> </span><span class="n">schema</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">Schema</span><span class="p">(</span><span class="n">asList</span><span class="p">(</span><span class="n">name</span><span class="p">,</span><span class="w"> </span><span class="n">age</span><span class="p">,</span><span class="w"> </span><span class="n">points</span><span class="p">));</span>
+<span class="k">try</span><span class="p">(</span>
+<span class="w">    </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">    </span><span class="n">VectorSchemaRoot</span><span class="w"> </span><span class="n">root</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">VectorSchemaRoot</span><span class="p">.</span><span class="na">create</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span><span class="w"> </span><span class="n">allocator</span><span class="p">)</span>
+<span class="p">){</span>
+<span class="w">    </span><span class="n">VarCharVector</span><span class="w"> </span><span class="n">nameVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">VarCharVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;name&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;David&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Gladis&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="s">&quot;Juan&quot;</span><span class="p">.</span><span class="na">getBytes</span><span class="p">());</span>
+<span class="w">    </span><span class="n">nameVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">IntVector</span><span class="w"> </span><span class="n">ageVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">IntVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;age&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">allocateNew</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">set</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ageVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">ListVector</span><span class="w"> </span><span class="n">listVector</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">ListVector</span><span class="p">)</span><span class="w"> </span><span class="n">root</span><span class="p">.</span><span class="na">getVector</span><span class="p">(</span><span class="s">&quot;points&quot;</span><span class="p">);</span>
+<span class="w">    </span><span class="n">UnionListWriter</span><span class="w"> </span><span class="n">listWriter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listVector</span><span class="p">.</span><span class="na">getWriter</span><span class="p">();</span>
+<span class="w">    </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="kt">int</span><span class="o">[]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">8</span><span class="p">,</span><span class="w"> </span><span class="mi">12</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">20</span><span class="p">,</span><span class="w"> </span><span class="mi">30</span><span class="p">,</span><span class="w"> </span><span class="mi">5</span><span class="p">,</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"> </span><span class="mi">15</span><span class="w"> </span><span class="p">};</span>
+<span class="w">    </span><span class="kt">int</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
+<span class="w">    </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setPosition</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">startList</span><span class="p">();</span>
+<span class="w">        </span><span class="k">for</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"> </span><span class="n">j</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="n">listWriter</span><span class="p">.</span><span class="na">writeInt</span><span class="p">(</span><span class="n">data</span><span class="o">[</span><span class="n">tmp_index</span><span class="o">]</span><span class="p">);</span>
+<span class="w">            </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tmp_index</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
+<span class="w">        </span><span class="n">listWriter</span><span class="p">.</span><span class="na">endList</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="w">    </span><span class="n">listVector</span><span class="p">.</span><span class="na">setValueCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+<span class="w">    </span><span class="n">root</span><span class="p">.</span><span class="na">setRowCount</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
+
+<span class="w">    </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">root</span><span class="p">.</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="p">}</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>name    age    points
+David    10    [4,8,12]
+Gladis    20    [10,20,30]
+Juan    30    [5,10,15]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-fields">Creating Fields</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-the-schema">Creating the Schema</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#adding-metadata-to-fields-and-schemas">Adding Metadata to Fields and Schemas</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-vectorschemaroot">Creating VectorSchemaRoot</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="io.html" title="next chapter">Reading and writing data</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/schema.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/search.html b/java/search.html
new file mode 100644
index 0000000..c3d6872
--- /dev/null
+++ b/java/search.html
@@ -0,0 +1,169 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1"><a class="reference internal" href="substrait.html">Substrait</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/java/searchindex.js b/java/searchindex.js
new file mode 100644
index 0000000..b28a43f
--- /dev/null
+++ b/java/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["avro", "create", "data", "dataset", "flight", "index", "io", "jdbc", "schema", "substrait"], "filenames": ["avro.rst", "create.rst", "data.rst", "dataset.rst", "flight.rst", "index.rst", "io.rst", "jdbc.rst", "schema.rst", "substrait.rst"], "titles": ["Avro", "Creating Arrow Objects", "Data manipulation", "Dataset", "Arrow Flight", "Apache Arrow Java Cookbook", "Reading and writing data", "Arrow JDBC Adapter", "Working with Schema", "Substrait"], "terms": {"encod": [0, 6], "data": [0, 1, 5, 8], "can": [0, 2, 3, 4, 6, 7, 9], "convert": [0, 7], "format": [0, 4], "The": [0, 1, 2, 5, 6, 7, 9], "exampl": [0, 1, 5, 7, 9], "assum": 0, "schema": [0, 2, 4, 5, 6], "i": [0, 1, 2, 5, 7, 8, 9], "store": [0, 4], "separ": [0, 6], "from": [0, 1, 7, 9], "itself": 0, "import": [0, 1, 2, 3, 4, 6, 7, 8, 9], "org": [0, 1, 2, 3, 4, 6, 7, 8, 9], "apach": [0, 1, 2, 3, 4, 6, 7, 8, 9], "avrotoarrow": 0, "avrotoarrowconfig": 0, "avrotoarrowconfigbuild": 0, "avrotoarrowvectoriter": 0, "memori": [0, 1, 2, 3, 4, 6, 7, 8, 9], "bufferalloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "rootalloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "vector": [0, 3, 4, 5, 6, 7, 8, 9], "vectorschemaroot": [0, 3, 4, 5, 6], "io": [0, 3, 4, 6, 7, 9], "binarydecod": 0, "decoderfactori": 0, "java": [0, 1, 2, 3, 4, 6, 7, 8, 9], "file": [0, 5, 8, 9], "fileinputstream": [0, 6], "filenotfoundexcept": [0, 6], "ioexcept": [0, 3, 4, 6, 7], "try": [0, 1, 2, 3, 4, 6, 7, 8, 9], "decod": [0, 6], "new": [0, 1, 2, 3, 4, 6, 7, 8, 9], "thirdpartydep": [0, 3, 6, 7, 9], "user": [0, 3, 5, 9], "null": [0, 2, 3, 4, 6, 7, 8, 9], "parser": [0, 9], "pars": 0, "avsc": 0, "alloc": [0, 1, 2, 3, 4, 6, 7, 8, 9], "config": [0, 7], "build": [0, 4, 7], "avrotoarrowiter": 0, "while": [0, 3, 4, 6, 7, 9], "hasnext": [0, 4, 7], "root": [0, 1, 2, 3, 4, 6, 7, 8], "next": [0, 4, 7], "system": [0, 1, 2, 3, 4, 6, 7, 8, 9], "out": [0, 1, 3, 4, 7, 8, 9], "print": [0, 1, 2, 3, 4, 6, 7, 8, 9], "contenttotsvstr": [0, 2, 3, 4, 6, 7, 8, 9], "catch": [0, 1, 3, 4, 6, 7, 8, 9], "except": [0, 1, 3, 4, 8, 9], "e": [0, 1, 3, 4, 6, 7, 8, 9], "printstacktrac": [0, 1, 3, 4, 6, 7, 8, 9], "name": [0, 3, 4, 6, 8], "favorite_numb": 0, "favorite_color": 0, "alyssa": 0, "256": 0, "ben": 0, "7": [0, 1, 3, 6, 7], "red": 0, "A": [1, 8], "basic": 1, "unit": 1, "librari": [1, 3], "type": [1, 2, 3, 4, 6, 7, 8], "describ": [1, 8], "valu": [1, 5, 7, 8], "valuevector": [1, 2, 6], "ar": [1, 6, 8], "sequenc": [1, 8], "repres": 1, "one": [1, 2], "dimension": [1, 8], "same": [1, 6], "thei": [1, 8], "mutabl": 1, "contain": [1, 2, 4], "implement": [1, 3, 4, 8], "interfac": 1, "provid": [1, 4, 6, 7, 8], "variou": 1, "allocatenew": [1, 2, 4, 6, 8], "3": [1, 2, 3, 4, 6, 7, 8], "set": [1, 2, 4, 6, 7, 8], "0": [1, 2, 3, 4, 5, 6, 7, 8], "1": [1, 2, 3, 4, 6, 7, 8, 9], "2": [1, 2, 3, 4, 6, 7, 8], "setvaluecount": [1, 2, 6, 8], "varcharvector": [1, 2, 4, 6, 8], "getbyt": [1, 2, 4, 6, 8], "two": [1, 2, 6, 8], "three": 1, "In": [1, 3, 7, 8], "some": [1, 2, 7, 9], "scenario": 1, "column": [1, 2, 3, 7, 8], "us": [1, 2, 4, 6, 8, 9], "save": 1, "fieldvector": [1, 6], "dictionaryencod": [1, 6], "pojo": [1, 2, 3, 4, 6, 8], "arrowtyp": [1, 2, 4, 6, 8], "nio": [1, 4, 6, 9], "charset": [1, 4, 6], "standardcharset": [1, 4, 6], "countri": [1, 6], "dict": [1, 6], "appusercountriesunencod": [1, 6], "app": [1, 6], "10": [1, 2, 3, 6, 8, 9], "andorra": [1, 6], "utf_8": [1, 4, 6], "cuba": [1, 6], "grecia": [1, 6], "guinea": [1, 6], "4": [1, 2, 3, 6, 8], "islandia": [1, 6], "5": [1, 3, 6, 8], "malta": [1, 6], "6": [1, 2, 3, 4, 6], "tailandia": [1, 6], "uganda": [1, 6], "8": [1, 2, 3, 6, 8], "yemen": [1, 6], "9": [1, 3, 6], "zambia": [1, 6], "countriesdictionari": [1, 6], "id": [1, 3, 6, 8], "1l": 1, "order": [1, 2, 4, 6], "fals": [1, 2, 3, 4, 6], "indextyp": [1, 6], "true": [1, 2, 3, 6, 7, 8], "println": [1, 2, 3, 4, 6], "unencod": [1, 6], "appusercountriesdictionaryencod": 1, "complex": [1, 8], "impl": [1, 8], "unionlistwrit": [1, 8], "listvector": [1, 8], "empti": 1, "listwrit": [1, 8], "getwrit": [1, 8], "20": [1, 2, 3, 6, 7, 8], "30": [1, 2, 6, 8], "100": [1, 2, 3], "200": 1, "300": 1, "1000": 1, "2000": 1, "3000": 1, "tmp_index": [1, 8], "setposit": [1, 8], "startlist": [1, 8], "j": [1, 8], "writeint": [1, 8], "endlist": [1, 8], "wai": 1, "copi": [1, 2], "rang": 1, "row": [1, 3, 4, 6, 7], "between": 1, "thi": [1, 2, 4, 5, 7], "we": [1, 2, 3, 4, 6, 7, 8, 9], "portion": 1, "input": 1, "util": [1, 2, 3, 4, 6, 7, 8, 9], "transferpair": 1, "setsaf": 1, "tp": 1, "gettransferpair": 1, "splitandtransf": 1, "getto": 1, "element": [1, 2, 7], "index": [1, 3, 5, 6], "recip": [2, 4, 5], "relat": 2, "filter": [2, 9], "transform": 2, "case": [2, 3, 4, 8], "need": [2, 3, 5, 8], "model": [2, 3], "To": [2, 5], "accomplish": 2, "you": [2, 7], "vectorschemarootappend": 2, "append": 2, "follow": 2, "code": [2, 4], "creat": [2, 4, 5, 6, 9], "them": [2, 9], "togeth": 2, "arrow": [2, 6, 8, 9], "intvector": [2, 6, 8], "fieldtyp": [2, 4, 6, 8], "static": [2, 6, 8, 9], "aslist": [2, 4, 6, 8], "column_on": 2, "nullabl": [2, 4, 6, 8], "int": [2, 3, 4, 6, 8], "32": [2, 3, 6, 8], "rooton": 2, "roottwo": 2, "result": [2, 4], "appenderon": 2, "getvector": [2, 4, 6, 8], "setrowcount": [2, 4, 6, 8], "appendertwo": 2, "34": [2, 6], "75": 2, "vectorappend": 2, "mutat": 2, "initi": 2, "initialvalu": 2, "toappend": 2, "appenderutil": 2, "accept": [2, 7], "typeequalsvisitor": 2, "right": 2, "left1": 2, "left2": 2, "int2": 2, "visitor": 2, "vectorequalsvisitor": 2, "vector1": 2, "vector2": 2, "vector3": 2, "vectorequ": 2, "given": [2, 7], "indic": 2, "algorithm": 2, "defaultvectorcompar": 2, "vectorvaluecompar": 2, "vec": 2, "valueindexcompar": 2, "ba": 2, "abc": 2, "aa": 2, "valuecompar": 2, "createdefaultcompar": 2, "attachvector": 2, "consid": [2, 3], "our": [2, 3, 4, 8], "own": 2, "could": [2, 3, 8], "extend": [2, 4], "overrid": [2, 4, 7], "comparenotnul": 2, "method": 2, "vectorsearch": 2, "linearsearch": 2, "linearsearchvector": 2, "comparatorint": 2, "binarysearch": 2, "binarysearchvector": 2, "origin": 2, "fixedwidthinplacevectorsort": 2, "intvectornotsort": 2, "setnul": 2, "sortinplac": 2, "fixedwidthoutofplacevectorsort": 2, "variablewidthoutofplacevectorsor": 2, "outofplacevectorsort": 2, "intvectorsort": 2, "getfield": [2, 6], "getfieldtyp": 2, "createnewsinglevector": 2, "sorteroutofplacesort": 2, "comparatoroutofplacesort": 2, "getvaluecount": 2, "sortoutofplac": 2, "api": [3, 6], "jni": [3, 9], "c": [3, 8, 9], "an": [3, 7, 9], "auto": [3, 6], "infer": [3, 7], "fileformat": [3, 9], "filesystemdatasetfactori": [3, 9], "nativememorypool": [3, 9], "scanner": [3, 9], "scanopt": [3, 9], "sourc": [3, 9], "datasetfactori": [3, 9], "stream": [3, 4], "streamsupport": 3, "string": [3, 4, 8, 9], "uri": [3, 4, 9], "getproperti": [3, 9], "dir": [3, 9], "parquetfil": 3, "data1": 3, "option": [3, 9], "batchsiz": [3, 9], "32768": [3, 9], "getdefault": [3, 9], "finish": [3, 9], "newscan": [3, 9], "scan": 3, "spliter": 3, "count": [3, 9], "let": [3, 4, 7, 8], "predefin": 3, "inspect": 3, "utf8": [3, 4, 6, 8], "metadata": [3, 5, 7], "avro": [3, 5], "record": [3, 4, 6, 8], "namespac": 3, "field": [3, 4, 5, 6], "writer": [3, 6], "inform": [3, 4], "ipc": [3, 4, 6, 9], "arrowread": [3, 9], "reader": [3, 6, 9], "scanbatch": [3, 9], "loadnextbatch": [3, 6, 9], "getvectorschemaroot": [3, 6, 9], "david": [3, 4, 6, 8], "gladi": [3, 6, 8], "juan": [3, 6, 8], "": [3, 4, 8], "read": [3, 5, 7, 9], "gzip": 3, "compress": 3, "group": [3, 9], "tool": 3, "meta": 3, "data4_3rg_gzip": 3, "ag": [3, 6, 8], "int64": 3, "r": 3, "d": 3, "binari": [3, 6, 9], "l": 3, "rc": 3, "t": [3, 4], "182": 3, "offset": 3, "190": 3, "420": 3, "179": 3, "838": 3, "totalbatchs": 3, "getrowcount": [3, 4, 6], "number": [3, 4, 6], "per": 3, "batch": [3, 4, 5, 6, 8], "total": 3, "size": [3, 5, 6], "jean": 3, "lu": 3, "kei": [3, 5, 8], "sophia": 3, "mara": [3, 6], "arit": 3, "neil": 3, "jason": 3, "john": 3, "peter": 3, "ismael": 3, "11": 3, "have": [3, 7], "data2": 3, "data3": 3, "250": 3, "rowcount": 3, "50": 3, "onli": 3, "certain": 3, "configur": [3, 5], "each": [3, 4], "arrowfil": [3, 6], "random_access": [3, 6], "arrow_ipc": 3, "zlib": 3, "385": 3, "stripe": 3, "5000": 3, "demo": 3, "more": [3, 4], "struct": 3, "_col0": 3, "_col1": 3, "_col2": 3, "_col3": 3, "_col4": 3, "_col5": 3, "_col6": 3, "_col7": 3, "_col8": 3, "block": 3, "262144": 3, "length": [3, 9], "1031": 3, "266": 3, "636": 3, "footer": 3, "129": 3, "1920800": 3, "tech_acquisit": 3, "acquir": 3, "acquire": 3, "amount": 3, "billion": 3, "usd": 3, "date": 3, "acquisit": 3, "nvidia": 3, "mellanox": 3, "04": 3, "05": 3, "2020": 3, "amd": 3, "xilinx": 3, "35": 3, "27": 3, "salesforc": 3, "slack": 3, "01": 3, "12": [3, 8], "section": 4, "work": [4, 5], "For": [4, 7, 9], "detail": 4, "about": [4, 8], "pleas": [4, 6], "take": 4, "look": 4, "rpc": 4, "ll": 4, "handl": [4, 8], "upload": 4, "request": 4, "actual": 4, "action": 4, "asyncputlisten": 4, "callstatu": 4, "criteria": [4, 9], "flightclient": 4, "flightdescriptor": 4, "flightendpoint": 4, "flightinfo": 4, "flightserv": 4, "flightstream": 4, "locat": 4, "noopflightproduc": 4, "putresult": 4, "ticket": 4, "autoclos": 4, "vectorload": 4, "vectorunload": 4, "messag": [4, 6, 7], "arrowrecordbatch": 4, "arraylist": [4, 8], "arrai": [4, 5, 6, 8], "collect": [4, 5, 9], "iter": [4, 7], "list": [4, 8], "concurr": 4, "concurrenthashmap": 4, "class": [4, 7], "dataset": [4, 5, 6, 8], "privat": 4, "final": 4, "long": 4, "public": 4, "getbatch": 4, "return": [4, 9], "getschema": 4, "getrow": 4, "void": [4, 9], "close": 4, "throw": [4, 9], "cookbookproduc": 4, "concurrentmap": 4, "runnabl": 4, "acceptput": 4, "callcontext": 4, "context": 4, "streamlisten": 4, "ackstream": 4, "unload": 4, "getroot": 4, "arb": 4, "getrecordbatch": 4, "add": [4, 8], "getdescriptor": 4, "oncomplet": 4, "getstream": 4, "serverstreamlisten": 4, "listen": 4, "path": [4, 6], "not_found": 4, "withdescript": 4, "unknown": 4, "descriptor": 4, "toruntimeexcept": 4, "loader": 4, "load": 4, "putnext": 4, "complet": 4, "doaction": 4, "getbodi": 4, "switch": 4, "gettyp": [4, 6], "remov": 4, "onerror": 4, "intern": 4, "tostr": 4, "onnext": 4, "els": [4, 7], "reason": 4, "did": 4, "exist": 4, "getflightinfo": 4, "getpath": 4, "singletonlist": 4, "byte": 4, "listflight": 4, "foreach": 4, "k": 4, "v": 4, "forgrpcinsecur": 4, "33333": 4, "produc": 4, "builder": 4, "s1": 4, "port": 4, "getport": 4, "runtimeexcept": 4, "c1": 4, "geturi": 4, "popul": [4, 8], "ronald": 4, "francisco": 4, "clientstreamlisten": 4, "startput": 4, "profil": 4, "manuel": 4, "felip": 4, "jj": 4, "getresult": 4, "c2": 4, "wrote": 4, "getinfo": 4, "c3": 4, "getendpoint": 4, "getticket": 4, "vectorschemarootreceiv": 4, "c4": 4, "receiv": 4, "all": [4, 7, 8], "flightinfosbefor": 4, "c5": 4, "info": 4, "do": 4, "deleteactionresult": 4, "c6": 4, "detel": 4, "c7": 4, "after": 4, "No": 4, "shut": 4, "down": 4, "shutdown": 4, "c8": 4, "successfulli": 4, "grpc": 4, "tcp": 4, "endpoint": 4, "58871b0a": 4, "expirationtim": 4, "none": 4, "explain": 4, "first": 4, "which": [4, 5, 7], "onc": 4, "so": 4, "retriev": 4, "And": 4, "back": 4, "clonewithtransf": 4, "Then": 4, "confirm": 4, "been": 4, "http": 4, "doc": 4, "html": 4, "demonstr": 5, "how": 5, "solv": 5, "mani": 5, "common": [5, 9], "task": 5, "might": 5, "perform": 5, "when": [5, 6], "also": [5, 6, 9], "serv": 5, "robust": 5, "well": 5, "solut": 5, "those": 5, "get": [5, 6, 9], "start": [5, 6, 8], "see": 5, "instal": 5, "instruct": 5, "test": [5, 6], "14": 5, "object": 5, "slice": 5, "ad": 5, "write": 5, "flight": 5, "simpl": 5, "storag": 5, "servic": 5, "construct": 5, "queri": 5, "parquet": [5, 9], "orc": [5, 9], "csv": [5, 8, 9], "substrait": 5, "manipul": 5, "concaten": 5, "compar": 5, "equal": [5, 7], "search": 5, "sort": 5, "jdbc": 5, "adapt": 5, "resultset": 5, "convers": 5, "subtyp": 5, "numer": 5, "decim": [5, 9], "precis": 5, "scale": 5, "modul": [5, 7], "page": 5, "defin": [6, 7], "serial": 6, "Such": 6, "directli": 6, "map": [6, 8, 9], "both": 6, "arrowfilewrit": 6, "fileoutputstream": 6, "schemaperson": [6, 8], "namevector": [6, 8], "agevector": [6, 8], "randon_access_to_fil": 6, "getchannel": 6, "writebatch": 6, "end": 6, "written": 6, "getrecordblock": 6, "bytearrayoutputstream": 6, "channel": 6, "newchannel": 6, "arrowstreamwrit": 6, "streaming_to_fil": 6, "offer": 6, "differ": [6, 8], "ani": [6, 7], "gener": 6, "purpos": 6, "chang": 6, "your": 6, "conveni": [6, 8], "arrowfileread": 6, "arrowblock": 6, "loadrecordbatch": 6, "vectorschemarootrecov": 6, "nidia": 6, "15": [6, 8, 9], "alexa": 6, "raul": 6, "jhon": 6, "29": 6, "thomi": 6, "33": 6, "seekablereadchannel": 6, "bytearrayreadableseekablebytechannel": 6, "readallbyt": 6, "arrowstreamread": 6, "fileinputstreamforstream": 6, "bytearrayinputstream": 6, "check": 6, "requir": 6, "track": 6, "dictionaryprovid": 6, "666l": 6, "minortyp": 6, "varchar": [6, 9], "random_access_file_with_dictionari": 6, "mapdictionaryprovid": 6, "put": [6, 7, 8, 9], "appusecountrydictionaryencod": 6, "getdictionari": 6, "getid": 6, "appusecountrydictionaryencodedread": 6, "dictionaryencodingread": 6, "recov": 6, "appusecountrydictionaryread": 6, "getdictionaryvector": 6, "readvector": 6, "666": 6, "main": 7, "help": 7, "u": 7, "jdbctoarrow": 7, "arrowvectoriter": 7, "ibati": 7, "scriptrunn": 7, "bufferedread": 7, "fileread": 7, "sql": [7, 9], "connect": 7, "drivermanag": 7, "sqlexcept": 7, "getconnect": 7, "h2": 7, "mem": 7, "runnerddldml": 7, "setlogwrit": 7, "runscript": 7, "ddl": 7, "dml": 7, "createstat": 7, "executequeri": 7, "select": [7, 9], "int_field1": 7, "bool_field2": 7, "bigint_field5": 7, "table1": 7, "sqltoarrowvectoriter": 7, "101": 7, "1000000000300": 7, "102": 7, "100000000030": 7, "103": 7, "10000000003": 7, "through": 7, "jdbctoarrowconfig": 7, "specifi": 7, "setarraysubtypebycolumnnamemap": 7, "jdbcfieldinfo": 7, "jdbctoarrowconfigbuild": 7, "jdbctoarrowutil": 7, "hashmap": [7, 8, 9], "getutccalendar": 7, "list_field19": 7, "integ": 7, "char_field16": 7, "char": [7, 9], "text": 7, "By": 7, "default": 7, "up": 7, "1024": 7, "custom": [7, 9], "via": 7, "settargetbatchs": 7, "must": 7, "exactli": 7, "match": 7, "unsupportedoperationexcept": 7, "thrown": 7, "like": 7, "bigdecim": 7, "happen": 7, "becaus": 7, "accur": 7, "databas": [7, 8], "driver": 7, "avoid": 7, "either": 7, "roundingmod": 7, "setbigdecimalroundingmod": 7, "expect": 7, "bigint": [7, 9], "math": 7, "setexplicittypesbycolumnnam": 7, "unnecessari": 7, "0000000": 7, "talk": 8, "tabular": 8, "often": 8, "come": 8, "form": 8, "heterogen": 8, "tabl": [8, 9], "sever": 8, "abstract": 8, "effici": 8, "denot": 8, "particular": 8, "inttyp": 8, "listtyp": 8, "childfield": 8, "intcol": 8, "point": 8, "consist": 8, "document": 8, "dictionari": 8, "card": 8, "b": 8, "passport": 8, "visa": 8, "getmetadata": 8, "metadataschema": 8, "somewhat": 8, "analog": 8, "other": [8, 9], "2d": 8, "usag": 8, "small": 8, "integr": 9, "languag": 9, "support": 9, "combin": 9, "acero": 9, "backend": 9, "current": 9, "project": 9, "join": 9, "aggreg": 9, "here": 9, "program": 9, "com": 9, "googl": 9, "immutablelist": 9, "isthmu": 9, "sqltosubstrait": 9, "proto": 9, "plan": 9, "acerosubstraitconsum": 9, "calcit": 9, "sqlparseexcept": 9, "bytebuff": 9, "querytablen": 9, "nation": 9, "where": 9, "n_nationkei": 9, "17": 9, "NOT": 9, "n_name": 9, "25": 9, "n_regionkei": 9, "n_comment": 9, "152": 9, "execut": 9, "querydatasetthrusubstraitplandefinit": 9, "tpch": 9, "maptabletoarrowread": 9, "substraitplan": 9, "allocatedirect": 9, "tobytearrai": 9, "run": 9, "runqueri": 9, "peru": 9, "platelet": 9, "blith": 9, "pend": 9, "depend": 9, "fluffili": 9, "across": 9, "even": 9, "pinto": 9, "bean": 9, "carefulli": 9, "silent": 9, "accoun": 9, "It": 9, "possibl": 9, "multipl": 9, "base": 9, "tpc": 9, "h": 9, "benchmark": 9, "querytablenationjoincustom": 9, "n": 9, "AS": 9, "number_custom": 9, "ON": 9, "c_nationkei": 9, "BY": 9, "c_custkei": 9, "c_name": 9, "c_address": 9, "40": 9, "c_phone": 9, "c_acctbal": 9, "c_mktsegment": 9, "c_comment": 9, "117": 9, "querytwodatasetsthrusubstraitplandefinit": 9, "urin": 9, "uricustom": 9, "readern": 9, "datasetfactorycustom": 9, "datasetcustom": 9, "scannercustom": 9, "readercustom": 9, "573": 9}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"avro": 0, "content": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "arrow": [0, 1, 3, 4, 5, 7], "creat": [1, 8], "object": 1, "vector": [1, 2], "arrai": [1, 2, 7], "int": 1, "varchar": 1, "dictionari": [1, 6], "encod": 1, "list": 1, "slice": 1, "intvector": 1, "data": [2, 3, 4, 6], "manipul": 2, "concaten": 2, "vectorschemaroot": [2, 7, 8], "valu": [2, 4], "compar": 2, "field": [2, 8], "equal": 2, "search": 2, "linear": 2, "o": 2, "n": 2, "binari": 2, "log": 2, "sort": 2, "In": 2, "place": 2, "sorter": 2, "nlog": 2, "out": [2, 6], "dataset": [3, 9], "construct": 3, "get": [3, 4], "schema": [3, 8], "dure": 3, "from": [3, 6], "queri": [3, 9], "parquet": [3, 6], "file": [3, 6], "For": 3, "directori": 3, "project": 3, "orc": 3, "csv": 3, "flight": 4, "simpl": 4, "kei": 4, "storag": 4, "servic": 4, "client": 4, "server": 4, "start": 4, "connect": 4, "put": 4, "metadata": [4, 8], "delet": 4, "valid": 4, "stop": 4, "apach": 5, "java": 5, "cookbook": 5, "indic": 5, "tabl": 5, "read": 6, "write": 6, "random": 6, "access": 6, "buffer": 6, "stream": 6, "format": 6, "handl": 6, "jdbc": 7, "adapt": 7, "resultset": 7, "convers": 7, "configur": 7, "subtyp": 7, "batch": 7, "size": 7, "numer": 7, "decim": 7, "precis": 7, "scale": 7, "work": 8, "ad": 8, "substrait": 9}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Avro": [[0, "avro"]], "Contents": [[0, "contents"], [1, "contents"], [2, "contents"], [3, "contents"], [4, "contents"], [6, "contents"], [7, "contents"], [8, "contents"], [9, "contents"]], "Avro to Arrow": [[0, "avro-to-arrow"]], "Creating Arrow Objects": [[1, "creating-arrow-objects"]], "Creating Vectors (arrays)": [[1, "creating-vectors-arrays"]], "Array of Int": [[1, "array-of-int"]], "Array of Varchar": [[1, "array-of-varchar"]], "Dictionary-Encoded Array of Varchar": [[1, "dictionary-encoded-array-of-varchar"]], "Array of List": [[1, "array-of-list"]], "Slicing": [[1, "slicing"]], "Slicing IntVector": [[1, "slicing-intvector"]], "Data manipulation": [[2, "data-manipulation"]], "Concatenate VectorSchemaRoots": [[2, "concatenate-vectorschemaroots"]], "Concatenate Value Vectors": [[2, "concatenate-value-vectors"]], "Compare Vectors for Field Equality": [[2, "compare-vectors-for-field-equality"]], "Compare Vectors Equality": [[2, "compare-vectors-equality"]], "Compare Values on the Array": [[2, "compare-values-on-the-array"]], "Search Values on the Array": [[2, "search-values-on-the-array"]], "Linear Search - O(n)": [[2, "linear-search-o-n"]], "Binary Search - O(log(n))": [[2, "binary-search-o-log-n"]], "Sort Values on the Array": [[2, "sort-values-on-the-array"]], "In-place Sorter - O(nlog(n))": [[2, "in-place-sorter-o-nlog-n"]], "Out-place Sorter - O(nlog(n))": [[2, "out-place-sorter-o-nlog-n"]], "Dataset": [[3, "dataset"]], "Constructing Datasets": [[3, "constructing-datasets"]], "Getting the Schema": [[3, "getting-the-schema"]], "During Dataset Construction": [[3, "during-dataset-construction"]], "From a Dataset": [[3, "from-a-dataset"]], "Query Parquet File": [[3, "query-parquet-file"]], "Query Data Content For File": [[3, "query-data-content-for-file"], [3, "id1"], [3, "id2"], [3, "id3"]], "Query Data Content For Directory": [[3, "query-data-content-for-directory"]], "Query Data Content with Projection": [[3, "query-data-content-with-projection"]], "Query Arrow Files": [[3, "query-arrow-files"]], "Query ORC File": [[3, "query-orc-file"]], "Query CSV File": [[3, "query-csv-file"]], "Arrow Flight": [[4, "arrow-flight"]], "Simple Key-Value Storage Service with Arrow Flight": [[4, "simple-key-value-storage-service-with-arrow-flight"]], "Flight Client and Server": [[4, "flight-client-and-server"]], "Start Flight Server": [[4, "start-flight-server"]], "Connect to Flight Server": [[4, "connect-to-flight-server"]], "Put Data": [[4, "put-data"]], "Get Metadata": [[4, "get-metadata"]], "Get Data": [[4, "get-data"]], "Delete data": [[4, "delete-data"]], "Validate Delete Data": [[4, "validate-delete-data"]], "Stop Flight Server": [[4, "stop-flight-server"]], "Apache Arrow Java Cookbook": [[5, "apache-arrow-java-cookbook"]], "Contents:": [[5, null]], "Indices and tables": [[5, "indices-and-tables"]], "Reading and writing data": [[6, "reading-and-writing-data"]], "Writing": [[6, "writing"]], "Writing Random Access Files": [[6, "writing-random-access-files"]], "Write - Out to File": [[6, "write-out-to-file"], [6, "id1"]], "Write - Out to Buffer": [[6, "write-out-to-buffer"], [6, "id2"]], "Writing Streaming Format": [[6, "writing-streaming-format"]], "Reading": [[6, "reading"]], "Reading Random Access Files": [[6, "reading-random-access-files"]], "Read - From File": [[6, "read-from-file"], [6, "id3"]], "Read - From Buffer": [[6, "read-from-buffer"], [6, "id4"]], "Reading Streaming Format": [[6, "reading-streaming-format"]], "Reading Parquet File": [[6, "reading-parquet-file"]], "Handling Data with Dictionaries": [[6, "handling-data-with-dictionaries"]], "Arrow JDBC Adapter": [[7, "arrow-jdbc-adapter"]], "ResultSet to VectorSchemaRoot Conversion": [[7, "resultset-to-vectorschemaroot-conversion"]], "Configuring Array subtypes": [[7, "configuring-array-subtypes"]], "Configuring batch size": [[7, "configuring-batch-size"]], "Configuring numeric (decimal) precision and scale": [[7, "configuring-numeric-decimal-precision-and-scale"]], "Working with Schema": [[8, "working-with-schema"]], "Creating Fields": [[8, "creating-fields"]], "Creating the Schema": [[8, "creating-the-schema"]], "Adding Metadata to Fields and Schemas": [[8, "adding-metadata-to-fields-and-schemas"]], "Creating VectorSchemaRoot": [[8, "creating-vectorschemaroot"]], "Substrait": [[9, "substrait"]], "Querying Datasets": [[9, "querying-datasets"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/java/substrait.html b/java/substrait.html
new file mode 100644
index 0000000..857e14b
--- /dev/null
+++ b/java/substrait.html
@@ -0,0 +1,338 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Substrait &#8212; Apache Arrow Java Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Data manipulation" href="data.html" />
+    <link rel="prev" title="Dataset" href="dataset.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="substrait">
+<span id="arrow-substrait"></span><h1><a class="toc-backref" href="#id2" role="doc-backlink">Substrait</a><a class="headerlink" href="#substrait" title="Link to this heading">¶</a></h1>
+<p>Arrow can use <a class="reference external" href="https://substrait.io/">Substrait</a> to integrate with other languages.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#substrait" id="id2">Substrait</a></p>
+<ul>
+<li><p><a class="reference internal" href="#querying-datasets" id="id3">Querying Datasets</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="querying-datasets">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Querying Datasets</a><a class="headerlink" href="#querying-datasets" title="Link to this heading">¶</a></h2>
+<p>The Substrait support in Arrow combines <a class="reference internal" href="dataset.html"><span class="doc">Dataset</span></a> and
+<a class="reference external" href="https://github.com/substrait-io/substrait-java">substrait-java</a> to query datasets using <a class="reference external" href="https://arrow.apache.org/docs/cpp/streaming_execution.html">Acero</a> as a backend.</p>
+<p>Acero currently supports:</p>
+<ul class="simple">
+<li><p>Reading Arrow, CSV, ORC, and Parquet files</p></li>
+<li><p>Filters</p></li>
+<li><p>Projections</p></li>
+<li><p>Joins</p></li>
+<li><p>Aggregates</p></li>
+</ul>
+<p>Here is an example of a Java program that queries a Parquet file:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">com.google.common.collect.ImmutableList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.Plan</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.substrait.AceroSubstraitConsumer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+
+<span class="kd">static</span><span class="w"> </span><span class="n">Plan</span><span class="w"> </span><span class="nf">queryTableNation</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">sql</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;SELECT * FROM NATION WHERE N_NATIONKEY = 17&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, N_NAME CHAR(25), &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">           </span><span class="s">&quot;N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">SqlToSubstrait</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlToSubstrait</span><span class="p">();</span>
+<span class="w">   </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="p">.</span><span class="na">execute</span><span class="p">(</span><span class="n">sql</span><span class="p">,</span><span class="w"> </span><span class="n">ImmutableList</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">nation</span><span class="p">));</span>
+<span class="w">   </span><span class="k">return</span><span class="w"> </span><span class="n">plan</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kd">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">queryDatasetThruSubstraitPlanDefinition</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">   </span><span class="n">String</span><span class="w"> </span><span class="n">uri</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">   </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="w">   </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">       </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">       </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">               </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uri</span><span class="p">);</span>
+<span class="w">       </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">       </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">       </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">reader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="w">   </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">       </span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">ArrowReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">mapTableToArrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">       </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;NATION&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">reader</span><span class="p">);</span>
+<span class="w">       </span><span class="c1">// get binary plan</span>
+<span class="w">       </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queryTableNation</span><span class="p">();</span>
+<span class="w">       </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">substraitPlan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">().</span><span class="na">length</span><span class="p">);</span>
+<span class="w">       </span><span class="n">substraitPlan</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">());</span>
+<span class="w">       </span><span class="c1">// run query</span>
+<span class="w">       </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">arrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AceroSubstraitConsumer</span><span class="p">(</span><span class="n">allocator</span><span class="p">).</span><span class="na">runQuery</span><span class="p">(</span>
+<span class="w">           </span><span class="n">substraitPlan</span><span class="p">,</span>
+<span class="w">           </span><span class="n">mapTableToArrowReader</span>
+<span class="w">       </span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">           </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">               </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">           </span><span class="p">}</span>
+<span class="w">       </span><span class="p">}</span>
+<span class="w">   </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">       </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">   </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">queryDatasetThruSubstraitPlanDefinition</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>N_NATIONKEY    N_NAME    N_REGIONKEY    N_COMMENT
+17    PERU    1    platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+</pre></div>
+</div>
+<p>It is also possible to query multiple datasets and join them based on some criteria.
+For example, we can join the nation and customer tables from the TPC-H benchmark:</p>
+<div class="highlight-java notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">com.google.common.collect.ImmutableList</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.isthmus.SqlToSubstrait</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">io.substrait.proto.Plan</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileFormat</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.file.FileSystemDatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.jni.NativeMemoryPool</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.ScanOptions</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.scanner.Scanner</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.Dataset</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.source.DatasetFactory</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.dataset.substrait.AceroSubstraitConsumer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.BufferAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.memory.RootAllocator</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.arrow.vector.ipc.ArrowReader</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">org.apache.calcite.sql.parser.SqlParseException</span><span class="p">;</span>
+
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.nio.ByteBuffer</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.HashMap</span><span class="p">;</span>
+<span class="kn">import</span><span class="w"> </span><span class="nn">java.util.Map</span><span class="p">;</span>
+
+<span class="kd">static</span><span class="w"> </span><span class="n">Plan</span><span class="w"> </span><span class="nf">queryTableNationJoinCustomer</span><span class="p">()</span><span class="w"> </span><span class="kd">throws</span><span class="w"> </span><span class="n">SqlParseException</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">sql</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;SELECT n.n_name, COUNT(*) AS NUMBER_CUSTOMER FROM NATION n JOIN CUSTOMER c &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;ON n.n_nationkey = c.c_nationkey WHERE n.n_nationkey = 17 &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;GROUP BY n.n_name&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">nation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE NATION (N_NATIONKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;N_NAME CHAR(25), N_REGIONKEY BIGINT NOT NULL, N_COMMENT VARCHAR(152))&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">customer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;CREATE TABLE CUSTOMER (C_CUSTKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_NAME VARCHAR(25), C_ADDRESS VARCHAR(40), C_NATIONKEY BIGINT NOT NULL, &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_PHONE CHAR(15), C_ACCTBAL DECIMAL, C_MKTSEGMENT CHAR(10), &quot;</span><span class="w"> </span><span class="o">+</span>
+<span class="w">        </span><span class="s">&quot;C_COMMENT VARCHAR(117) )&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">SqlToSubstrait</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">SqlToSubstrait</span><span class="p">();</span>
+<span class="w">    </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">sqlToSubstrait</span><span class="p">.</span><span class="na">execute</span><span class="p">(</span><span class="n">sql</span><span class="p">,</span>
+<span class="w">        </span><span class="n">ImmutableList</span><span class="p">.</span><span class="na">of</span><span class="p">(</span><span class="n">nation</span><span class="p">,</span><span class="w"> </span><span class="n">customer</span><span class="p">));</span>
+<span class="w">    </span><span class="k">return</span><span class="w"> </span><span class="n">plan</span><span class="p">;</span>
+<span class="p">}</span>
+
+<span class="kd">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">queryTwoDatasetsThruSubstraitPlanDefinition</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">uriNation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/nation.parquet&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">String</span><span class="w"> </span><span class="n">uriCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&quot;file:&quot;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">getProperty</span><span class="p">(</span><span class="s">&quot;user.dir&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s">&quot;/thirdpartydeps/tpch/customer.parquet&quot;</span><span class="p">;</span>
+<span class="w">    </span><span class="n">ScanOptions</span><span class="w"> </span><span class="n">options</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">ScanOptions</span><span class="p">(</span><span class="cm">/*batchSize*/</span><span class="w"> </span><span class="mi">32768</span><span class="p">);</span>
+<span class="w">    </span><span class="k">try</span><span class="w"> </span><span class="p">(</span>
+<span class="w">        </span><span class="n">BufferAllocator</span><span class="w"> </span><span class="n">allocator</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">RootAllocator</span><span class="p">();</span>
+<span class="w">        </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactory</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uriNation</span><span class="p">);</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">dataset</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactory</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">        </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scanner</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">dataset</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">readerNation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scanner</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">();</span>
+<span class="w">        </span><span class="n">DatasetFactory</span><span class="w"> </span><span class="n">datasetFactoryCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">FileSystemDatasetFactory</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">,</span><span class="w"> </span><span class="n">NativeMemoryPool</span><span class="p">.</span><span class="na">getDefault</span><span class="p">(),</span>
+<span class="w">            </span><span class="n">FileFormat</span><span class="p">.</span><span class="na">PARQUET</span><span class="p">,</span><span class="w"> </span><span class="n">uriCustomer</span><span class="p">);</span>
+<span class="w">        </span><span class="n">Dataset</span><span class="w"> </span><span class="n">datasetCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetFactoryCustomer</span><span class="p">.</span><span class="na">finish</span><span class="p">();</span>
+<span class="w">        </span><span class="n">Scanner</span><span class="w"> </span><span class="n">scannerCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">datasetCustomer</span><span class="p">.</span><span class="na">newScan</span><span class="p">(</span><span class="n">options</span><span class="p">);</span>
+<span class="w">        </span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">readerCustomer</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">scannerCustomer</span><span class="p">.</span><span class="na">scanBatches</span><span class="p">()</span>
+<span class="w">    </span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="c1">// map table to reader</span>
+<span class="w">        </span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span><span class="w"> </span><span class="n">ArrowReader</span><span class="o">&gt;</span><span class="w"> </span><span class="n">mapTableToArrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">HashMap</span><span class="o">&lt;&gt;</span><span class="p">();</span>
+<span class="w">        </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;NATION&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">readerNation</span><span class="p">);</span>
+<span class="w">        </span><span class="n">mapTableToArrowReader</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="s">&quot;CUSTOMER&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">readerCustomer</span><span class="p">);</span>
+<span class="w">        </span><span class="c1">// get binary plan</span>
+<span class="w">        </span><span class="n">Plan</span><span class="w"> </span><span class="n">plan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">queryTableNationJoinCustomer</span><span class="p">();</span>
+<span class="w">        </span><span class="n">ByteBuffer</span><span class="w"> </span><span class="n">substraitPlan</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ByteBuffer</span><span class="p">.</span><span class="na">allocateDirect</span><span class="p">(</span>
+<span class="w">            </span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">().</span><span class="na">length</span><span class="p">);</span>
+<span class="w">        </span><span class="n">substraitPlan</span><span class="p">.</span><span class="na">put</span><span class="p">(</span><span class="n">plan</span><span class="p">.</span><span class="na">toByteArray</span><span class="p">());</span>
+<span class="w">        </span><span class="c1">// run query</span>
+<span class="w">        </span><span class="k">try</span><span class="w"> </span><span class="p">(</span><span class="n">ArrowReader</span><span class="w"> </span><span class="n">arrowReader</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">AceroSubstraitConsumer</span><span class="p">(</span>
+<span class="w">            </span><span class="n">allocator</span><span class="p">).</span><span class="na">runQuery</span><span class="p">(</span>
+<span class="w">            </span><span class="n">substraitPlan</span><span class="p">,</span>
+<span class="w">            </span><span class="n">mapTableToArrowReader</span>
+<span class="w">        </span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
+<span class="w">            </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">loadNextBatch</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
+<span class="w">                </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">arrowReader</span><span class="p">.</span><span class="na">getVectorSchemaRoot</span><span class="p">().</span><span class="na">contentToTSVString</span><span class="p">());</span>
+<span class="w">            </span><span class="p">}</span>
+<span class="w">        </span><span class="p">}</span>
+<span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">catch</span><span class="w"> </span><span class="p">(</span><span class="n">Exception</span><span class="w"> </span><span class="n">e</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
+<span class="w">        </span><span class="n">e</span><span class="p">.</span><span class="na">printStackTrace</span><span class="p">();</span>
+<span class="w">    </span><span class="p">}</span>
+<span class="p">}</span>
+
+<span class="n">queryTwoDatasetsThruSubstraitPlanDefinition</span><span class="p">();</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>N_NAME    NUMBER_CUSTOMER
+PERU    573
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and writing data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+<li class="toctree-l1"><a class="reference internal" href="dataset.html">Dataset</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Substrait</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#querying-datasets">Querying Datasets</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="avro.html">Avro</a></li>
+<li class="toctree-l1"><a class="reference internal" href="jdbc.html">Arrow JDBC Adapter</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/java/reference/index.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="dataset.html" title="previous chapter">Dataset</a></li>
+      <li>Next: <a href="data.html" title="next chapter">Data manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/substrait.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/_sources/create.rst.txt b/py/_sources/create.rst.txt
new file mode 100644
index 0000000..f41e748
--- /dev/null
+++ b/py/_sources/create.rst.txt
@@ -0,0 +1,305 @@
+.. 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.
+
+======================
+Creating Arrow Objects
+======================
+
+Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.
+
+.. contents::
+
+Creating Arrays
+===============
+
+Arrow keeps data in continuous arrays optimised for memory footprint
+and SIMD analyses. In Python it's possible to build :class:`pyarrow.Array`
+starting from Python ``lists`` (or sequence types in general),
+``numpy`` arrays and ``pandas`` Series.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    array = pa.array([1, 2, 3, 4, 5])
+
+.. testcode::
+
+    print(array)
+
+.. testoutput::
+
+    [
+      1,
+      2,
+      3,
+      4,
+      5
+    ]
+
+Arrays can also provide a ``mask`` to specify which values should
+be considered nulls
+
+.. testcode::
+
+    import numpy as np
+
+    array = pa.array([1, 2, 3, 4, 5],
+                     mask=np.array([True, False, True, False, True]))
+
+    print(array)
+
+.. testoutput::
+
+    [
+      null,
+      2,
+      null,
+      4,
+      null
+    ]
+
+When building arrays from ``numpy`` or ``pandas``, Arrow will leverage
+optimized code paths that rely on the internal in-memory representation
+of the data by ``numpy`` and ``pandas``
+
+.. testcode::
+
+    import numpy as np
+    import pandas as pd
+
+    array_from_numpy = pa.array(np.arange(5))
+    array_from_pandas = pa.array(pd.Series([1, 2, 3, 4, 5]))
+
+Creating Tables
+===============
+
+Arrow supports tabular data in :class:`pyarrow.Table`: each column
+is represented by a :class:`pyarrow.ChunkedArray` and tables can be created
+by pairing multiple arrays with names for their columns
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.table([
+        pa.array([1, 2, 3, 4, 5]),
+        pa.array(["a", "b", "c", "d", "e"]),
+        pa.array([1.0, 2.0, 3.0, 4.0, 5.0])
+    ], names=["col1", "col2", "col3"])
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Create Table from Plain Types
+=============================
+
+Arrow allows fast zero copy creation of arrow arrays
+from numpy and pandas arrays and series, but it's also
+possible to create Arrow Arrays and Tables from
+plain Python structures.
+
+The :func:`pyarrow.table` function allows creation of Tables
+from a variety of inputs, including plain python objects
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.table({
+        "col1": [1, 2, 3, 4, 5],
+        "col2": ["a", "b", "c", "d", "e"]
+    })
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+
+.. note::
+
+    All values provided in the dictionary will be passed to
+    :func:`pyarrow.array` for conversion to Arrow arrays,
+    and will benefit from zero copy behaviour when possible.
+
+The :meth:`pyarrow.Table.from_pylist` method allows the creation
+of Tables from python lists of row dicts. Types are inferred if a
+schema is not explicitly passed.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    table = pa.Table.from_pylist([
+        {"col1": 1, "col2": "a"},
+        {"col1": 2, "col2": "b"},
+        {"col1": 3, "col2": "c"},
+        {"col1": 4, "col2": "d"},
+        {"col1": 5, "col2": "e"}
+    ])
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    col2: string
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+
+Creating Record Batches
+=======================
+
+Most I/O operations in Arrow happen when shipping batches of data
+to their destination.  :class:`pyarrow.RecordBatch` is the way
+Arrow represents batches of data.  A RecordBatch can be seen as a slice
+of a table.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    batch = pa.RecordBatch.from_arrays([
+        pa.array([1, 3, 5, 7, 9]),
+        pa.array([2, 4, 6, 8, 10])
+    ], names=["odd", "even"])
+
+Multiple batches can be combined into a table using
+:meth:`pyarrow.Table.from_batches`
+
+.. testcode::
+
+    second_batch = pa.RecordBatch.from_arrays([
+        pa.array([11, 13, 15, 17, 19]),
+        pa.array([12, 14, 16, 18, 20])
+    ], names=["odd", "even"])
+
+    table = pa.Table.from_batches([batch, second_batch])
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    odd: int64
+    even: int64
+    ----
+    odd: [[1,3,5,7,9],[11,13,15,17,19]]
+    even: [[2,4,6,8,10],[12,14,16,18,20]]
+
+Equally, :class:`pyarrow.Table` can be converted to a list of
+:class:`pyarrow.RecordBatch` using the :meth:`pyarrow.Table.to_batches`
+method
+
+.. testcode::
+
+    record_batches = table.to_batches(max_chunksize=5)
+    print(len(record_batches))
+
+.. testoutput::
+
+    2
+
+Store Categorical Data
+======================
+
+Arrow provides the :class:`pyarrow.DictionaryArray` type
+to represent categorical data without the cost of
+storing and repeating the categories over and over.  This can reduce memory use
+when columns might have large values (such as text).
+
+If you have an array containing repeated categorical data,
+it is possible to convert it to a :class:`pyarrow.DictionaryArray`
+using :meth:`pyarrow.Array.dictionary_encode`
+
+.. testcode::
+
+    arr = pa.array(["red", "green", "blue", "blue", "green", "red"])
+
+    categorical = arr.dictionary_encode()
+    print(categorical)
+
+.. testoutput::
+
+    ...
+    -- dictionary:
+      [
+        "red",
+        "green",
+        "blue"
+      ]
+    -- indices:
+      [
+        0,
+        1,
+        2,
+        2,
+        1,
+        0
+      ]
+
+If you already know the categories and indices then you can skip the encode
+step and directly create the ``DictionaryArray`` using
+:meth:`pyarrow.DictionaryArray.from_arrays`
+
+.. testcode::
+
+    categorical = pa.DictionaryArray.from_arrays(
+        indices=[0, 1, 2, 2, 1, 0],
+        dictionary=["red", "green", "blue"]
+    )
+    print(categorical)
+
+.. testoutput::
+
+    ...
+    -- dictionary:
+      [
+        "red",
+        "green",
+        "blue"
+      ]
+    -- indices:
+      [
+        0,
+        1,
+        2,
+        2,
+        1,
+        0
+      ]
diff --git a/py/_sources/data.rst.txt b/py/_sources/data.rst.txt
new file mode 100644
index 0000000..e31593a
--- /dev/null
+++ b/py/_sources/data.rst.txt
@@ -0,0 +1,574 @@
+.. 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.
+
+=================
+Data Manipulation
+=================
+
+Recipes related to filtering or transforming data in
+arrays and tables.
+
+.. contents::
+
+See :ref:`compute` for a complete list of all available compute functions
+
+Computing Mean/Min/Max values of an array
+=========================================
+
+Arrow provides compute functions that can be applied to arrays.
+Those compute functions are exposed through the :mod:`pyarrow.compute`
+module.
+
+.. testsetup::
+
+  import numpy as np
+  import pyarrow as pa
+
+  arr = pa.array(np.arange(100))
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+  print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+  0 .. 99
+
+We can compute the ``mean`` using the :func:`pyarrow.compute.mean`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  mean = pc.mean(arr)
+  print(mean)
+
+.. testoutput::
+
+  49.5
+
+And the ``min`` and ``max`` using the :func:`pyarrow.compute.min_max`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  min_max = pc.min_max(arr)
+  print(min_max)
+
+.. testoutput::
+
+  [('min', 0), ('max', 99)]
+
+Counting Occurrences of Elements
+================================
+
+Arrow provides compute functions that can be applied to arrays,
+those compute functions are exposed through the :mod:`pyarrow.compute`
+module.
+
+.. testsetup::
+
+  import pyarrow as pa
+
+  nums_arr = pa.array(list(range(10))*10)
+
+Given an array with all numbers from 0 to 9 repeated 10 times
+
+.. testcode::
+
+  print(f"LEN: {len(nums_arr)}, MIN/MAX: {nums_arr[0]} .. {nums_arr[-1]}")
+
+.. testoutput::
+
+  LEN: 100, MIN/MAX: 0 .. 9
+
+We can count occurrences of all entries in the array using the
+:func:`pyarrow.compute.value_counts` function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  counts = pc.value_counts(nums_arr)
+  for pair in counts:
+      print(pair)
+
+.. testoutput::
+
+  [('values', 0), ('counts', 10)]
+  [('values', 1), ('counts', 10)]
+  [('values', 2), ('counts', 10)]
+  [('values', 3), ('counts', 10)]
+  [('values', 4), ('counts', 10)]
+  [('values', 5), ('counts', 10)]
+  [('values', 6), ('counts', 10)]
+  [('values', 7), ('counts', 10)]
+  [('values', 8), ('counts', 10)]
+  [('values', 9), ('counts', 10)]
+
+Applying arithmetic functions to arrays.
+=========================================
+
+The compute functions in :mod:`pyarrow.compute` also include
+common transformations such as arithmetic functions.
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+  print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+  0 .. 99
+
+We can multiply all values by 2 using the :func:`pyarrow.compute.multiply`
+function
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  doubles = pc.multiply(arr, 2)
+  print(f"{doubles[0]} .. {doubles[-1]}")
+
+.. testoutput::
+
+  0 .. 198
+
+Appending tables to an existing table
+=====================================
+
+If you have data split across two different tables, it is possible
+to concatenate their rows into a single table.
+
+If we have the list of Oscar nominations divided between two different tables:
+
+.. testcode::
+
+  import pyarrow as pa
+
+  oscar_nominations_1 = pa.table([
+    ["Meryl Streep", "Katharine Hepburn"],
+    [21, 12]
+  ], names=["actor", "nominations"])
+
+  oscar_nominations_2 = pa.table([
+    ["Jack Nicholson", "Bette Davis"],
+    [12, 10]
+  ], names=["actor", "nominations"])
+
+We can combine them into a single table using :func:`pyarrow.concat_tables`:
+
+.. testcode::
+
+  oscar_nominations = pa.concat_tables([oscar_nominations_1, 
+                                        oscar_nominations_2])
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"],["Jack Nicholson","Bette Davis"]]
+    nominations: [[21,12],[12,10]]
+
+.. note::
+
+  By default, appending two tables is a zero-copy operation that doesn't need to
+  copy or rewrite data. As tables are made of :class:`pyarrow.ChunkedArray`,
+  the result will be a table with multiple chunks, each pointing to the original 
+  data that has been appended. Under some conditions, Arrow might have to 
+  cast data from one type to another (if `promote=True`).  In such cases the data 
+  will need to be copied and an extra cost will occur.
+
+Adding a column to an existing Table
+====================================
+
+If you have a table it is possible to extend its columns using
+:meth:`pyarrow.Table.append_column`
+
+Suppose we have a table with oscar nominations for each actress
+
+.. testcode::
+
+  import pyarrow as pa
+
+  oscar_nominations = pa.table([
+    ["Meryl Streep", "Katharine Hepburn"],
+    [21, 12]
+  ], names=["actor", "nominations"])
+
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"]]
+    nominations: [[21,12]]
+
+it's possible to append an additional column to track the years the
+nomination was won using :meth:`pyarrow.Table.append_column`
+
+.. testcode::
+
+  oscar_nominations = oscar_nominations.append_column(
+    "wonyears", 
+    pa.array([
+      [1980, 1983, 2012],
+      [1934, 1968, 1969, 1982]
+    ])
+  )
+
+  print(oscar_nominations)
+
+.. testoutput::
+
+    pyarrow.Table
+    actor: string
+    nominations: int64
+    wonyears: list<item: int64>
+      child 0, item: int64
+    ----
+    actor: [["Meryl Streep","Katharine Hepburn"]]
+    nominations: [[21,12]]
+    wonyears: [[[1980,1983,2012],[1934,1968,1969,1982]]]
+
+
+Replacing a column in an existing Table
+=======================================
+
+If you have a table it is possible to replace an existing column using
+:meth:`pyarrow.Table.set_column`
+
+Suppose we have a table with information about items sold at a supermarket
+on a particular day.
+
+.. testcode::
+
+  import pyarrow as pa
+
+  sales_data = pa.table([
+    ["Potato", "Bean", "Cucumber", "Eggs"],
+    [21, 12, 10, 30]
+  ], names=["item", "amount"])
+
+  print(sales_data)
+
+.. testoutput::
+
+    pyarrow.Table
+    item: string
+    amount: int64
+    ----
+    item: [["Potato","Bean","Cucumber","Eggs"]]
+    amount: [[21,12,10,30]]
+
+it's possible to replace the existing column `amount`
+in index `1` to update the sales 
+using :meth:`pyarrow.Table.set_column`
+
+.. testcode::
+
+  new_sales_data = sales_data.set_column(
+    1, 
+    "new_amount",
+    pa.array([30, 20, 15, 40])
+  )
+
+  print(new_sales_data)
+
+.. testoutput::
+
+    pyarrow.Table
+    item: string
+    new_amount: int64
+    ----
+    item: [["Potato","Bean","Cucumber","Eggs"]]
+    new_amount: [[30,20,15,40]]
+
+.. data_group_a_table:
+
+Group a Table
+================
+
+If you have a table which needs to be grouped by a particular key, 
+you can use :meth:`pyarrow.Table.group_by` followed by an aggregation
+operation :meth:`pyarrow.TableGroupBy.aggregate`. Learn more about
+groupby operations `here <https://arrow.apache.org/docs/python/compute.html#grouped-aggregations>`_.
+
+For example, let’s say we have some data with a particular set of keys
+and values associated with that key. And we want to group the data by 
+those keys and apply an aggregate function like sum to evaluate
+how many items are for each unique key. 
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+       pa.array(["a", "a", "b", "b", "c", "d", "e", "c"]),
+       pa.array([11, 20, 3, 4, 5, 1, 4, 10]),
+      ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","c","d","e","c"]]
+    values: [[11,20,3,4,5,1,4,10]]
+
+Now we let's apply a groupby operation. The table will be grouped
+by the field ``key`` and an aggregation operation, ``sum`` is applied
+on the column ``values``. Note that, an aggregation operation pairs with a column name. 
+
+.. testcode::
+
+  aggregated_table = table.group_by("keys").aggregate([("values", "sum")])
+
+  print(aggregated_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values_sum: int64
+    ----
+    keys: [["a","b","c","d","e"]]
+    values_sum: [[31,7,15,1,4]]
+
+If you observe carefully, the new table returns the aggregated column
+as ``values_sum`` which is formed by the column name and aggregation operation name. 
+
+Aggregation operations can be applied with options. Let's take a case where
+we have null values included in our dataset, but we want to take the 
+count of the unique groups excluding the null values. 
+
+A sample dataset can be formed as follows. 
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+        pa.array(["a", "a", "b", "b", "b", "c", "d", "d", "e", "c"]),
+        pa.array([None, 20, 3, 4, 5, 6, 10, 1, 4, None]),
+        ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","b","c","d","d","e","c"]]
+    values: [[null,20,3,4,5,6,10,1,4,null]]
+
+Let's apply an aggregation operation ``count`` with the option to exclude
+null values. 
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  grouped_table = table.group_by("keys").aggregate(
+    [("values", 
+    "count",
+    pc.CountOptions(mode="only_valid"))]
+  )
+
+  print(grouped_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values_count: int64
+    ----
+    keys: [["a","b","c","d","e"]]
+    values_count: [[1,3,1,2,1]]
+
+
+Sort a Table
+============
+
+Let's discusse how to sort a table. We can sort a table, 
+based on values of a given column. Data can be either sorted ``ascending`` 
+or ``descending``. 
+
+Prepare data;
+
+.. testcode::
+
+  import pyarrow as pa
+
+  table = pa.table([
+        pa.array(["a", "a", "b", "b", "b", "c", "d", "d", "e", "c"]),
+        pa.array([15, 20, 3, 4, 5, 6, 10, 1, 14, 123]),
+        ], names=["keys", "values"])
+
+  print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["a","a","b","b","b","c","d","d","e","c"]]
+    values: [[15,20,3,4,5,6,10,1,14,123]]
+
+Then applying sort with :meth:`pyarrow.Table.sort_by`;
+
+.. testcode::
+
+  sorted_table = table.sort_by([("values", "ascending")])
+
+  print(sorted_table)
+
+.. testoutput::
+
+    pyarrow.Table
+    keys: string
+    values: int64
+    ----
+    keys: [["d","b","b","b","c","d","e","a","a","c"]]
+    values: [[1,3,4,5,6,10,14,15,20,123]]
+
+
+Searching for values matching a predicate in Arrays
+===================================================
+
+If you have to look for values matching a predicate in Arrow arrays
+the :mod:`pyarrow.compute` module provides several methods that
+can be used to find the values you are looking for.
+
+For example, given an array with numbers from 0 to 9, if we
+want to look only for those greater than 5 we could use the
+:func:`pyarrow.compute.greater` method and get back the elements
+that fit our predicate
+
+.. testcode::
+
+  import pyarrow as pa
+  import pyarrow.compute as pc
+
+  arr = pa.array(range(10))
+  gtfive = pc.greater(arr, 5)
+
+  print(gtfive.to_string())
+
+.. testoutput::
+
+  [
+    false,
+    false,
+    false,
+    false,
+    false,
+    false,
+    true,
+    true,
+    true,
+    true
+  ]
+
+Furthermore we can filter the array to get only the entries
+that match our predicate with :func:`pyarrow.compute.filter`
+
+.. testcode::
+
+  filtered_array = pc.filter(arr, gtfive)
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    6,
+    7,
+    8,
+    9
+  ]
+
+Filtering Arrays using a mask
+=============================
+
+In many cases, when you are searching for something in an array
+you will end up with a mask that tells you the positions at which
+your search matched the values.
+
+For example in an array of four items, we might have a mask that
+matches the first and the last items only:
+
+.. testcode::
+
+  import pyarrow as pa
+
+  array = pa.array([1, 2, 3, 4])
+  mask = pa.array([True, False, False, True])
+
+We can then filter the array according to the mask using
+:meth:`pyarrow.Array.filter` to get back a new array with
+only the values matching the mask:
+
+.. testcode::
+
+  filtered_array = array.filter(mask)
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    1,
+    4
+  ]
+
+Most search functions in :mod:`pyarrow.compute` will produce
+a mask as the output, so you can use them to filter your arrays
+for the values that have been found by the function.
+
+For example we might filter our arrays for the values equal to ``2``
+using :func:`pyarrow.compute.equal`:
+
+.. testcode::
+
+  import pyarrow.compute as pc
+
+  filtered_array = array.filter(pc.equal(array, 2))
+  print(filtered_array)
+
+.. testoutput::
+
+  [
+    2
+  ]
diff --git a/py/_sources/flight.rst.txt b/py/_sources/flight.rst.txt
new file mode 100644
index 0000000..67c359c
--- /dev/null
+++ b/py/_sources/flight.rst.txt
@@ -0,0 +1,970 @@
+.. 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.
+
+============
+Arrow Flight
+============
+
+Recipes related to leveraging Arrow Flight protocol
+
+.. contents::
+
+Simple Parquet storage service with Arrow Flight
+================================================
+
+Suppose you want to implement a service that can store, send and receive
+Parquet files using the Arrow Flight protocol,
+``pyarrow`` provides an implementation framework in :mod:`pyarrow.flight`
+and particularly through the :class:`pyarrow.flight.FlightServerBase` class.
+
+.. testcode::
+
+    import pathlib
+
+    import pyarrow as pa
+    import pyarrow.flight
+    import pyarrow.parquet
+
+
+    class FlightServer(pa.flight.FlightServerBase):
+
+        def __init__(self, location="grpc://0.0.0.0:8815",
+                    repo=pathlib.Path("./datasets"), **kwargs):
+            super(FlightServer, self).__init__(location, **kwargs)
+            self._location = location
+            self._repo = repo
+
+        def _make_flight_info(self, dataset):
+            dataset_path = self._repo / dataset
+            schema = pa.parquet.read_schema(dataset_path)
+            metadata = pa.parquet.read_metadata(dataset_path)
+            descriptor = pa.flight.FlightDescriptor.for_path(
+                dataset.encode('utf-8')
+            )
+            endpoints = [pa.flight.FlightEndpoint(dataset, [self._location])]
+            return pyarrow.flight.FlightInfo(schema,
+                                            descriptor,
+                                            endpoints,
+                                            metadata.num_rows,
+                                            metadata.serialized_size)
+
+        def list_flights(self, context, criteria):
+            for dataset in self._repo.iterdir():
+                yield self._make_flight_info(dataset.name)
+
+        def get_flight_info(self, context, descriptor):
+            return self._make_flight_info(descriptor.path[0].decode('utf-8'))
+
+        def do_put(self, context, descriptor, reader, writer):
+            dataset = descriptor.path[0].decode('utf-8')
+            dataset_path = self._repo / dataset
+            data_table = reader.read_all()
+            pa.parquet.write_table(data_table, dataset_path)
+
+        def do_get(self, context, ticket):
+            dataset = ticket.ticket.decode('utf-8')
+            dataset_path = self._repo / dataset
+            return pa.flight.RecordBatchStream(pa.parquet.read_table(dataset_path))
+
+        def list_actions(self, context):
+            return [
+                ("drop_dataset", "Delete a dataset."),
+            ]
+
+        def do_action(self, context, action):
+            if action.type == "drop_dataset":
+                self.do_drop_dataset(action.body.to_pybytes().decode('utf-8'))
+            else:
+                raise NotImplementedError
+
+        def do_drop_dataset(self, dataset):
+            dataset_path = self._repo / dataset
+            dataset_path.unlink()
+
+The example server exposes :meth:`pyarrow.flight.FlightServerBase.list_flights`
+which is the method in charge of returning the list of data streams available
+for fetching.
+
+Likewise, :meth:`pyarrow.flight.FlightServerBase.get_flight_info` provides
+the information regarding a single specific data stream.
+
+Then we expose :meth:`pyarrow.flight.FlightServerBase.do_get` which is in charge
+of actually fetching the exposed data streams and sending them to the client.
+
+Allowing to list and download data streams would be pretty useless if we didn't
+expose a way to create them, this is the responsibility of
+:meth:`pyarrow.flight.FlightServerBase.do_put` which is in charge of receiving
+new data from the client and dealing with it (in this case saving it
+into a parquet file)
+
+This are the most common Arrow Flight requests, if we need to add more
+functionalities, we can do so using custom actions.
+
+In the previous example a ``drop_dataset`` custom action is added.
+All custom actions are executed through the
+:meth:`pyarrow.flight.FlightServerBase.do_action` method, thus it's up to
+the server subclass to dispatch them properly. In this case we invoke
+the `do_drop_dataset` method when the `action.type` is the one we expect.
+
+Our server can then be started with
+:meth:`pyarrow.flight.FlightServerBase.serve`
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = FlightServer()
+        server._repo.mkdir(exist_ok=True)
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import tempfile
+    repo = tempfile.TemporaryDirectory(prefix="arrow-cookbook-flight")
+    server = FlightServer(repo=pathlib.Path(repo.name))
+
+    pa.flight.connect("grpc://0.0.0.0:8815").wait_for_available()
+
+Once the server is started we can build a client to perform
+requests to it
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.flight
+
+    client = pa.flight.connect("grpc://0.0.0.0:8815")
+
+We can create a new table and upload it so that it gets stored
+in a new parquet file:
+
+.. testcode::
+
+    # Upload a new dataset
+    data_table = pa.table(
+        [["Mario", "Luigi", "Peach"]],
+        names=["Character"]
+    )
+    upload_descriptor = pa.flight.FlightDescriptor.for_path("uploaded.parquet")
+    writer, _ = client.do_put(upload_descriptor, data_table.schema)
+    writer.write_table(data_table)
+    writer.close()
+
+Once uploaded we should be able to retrieve the metadata for our
+newly uploaded table:
+
+.. testcode::
+
+    # Retrieve metadata of newly uploaded dataset
+    flight = client.get_flight_info(upload_descriptor)
+    descriptor = flight.descriptor
+    print("Path:", descriptor.path[0].decode('utf-8'), "Rows:", flight.total_records, "Size:", flight.total_bytes)
+    print("=== Schema ===")
+    print(flight.schema)
+    print("==============")
+
+.. testoutput::
+
+    Path: uploaded.parquet Rows: 3 Size: ...
+    === Schema ===
+    Character: string
+    ==============
+
+And we can fetch the content of the dataset:
+
+.. testcode::
+
+    # Read content of the dataset
+    reader = client.do_get(flight.endpoints[0].ticket)
+    read_table = reader.read_all()
+    print(read_table.to_pandas().head())
+
+.. testoutput::
+
+      Character
+    0     Mario
+    1     Luigi
+    2     Peach
+
+Once we finished we can invoke our custom action to delete the
+dataset we newly uploaded:
+
+.. testcode::
+
+    # Drop the newly uploaded dataset
+    client.do_action(pa.flight.Action("drop_dataset", "uploaded.parquet".encode('utf-8')))
+
+.. testcode::
+    :hide:
+
+    # Deal with a bug in do_action, see ARROW-14255
+    # can be removed once 6.0.0 is released.
+    try:
+        list(client.do_action(pa.flight.Action("drop_dataset", "uploaded.parquet".encode('utf-8'))))
+    except:
+        pass
+
+To confirm our dataset was deleted,
+we might list all parquet files that are currently stored by the server:
+
+.. testcode::
+
+    # List existing datasets.
+    for flight in client.list_flights():
+        descriptor = flight.descriptor
+        print("Path:", descriptor.path[0].decode('utf-8'), "Rows:", flight.total_records, "Size:", flight.total_bytes)
+        print("=== Schema ===")
+        print(flight.schema)
+        print("==============")
+        print("")
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+    repo.cleanup()
+
+Streaming Parquet Storage Service
+=================================
+
+We can improve the Parquet storage service and avoid holding entire datasets in
+memory by streaming data. Flight readers and writers, like others in PyArrow,
+can be iterated through, so let's update the server from before to take
+advantage of this:
+
+.. testcode::
+
+   import pathlib
+
+   import pyarrow as pa
+   import pyarrow.flight
+   import pyarrow.parquet
+
+
+   class FlightServer(pa.flight.FlightServerBase):
+
+       def __init__(self, location="grpc://0.0.0.0:8815",
+                   repo=pathlib.Path("./datasets"), **kwargs):
+           super(FlightServer, self).__init__(location, **kwargs)
+           self._location = location
+           self._repo = repo
+
+       def _make_flight_info(self, dataset):
+           dataset_path = self._repo / dataset
+           schema = pa.parquet.read_schema(dataset_path)
+           metadata = pa.parquet.read_metadata(dataset_path)
+           descriptor = pa.flight.FlightDescriptor.for_path(
+               dataset.encode('utf-8')
+           )
+           endpoints = [pa.flight.FlightEndpoint(dataset, [self._location])]
+           return pyarrow.flight.FlightInfo(schema,
+                                           descriptor,
+                                           endpoints,
+                                           metadata.num_rows,
+                                           metadata.serialized_size)
+
+       def list_flights(self, context, criteria):
+           for dataset in self._repo.iterdir():
+               yield self._make_flight_info(dataset.name)
+
+       def get_flight_info(self, context, descriptor):
+           return self._make_flight_info(descriptor.path[0].decode('utf-8'))
+
+       def do_put(self, context, descriptor, reader, writer):
+           dataset = descriptor.path[0].decode('utf-8')
+           dataset_path = self._repo / dataset
+           # Read the uploaded data and write to Parquet incrementally
+           with dataset_path.open("wb") as sink:
+               with pa.parquet.ParquetWriter(sink, reader.schema) as writer:
+                   for chunk in reader:
+                       writer.write_table(pa.Table.from_batches([chunk.data]))
+
+       def do_get(self, context, ticket):
+           dataset = ticket.ticket.decode('utf-8')
+           # Stream data from a file
+           dataset_path = self._repo / dataset
+           reader = pa.parquet.ParquetFile(dataset_path)
+           return pa.flight.GeneratorStream(
+               reader.schema_arrow, reader.iter_batches())
+
+       def list_actions(self, context):
+           return [
+               ("drop_dataset", "Delete a dataset."),
+           ]
+
+       def do_action(self, context, action):
+           if action.type == "drop_dataset":
+               self.do_drop_dataset(action.body.to_pybytes().decode('utf-8'))
+           else:
+               raise NotImplementedError
+
+       def do_drop_dataset(self, dataset):
+           dataset_path = self._repo / dataset
+           dataset_path.unlink()
+
+First, we've modified :meth:`pyarrow.flight.FlightServerBase.do_put`. Instead
+of reading all the uploaded data into a :class:`pyarrow.Table` before writing,
+we instead iterate through each batch as it comes and add it to a Parquet file.
+
+Then, we've modified :meth:`pyarrow.flight.FlightServerBase.do_get` to stream
+data to the client. This uses :class:`pyarrow.flight.GeneratorStream`, which
+takes a schema and any iterable or iterator. Flight then iterates through and
+sends each record batch to the client, allowing us to handle even large Parquet
+files that don't fit into memory.
+
+While GeneratorStream has the advantage that it can stream data, that means
+Flight must call back into Python for each record batch to send. In contrast,
+RecordBatchStream requires that all data is in-memory up front, but once
+created, all data transfer is handled purely in C++, without needing to call
+Python code.
+
+Let's give the server a spin. As before, we'll start the server:
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = FlightServer()
+        server._repo.mkdir(exist_ok=True)
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import tempfile
+    repo = tempfile.TemporaryDirectory(prefix="arrow-cookbook-flight")
+    server = FlightServer(repo=pathlib.Path(repo.name))
+
+    pa.flight.connect("grpc://0.0.0.0:8815").wait_for_available()
+
+We create a client, and this time, we'll write batches to the writer, as if we
+had a stream of data instead of a table in memory:
+
+.. testcode::
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+   client = pa.flight.connect("grpc://0.0.0.0:8815")
+
+   # Upload a new dataset
+   NUM_BATCHES = 1024
+   ROWS_PER_BATCH = 4096
+   upload_descriptor = pa.flight.FlightDescriptor.for_path("streamed.parquet")
+   batch = pa.record_batch([
+       pa.array(range(ROWS_PER_BATCH)),
+   ], names=["ints"])
+   writer, _ = client.do_put(upload_descriptor, batch.schema)
+   with writer:
+       for _ in range(NUM_BATCHES):
+           writer.write_batch(batch)
+
+As before, we can then read it back. Again, we'll read each batch from the
+stream as it arrives, instead of reading them all into a table:
+
+.. testcode::
+
+   # Read content of the dataset
+   flight = client.get_flight_info(upload_descriptor)
+   reader = client.do_get(flight.endpoints[0].ticket)
+   total_rows = 0
+   for chunk in reader:
+       total_rows += chunk.data.num_rows
+   print("Got", total_rows, "rows total, expected", NUM_BATCHES * ROWS_PER_BATCH)
+
+.. testoutput::
+
+   Got 4194304 rows total, expected 4194304
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+    repo.cleanup()
+
+Authentication with user/password
+=================================
+
+Often, services need a way to authenticate the user and identify who
+they are. Flight provides :doc:`several ways to implement
+authentication <pyarrow:format/Flight>`; the simplest uses a
+user-password scheme. At startup, the client authenticates itself with
+the server using a username and password. The server returns an
+authorization token to include on future requests.
+
+.. warning:: Authentication should only be used over a secure encrypted
+             channel, i.e. TLS should be enabled.
+
+.. note:: While the scheme is described as "`(HTTP) basic
+          authentication`_", it does not actually implement HTTP
+          authentication (RFC 7325) per se.
+
+While Flight provides some interfaces to implement such a scheme, the
+server must provide the actual implementation, as demonstrated
+below. **The implementation here is not secure and is provided as a
+minimal example only.**
+
+.. testcode::
+
+   import base64
+   import secrets
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+
+   class EchoServer(pa.flight.FlightServerBase):
+       """A simple server that just echoes any requests from DoAction."""
+
+       def do_action(self, context, action):
+           return [action.type.encode("utf-8"), action.body]
+
+
+   class BasicAuthServerMiddlewareFactory(pa.flight.ServerMiddlewareFactory):
+       """
+       Middleware that implements username-password authentication.
+
+       Parameters
+       ----------
+       creds: Dict[str, str]
+           A dictionary of username-password values to accept.
+       """
+
+       def __init__(self, creds):
+           self.creds = creds
+           # Map generated bearer tokens to users
+           self.tokens = {}
+
+       def start_call(self, info, headers):
+           """Validate credentials at the start of every call."""
+           # Search for the authentication header (case-insensitive)
+           auth_header = None
+           for header in headers:
+               if header.lower() == "authorization":
+                   auth_header = headers[header][0]
+                   break
+
+           if not auth_header:
+               raise pa.flight.FlightUnauthenticatedError("No credentials supplied")
+
+           # The header has the structure "AuthType TokenValue", e.g.
+           # "Basic <encoded username+password>" or "Bearer <random token>".
+           auth_type, _, value = auth_header.partition(" ")
+
+           if auth_type == "Basic":
+               # Initial "login". The user provided a username/password
+               # combination encoded in the same way as HTTP Basic Auth.
+               decoded = base64.b64decode(value).decode("utf-8")
+               username, _, password = decoded.partition(':')
+               if not password or password != self.creds.get(username):
+                   raise pa.flight.FlightUnauthenticatedError("Unknown user or invalid password")
+               # Generate a secret, random bearer token for future calls.
+               token = secrets.token_urlsafe(32)
+               self.tokens[token] = username
+               return BasicAuthServerMiddleware(token)
+           elif auth_type == "Bearer":
+               # An actual call. Validate the bearer token.
+               username = self.tokens.get(value)
+               if username is None:
+                   raise pa.flight.FlightUnauthenticatedError("Invalid token")
+               return BasicAuthServerMiddleware(value)
+
+           raise pa.flight.FlightUnauthenticatedError("No credentials supplied")
+
+
+   class BasicAuthServerMiddleware(pa.flight.ServerMiddleware):
+       """Middleware that implements username-password authentication."""
+
+       def __init__(self, token):
+           self.token = token
+
+       def sending_headers(self):
+           """Return the authentication token to the client."""
+           return {"authorization": f"Bearer {self.token}"}
+
+
+   class NoOpAuthHandler(pa.flight.ServerAuthHandler):
+       """
+       A handler that implements username-password authentication.
+
+       This is required only so that the server will respond to the internal
+       Handshake RPC call, which the client calls when authenticate_basic_token
+       is called. Otherwise, it should be a no-op as the actual authentication is
+       implemented in middleware.
+       """
+
+       def authenticate(self, outgoing, incoming):
+           pass
+
+       def is_valid(self, token):
+           return ""
+
+We can then start the server:
+
+.. code-block::
+
+    if __name__ == '__main__':
+        server = EchoServer(
+            auth_handler=NoOpAuthHandler(),
+            location="grpc://0.0.0.0:8816",
+            middleware={
+                "basic": BasicAuthServerMiddlewareFactory({
+                    "test": "password",
+                })
+            },
+        )
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import threading
+    server = EchoServer(
+        auth_handler=NoOpAuthHandler(),
+        location="grpc://0.0.0.0:8816",
+        middleware={
+            "basic": BasicAuthServerMiddlewareFactory({
+                "test": "password",
+            })
+        },
+    )
+    t = threading.Thread(target=server.serve)
+    t.start()
+
+Then, we can make a client and log in:
+
+.. testcode::
+
+   import pyarrow as pa
+   import pyarrow.flight
+
+   client = pa.flight.connect("grpc://0.0.0.0:8816")
+
+   token_pair = client.authenticate_basic_token(b'test', b'password')
+   print(token_pair)
+
+.. testoutput::
+
+   (b'authorization', b'Bearer ...')
+
+For future calls, we include the authentication token with the call:
+
+.. testcode::
+
+   action = pa.flight.Action("echo", b"Hello, world!")
+   options = pa.flight.FlightCallOptions(headers=[token_pair])
+   for response in client.do_action(action=action, options=options):
+       print(response.body.to_pybytes())
+
+.. testoutput::
+
+   b'echo'
+   b'Hello, world!'
+
+If we fail to do so, we get an authentication error:
+
+.. testcode::
+
+   try:
+       list(client.do_action(action=action))
+   except pa.flight.FlightUnauthenticatedError as e:
+       print("Unauthenticated:", e)
+   else:
+       raise RuntimeError("Expected call to fail")
+
+.. testoutput::
+
+   Unauthenticated: No credentials supplied. Detail: Unauthenticated
+
+Or if we use the wrong credentials on login, we also get an error:
+
+.. testcode::
+
+   try:
+       client.authenticate_basic_token(b'invalid', b'password')
+   except pa.flight.FlightUnauthenticatedError as e:
+       print("Unauthenticated:", e)
+   else:
+       raise RuntimeError("Expected call to fail")
+
+.. testoutput::
+
+   Unauthenticated: Unknown user or invalid password. Detail: Unauthenticated
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
+
+.. _(HTTP) basic authentication: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
+
+Securing connections with TLS
+=================================
+
+Following on from the previous scenario where traffic to the server is managed via a username and password, 
+HTTPS (more specifically TLS) communication allows an additional layer of security by encrypting messages
+between the client and server. This is achieved using certificates. During development, the easiest 
+approach is developing with self-signed certificates. At startup, the server loads the public and private 
+key and the client authenticates the server with the TLS root certificate.
+
+.. note:: In production environments it is recommended to make use of a certificate signed by a certificate authority.
+
+**Step 1 - Generating the Self Signed Certificate**  
+
+Generate a self-signed certificate by using dotnet on `Windows`_, or `openssl`_ on Linux or MacOS. 
+Alternatively, the self-signed certificate from the `Arrow testing data repository`_ can be used. 
+Depending on the file generated, you may need to convert it to a .crt and .key file as required for the Arrow server. 
+One method to achieve this is openssl, please visit this `IBM article`_ for more info. 
+
+
+**Step 2 - Running a server with TLS enabled**
+
+The code below is a minimal working example of an Arrow server used to receive data with TLS.
+
+.. testcode::
+    
+    import argparse
+    import pyarrow
+    import pyarrow.flight
+    
+    
+    class FlightServer(pyarrow.flight.FlightServerBase):
+        def __init__(self, host="localhost", location=None,
+                     tls_certificates=None, verify_client=False,
+                     root_certificates=None, auth_handler=None):
+            super(FlightServer, self).__init__(
+                location, auth_handler, tls_certificates, verify_client,
+                root_certificates)
+            self.flights = {}
+    
+        @classmethod
+        def descriptor_to_key(self, descriptor):
+            return (descriptor.descriptor_type.value, descriptor.command,
+                    tuple(descriptor.path or tuple()))
+    
+        def do_put(self, context, descriptor, reader, writer):
+            key = FlightServer.descriptor_to_key(descriptor)
+            print(key)
+            self.flights[key] = reader.read_all()
+            print(self.flights[key])
+    
+    
+    def main():
+        parser = argparse.ArgumentParser()
+        parser.add_argument("--tls", nargs=2, default=None, metavar=('CERTFILE', 'KEYFILE'))
+        args = parser.parse_args()                                
+        tls_certificates = []
+    
+        scheme = "grpc+tls"
+        host = "localhost"
+        port = "5005"
+        
+        with open(args.tls[0], "rb") as cert_file:
+            tls_cert_chain = cert_file.read()
+        with open(args.tls[1], "rb") as key_file:
+            tls_private_key = key_file.read()
+    
+        tls_certificates.append((tls_cert_chain, tls_private_key))
+        
+        location = "{}://{}:{}".format(scheme, host, port)
+    
+        server = FlightServer(host, location,
+                              tls_certificates=tls_certificates)
+        print("Serving on", location)
+        server.serve()
+    
+    
+    if __name__ == '__main__':
+        main()
+
+Running the server, you should see ``Serving on grpc+tls://localhost:5005``.
+
+**Step 3 - Securely Connecting to the Server**
+Suppose we want to connect to the client and push some data to it. The following code securely sends information to the server using TLS encryption.
+
+.. testcode::
+    
+    import argparse
+    import pyarrow
+    import pyarrow.flight
+    import pandas as pd
+    
+    # Assumes incoming data object is a Pandas Dataframe
+    def push_to_server(name, data, client):
+        object_to_send = pyarrow.Table.from_pandas(data)
+        writer, _ = client.do_put(pyarrow.flight.FlightDescriptor.for_path(name), object_to_send.schema)
+        writer.write_table(object_to_send)
+        writer.close()
+    
+    def main():
+        parser = argparse.ArgumentParser()
+    
+        parser.add_argument('--tls-roots', default=None,
+                            help='Path to trusted TLS certificate(s)')
+        parser.add_argument('--host', default="localhost",
+                            help='Host endpoint')
+        parser.add_argument('--port', default=5005,
+                            help='Host port')
+        args = parser.parse_args()
+        kwargs = {}
+    
+        with open(args.tls_roots, "rb") as root_certs:
+            kwargs["tls_root_certs"] = root_certs.read()
+    
+        client = pyarrow.flight.FlightClient(f"grpc+tls://{args.host}:{args.port}", **kwargs)
+        data = {'Animal': ['Dog', 'Cat', 'Mouse'], 'Size': ['Big', 'Small', 'Tiny']}
+        df = pd.DataFrame(data, columns=['Animal', 'Size'])
+        push_to_server("AnimalData", df, client)
+    
+    if __name__ == '__main__':
+        try:
+            main()
+        except Exception as e:
+            print(e) 
+            
+Running the client script, you should see the server printing out information about the data it just received.
+
+.. _IBM article: https://www.ibm.com/docs/en/arl/9.7?topic=certification-extracting-certificate-keys-from-pfx-file
+.. _Windows: https://docs.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide
+.. _Arrow testing data repository: https://github.com/apache/arrow-testing/tree/master/data/flight
+.. _openssl: https://www.ibm.com/docs/en/api-connect/2018.x?topic=overview-generating-self-signed-certificate-using-openssl
+
+Propagating OpenTelemetry Traces
+================================
+
+Distributed tracing with OpenTelemetry_ allows collecting call-level performance
+measurements across a Flight service. In order to correlate spans across a Flight
+client and server, trace context must be passed between the two. This can be passed
+manually through headers in :class:`pyarrow.flight.FlightCallOptions`, or can 
+be automatically propagated using middleware.
+
+This example shows how to accomplish trace propagation through middleware.
+The client middleware needs to inject the trace context into the call headers.
+The server middleware needs to extract the trace context from the headers and
+pass the context into a new span. Optionally, the client middleware can also
+create a new span to time the client-side call.
+
+.. _OpenTelemetry: https://opentelemetry.io/docs/instrumentation/python/getting-started/
+
+**Step 1: define the client middleware:**
+
+.. testcode::
+
+    import pyarrow.flight as flight
+    from opentelemetry import trace
+    from opentelemetry.propagate import inject
+    from opentelemetry.trace.status import StatusCode
+
+    class ClientTracingMiddlewareFactory(flight.ClientMiddlewareFactory):
+        def __init__(self):
+            self._tracer = trace.get_tracer(__name__)
+
+        def start_call(self, info):
+            span = self._tracer.start_span(f"client.{info.method}")
+            return ClientTracingMiddleware(span)
+
+    class ClientTracingMiddleware(flight.ClientMiddleware):
+        def __init__(self, span):
+            self._span = span
+
+        def sending_headers(self):
+            ctx = trace.set_span_in_context(self._span)
+            carrier = {}
+            inject(carrier=carrier, context=ctx)
+            return carrier
+
+        def call_completed(self, exception):
+            if exception:
+                self._span.record_exception(exception)
+                self._span.set_status(StatusCode.ERROR)
+                print(exception)
+            else:
+                self._span.set_status(StatusCode.OK)
+            self._span.end()
+
+**Step 2: define the server middleware:**
+
+.. testcode::
+
+    import pyarrow.flight as flight
+    from opentelemetry import trace
+    from opentelemetry.propagate import extract
+    from opentelemetry.trace.status import StatusCode
+
+    class ServerTracingMiddlewareFactory(flight.ServerMiddlewareFactory):
+        def __init__(self):
+            self._tracer = trace.get_tracer(__name__)
+        
+        def start_call(self, info, headers):
+            context = extract(headers)
+            span = self._tracer.start_span(f"server.{info.method}", context=context)
+            return ServerTracingMiddleware(span)
+    
+    class ServerTracingMiddleware(flight.ServerMiddleware):
+        def __init__(self, span):
+            self._span = span
+        
+        def call_completed(self, exception):
+            if exception:
+                self._span.record_exception(exception)
+                self._span.set_status(StatusCode.ERROR)
+                print(exception)
+            else:
+                self._span.set_status(StatusCode.OK)
+            self._span.end()
+
+**Step 3: configure the trace exporter, processor, and provider:**
+
+Both the server and client will need to be configured with the OpenTelemetry SDK
+to record spans and export them somewhere. For the sake of the example, we'll 
+collect the spans into a Python list, but this is normally where you would set
+them up to be exported to some service like `Jaeger`_. See other examples of 
+exporters at `OpenTelemetry Exporters`_.
+
+As part of this, you will need to define the resource where spans are running.
+At a minimum this is the service name, but it could include other information like
+a hostname, process id, service version, and operating system.
+
+.. _Jaeger: https://www.jaegertracing.io/
+.. _`OpenTelemetry Exporters`: https://opentelemetry.io/docs/instrumentation/python/exporters/
+
+.. testcode::
+
+    from opentelemetry import trace
+    from opentelemetry.sdk.trace import TracerProvider
+    from opentelemetry.sdk.trace.export import SimpleSpanProcessor
+    from opentelemetry.sdk.resources import SERVICE_NAME, Resource
+    from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
+
+    class TestSpanExporter(SpanExporter):
+        def __init__(self):
+            self.spans = []
+    
+        def export(self, spans):
+            self.spans.extend(spans)
+            return SpanExportResult.SUCCESS
+
+    def configure_tracing():
+        # Service name is required for most backends,
+        # and although it's not necessary for console export,
+        # it's good to set service name anyways.
+        resource = Resource(attributes={
+            SERVICE_NAME: "my-service"
+        })
+        exporter = TestSpanExporter()
+        provider = TracerProvider(resource=resource)
+        processor = SimpleSpanProcessor(exporter)
+        provider.add_span_processor(processor)
+        trace.set_tracer_provider(provider)
+        return exporter
+
+**Step 4: add the middleware to the server:**
+
+We can use the middleware now in our EchoServer from earlier. 
+
+.. code-block::
+
+    if __name__ == '__main__':
+        exporter = configure_tracing()
+        server = EchoServer(
+            location="grpc://0.0.0.0:8816",
+            middleware={
+                "tracing": ServerTracingMiddlewareFactory()
+            },
+        )
+        server.serve()
+
+.. testcode::
+    :hide:
+
+    # Code block to start for real a server in background
+    # and wait for it to be available.
+    # Previous code block is just to show to user how to start it.
+    import threading
+    exporter = configure_tracing()
+    server = EchoServer(
+        location="grpc://0.0.0.0:8816",
+        middleware={
+            "tracing": ServerTracingMiddlewareFactory()
+        },
+    )
+    t = threading.Thread(target=server.serve)
+    t.start()
+
+**Step 5: add the middleware to the client:**
+
+.. testcode::
+
+   client = pa.flight.connect(
+       "grpc://0.0.0.0:8816",
+       middleware=[ClientTracingMiddlewareFactory()],
+   )
+
+**Step 6: use the client within active spans:**
+
+When we make a call with our client within an OpenTelemetry span, our client 
+middleware will create a child span for the client-side Flight call and then 
+propagate the span context to the server. Our server middleware will pick up 
+that trace context and create another child span.
+
+.. testcode::
+
+   from opentelemetry import trace
+
+   # Client would normally also need to configure tracing, but for this example
+   # the client and server are running in the same Python process.
+   # exporter = configure_tracing()
+
+   tracer = trace.get_tracer(__name__)
+
+   with tracer.start_as_current_span("hello_world") as span:
+       action = pa.flight.Action("echo", b"Hello, world!")
+       # Call list() on do_action to drain all results.
+       list(client.do_action(action=action))
+    
+   print(f"There are {len(exporter.spans)} spans.")
+   print(f"The span names are:\n  {list(span.name for span in exporter.spans)}.")
+   print(f"The span status codes are:\n  "
+         f"{list(span.status.status_code for span in exporter.spans)}.")
+
+.. testoutput::
+
+   There are 3 spans.
+   The span names are:
+     ['server.FlightMethod.DO_ACTION', 'client.FlightMethod.DO_ACTION', 'hello_world'].
+   The span status codes are:
+     [<StatusCode.OK: 1>, <StatusCode.OK: 1>, <StatusCode.UNSET: 0>].
+
+As expected, we have three spans: one in our client code, one in the client
+middleware, and one in the server middleware.
+
+.. testcode::
+    :hide:
+
+    # Shutdown the server
+    server.shutdown()
\ No newline at end of file
diff --git a/py/_sources/index.rst.txt b/py/_sources/index.rst.txt
new file mode 100644
index 0000000..06aa495
--- /dev/null
+++ b/py/_sources/index.rst.txt
@@ -0,0 +1,48 @@
+.. 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.
+
+.. Apache Arrow Cookbook documentation master file, created by
+   sphinx-quickstart on Wed Jun 16 10:33:09 2021.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Apache Arrow Python Cookbook
+============================
+
+The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.
+
+This cookbook is tested with pyarrow |version|.
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+   io
+   create
+   schema
+   data
+   flight
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/py/_sources/io.rst.txt b/py/_sources/io.rst.txt
new file mode 100644
index 0000000..4a38853
--- /dev/null
+++ b/py/_sources/io.rst.txt
@@ -0,0 +1,712 @@
+.. 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.
+
+========================
+Reading and Writing Data
+========================
+
+Recipes related to reading and writing data from disk using
+Apache Arrow.
+
+.. contents::
+
+.. testsetup::
+
+    import pyarrow as pa
+
+Write a Parquet file
+====================
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+To write it to a Parquet file, 
+as Parquet is a format that contains multiple named columns,
+we must create a :class:`pyarrow.Table` out of it,
+so that we get a table of a single column which can then be
+written to a Parquet file. 
+
+.. testcode::
+
+    table = pa.Table.from_arrays([arr], names=["col1"])
+
+Once we have a table, it can be written to a Parquet File 
+using the functions provided by the ``pyarrow.parquet`` module
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    pq.write_table(table, "example.parquet", compression=None)
+
+Reading a Parquet file
+======================
+
+Given a Parquet file, it can be read back to a :class:`pyarrow.Table`
+by using :func:`pyarrow.parquet.read_table` function
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    table = pq.read_table("example.parquet")
+
+The resulting table will contain the same columns that existed in
+the parquet file as :class:`ChunkedArray`
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Reading a subset of Parquet data
+================================
+
+When reading a Parquet file with :func:`pyarrow.parquet.read_table` 
+it is possible to restrict which Columns and Rows will be read
+into memory by using the ``filters`` and ``columns`` arguments
+
+.. testcode::
+
+    import pyarrow.parquet as pq
+
+    table = pq.read_table("example.parquet", 
+                          columns=["col1"],
+                          filters=[
+                              ("col1", ">", 5),
+                              ("col1", "<", 10),
+                          ])
+
+The resulting table will contain only the projected columns
+and filtered rows. Refer to :func:`pyarrow.parquet.read_table`
+documentation for details about the syntax for filters.
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[6,7,8,9]]
+
+Saving Arrow Arrays to disk
+===========================
+
+Apart from using arrow to read and save common file formats like Parquet,
+it is possible to dump data in the raw arrow format which allows 
+direct memory mapping of data from disk. This format is called
+the Arrow IPC format.
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+We can save the array by making a :class:`pyarrow.RecordBatch` out
+of it and writing the record batch to disk.
+
+.. testcode::
+
+    schema = pa.schema([
+        pa.field('nums', arr.type)
+    ])
+
+    with pa.OSFile('arraydata.arrow', 'wb') as sink:
+        with pa.ipc.new_file(sink, schema=schema) as writer:
+            batch = pa.record_batch([arr], schema=schema)
+            writer.write(batch)
+
+If we were to save multiple arrays into the same file,
+we would just have to adapt the ``schema`` accordingly and add
+them all to the ``record_batch`` call.
+
+Memory Mapping Arrow Arrays from disk
+=====================================
+
+Arrow arrays that have been written to disk in the Arrow IPC
+format can be memory mapped back directly from the disk.
+
+.. testcode::
+
+    with pa.memory_map('arraydata.arrow', 'r') as source:
+        loaded_arrays = pa.ipc.open_file(source).read_all()
+
+.. testcode::
+
+    arr = loaded_arrays[0]
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+Writing CSV files
+=================
+
+It is possible to write an Arrow :class:`pyarrow.Table` to
+a CSV file using the :func:`pyarrow.csv.write_csv` function
+
+.. testcode::
+
+    arr = pa.array(range(100))
+    table = pa.Table.from_arrays([arr], names=["col1"])
+    
+    import pyarrow.csv
+    pa.csv.write_csv(table, "table.csv",
+                     write_options=pa.csv.WriteOptions(include_header=True))
+
+Writing CSV files incrementally
+===============================
+
+If you need to write data to a CSV file incrementally
+as you generate or retrieve the data and you don't want to keep
+in memory the whole table to write it at once, it's possible to use
+:class:`pyarrow.csv.CSVWriter` to write data incrementally
+
+.. testcode::
+
+    schema = pa.schema([("col1", pa.int32())])
+    with pa.csv.CSVWriter("table.csv", schema=schema) as writer:
+        for chunk in range(10):
+            datachunk = range(chunk*10, (chunk+1)*10)
+            table = pa.Table.from_arrays([pa.array(datachunk)], schema=schema)
+            writer.write(table)
+
+It's equally possible to write :class:`pyarrow.RecordBatch`
+by passing them as you would for tables.
+
+Reading CSV files
+=================
+
+Arrow can read :class:`pyarrow.Table` entities from CSV using an
+optimized codepath that can leverage multiple threads.
+
+.. testcode::
+
+    import pyarrow.csv
+
+    table = pa.csv.read_csv("table.csv")
+
+Arrow will do its best to infer data types.  Further options can be
+provided to :func:`pyarrow.csv.read_csv` to drive
+:class:`pyarrow.csv.ConvertOptions`.
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Writing Partitioned Datasets 
+============================
+
+When your dataset is big it usually makes sense to split it into
+multiple separate files. You can do this manually or use 
+:func:`pyarrow.dataset.write_dataset` to let Arrow do the effort
+of splitting the data in chunks for you.
+
+The ``partitioning`` argument allows to tell :func:`pyarrow.dataset.write_dataset`
+for which columns the data should be split. 
+
+For example given 100 birthdays, within 2000 and 2009
+
+.. testcode::
+
+    import numpy.random
+    data = pa.table({"day": numpy.random.randint(1, 31, size=100), 
+                     "month": numpy.random.randint(1, 12, size=100),
+                     "year": [2000 + x // 10 for x in range(100)]})
+
+Then we could partition the data by the year column so that it
+gets saved in 10 different files:
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.dataset as ds
+
+    ds.write_dataset(data, "./partitioned", format="parquet",
+                     partitioning=ds.partitioning(pa.schema([("year", pa.int16())])))
+
+Arrow will partition datasets in subdirectories by default, which will
+result in 10 different directories named with the value of the partitioning
+column each with a file containing the subset of the data for that partition:
+
+.. testcode::
+
+    from pyarrow import fs
+
+    localfs = fs.LocalFileSystem()
+    partitioned_dir_content = localfs.get_file_info(fs.FileSelector("./partitioned", recursive=True))
+    files = sorted((f.path for f in partitioned_dir_content if f.type == fs.FileType.File))
+
+    for file in files:
+        print(file)
+
+.. testoutput::
+
+    ./partitioned/2000/part-0.parquet
+    ./partitioned/2001/part-0.parquet
+    ./partitioned/2002/part-0.parquet
+    ./partitioned/2003/part-0.parquet
+    ./partitioned/2004/part-0.parquet
+    ./partitioned/2005/part-0.parquet
+    ./partitioned/2006/part-0.parquet
+    ./partitioned/2007/part-0.parquet
+    ./partitioned/2008/part-0.parquet
+    ./partitioned/2009/part-0.parquet
+
+Reading Partitioned data
+========================
+
+In some cases, your dataset might be composed by multiple separate
+files each containing a piece of the data. 
+
+.. testsetup::
+
+    import pathlib
+    import pyarrow.parquet as pq
+
+    examples = pathlib.Path("examples")
+    examples.mkdir(exist_ok=True)
+
+    pq.write_table(pa.table({"col1": range(10)}), 
+                   examples / "dataset1.parquet", compression=None)
+    pq.write_table(pa.table({"col1": range(10, 20)}), 
+                   examples / "dataset2.parquet", compression=None)
+    pq.write_table(pa.table({"col1": range(20, 30)}), 
+                   examples / "dataset3.parquet", compression=None)
+
+In this case the :func:`pyarrow.dataset.dataset` function provides
+an interface to discover and read all those files as a single big dataset.
+
+For example if we have a structure like:
+
+.. code-block::
+
+    examples/
+    ├── dataset1.parquet
+    ├── dataset2.parquet
+    └── dataset3.parquet
+
+Then, pointing the :func:`pyarrow.dataset.dataset` function to the ``examples`` directory
+will discover those parquet files and will expose them all as a single
+:class:`pyarrow.dataset.Dataset`:
+
+.. testcode::
+
+    import pyarrow.dataset as ds
+
+    dataset = ds.dataset("./examples", format="parquet")
+    print(dataset.files)
+
+.. testoutput::
+
+    ['./examples/dataset1.parquet', './examples/dataset2.parquet', './examples/dataset3.parquet']
+
+The whole dataset can be viewed as a single big table using
+:meth:`pyarrow.dataset.Dataset.to_table`. While each parquet file
+contains only 10 rows, converting the dataset to a table will
+expose them as a single Table.
+
+.. testcode::
+
+    table = dataset.to_table()
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29]]
+
+Notice that converting to a table will force all data to be loaded 
+in memory.  For big datasets is usually not what you want.
+
+For this reason, it might be better to rely on the 
+:meth:`pyarrow.dataset.Dataset.to_batches` method, which will
+iteratively load the dataset one chunk of data at the time returning a 
+:class:`pyarrow.RecordBatch` for each one of them.
+
+.. testcode::
+
+    for record_batch in dataset.to_batches():
+        col1 = record_batch.column("col1")
+        print(f"{col1._name} = {col1[0]} .. {col1[-1]}")
+
+.. testoutput::
+
+    col1 = 0 .. 9
+    col1 = 10 .. 19
+    col1 = 20 .. 29
+
+Reading Partitioned Data from S3
+================================
+
+The :class:`pyarrow.dataset.Dataset` is also able to abstract
+partitioned data coming from remote sources like S3 or HDFS.
+
+.. testcode::
+
+    from pyarrow import fs
+
+    # List content of s3://ursa-labs-taxi-data/2011
+    s3 = fs.SubTreeFileSystem(
+        "ursa-labs-taxi-data", 
+        fs.S3FileSystem(region="us-east-2", anonymous=True)
+    )
+    for entry in s3.get_file_info(fs.FileSelector("2011", recursive=True)):
+        if entry.type == fs.FileType.File:
+            print(entry.path)
+
+.. testoutput::
+
+    2011/01/data.parquet
+    2011/02/data.parquet
+    2011/03/data.parquet
+    2011/04/data.parquet
+    2011/05/data.parquet
+    2011/06/data.parquet
+    2011/07/data.parquet
+    2011/08/data.parquet
+    2011/09/data.parquet
+    2011/10/data.parquet
+    2011/11/data.parquet
+    2011/12/data.parquet
+
+The data in the bucket can be loaded as a single big dataset partitioned
+by ``month`` using
+
+.. testcode::
+
+    dataset = ds.dataset("s3://ursa-labs-taxi-data/2011",
+                         partitioning=["month"])
+    for f in dataset.files[:10]:
+        print(f)
+    print("...")
+
+.. testoutput::
+
+    ursa-labs-taxi-data/2011/01/data.parquet
+    ursa-labs-taxi-data/2011/02/data.parquet
+    ursa-labs-taxi-data/2011/03/data.parquet
+    ursa-labs-taxi-data/2011/04/data.parquet
+    ursa-labs-taxi-data/2011/05/data.parquet
+    ursa-labs-taxi-data/2011/06/data.parquet
+    ursa-labs-taxi-data/2011/07/data.parquet
+    ursa-labs-taxi-data/2011/08/data.parquet
+    ursa-labs-taxi-data/2011/09/data.parquet
+    ursa-labs-taxi-data/2011/10/data.parquet
+    ...
+
+The dataset can then be used with :meth:`pyarrow.dataset.Dataset.to_table`
+or :meth:`pyarrow.dataset.Dataset.to_batches` like you would for a local one.
+
+.. note::
+
+    It is possible to load partitioned data also in the ipc arrow
+    format or in feather format.
+
+.. warning::
+
+    If the above code throws an error most likely the reason is your
+    AWS credentials are not set. Follow these instructions to get
+    ``AWS Access Key Id`` and ``AWS Secret Access Key``: 
+    `AWS Credentials <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html>`_.
+
+    The credentials are normally stored in ``~/.aws/credentials`` (on Mac or Linux)
+    or in ``C:\Users\<USERNAME>\.aws\credentials`` (on Windows) file. 
+    You will need to either create or update this file in the appropriate location.
+
+    The contents of the file should look like this:
+
+    .. code-block:: bash 
+
+        [default]
+        aws_access_key_id=<YOUR_AWS_ACCESS_KEY_ID>
+        aws_secret_access_key=<YOUR_AWS_SECRET_ACCESS_KEY>
+
+
+
+Write a Feather file
+====================
+
+.. testsetup::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+Given an array with 100 numbers, from 0 to 99
+
+.. testcode::
+
+    import numpy as np
+    import pyarrow as pa
+
+    arr = pa.array(np.arange(100))
+
+    print(f"{arr[0]} .. {arr[-1]}")
+
+.. testoutput::
+
+    0 .. 99
+
+To write it to a Feather file, as Feather stores multiple columns,
+we must create a :class:`pyarrow.Table` out of it,
+so that we get a table of a single column which can then be
+written to a Feather file. 
+
+.. testcode::
+
+    table = pa.Table.from_arrays([arr], names=["col1"])
+
+Once we have a table, it can be written to a Feather File 
+using the functions provided by the ``pyarrow.feather`` module
+
+.. testcode::
+
+    import pyarrow.feather as ft
+    
+    ft.write_feather(table, 'example.feather')
+
+Reading a Feather file
+======================
+
+Given a Feather file, it can be read back to a :class:`pyarrow.Table`
+by using :func:`pyarrow.feather.read_table` function
+
+.. testcode::
+
+    import pyarrow.feather as ft
+
+    table = ft.read_table("example.feather")
+
+The resulting table will contain the same columns that existed in
+the parquet file as :class:`ChunkedArray`
+
+.. testcode::
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int64
+    ----
+    col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+
+Reading Line Delimited JSON
+===========================
+
+Arrow has builtin support for line-delimited JSON.
+Each line represents a row of data as a JSON object.
+
+Given some data in a file where each line is a JSON object
+containing a row of data:
+
+.. testcode::
+
+    import tempfile
+
+    with tempfile.NamedTemporaryFile(delete=False, mode="w+") as f:
+        f.write('{"a": 1, "b": 2.0, "c": 1}\n')
+        f.write('{"a": 3, "b": 3.0, "c": 2}\n')
+        f.write('{"a": 5, "b": 4.0, "c": 3}\n')
+        f.write('{"a": 7, "b": 5.0, "c": 4}\n')
+
+The content of the file can be read back to a :class:`pyarrow.Table` using
+:func:`pyarrow.json.read_json`:
+
+.. testcode::
+
+    import pyarrow as pa
+    import pyarrow.json
+
+    table = pa.json.read_json(f.name)
+
+.. testcode::
+
+    print(table.to_pydict())
+
+.. testoutput::
+
+    {'a': [1, 3, 5, 7], 'b': [2.0, 3.0, 4.0, 5.0], 'c': [1, 2, 3, 4]}
+
+Writing Compressed Data
+=======================
+
+Arrow provides support for writing files in compressed formats,
+both for formats that provide compression natively like Parquet or Feather,
+and for formats that don't support compression out of the box like CSV.
+
+Given a table:
+
+.. testcode::
+
+    table = pa.table([
+        pa.array([1, 2, 3, 4, 5])
+    ], names=["numbers"])
+
+Writing compressed Parquet or Feather data is driven by the
+``compression`` argument to the :func:`pyarrow.feather.write_feather` and
+:func:`pyarrow.parquet.write_table` functions:
+
+.. testcode::
+
+    pa.feather.write_feather(table, "compressed.feather",
+                             compression="lz4")
+    pa.parquet.write_table(table, "compressed.parquet",
+                           compression="lz4")
+
+You can refer to each of those functions' documentation for a complete
+list of supported compression formats.
+
+.. note::
+
+    Arrow actually uses compression by default when writing
+    Parquet or Feather files. Feather is compressed using ``lz4``
+    by default and Parquet uses ``snappy`` by default.
+
+For formats that don't support compression natively, like CSV,
+it's possible to save compressed data using
+:class:`pyarrow.CompressedOutputStream`:
+
+.. testcode::
+
+    with pa.CompressedOutputStream("compressed.csv.gz", "gzip") as out:
+        pa.csv.write_csv(table, out)
+
+This requires decompressing the file when reading it back,
+which can be done using :class:`pyarrow.CompressedInputStream`
+as explained in the next recipe.
+
+Reading Compressed Data
+=======================
+
+Arrow provides support for reading compressed files,
+both for formats that provide it natively like Parquet or Feather,
+and for files in formats that don't support compression natively,
+like CSV, but have been compressed by an application.
+
+Reading compressed formats that have native support for compression
+doesn't require any special handling. We can for example read back
+the Parquet and Feather files we wrote in the previous recipe
+by simply invoking :meth:`pyarrow.feather.read_table` and
+:meth:`pyarrow.parquet.read_table`:
+
+.. testcode::
+
+    table_feather = pa.feather.read_table("compressed.feather")
+    print(table_feather)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+.. testcode::
+
+    table_parquet = pa.parquet.read_table("compressed.parquet")
+    print(table_parquet)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+Reading data from formats that don't have native support for
+compression instead involves decompressing them before decoding them.
+This can be done using the :class:`pyarrow.CompressedInputStream` class
+which wraps files with a decompress operation before the result is
+provided to the actual read function.
+
+For example to read a compressed CSV file:
+
+.. testcode::
+
+    with pa.CompressedInputStream(pa.OSFile("compressed.csv.gz"), "gzip") as input:
+        table_csv = pa.csv.read_csv(input)
+        print(table_csv)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
+
+.. note::
+
+    In the case of CSV, arrow is actually smart enough to try detecting
+    compressed files using the file extension. So if your file is named
+    ``*.gz`` or ``*.bz2`` the :meth:`pyarrow.csv.read_csv` function will
+    try to decompress it accordingly
+
+.. testcode::
+
+    table_csv2 = pa.csv.read_csv("compressed.csv.gz")
+    print(table_csv2)
+
+.. testoutput::
+
+    pyarrow.Table
+    numbers: int64
+    ----
+    numbers: [[1,2,3,4,5]]
diff --git a/py/_sources/schema.rst.txt b/py/_sources/schema.rst.txt
new file mode 100644
index 0000000..561c3ff
--- /dev/null
+++ b/py/_sources/schema.rst.txt
@@ -0,0 +1,219 @@
+.. 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.
+
+===================
+Working with Schema
+===================
+
+Arrow automatically infers the most appropriate data type when reading in data
+or converting Python objects to Arrow objects.  
+
+However, you might want to manually tell Arrow which data types to 
+use, for example, to ensure interoperability with databases and data warehouse 
+systems.  This chapter includes recipes for dealing with schemas.
+
+.. contents::
+
+Setting the data type of an Arrow Array
+=======================================
+
+If you have an existing array and want to change its data type,
+that can be done through the ``cast`` function:
+
+.. testcode::
+
+    import pyarrow as pa
+
+    arr = pa.array([1, 2, 3, 4, 5])
+    print(arr.type)
+
+.. testoutput::
+
+    int64
+
+.. testcode::
+
+    arr = arr.cast(pa.int8())
+    print(arr.type)
+
+.. testoutput::
+
+    int8
+
+You can also create an array of the requested type by providing
+the type at array creation
+
+.. testcode::
+
+    import pyarrow as pa
+
+    arr = pa.array([1, 2, 3, 4, 5], type=pa.int8())
+    print(arr.type)
+
+.. testoutput::
+
+    int8
+
+Setting the schema of a Table
+=============================
+
+Tables detain multiple columns, each with its own name
+and type. The union of types and names is what defines a schema.
+
+A schema in Arrow can be defined using :meth:`pyarrow.schema`
+
+.. testcode::
+
+    import pyarrow as pa
+
+    schema = pa.schema([
+        ("col1", pa.int8()),
+        ("col2", pa.string()),
+        ("col3", pa.float64())
+    ])
+
+The schema can then be provided to a table when created:
+
+.. testcode::
+
+    table = pa.table([
+        [1, 2, 3, 4, 5],
+        ["a", "b", "c", "d", "e"],
+        [1.0, 2.0, 3.0, 4.0, 5.0]
+    ], schema=schema)
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int8
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Like for arrays, it's possible to cast tables to different schemas
+as far as they are compatible
+
+.. testcode::
+
+    schema_int32 = pa.schema([
+        ("col1", pa.int32()),
+        ("col2", pa.string()),
+        ("col3", pa.float64())
+    ])
+
+    table = table.cast(schema_int32)
+
+    print(table)
+
+.. testoutput::
+
+    pyarrow.Table
+    col1: int32
+    col2: string
+    col3: double
+    ----
+    col1: [[1,2,3,4,5]]
+    col2: [["a","b","c","d","e"]]
+    col3: [[1,2,3,4,5]]
+
+Merging multiple schemas
+========================
+
+When you have multiple separate groups of data that you want to combine
+it might be necessary to unify their schemas to create a superset of them
+that applies to all data sources.
+
+.. testcode::
+
+    import pyarrow as pa
+
+    first_schema = pa.schema([
+        ("country", pa.string()),
+        ("population", pa.int32())
+    ])
+
+    second_schema = pa.schema([
+        ("country_code", pa.string()),
+        ("language", pa.string())
+    ])
+
+:func:`unify_schemas` can be used to combine multiple schemas into
+a single one:
+
+.. testcode::
+
+    union_schema = pa.unify_schemas([first_schema, second_schema])
+
+    print(union_schema)
+
+.. testoutput::
+
+    country: string
+    population: int32
+    country_code: string
+    language: string
+
+If the combined schemas have overlapping columns, they can still be combined
+as far as the colliding columns retain the same type (``country_code``):
+
+.. testcode::
+
+    third_schema = pa.schema([
+        ("country_code", pa.string()),
+        ("lat", pa.float32()),
+        ("long", pa.float32()),
+    ])
+
+    union_schema =  pa.unify_schemas([first_schema, second_schema, third_schema])
+
+    print(union_schema)
+
+.. testoutput::
+
+    country: string
+    population: int32
+    country_code: string
+    language: string
+    lat: float
+    long: float
+
+If a merged field has instead diverging types in the combined schemas
+then trying to merge the schemas will fail. For example if ``country_code``
+was a numeric instead of a string we would be unable to unify the schemas
+because in ``second_schema`` it was already declared as a ``pa.string()``
+
+.. testcode::
+
+    third_schema = pa.schema([
+        ("country_code", pa.int32()),
+        ("lat", pa.float32()),
+        ("long", pa.float32()),
+    ])
+
+    try:
+        union_schema =  pa.unify_schemas([first_schema, second_schema, third_schema])
+    except (pa.ArrowInvalid, pa.ArrowTypeError) as e:
+        print(e)
+
+.. testoutput::
+
+    Unable to merge: Field country_code has incompatible types: string vs int32
\ No newline at end of file
diff --git a/py/_static/alabaster.css b/py/_static/alabaster.css
new file mode 100644
index 0000000..cfaa100
--- /dev/null
+++ b/py/_static/alabaster.css
@@ -0,0 +1,703 @@
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 17px;
+    background-color: #fff;
+    color: #000;
+    margin: 0;
+    padding: 0;
+}
+
+
+div.document {
+    width: 1200px;
+    margin: 30px auto 0 auto;
+}
+
+div.documentwrapper {
+    float: left;
+    width: 100%;
+}
+
+div.bodywrapper {
+    margin: 0 0 0 220px;
+}
+
+div.sphinxsidebar {
+    width: 220px;
+    font-size: 14px;
+    line-height: 1.5;
+}
+
+hr {
+    border: 1px solid #B1B4B6;
+}
+
+div.body {
+    background-color: #fff;
+    color: #3E4349;
+    padding: 0 30px 0 30px;
+}
+
+div.body > .section {
+    text-align: left;
+}
+
+div.footer {
+    width: 1200px;
+    margin: 20px auto 30px auto;
+    font-size: 14px;
+    color: #888;
+    text-align: right;
+}
+
+div.footer a {
+    color: #888;
+}
+
+p.caption {
+    font-family: inherit;
+    font-size: inherit;
+}
+
+
+div.relations {
+    display: none;
+}
+
+
+div.sphinxsidebar a {
+    color: #444;
+    text-decoration: none;
+    border-bottom: 1px dotted #999;
+}
+
+div.sphinxsidebar a:hover {
+    border-bottom: 1px solid #999;
+}
+
+div.sphinxsidebarwrapper {
+    padding: 18px 10px;
+}
+
+div.sphinxsidebarwrapper p.logo {
+    padding: 0;
+    margin: -10px 0 0 0px;
+    text-align: center;
+}
+
+div.sphinxsidebarwrapper h1.logo {
+    margin-top: -10px;
+    text-align: center;
+    margin-bottom: 5px;
+    text-align: left;
+}
+
+div.sphinxsidebarwrapper h1.logo-name {
+    margin-top: 0px;
+}
+
+div.sphinxsidebarwrapper p.blurb {
+    margin-top: 0;
+    font-style: normal;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    color: #444;
+    font-size: 24px;
+    font-weight: normal;
+    margin: 0 0 5px 0;
+    padding: 0;
+}
+
+div.sphinxsidebar h4 {
+    font-size: 20px;
+}
+
+div.sphinxsidebar h3 a {
+    color: #444;
+}
+
+div.sphinxsidebar p.logo a,
+div.sphinxsidebar h3 a,
+div.sphinxsidebar p.logo a:hover,
+div.sphinxsidebar h3 a:hover {
+    border: none;
+}
+
+div.sphinxsidebar p {
+    color: #555;
+    margin: 10px 0;
+}
+
+div.sphinxsidebar ul {
+    margin: 10px 0;
+    padding: 0;
+    color: #000;
+}
+
+div.sphinxsidebar ul li.toctree-l1 > a {
+    font-size: 120%;
+}
+
+div.sphinxsidebar ul li.toctree-l2 > a {
+    font-size: 110%;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #CCC;
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-size: 1em;
+}
+
+div.sphinxsidebar hr {
+    border: none;
+    height: 1px;
+    color: #AAA;
+    background: #AAA;
+
+    text-align: left;
+    margin-left: 0;
+    width: 50%;
+}
+
+div.sphinxsidebar .badge {
+    border-bottom: none;
+}
+
+div.sphinxsidebar .badge:hover {
+    border-bottom: none;
+}
+
+/* To address an issue with donation coming after search */
+div.sphinxsidebar h3.donation {
+    margin-top: 10px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+    color: #004B6B;
+    text-decoration: underline;
+}
+
+a:hover {
+    color: #6D4100;
+    text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    margin: 30px 0px 10px 0px;
+    padding: 0;
+}
+
+div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
+div.body h2 { font-size: 180%; }
+div.body h3 { font-size: 150%; }
+div.body h4 { font-size: 130%; }
+div.body h5 { font-size: 100%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+    color: #DDD;
+    padding: 0 4px;
+    text-decoration: none;
+}
+
+a.headerlink:hover {
+    color: #444;
+    background: #EAEAEA;
+}
+
+div.body p, div.body dd, div.body li {
+    line-height: 1.4em;
+}
+
+div.admonition {
+    margin: 20px 0px;
+    padding: 10px 30px;
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.admonition tt.xref, div.admonition code.xref, div.admonition a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fafafa;
+}
+
+div.admonition p.admonition-title {
+    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;
+    font-weight: normal;
+    font-size: 24px;
+    margin: 0 0 10px 0;
+    padding: 0;
+    line-height: 1;
+}
+
+div.admonition p.last {
+    margin-bottom: 0;
+}
+
+div.highlight {
+    background-color: #fff;
+}
+
+dt:target, .highlight {
+    background: #FAF3E8;
+}
+
+div.warning {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.danger {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.error {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+    -moz-box-shadow: 2px 2px 4px #D52C2C;
+    -webkit-box-shadow: 2px 2px 4px #D52C2C;
+    box-shadow: 2px 2px 4px #D52C2C;
+}
+
+div.caution {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.attention {
+    background-color: #FCC;
+    border: 1px solid #FAA;
+}
+
+div.important {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.note {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.tip {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.hint {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.seealso {
+    background-color: #EEE;
+    border: 1px solid #CCC;
+}
+
+div.topic {
+    background-color: #EEE;
+}
+
+p.admonition-title {
+    display: inline;
+}
+
+p.admonition-title:after {
+    content: ":";
+}
+
+pre, tt, code {
+    font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+    font-size: 0.8em;
+}
+
+.hll {
+    background-color: #FFC;
+    margin: 0 -12px;
+    padding: 0 12px;
+    display: block;
+}
+
+img.screenshot {
+}
+
+tt.descname, tt.descclassname, code.descname, code.descclassname {
+    font-size: 0.95em;
+}
+
+tt.descname, code.descname {
+    padding-right: 0.08em;
+}
+
+img.screenshot {
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils {
+    border: 1px solid #888;
+    -moz-box-shadow: 2px 2px 4px #EEE;
+    -webkit-box-shadow: 2px 2px 4px #EEE;
+    box-shadow: 2px 2px 4px #EEE;
+}
+
+table.docutils td, table.docutils th {
+    border: 1px solid #888;
+    padding: 0.25em 0.7em;
+}
+
+table.field-list, table.footnote {
+    border: none;
+    -moz-box-shadow: none;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+
+table.footnote {
+    margin: 15px 0;
+    width: 100%;
+    border: 1px solid #EEE;
+    background: #FDFDFD;
+    font-size: 0.9em;
+}
+
+table.footnote + table.footnote {
+    margin-top: -15px;
+    border-top: none;
+}
+
+table.field-list th {
+    padding: 0 0.8em 0 0;
+}
+
+table.field-list td {
+    padding: 0;
+}
+
+table.field-list p {
+    margin-bottom: 0.8em;
+}
+
+/* Cloned from
+ * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68
+ */
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+table.footnote td.label {
+    width: .1px;
+    padding: 0.3em 0 0.3em 0.5em;
+}
+
+table.footnote td {
+    padding: 0.3em 0.5em;
+}
+
+dl {
+    margin-left: 0;
+    margin-right: 0;
+    margin-top: 0;
+    padding: 0;
+}
+
+dl dd {
+    margin-left: 30px;
+}
+
+blockquote {
+    margin: 0 0 0 30px;
+    padding: 0;
+}
+
+ul, ol {
+    /* Matches the 30px from the narrow-screen "li > ul" selector below */
+    margin: 10px 0 10px 30px;
+    padding: 0;
+}
+
+pre {
+    background: #EEE;
+    padding: 7px 30px;
+    margin: 15px 0px;
+    line-height: 1.3em;
+}
+
+div.viewcode-block:target {
+    background: #ffd;
+}
+
+dl pre, blockquote pre, li pre {
+    margin-left: 0;
+    padding-left: 30px;
+}
+
+tt, code {
+    background-color: #ecf0f3;
+    color: #222;
+    /* padding: 1px 2px; */
+}
+
+tt.xref, code.xref, a tt {
+    background-color: #FBFBFB;
+    border-bottom: 1px solid #fff;
+}
+
+a.reference {
+    text-decoration: none;
+    border-bottom: 1px dotted #004B6B;
+}
+
+/* Don't put an underline on images */
+a.image-reference, a.image-reference:hover {
+    border-bottom: none;
+}
+
+a.reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a.footnote-reference {
+    text-decoration: none;
+    font-size: 0.7em;
+    vertical-align: top;
+    border-bottom: 1px dotted #004B6B;
+}
+
+a.footnote-reference:hover {
+    border-bottom: 1px solid #6D4100;
+}
+
+a:hover tt, a:hover code {
+    background: #EEE;
+}
+
+
+@media screen and (max-width: 870px) {
+
+    div.sphinxsidebar {
+    	display: none;
+    }
+
+    div.document {
+       width: 100%;
+
+    }
+
+    div.documentwrapper {
+    	margin-left: 0;
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    }
+
+    div.bodywrapper {
+    	margin-top: 0;
+    	margin-right: 0;
+    	margin-bottom: 0;
+    	margin-left: 0;
+    }
+
+    ul {
+    	margin-left: 0;
+    }
+
+	li > ul {
+        /* Matches the 30px from the "ul, ol" selector above */
+		margin-left: 30px;
+	}
+
+    .document {
+    	width: auto;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .bodywrapper {
+    	margin: 0;
+    }
+
+    .footer {
+    	width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+
+
+
+}
+
+
+
+@media screen and (max-width: 875px) {
+
+    body {
+        margin: 0;
+        padding: 20px 30px;
+    }
+
+    div.documentwrapper {
+        float: none;
+        background: #fff;
+    }
+
+    div.sphinxsidebar {
+        display: block;
+        float: none;
+        width: 102.5%;
+        margin: 50px -30px -20px -30px;
+        padding: 10px 20px;
+        background: #333;
+        color: #FFF;
+    }
+
+    div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
+    div.sphinxsidebar h3 a {
+        color: #fff;
+    }
+
+    div.sphinxsidebar a {
+        color: #AAA;
+    }
+
+    div.sphinxsidebar p.logo {
+        display: none;
+    }
+
+    div.document {
+        width: 100%;
+        margin: 0;
+    }
+
+    div.footer {
+        display: none;
+    }
+
+    div.bodywrapper {
+        margin: 0;
+    }
+
+    div.body {
+        min-height: 0;
+        padding: 0;
+    }
+
+    .rtd_doc_footer {
+        display: none;
+    }
+
+    .document {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .footer {
+        width: auto;
+    }
+
+    .github {
+        display: none;
+    }
+}
+
+
+/* misc. */
+
+.revsys-inline {
+    display: none!important;
+}
+
+/* Make nested-list/multi-paragraph items look better in Releases changelog
+ * pages. Without this, docutils' magical list fuckery causes inconsistent
+ * formatting between different release sub-lists.
+ */
+div#changelog > div.section > ul > li > p:only-child {
+    margin-bottom: 0;
+}
+
+/* Hide fugly table cell borders in ..bibliography:: directive output */
+table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
+  border: none;
+  /* Below needed in some edge cases; if not applied, bottom shadows appear */
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+
+/* relbar */
+
+.related {
+    line-height: 30px;
+    width: 100%;
+    font-size: 0.9rem;
+}
+
+.related.top {
+    border-bottom: 1px solid #EEE;
+    margin-bottom: 20px;
+}
+
+.related.bottom {
+    border-top: 1px solid #EEE;
+}
+
+.related ul {
+    padding: 0;
+    margin: 0;
+    list-style: none;
+}
+
+.related li {
+    display: inline;
+}
+
+nav#rellinks {
+    float: right;
+}
+
+nav#rellinks li+li:before {
+    content: "|";
+}
+
+nav#breadcrumbs li+li:before {
+    content: "\00BB";
+}
+
+/* Hide certain items when printing */
+@media print {
+    div.related {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg b/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
new file mode 100644
index 0000000..a1ffdcd
--- /dev/null
+++ b/py/_static/arrow-logo_vertical_black-txt_transparent-bg.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   class="svglite"
+   width="1350.00pt"
+   height="1350.00pt"
+   viewBox="0 0 1350.00 1350.00"
+   version="1.1"
+   id="svg45"
+   sodipodi:docname="arrow-logo_vertical_black-txt_transparent-bg.svg"
+   inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview47"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="pt"
+     showgrid="false"
+     inkscape:zoom="0.13111111"
+     inkscape:cx="922.88136"
+     inkscape:cy="930.50847"
+     inkscape:window-width="2181"
+     inkscape:window-height="1222"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="g43" />
+  <defs
+     id="defs4">
+    <style
+       type="text/css"
+       id="style2"><![CDATA[
+    .svglite line, .svglite polyline, .svglite polygon, .svglite path, .svglite rect, .svglite circle {
+      fill: none;
+      stroke: #000000;
+      stroke-linecap: round;
+      stroke-linejoin: round;
+      stroke-miterlimit: 10.00;
+    }
+  ]]></style>
+  </defs>
+  <rect
+     width="200.84746%"
+     height="200.84746%"
+     style="fill:none;stroke:none;stroke-width:2.00847"
+     id="rect6"
+     x="-610.22034"
+     y="-707.72034" />
+  <defs
+     id="defs11">
+    <clipPath
+       id="cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==">
+      <rect
+         x="0.00"
+         y="0.00"
+         width="1350.00"
+         height="1350.00"
+         id="rect8" />
+    </clipPath>
+  </defs>
+  <g
+     clip-path="url(#cpMC4wMHwxMzUwLjAwfDAuMDB8MTM1MC4wMA==)"
+     id="g43"
+     transform="matrix(2.0084746,0,0,2.0084746,-610.22034,-707.72034)">
+    <rect
+       x="0"
+       y="0"
+       width="1350"
+       height="1350"
+       style="stroke-width:0.75"
+       id="rect13" />
+    <polygon
+       points="453.6,639 633.6,819 453.6,999 453.6,927 561.6,819 453.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon15" />
+    <polygon
+       points="579.6,639 759.6,819 579.6,999 579.6,927 687.6,819 579.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon17" />
+    <polygon
+       points="705.6,639 885.6,819 705.6,999 705.6,927 813.6,819 705.6,711 "
+       style="fill:#000000;stroke-width:1.07"
+       id="polygon19" />
+    <path
+       d="m 369.86,405.52 -14.07,38.72 h -5.74 l 16.19,-42.48 h 3.7 z m 11.78,38.72 -14.09,-38.72 -0.09,-3.76 h 3.71 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.86 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path21" />
+    <path
+       d="M 408.78,427.58 H 397.43 V 423 h 11.35 v 0 l 0.64,-0.01 0.62,-0.03 0.6,-0.05 0.57,-0.08 0.55,-0.09 0.52,-0.12 0.5,-0.13 0.47,-0.16 0.44,-0.18 0.42,-0.2 v 0 l 0.4,-0.22 0.38,-0.23 0.35,-0.25 0.33,-0.27 0.31,-0.28 0.29,-0.3 0.26,-0.32 0.24,-0.33 0.22,-0.35 0.2,-0.37 v 0 l 0.18,-0.38 0.17,-0.39 0.14,-0.4 0.13,-0.41 0.1,-0.42 0.09,-0.43 0.07,-0.44 0.04,-0.45 0.03,-0.46 0.01,-0.48 v 0 l -0.01,-0.43 -0.03,-0.43 -0.04,-0.43 -0.07,-0.42 -0.09,-0.41 -0.1,-0.41 -0.13,-0.4 -0.14,-0.4 -0.17,-0.39 -0.18,-0.39 v 0 l -0.2,-0.38 -0.22,-0.36 -0.24,-0.35 -0.26,-0.33 -0.29,-0.32 -0.31,-0.3 -0.33,-0.29 -0.35,-0.27 -0.38,-0.25 -0.4,-0.24 v 0 l -0.42,-0.23 -0.44,-0.2 -0.47,-0.18 -0.5,-0.16 -0.52,-0.13 -0.55,-0.11 -0.57,-0.08 -0.6,-0.06 -0.62,-0.04 -0.64,-0.01 h -10.04 v 37.87 h -5.63 v -42.48 h 15.67 v 0 l 0.94,0.02 0.92,0.05 0.89,0.08 0.86,0.12 0.83,0.15 0.8,0.18 0.77,0.22 0.74,0.24 0.71,0.29 0.68,0.31 v 0 l 0.64,0.35 0.62,0.37 0.59,0.4 0.55,0.42 0.52,0.45 0.49,0.47 0.46,0.5 0.42,0.53 0.39,0.55 0.36,0.57 v 0 l 0.33,0.6 0.29,0.6 0.26,0.63 0.22,0.64 0.19,0.66 0.16,0.68 0.12,0.69 0.09,0.71 0.05,0.73 0.01,0.74 v 0 l -0.01,0.81 -0.05,0.78 -0.09,0.76 -0.12,0.73 -0.16,0.71 -0.19,0.69 -0.22,0.66 -0.26,0.63 -0.29,0.62 -0.33,0.59 v 0 l -0.36,0.56 -0.39,0.54 -0.42,0.51 -0.46,0.48 -0.49,0.45 -0.52,0.43 -0.55,0.4 -0.59,0.37 -0.62,0.35 -0.64,0.31 v 0 l -0.68,0.29 -0.71,0.25 -0.74,0.22 -0.77,0.19 -0.8,0.17 -0.83,0.13 -0.86,0.11 -0.89,0.07 -0.92,0.05 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path23" />
+    <path
+       d="m 446.53,405.52 -14.06,38.72 h -5.75 l 16.19,-42.48 h 3.71 z m 11.79,38.72 -14.1,-38.72 -0.08,-3.76 h 3.7 l 16.25,42.48 z m -0.73,-15.73 v 4.61 h -23.87 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path25" />
+    <path
+       d="m 495.43,430.73 h 5.6 v 0 l -0.1,0.8 -0.13,0.78 -0.16,0.76 -0.19,0.75 -0.22,0.73 -0.24,0.71 -0.28,0.69 -0.3,0.68 -0.33,0.66 -0.36,0.65 v 0 l -0.39,0.62 -0.42,0.6 -0.45,0.57 -0.48,0.54 -0.51,0.52 -0.54,0.49 -0.58,0.47 -0.6,0.44 -0.64,0.41 -0.67,0.39 v 0 l -0.7,0.34 -0.73,0.32 -0.77,0.27 -0.8,0.24 -0.83,0.2 -0.87,0.17 -0.91,0.13 -0.93,0.09 -0.97,0.05 -1.01,0.02 v 0 l -0.74,-0.01 -0.72,-0.04 -0.72,-0.07 -0.7,-0.1 -0.68,-0.13 -0.68,-0.15 -0.66,-0.18 -0.64,-0.21 -0.64,-0.24 -0.61,-0.27 v 0 l -0.6,-0.29 -0.58,-0.31 -0.57,-0.34 -0.55,-0.36 -0.53,-0.39 -0.51,-0.41 -0.5,-0.43 -0.48,-0.45 -0.46,-0.48 -0.45,-0.51 v 0 l -0.42,-0.52 -0.41,-0.55 -0.39,-0.58 -0.37,-0.59 -0.35,-0.61 -0.33,-0.63 -0.3,-0.65 -0.29,-0.67 -0.27,-0.7 -0.25,-0.71 v 0 l -0.22,-0.74 -0.2,-0.75 -0.18,-0.77 -0.15,-0.79 -0.13,-0.8 -0.1,-0.82 -0.08,-0.84 -0.06,-0.85 -0.04,-0.87 -0.01,-0.88 v -4.23 0 l 0.01,-0.88 0.04,-0.87 0.06,-0.85 0.08,-0.84 0.1,-0.81 0.13,-0.8 0.15,-0.79 0.18,-0.76 0.2,-0.75 0.22,-0.73 v 0 l 0.25,-0.72 0.27,-0.7 0.29,-0.68 0.31,-0.65 0.33,-0.64 0.35,-0.61 0.37,-0.59 0.4,-0.57 0.41,-0.56 0.43,-0.53 v 0 l 0.46,-0.5 0.48,-0.49 0.49,-0.46 0.51,-0.43 0.53,-0.41 0.55,-0.39 0.57,-0.36 0.59,-0.34 0.6,-0.32 0.62,-0.29 v 0 l 0.64,-0.27 0.65,-0.24 0.67,-0.21 0.69,-0.18 0.7,-0.15 0.71,-0.13 0.74,-0.1 0.75,-0.07 0.76,-0.04 0.78,-0.01 v 0 l 0.95,0.02 0.92,0.05 0.88,0.09 0.86,0.13 0.83,0.16 0.8,0.2 0.77,0.23 0.74,0.27 0.71,0.31 0.68,0.35 v 0 l 0.65,0.37 0.62,0.41 0.59,0.43 0.56,0.46 0.53,0.48 0.5,0.52 0.48,0.54 0.44,0.58 0.41,0.6 0.38,0.62 v 0 l 0.36,0.65 0.33,0.67 0.3,0.68 0.28,0.71 0.24,0.73 0.22,0.75 0.19,0.77 0.16,0.79 0.13,0.81 0.1,0.83 h -5.6 v 0 l -0.09,-0.59 -0.11,-0.57 -0.11,-0.55 -0.13,-0.54 -0.15,-0.52 -0.16,-0.5 -0.17,-0.49 -0.19,-0.46 -0.2,-0.46 -0.21,-0.43 v 0 l -0.23,-0.42 -0.25,-0.4 -0.27,-0.39 -0.29,-0.36 -0.3,-0.34 -0.33,-0.32 -0.34,-0.31 -0.36,-0.28 -0.38,-0.26 -0.4,-0.25 v 0 l -0.42,-0.22 -0.45,-0.2 -0.47,-0.17 -0.5,-0.15 -0.52,-0.13 -0.54,-0.11 -0.58,-0.08 -0.59,-0.06 -0.62,-0.03 -0.65,-0.01 v 0 l -0.56,0.01 -0.55,0.03 -0.53,0.05 -0.52,0.08 -0.5,0.1 -0.5,0.12 -0.47,0.14 -0.47,0.16 -0.45,0.18 -0.44,0.21 v 0 l -0.42,0.22 -0.41,0.24 -0.39,0.27 -0.38,0.27 -0.36,0.3 -0.35,0.32 -0.34,0.33 -0.33,0.35 -0.31,0.37 -0.3,0.39 v 0 l -0.28,0.4 -0.26,0.42 -0.25,0.44 -0.24,0.45 -0.22,0.47 -0.21,0.48 -0.2,0.5 -0.18,0.52 -0.16,0.53 -0.16,0.55 v 0 l -0.14,0.56 -0.12,0.57 -0.11,0.58 -0.09,0.6 -0.08,0.61 -0.07,0.62 -0.05,0.64 -0.04,0.64 -0.02,0.66 -0.01,0.67 v 4.29 0 l 0.01,0.62 0.02,0.61 0.03,0.61 0.05,0.6 0.05,0.59 0.07,0.58 0.09,0.57 0.09,0.57 0.11,0.56 0.12,0.55 v 0 l 0.15,0.55 0.15,0.52 0.17,0.52 0.18,0.5 0.19,0.49 0.21,0.47 0.22,0.46 0.24,0.45 0.25,0.44 0.26,0.42 v 0 l 0.27,0.4 0.29,0.39 0.31,0.37 0.32,0.36 0.33,0.33 0.35,0.32 0.36,0.3 0.38,0.28 0.39,0.27 0.41,0.25 v 0 l 0.42,0.22 0.44,0.2 0.45,0.17 0.47,0.15 0.48,0.13 0.5,0.11 0.51,0.08 0.53,0.06 0.54,0.03 0.56,0.01 v 0 l 0.71,-0.01 0.67,-0.03 0.64,-0.06 0.62,-0.08 0.59,-0.1 0.55,-0.13 0.53,-0.15 0.5,-0.17 0.47,-0.19 0.44,-0.22 v 0 l 0.42,-0.23 0.39,-0.26 0.37,-0.28 0.36,-0.29 0.33,-0.32 0.31,-0.34 0.29,-0.35 0.27,-0.38 0.24,-0.4 0.23,-0.41 v 0 l 0.22,-0.44 0.2,-0.45 0.19,-0.47 0.17,-0.48 0.17,-0.5 0.15,-0.52 0.14,-0.54 0.12,-0.55 0.12,-0.57 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path27" />
+    <path
+       d="m 536.42,420.02 v 4.58 h -22.99 v -4.58 z M 514.3,401.76 v 42.48 h -5.63 v -42.48 z m 27.02,0 v 42.48 h -5.6 v -42.48 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path29" />
+    <path
+       d="m 578.28,439.66 v 4.58 h -22.49 v -4.58 z m -21.35,-37.9 v 42.48 h -5.63 v -42.48 z m 18.38,18.26 v 4.58 h -19.52 v -4.58 z m 2.68,-18.26 v 4.61 h -22.2 v -4.61 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path31" />
+    <path
+       d="m 429.35,593.05 v 0 l -0.34,-0.02 -0.3,-0.05 -0.29,-0.09 -0.26,-0.12 -0.23,-0.15 -0.22,-0.19 -0.18,-0.22 -0.17,-0.26 -0.14,-0.3 -0.11,-0.32 -5.17,-16.87 v 0 l -0.07,-0.13 -0.07,-0.12 -0.08,-0.1 -0.08,-0.09 -0.08,-0.08 -0.09,-0.06 -0.09,-0.05 -0.1,-0.03 -0.1,-0.02 -0.1,-0.01 h -42.34 v 0 l -0.1,0.01 -0.1,0.02 -0.1,0.03 -0.09,0.05 -0.09,0.06 -0.08,0.08 -0.08,0.09 -0.08,0.1 -0.07,0.12 -0.07,0.13 -5,16.87 v 0 l -0.11,0.32 -0.14,0.3 -0.16,0.26 -0.19,0.22 -0.21,0.19 -0.24,0.15 -0.26,0.12 -0.28,0.09 -0.31,0.05 -0.33,0.02 h -21.87 v 0 l -0.2,-0.01 -0.19,-0.01 -0.18,-0.03 -0.17,-0.03 -0.16,-0.05 -0.15,-0.06 -0.14,-0.06 -0.13,-0.08 -0.12,-0.09 -0.1,-0.1 v 0 l -0.1,-0.14 -0.08,-0.15 -0.06,-0.17 -0.04,-0.17 -0.03,-0.19 v -0.19 -0.2 l 0.03,-0.22 0.04,-0.23 0.06,-0.23 37.19,-116.37 v 0 l 0.11,-0.32 0.14,-0.3 0.16,-0.26 0.19,-0.22 0.21,-0.19 0.24,-0.15 0.26,-0.12 0.28,-0.09 0.31,-0.05 0.33,-0.02 h 27.03 v 0 l 0.33,0.02 0.31,0.05 0.28,0.09 0.26,0.12 0.24,0.15 0.21,0.19 0.19,0.22 0.16,0.26 0.14,0.3 0.12,0.32 37.18,116.37 v 0 l 0.03,0.07 0.03,0.07 0.03,0.08 0.02,0.08 0.02,0.09 0.01,0.08 0.02,0.1 v 0.09 l 0.01,0.1 v 0.1 0 l -0.02,0.29 -0.05,0.27 -0.1,0.23 -0.13,0.2 -0.17,0.17 -0.21,0.14 -0.25,0.11 -0.28,0.08 -0.32,0.04 -0.36,0.02 z m -45.28,-39.08 v 0 l -0.02,0.2 v 0.17 l 0.01,0.16 0.04,0.13 0.06,0.12 0.08,0.09 0.1,0.07 0.12,0.05 0.14,0.04 0.16,0.01 h 30.3 v 0 l 0.19,-0.01 0.17,-0.04 0.13,-0.05 0.11,-0.07 0.09,-0.09 0.05,-0.12 0.03,-0.13 v -0.16 l -0.03,-0.17 -0.05,-0.2 -15.5,-51.12 v 0 l -0.03,-0.13 -0.04,-0.11 -0.04,-0.1 -0.05,-0.08 -0.05,-0.06 -0.05,-0.04 -0.06,-0.02 -0.06,-0.01 -0.07,0.01 -0.06,0.02 v 0 l -0.07,0.01 -0.06,0.01 -0.06,0.03 -0.06,0.03 -0.05,0.05 -0.05,0.06 -0.05,0.06 -0.04,0.08 -0.04,0.09 -0.04,0.1 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path33" />
+    <path
+       d="m 534.35,593.05 v 0 l -0.33,-0.02 -0.32,-0.04 -0.29,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.52,-47.68 v 0 l -0.07,-0.13 -0.08,-0.12 -0.08,-0.1 -0.1,-0.09 -0.1,-0.08 -0.1,-0.06 -0.12,-0.05 -0.12,-0.03 -0.13,-0.02 -0.13,-0.01 h -16.01 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 l -0.01,0.17 -0.02,0.17 -0.03,0.16 -0.05,0.16 -0.06,0.16 -0.08,0.15 -0.09,0.15 -0.1,0.15 -0.12,0.14 -0.13,0.14 v 0 l -0.1,0.1 -0.12,0.09 -0.12,0.08 -0.13,0.06 -0.13,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.17,0.01 -0.16,0.01 h -20.15 v 0 l -0.17,-0.01 -0.16,-0.01 -0.17,-0.03 -0.16,-0.03 -0.15,-0.05 -0.16,-0.06 -0.15,-0.06 -0.14,-0.08 -0.15,-0.09 -0.13,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.08,-0.15 -0.06,-0.15 -0.06,-0.15 -0.05,-0.16 -0.03,-0.16 -0.03,-0.16 -0.02,-0.17 v -0.17 -116.36 0 -0.17 l 0.02,-0.16 0.03,-0.16 0.03,-0.15 0.05,-0.14 0.06,-0.13 0.06,-0.13 0.08,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.13,-0.13 0.15,-0.12 0.14,-0.1 0.15,-0.09 0.16,-0.08 0.15,-0.06 0.16,-0.05 0.17,-0.03 0.16,-0.02 0.17,-0.01 h 49.24 v 0 l 2.17,0.05 2.12,0.13 2.07,0.22 2.01,0.32 1.95,0.4 1.91,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.64,0.93 1.57,1.01 1.49,1.08 1.41,1.16 1.33,1.24 1.25,1.31 1.17,1.39 1.1,1.46 1.01,1.54 0.94,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.51,1.88 0.42,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.04,2.14 v 0 l -0.05,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -1,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.49,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.87,0.93 -1.96,0.83 -2.05,0.74 v 0 l -0.16,0.07 -0.14,0.09 -0.11,0.09 -0.09,0.11 -0.06,0.11 -0.04,0.13 -0.02,0.13 0.01,0.15 0.04,0.16 0.05,0.16 23.41,48.72 v 0 l 0.07,0.13 0.06,0.13 0.05,0.12 0.04,0.11 0.04,0.11 0.03,0.1 0.03,0.09 0.01,0.09 0.01,0.08 0.01,0.07 v 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.14,0.18 -0.17,0.15 -0.2,0.13 -0.25,0.09 -0.28,0.07 -0.33,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.15,0.02 -0.13,0.05 -0.11,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.11,0.06 0.13,0.04 0.15,0.03 0.16,0.01 h 22.55 v 0 l 1.42,-0.05 1.36,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.15,-0.47 1.08,-0.56 1.04,-0.65 0.97,-0.73 0.93,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.6,-1.04 0.51,-1.1 0.42,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.04,-1.36 v 0 l -0.04,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.42,-1.15 -0.51,-1.09 -0.6,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.93,-0.85 -0.97,-0.77 -1.04,-0.67 -1.08,-0.58 -1.15,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.36,-0.14 -1.42,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path35" />
+    <path
+       d="m 640.04,593.05 v 0 l -0.33,-0.02 -0.31,-0.04 -0.3,-0.08 -0.27,-0.11 -0.25,-0.14 -0.23,-0.17 -0.21,-0.2 -0.19,-0.23 -0.17,-0.27 -0.15,-0.29 -21.51,-47.68 v 0 l -0.08,-0.13 -0.07,-0.12 -0.09,-0.1 -0.09,-0.09 -0.1,-0.08 -0.11,-0.06 -0.11,-0.05 -0.12,-0.03 -0.13,-0.02 -0.14,-0.01 h -16.01 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.07 -0.08,0.1 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 46.99 0 0.17 l -0.02,0.17 -0.04,0.16 -0.05,0.16 -0.06,0.16 -0.07,0.15 -0.09,0.15 -0.11,0.15 -0.11,0.14 -0.13,0.14 v 0 l -0.11,0.1 -0.11,0.09 -0.13,0.08 -0.12,0.06 -0.14,0.06 -0.14,0.05 -0.15,0.03 -0.15,0.03 -0.16,0.01 -0.17,0.01 h -20.14 v 0 l -0.17,-0.01 -0.17,-0.01 -0.16,-0.03 -0.16,-0.03 -0.16,-0.05 -0.15,-0.06 -0.15,-0.06 -0.15,-0.08 -0.14,-0.09 -0.14,-0.1 v 0 l -0.1,-0.14 -0.09,-0.14 -0.07,-0.15 -0.07,-0.15 -0.06,-0.15 -0.04,-0.16 -0.04,-0.16 -0.03,-0.16 -0.01,-0.17 -0.01,-0.17 v -116.36 0 l 0.01,-0.17 0.01,-0.16 0.03,-0.16 0.04,-0.15 0.04,-0.14 0.06,-0.13 0.07,-0.13 0.07,-0.12 0.09,-0.11 0.1,-0.11 v 0 l 0.14,-0.13 0.14,-0.12 0.15,-0.1 0.15,-0.09 0.15,-0.08 0.16,-0.06 0.16,-0.05 0.16,-0.03 0.17,-0.02 0.17,-0.01 h 49.23 v 0 l 2.18,0.05 2.12,0.13 2.06,0.22 2.01,0.32 1.96,0.4 1.9,0.49 1.84,0.58 1.79,0.68 1.74,0.76 1.68,0.85 v 0 l 1.65,0.93 1.57,1.01 1.48,1.08 1.41,1.16 1.33,1.24 1.26,1.31 1.17,1.39 1.09,1.46 1.02,1.54 0.93,1.62 v 0 l 0.88,1.67 0.79,1.73 0.7,1.79 0.6,1.83 0.52,1.88 0.41,1.94 0.33,1.99 0.23,2.04 0.14,2.09 0.05,2.14 v 0 l -0.06,2.31 -0.18,2.24 -0.29,2.18 -0.41,2.11 -0.53,2.05 -0.64,1.98 -0.76,1.92 -0.88,1.85 -0.99,1.78 -1.11,1.72 v 0 l -1.22,1.61 -1.31,1.51 -1.4,1.41 -1.5,1.31 -1.59,1.22 -1.68,1.12 -1.78,1.03 -1.86,0.93 -1.96,0.83 -2.06,0.74 v 0 l -0.16,0.07 -0.13,0.09 -0.12,0.09 -0.08,0.11 -0.07,0.11 -0.04,0.13 -0.01,0.13 0.01,0.15 0.03,0.16 0.06,0.16 23.41,48.72 v 0 l 0.06,0.13 0.06,0.13 0.05,0.12 0.05,0.11 0.03,0.11 0.04,0.1 0.02,0.09 0.02,0.09 0.01,0.08 v 0.07 0 l -0.02,0.26 -0.06,0.24 -0.09,0.2 -0.13,0.18 -0.17,0.15 -0.21,0.13 -0.25,0.09 -0.28,0.07 -0.32,0.04 -0.36,0.02 z m -40.97,-99.67 v 0 l -0.16,0.01 -0.14,0.02 -0.13,0.05 -0.12,0.06 -0.09,0.08 -0.08,0.09 -0.06,0.11 -0.04,0.13 -0.03,0.15 -0.01,0.16 v 29.44 0 l 0.01,0.16 0.03,0.15 0.04,0.13 0.06,0.11 0.08,0.09 0.09,0.08 0.12,0.06 0.13,0.04 0.14,0.03 0.16,0.01 h 22.56 v 0 l 1.41,-0.05 1.37,-0.12 1.31,-0.22 1.25,-0.3 1.2,-0.39 1.14,-0.47 1.09,-0.56 1.03,-0.65 0.98,-0.73 0.92,-0.82 v 0 l 0.88,-0.88 0.79,-0.94 0.7,-0.99 0.61,-1.04 0.51,-1.1 0.41,-1.14 0.33,-1.2 0.23,-1.24 0.14,-1.3 0.05,-1.36 v 0 l -0.05,-1.35 -0.14,-1.3 -0.23,-1.24 -0.33,-1.2 -0.41,-1.15 -0.51,-1.09 -0.61,-1.04 -0.7,-0.99 -0.79,-0.94 -0.88,-0.88 v 0 l -0.92,-0.85 -0.98,-0.77 -1.03,-0.67 -1.09,-0.58 -1.14,-0.49 -1.2,-0.4 -1.25,-0.32 -1.31,-0.22 -1.37,-0.14 -1.41,-0.04 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path37" />
+    <path
+       d="m 722.5,594.94 v 0 l -2.66,-0.05 -2.59,-0.17 -2.53,-0.27 -2.47,-0.39 -2.4,-0.49 -2.35,-0.61 -2.28,-0.72 -2.22,-0.82 -2.16,-0.94 -2.1,-1.05 v 0 l -1.98,-1.14 -1.9,-1.23 -1.81,-1.32 -1.72,-1.4 -1.62,-1.49 -1.54,-1.58 -1.45,-1.66 -1.36,-1.74 -1.27,-1.84 -1.18,-1.92 v 0 l -1.08,-2.02 -0.97,-2.09 -0.85,-2.14 -0.74,-2.2 -0.62,-2.26 -0.52,-2.32 -0.39,-2.38 -0.29,-2.43 -0.17,-2.5 -0.05,-2.55 v -36.84 0 l 0.05,-2.52 0.17,-2.46 0.29,-2.4 0.39,-2.34 0.52,-2.29 0.62,-2.22 0.74,-2.17 0.85,-2.11 0.97,-2.05 1.08,-1.99 v 0 l 1.18,-1.92 1.27,-1.82 1.36,-1.74 1.45,-1.65 1.54,-1.56 1.62,-1.47 1.72,-1.38 1.81,-1.29 1.9,-1.21 1.98,-1.11 v 0 l 2.1,-1.04 2.16,-0.94 2.22,-0.83 2.28,-0.71 2.35,-0.61 2.4,-0.49 2.47,-0.39 2.53,-0.28 2.59,-0.16 2.66,-0.06 v 0 l 2.68,0.06 2.62,0.16 2.55,0.28 2.48,0.39 2.41,0.49 2.34,0.61 2.27,0.71 2.2,0.83 2.14,0.94 2.06,1.04 v 0 l 2.02,1.11 1.93,1.21 1.83,1.29 1.74,1.38 1.65,1.47 1.55,1.56 1.47,1.65 1.36,1.74 1.28,1.82 1.18,1.92 v 0 l 1.08,1.99 0.97,2.05 0.85,2.11 0.74,2.17 0.62,2.22 0.51,2.29 0.4,2.34 0.29,2.4 0.17,2.46 0.05,2.52 v 36.84 0 l -0.05,2.55 -0.17,2.5 -0.29,2.43 -0.4,2.38 -0.51,2.32 -0.62,2.26 -0.74,2.2 -0.85,2.14 -0.97,2.09 -1.08,2.02 v 0 l -1.18,1.96 -1.28,1.86 -1.36,1.77 -1.47,1.68 -1.55,1.6 -1.65,1.5 -1.74,1.42 -1.83,1.32 -1.93,1.24 -2.02,1.15 v 0 l -2.06,1.01 -2.14,0.91 -2.2,0.8 -2.27,0.69 -2.34,0.59 -2.41,0.48 -2.48,0.37 -2.55,0.27 -2.62,0.16 z m 0,-20.83 v 0 l 1.86,-0.06 1.78,-0.18 1.71,-0.3 1.64,-0.42 1.57,-0.54 1.5,-0.67 1.42,-0.78 1.35,-0.9 1.28,-1.03 1.21,-1.14 v 0 l 1.11,-1.25 1,-1.32 0.87,-1.4 0.76,-1.48 0.65,-1.57 0.53,-1.64 0.41,-1.72 0.29,-1.8 0.17,-1.87 0.06,-1.96 v -37.87 0 l -0.06,-1.96 -0.17,-1.88 -0.29,-1.8 -0.41,-1.71 -0.53,-1.65 -0.65,-1.56 -0.76,-1.48 -0.87,-1.4 -1,-1.33 -1.11,-1.24 v 0 l -1.18,-1.18 -1.25,-1.05 -1.34,-0.93 -1.41,-0.81 -1.49,-0.68 -1.57,-0.56 -1.65,-0.43 -1.73,-0.31 -1.81,-0.19 -1.89,-0.06 v 0 l -1.86,0.06 -1.78,0.19 -1.72,0.31 -1.64,0.43 -1.57,0.56 -1.49,0.68 -1.42,0.81 -1.36,0.93 -1.28,1.05 -1.2,1.18 v 0 l -1.08,1.24 -0.97,1.33 -0.85,1.4 -0.74,1.48 -0.62,1.56 -0.51,1.65 -0.4,1.71 -0.29,1.8 -0.17,1.88 -0.05,1.96 v 37.87 0 l 0.05,1.96 0.17,1.87 0.29,1.8 0.4,1.72 0.51,1.64 0.62,1.57 0.74,1.48 0.85,1.4 0.97,1.32 1.08,1.25 v 0 l 1.2,1.14 1.28,1.03 1.36,0.9 1.42,0.78 1.49,0.67 1.57,0.54 1.64,0.42 1.72,0.3 1.78,0.18 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path39" />
+    <path
+       d="m 813.22,593.05 v 0 l -0.37,-0.02 -0.34,-0.05 -0.31,-0.09 -0.28,-0.12 -0.25,-0.15 -0.23,-0.19 -0.2,-0.22 -0.17,-0.26 -0.15,-0.3 -0.11,-0.32 -30.47,-116.54 -0.17,-0.69 v 0 l 0.01,-0.29 0.06,-0.27 0.1,-0.23 0.13,-0.2 0.17,-0.17 0.21,-0.14 0.24,-0.11 0.29,-0.08 0.32,-0.04 0.36,-0.02 h 21.34 v 0 l 0.34,0.02 0.3,0.05 0.29,0.09 0.26,0.12 0.23,0.15 0.22,0.19 0.18,0.22 0.17,0.26 0.14,0.3 0.11,0.32 16.36,70.06 v 0 l 0.03,0.13 0.04,0.12 0.04,0.1 0.05,0.09 0.05,0.08 0.05,0.06 0.06,0.05 0.06,0.03 0.06,0.02 0.07,0.01 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.83 v 0 l 0.37,0.02 0.33,0.05 0.31,0.09 0.29,0.12 0.25,0.15 0.23,0.19 0.2,0.22 0.17,0.26 0.14,0.3 0.12,0.32 17.22,70.06 v 0 l 0.03,0.1 0.04,0.1 0.04,0.08 0.05,0.08 0.05,0.07 0.05,0.07 0.06,0.06 0.06,0.05 0.06,0.04 0.07,0.04 v 0 l 0.07,-0.01 0.06,-0.02 0.06,-0.03 0.06,-0.05 0.05,-0.06 0.05,-0.08 0.05,-0.09 0.04,-0.1 0.04,-0.12 0.04,-0.13 15.83,-69.89 v 0 l 0.12,-0.35 0.14,-0.33 0.16,-0.28 0.19,-0.25 0.21,-0.21 0.24,-0.17 0.26,-0.13 0.28,-0.09 0.31,-0.06 0.33,-0.02 h 20.32 v 0 l 0.45,0.02 0.39,0.07 0.34,0.11 0.27,0.16 0.22,0.2 0.16,0.25 0.11,0.29 0.04,0.33 -0.02,0.38 -0.07,0.43 -28.23,116.54 v 0 l -0.12,0.32 -0.14,0.3 -0.18,0.26 -0.2,0.22 -0.22,0.19 -0.26,0.15 -0.28,0.12 -0.31,0.09 -0.34,0.05 -0.36,0.02 h -20.49 v 0 l -0.33,-0.02 -0.31,-0.05 -0.28,-0.09 -0.26,-0.12 -0.24,-0.15 -0.21,-0.19 -0.19,-0.22 -0.16,-0.26 -0.14,-0.3 -0.11,-0.32 -17.56,-74.54 v 0 l -0.04,-0.13 -0.04,-0.12 -0.04,-0.1 -0.05,-0.09 -0.05,-0.08 -0.05,-0.06 -0.06,-0.05 -0.06,-0.03 -0.06,-0.02 -0.07,-0.01 v 0 l -0.07,0.01 -0.06,0.02 -0.06,0.03 -0.06,0.05 -0.05,0.06 -0.05,0.08 -0.05,0.09 -0.04,0.1 -0.04,0.12 -0.04,0.13 -16.35,74.37 v 0 l -0.08,0.35 -0.12,0.33 -0.14,0.28 -0.18,0.25 -0.21,0.21 -0.24,0.17 -0.27,0.13 -0.3,0.09 -0.33,0.06 -0.37,0.02 z"
+       style="fill:#000000;fill-rule:nonzero;stroke:none;stroke-width:0.75"
+       id="path41" />
+  </g>
+</svg>
diff --git a/py/_static/basic.css b/py/_static/basic.css
new file mode 100644
index 0000000..30fee9d
--- /dev/null
+++ b/py/_static/basic.css
@@ -0,0 +1,925 @@
+/*
+ * basic.css
+ * ~~~~~~~~~
+ *
+ * Sphinx stylesheet -- basic theme.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+    clear: both;
+}
+
+div.section::after {
+    display: block;
+    content: '';
+    clear: left;
+}
+
+/* -- relbar ---------------------------------------------------------------- */
+
+div.related {
+    width: 100%;
+    font-size: 90%;
+}
+
+div.related h3 {
+    display: none;
+}
+
+div.related ul {
+    margin: 0;
+    padding: 0 0 0 10px;
+    list-style: none;
+}
+
+div.related li {
+    display: inline;
+}
+
+div.related li.right {
+    float: right;
+    margin-right: 5px;
+}
+
+/* -- sidebar --------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+    padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+    float: left;
+    width: 230px;
+    margin-left: -100%;
+    font-size: 90%;
+    word-wrap: break-word;
+    overflow-wrap : break-word;
+}
+
+div.sphinxsidebar ul {
+    list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+    margin-left: 20px;
+    list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+    margin-top: 0;
+    margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+    margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+    border: 1px solid #98dbcc;
+    font-family: sans-serif;
+    font-size: 1em;
+}
+
+div.sphinxsidebar #searchbox form.search {
+    overflow: hidden;
+}
+
+div.sphinxsidebar #searchbox input[type="text"] {
+    float: left;
+    width: 80%;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+div.sphinxsidebar #searchbox input[type="submit"] {
+    float: left;
+    width: 20%;
+    border-left: none;
+    padding: 0.25em;
+    box-sizing: border-box;
+}
+
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+    margin: 10px 0 0 20px;
+    padding: 0;
+}
+
+ul.search li {
+    padding: 5px 0 5px 20px;
+    background-image: url(file.png);
+    background-repeat: no-repeat;
+    background-position: 0 7px;
+}
+
+ul.search li a {
+    font-weight: bold;
+}
+
+ul.search li p.context {
+    color: #888;
+    margin: 2px 0 0 30px;
+    text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+    font-weight: bold;
+}
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+    width: 90%;
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.contentstable p.biglink {
+    line-height: 150%;
+}
+
+a.biglink {
+    font-size: 1.3em;
+}
+
+span.linkdescr {
+    font-style: italic;
+    padding-top: 5px;
+    font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable {
+    width: 100%;
+}
+
+table.indextable td {
+    text-align: left;
+    vertical-align: top;
+}
+
+table.indextable ul {
+    margin-top: 0;
+    margin-bottom: 0;
+    list-style-type: none;
+}
+
+table.indextable > tbody > tr > td > ul {
+    padding-left: 0em;
+}
+
+table.indextable tr.pcap {
+    height: 10px;
+}
+
+table.indextable tr.cap {
+    margin-top: 10px;
+    background-color: #f2f2f2;
+}
+
+img.toggler {
+    margin-right: 3px;
+    margin-top: 3px;
+    cursor: pointer;
+}
+
+div.modindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+div.genindex-jumpbox {
+    border-top: 1px solid #ddd;
+    border-bottom: 1px solid #ddd;
+    margin: 1em 0 1em 0;
+    padding: 0.4em;
+}
+
+/* -- domain module index --------------------------------------------------- */
+
+table.modindextable td {
+    padding: 2px;
+    border-collapse: collapse;
+}
+
+/* -- general body styles --------------------------------------------------- */
+
+div.body {
+    min-width: 360px;
+    max-width: 800px;
+}
+
+div.body p, div.body dd, div.body li, div.body blockquote {
+    -moz-hyphens: auto;
+    -ms-hyphens: auto;
+    -webkit-hyphens: auto;
+    hyphens: auto;
+}
+
+a.headerlink {
+    visibility: hidden;
+}
+
+a:visited {
+    color: #551A8B;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink,
+caption:hover > a.headerlink,
+p.caption:hover > a.headerlink,
+div.code-block-caption:hover > a.headerlink {
+    visibility: visible;
+}
+
+div.body p.caption {
+    text-align: inherit;
+}
+
+div.body td {
+    text-align: left;
+}
+
+.first {
+    margin-top: 0 !important;
+}
+
+p.rubric {
+    margin-top: 30px;
+    font-weight: bold;
+}
+
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
+    clear: left;
+    float: left;
+    margin-right: 1em;
+}
+
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
+    clear: right;
+    float: right;
+    margin-left: 1em;
+}
+
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+img.align-default, figure.align-default, .figure.align-default {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+
+.align-left {
+    text-align: left;
+}
+
+.align-center {
+    text-align: center;
+}
+
+.align-default {
+    text-align: center;
+}
+
+.align-right {
+    text-align: right;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+div.sidebar,
+aside.sidebar {
+    margin: 0 0 0.5em 1em;
+    border: 1px solid #ddb;
+    padding: 7px;
+    background-color: #ffe;
+    width: 40%;
+    float: right;
+    clear: right;
+    overflow-x: auto;
+}
+
+p.sidebar-title {
+    font-weight: bold;
+}
+
+nav.contents,
+aside.topic,
+div.admonition, div.topic, blockquote {
+    clear: left;
+}
+
+/* -- topics ---------------------------------------------------------------- */
+
+nav.contents,
+aside.topic,
+div.topic {
+    border: 1px solid #ccc;
+    padding: 7px;
+    margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+
+div.admonition {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    padding: 7px;
+}
+
+div.admonition dt {
+    font-weight: bold;
+}
+
+p.admonition-title {
+    margin: 0px 10px 5px 0px;
+    font-weight: bold;
+}
+
+div.body p.centered {
+    text-align: center;
+    margin-top: 25px;
+}
+
+/* -- content of sidebars/topics/admonitions -------------------------------- */
+
+div.sidebar > :last-child,
+aside.sidebar > :last-child,
+nav.contents > :last-child,
+aside.topic > :last-child,
+div.topic > :last-child,
+div.admonition > :last-child {
+    margin-bottom: 0;
+}
+
+div.sidebar::after,
+aside.sidebar::after,
+nav.contents::after,
+aside.topic::after,
+div.topic::after,
+div.admonition::after,
+blockquote::after {
+    display: block;
+    content: '';
+    clear: both;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+    margin-top: 10px;
+    margin-bottom: 10px;
+    border: 0;
+    border-collapse: collapse;
+}
+
+table.align-center {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table.align-default {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+table caption span.caption-number {
+    font-style: italic;
+}
+
+table caption span.caption-text {
+}
+
+table.docutils td, table.docutils th {
+    padding: 1px 8px 1px 5px;
+    border-top: 0;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 1px solid #aaa;
+}
+
+th {
+    text-align: left;
+    padding-right: 5px;
+}
+
+table.citation {
+    border-left: solid 1px gray;
+    margin-left: 1px;
+}
+
+table.citation td {
+    border-bottom: none;
+}
+
+th > :first-child,
+td > :first-child {
+    margin-top: 0px;
+}
+
+th > :last-child,
+td > :last-child {
+    margin-bottom: 0px;
+}
+
+/* -- figures --------------------------------------------------------------- */
+
+div.figure, figure {
+    margin: 0.5em;
+    padding: 0.5em;
+}
+
+div.figure p.caption, figcaption {
+    padding: 0.3em;
+}
+
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
+    font-style: italic;
+}
+
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
+}
+
+/* -- field list styles ----------------------------------------------------- */
+
+table.field-list td, table.field-list th {
+    border: 0 !important;
+}
+
+.field-list ul {
+    margin: 0;
+    padding-left: 1em;
+}
+
+.field-list p {
+    margin: 0;
+}
+
+.field-name {
+    -moz-hyphens: manual;
+    -ms-hyphens: manual;
+    -webkit-hyphens: manual;
+    hyphens: manual;
+}
+
+/* -- hlist styles ---------------------------------------------------------- */
+
+table.hlist {
+    margin: 1em 0;
+}
+
+table.hlist td {
+    vertical-align: top;
+}
+
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+	font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+.sig-name {
+	font-size: 1.1em;
+}
+
+code.descname {
+    font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+    background-color: transparent;
+}
+
+.optional {
+    font-size: 1.3em;
+}
+
+.sig-paren {
+    font-size: larger;
+}
+
+.sig-param.n {
+	font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+	font-family: unset;
+}
+
+.sig.c   .k, .sig.c   .kt,
+.sig.cpp .k, .sig.cpp .kt {
+	color: #0033B3;
+}
+
+.sig.c   .m,
+.sig.cpp .m {
+	color: #1750EB;
+}
+
+.sig.c   .s, .sig.c   .sc,
+.sig.cpp .s, .sig.cpp .sc {
+	color: #067D17;
+}
+
+
+/* -- other body styles ----------------------------------------------------- */
+
+ol.arabic {
+    list-style: decimal;
+}
+
+ol.loweralpha {
+    list-style: lower-alpha;
+}
+
+ol.upperalpha {
+    list-style: upper-alpha;
+}
+
+ol.lowerroman {
+    list-style: lower-roman;
+}
+
+ol.upperroman {
+    list-style: upper-roman;
+}
+
+:not(li) > ol > li:first-child > :first-child,
+:not(li) > ul > li:first-child > :first-child {
+    margin-top: 0px;
+}
+
+:not(li) > ol > li:last-child > :last-child,
+:not(li) > ul > li:last-child > :last-child {
+    margin-bottom: 0px;
+}
+
+ol.simple ol p,
+ol.simple ul p,
+ul.simple ol p,
+ul.simple ul p {
+    margin-top: 0;
+}
+
+ol.simple > li:not(:first-child) > p,
+ul.simple > li:not(:first-child) > p {
+    margin-top: 0;
+}
+
+ol.simple p,
+ul.simple p {
+    margin-bottom: 0;
+}
+
+aside.footnote > span,
+div.citation > span {
+    float: left;
+}
+aside.footnote > span:last-of-type,
+div.citation > span:last-of-type {
+  padding-right: 0.5em;
+}
+aside.footnote > p {
+  margin-left: 2em;
+}
+div.citation > p {
+  margin-left: 4em;
+}
+aside.footnote > p:last-of-type,
+div.citation > p:last-of-type {
+    margin-bottom: 0em;
+}
+aside.footnote > p:last-of-type:after,
+div.citation > p:last-of-type:after {
+    content: "";
+    clear: both;
+}
+
+dl.field-list {
+    display: grid;
+    grid-template-columns: fit-content(30%) auto;
+}
+
+dl.field-list > dt {
+    font-weight: bold;
+    word-break: break-word;
+    padding-left: 0.5em;
+    padding-right: 5px;
+}
+
+dl.field-list > dd {
+    padding-left: 0.5em;
+    margin-top: 0em;
+    margin-left: 0em;
+    margin-bottom: 0em;
+}
+
+dl {
+    margin-bottom: 15px;
+}
+
+dd > :first-child {
+    margin-top: 0px;
+}
+
+dd ul, dd table {
+    margin-bottom: 10px;
+}
+
+dd {
+    margin-top: 3px;
+    margin-bottom: 10px;
+    margin-left: 30px;
+}
+
+.sig dd {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+.sig dl {
+    margin-top: 0px;
+    margin-bottom: 0px;
+}
+
+dl > dd:last-child,
+dl > dd:last-child > :last-child {
+    margin-bottom: 0;
+}
+
+dt:target, span.highlighted {
+    background-color: #fbe54e;
+}
+
+rect.highlighted {
+    fill: #fbe54e;
+}
+
+dl.glossary dt {
+    font-weight: bold;
+    font-size: 1.1em;
+}
+
+.versionmodified {
+    font-style: italic;
+}
+
+.system-message {
+    background-color: #fda;
+    padding: 5px;
+    border: 3px solid red;
+}
+
+.footnote:target  {
+    background-color: #ffa;
+}
+
+.line-block {
+    display: block;
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+
+.line-block .line-block {
+    margin-top: 0;
+    margin-bottom: 0;
+    margin-left: 1.5em;
+}
+
+.guilabel, .menuselection {
+    font-family: sans-serif;
+}
+
+.accelerator {
+    text-decoration: underline;
+}
+
+.classifier {
+    font-style: oblique;
+}
+
+.classifier:before {
+    font-style: normal;
+    margin: 0 0.5em;
+    content: ":";
+    display: inline-block;
+}
+
+abbr, acronym {
+    border-bottom: dotted 1px;
+    cursor: help;
+}
+
+.translated {
+    background-color: rgba(207, 255, 207, 0.2)
+}
+
+.untranslated {
+    background-color: rgba(255, 207, 207, 0.2)
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+    overflow: auto;
+    overflow-y: hidden;  /* fixes display issues on Chrome browsers */
+}
+
+pre, div[class*="highlight-"] {
+    clear: both;
+}
+
+span.pre {
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    -webkit-hyphens: none;
+    hyphens: none;
+    white-space: nowrap;
+}
+
+div[class*="highlight-"] {
+    margin: 1em 0;
+}
+
+td.linenos pre {
+    border: 0;
+    background-color: transparent;
+    color: #aaa;
+}
+
+table.highlighttable {
+    display: block;
+}
+
+table.highlighttable tbody {
+    display: block;
+}
+
+table.highlighttable tr {
+    display: flex;
+}
+
+table.highlighttable td {
+    margin: 0;
+    padding: 0;
+}
+
+table.highlighttable td.linenos {
+    padding-right: 0.5em;
+}
+
+table.highlighttable td.code {
+    flex: 1;
+    overflow: hidden;
+}
+
+.highlight .hll {
+    display: block;
+}
+
+div.highlight pre,
+table.highlighttable pre {
+    margin: 0;
+}
+
+div.code-block-caption + div {
+    margin-top: 0;
+}
+
+div.code-block-caption {
+    margin-top: 1em;
+    padding: 2px 5px;
+    font-size: small;
+}
+
+div.code-block-caption code {
+    background-color: transparent;
+}
+
+table.highlighttable td.linenos,
+span.linenos,
+div.highlight span.gp {  /* gp: Generic.Prompt */
+  user-select: none;
+  -webkit-user-select: text; /* Safari fallback only */
+  -webkit-user-select: none; /* Chrome/Safari */
+  -moz-user-select: none; /* Firefox */
+  -ms-user-select: none; /* IE10+ */
+}
+
+div.code-block-caption span.caption-number {
+    padding: 0.1em 0.3em;
+    font-style: italic;
+}
+
+div.code-block-caption span.caption-text {
+}
+
+div.literal-block-wrapper {
+    margin: 1em 0;
+}
+
+code.xref, a code {
+    background-color: transparent;
+    font-weight: bold;
+}
+
+h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
+    background-color: transparent;
+}
+
+.viewcode-link {
+    float: right;
+}
+
+.viewcode-back {
+    float: right;
+    font-family: sans-serif;
+}
+
+div.viewcode-block:target {
+    margin: -1px -10px;
+    padding: 0 10px;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+    vertical-align: middle;
+}
+
+div.body div.math p {
+    text-align: center;
+}
+
+span.eqno {
+    float: right;
+}
+
+span.eqno a.headerlink {
+    position: absolute;
+    z-index: 1;
+}
+
+div.math:hover a.headerlink {
+    visibility: visible;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+    div.document,
+    div.documentwrapper,
+    div.bodywrapper {
+        margin: 0 !important;
+        width: 100%;
+    }
+
+    div.sphinxsidebar,
+    div.related,
+    div.footer,
+    #top-link {
+        display: none;
+    }
+}
\ No newline at end of file
diff --git a/py/_static/custom.css b/py/_static/custom.css
new file mode 100644
index 0000000..2a924f1
--- /dev/null
+++ b/py/_static/custom.css
@@ -0,0 +1 @@
+/* This file intentionally left blank. */
diff --git a/py/_static/doctools.js b/py/_static/doctools.js
new file mode 100644
index 0000000..d06a71d
--- /dev/null
+++ b/py/_static/doctools.js
@@ -0,0 +1,156 @@
+/*
+ * doctools.js
+ * ~~~~~~~~~~~
+ *
+ * Base JavaScript utilities for all Sphinx HTML documentation.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+  "TEXTAREA",
+  "INPUT",
+  "SELECT",
+  "BUTTON",
+]);
+
+const _ready = (callback) => {
+  if (document.readyState !== "loading") {
+    callback();
+  } else {
+    document.addEventListener("DOMContentLoaded", callback);
+  }
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const Documentation = {
+  init: () => {
+    Documentation.initDomainIndexTable();
+    Documentation.initOnKeyListeners();
+  },
+
+  /**
+   * i18n support
+   */
+  TRANSLATIONS: {},
+  PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
+  LOCALE: "unknown",
+
+  // gettext and ngettext don't access this so that the functions
+  // can safely bound to a different name (_ = Documentation.gettext)
+  gettext: (string) => {
+    const translated = Documentation.TRANSLATIONS[string];
+    switch (typeof translated) {
+      case "undefined":
+        return string; // no translation
+      case "string":
+        return translated; // translation exists
+      default:
+        return translated[0]; // (singular, plural) translation tuple exists
+    }
+  },
+
+  ngettext: (singular, plural, n) => {
+    const translated = Documentation.TRANSLATIONS[singular];
+    if (typeof translated !== "undefined")
+      return translated[Documentation.PLURAL_EXPR(n)];
+    return n === 1 ? singular : plural;
+  },
+
+  addTranslations: (catalog) => {
+    Object.assign(Documentation.TRANSLATIONS, catalog.messages);
+    Documentation.PLURAL_EXPR = new Function(
+      "n",
+      `return (${catalog.plural_expr})`
+    );
+    Documentation.LOCALE = catalog.locale;
+  },
+
+  /**
+   * helper function to focus on search bar
+   */
+  focusSearchBar: () => {
+    document.querySelectorAll("input[name=q]")[0]?.focus();
+  },
+
+  /**
+   * Initialise the domain index toggle buttons
+   */
+  initDomainIndexTable: () => {
+    const toggler = (el) => {
+      const idNumber = el.id.substr(7);
+      const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
+      if (el.src.substr(-9) === "minus.png") {
+        el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
+        toggledRows.forEach((el) => (el.style.display = "none"));
+      } else {
+        el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
+        toggledRows.forEach((el) => (el.style.display = ""));
+      }
+    };
+
+    const togglerElements = document.querySelectorAll("img.toggler");
+    togglerElements.forEach((el) =>
+      el.addEventListener("click", (event) => toggler(event.currentTarget))
+    );
+    togglerElements.forEach((el) => (el.style.display = ""));
+    if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
+  },
+
+  initOnKeyListeners: () => {
+    // only install a listener if it is really needed
+    if (
+      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
+    )
+      return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.altKey || event.ctrlKey || event.metaKey) return;
+
+      if (!event.shiftKey) {
+        switch (event.key) {
+          case "ArrowLeft":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const prevLink = document.querySelector('link[rel="prev"]');
+            if (prevLink && prevLink.href) {
+              window.location.href = prevLink.href;
+              event.preventDefault();
+            }
+            break;
+          case "ArrowRight":
+            if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
+
+            const nextLink = document.querySelector('link[rel="next"]');
+            if (nextLink && nextLink.href) {
+              window.location.href = nextLink.href;
+              event.preventDefault();
+            }
+            break;
+        }
+      }
+
+      // some keyboard layouts may need Shift to get /
+      switch (event.key) {
+        case "/":
+          if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
+          Documentation.focusSearchBar();
+          event.preventDefault();
+      }
+    });
+  },
+};
+
+// quick alias for translations
+const _ = Documentation.gettext;
+
+_ready(Documentation.init);
diff --git a/py/_static/documentation_options.js b/py/_static/documentation_options.js
new file mode 100644
index 0000000..7e4c114
--- /dev/null
+++ b/py/_static/documentation_options.js
@@ -0,0 +1,13 @@
+const DOCUMENTATION_OPTIONS = {
+    VERSION: '',
+    LANGUAGE: 'en',
+    COLLAPSE_INDEX: false,
+    BUILDER: 'html',
+    FILE_SUFFIX: '.html',
+    LINK_SUFFIX: '.html',
+    HAS_SOURCE: true,
+    SOURCELINK_SUFFIX: '.txt',
+    NAVIGATION_WITH_KEYS: false,
+    SHOW_SEARCH_SUMMARY: true,
+    ENABLE_SEARCH_SHORTCUTS: true,
+};
\ No newline at end of file
diff --git a/py/_static/favicon.ico b/py/_static/favicon.ico
new file mode 100644
index 0000000..33a554a
--- /dev/null
+++ b/py/_static/favicon.ico
Binary files differ
diff --git a/py/_static/file.png b/py/_static/file.png
new file mode 100644
index 0000000..a858a41
--- /dev/null
+++ b/py/_static/file.png
Binary files differ
diff --git a/py/_static/language_data.js b/py/_static/language_data.js
new file mode 100644
index 0000000..250f566
--- /dev/null
+++ b/py/_static/language_data.js
@@ -0,0 +1,199 @@
+/*
+ * language_data.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * This script contains the language-specific data used by searchtools.js,
+ * namely the list of stopwords, stemmer, scorer and splitter.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
+
+
+/* Non-minified version is copied as a separate JS file, is available */
+
+/**
+ * Porter Stemmer
+ */
+var Stemmer = function() {
+
+  var step2list = {
+    ational: 'ate',
+    tional: 'tion',
+    enci: 'ence',
+    anci: 'ance',
+    izer: 'ize',
+    bli: 'ble',
+    alli: 'al',
+    entli: 'ent',
+    eli: 'e',
+    ousli: 'ous',
+    ization: 'ize',
+    ation: 'ate',
+    ator: 'ate',
+    alism: 'al',
+    iveness: 'ive',
+    fulness: 'ful',
+    ousness: 'ous',
+    aliti: 'al',
+    iviti: 'ive',
+    biliti: 'ble',
+    logi: 'log'
+  };
+
+  var step3list = {
+    icate: 'ic',
+    ative: '',
+    alize: 'al',
+    iciti: 'ic',
+    ical: 'ic',
+    ful: '',
+    ness: ''
+  };
+
+  var c = "[^aeiou]";          // consonant
+  var v = "[aeiouy]";          // vowel
+  var C = c + "[^aeiouy]*";    // consonant sequence
+  var V = v + "[aeiou]*";      // vowel sequence
+
+  var mgr0 = "^(" + C + ")?" + V + C;                      // [C]VC... is m>0
+  var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$";    // [C]VC[V] is m=1
+  var mgr1 = "^(" + C + ")?" + V + C + V + C;              // [C]VCVC... is m>1
+  var s_v   = "^(" + C + ")?" + v;                         // vowel in stem
+
+  this.stemWord = function (w) {
+    var stem;
+    var suffix;
+    var firstch;
+    var origword = w;
+
+    if (w.length < 3)
+      return w;
+
+    var re;
+    var re2;
+    var re3;
+    var re4;
+
+    firstch = w.substr(0,1);
+    if (firstch == "y")
+      w = firstch.toUpperCase() + w.substr(1);
+
+    // Step 1a
+    re = /^(.+?)(ss|i)es$/;
+    re2 = /^(.+?)([^s])s$/;
+
+    if (re.test(w))
+      w = w.replace(re,"$1$2");
+    else if (re2.test(w))
+      w = w.replace(re2,"$1$2");
+
+    // Step 1b
+    re = /^(.+?)eed$/;
+    re2 = /^(.+?)(ed|ing)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      re = new RegExp(mgr0);
+      if (re.test(fp[1])) {
+        re = /.$/;
+        w = w.replace(re,"");
+      }
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1];
+      re2 = new RegExp(s_v);
+      if (re2.test(stem)) {
+        w = stem;
+        re2 = /(at|bl|iz)$/;
+        re3 = new RegExp("([^aeiouylsz])\\1$");
+        re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+        if (re2.test(w))
+          w = w + "e";
+        else if (re3.test(w)) {
+          re = /.$/;
+          w = w.replace(re,"");
+        }
+        else if (re4.test(w))
+          w = w + "e";
+      }
+    }
+
+    // Step 1c
+    re = /^(.+?)y$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(s_v);
+      if (re.test(stem))
+        w = stem + "i";
+    }
+
+    // Step 2
+    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step2list[suffix];
+    }
+
+    // Step 3
+    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      suffix = fp[2];
+      re = new RegExp(mgr0);
+      if (re.test(stem))
+        w = stem + step3list[suffix];
+    }
+
+    // Step 4
+    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+    re2 = /^(.+?)(s|t)(ion)$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      if (re.test(stem))
+        w = stem;
+    }
+    else if (re2.test(w)) {
+      var fp = re2.exec(w);
+      stem = fp[1] + fp[2];
+      re2 = new RegExp(mgr1);
+      if (re2.test(stem))
+        w = stem;
+    }
+
+    // Step 5
+    re = /^(.+?)e$/;
+    if (re.test(w)) {
+      var fp = re.exec(w);
+      stem = fp[1];
+      re = new RegExp(mgr1);
+      re2 = new RegExp(meq1);
+      re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+        w = stem;
+    }
+    re = /ll$/;
+    re2 = new RegExp(mgr1);
+    if (re.test(w) && re2.test(w)) {
+      re = /.$/;
+      w = w.replace(re,"");
+    }
+
+    // and turn initial Y back to y
+    if (firstch == "y")
+      w = firstch.toLowerCase() + w.substr(1);
+    return w;
+  }
+}
+
diff --git a/py/_static/minus.png b/py/_static/minus.png
new file mode 100644
index 0000000..d96755f
--- /dev/null
+++ b/py/_static/minus.png
Binary files differ
diff --git a/py/_static/plus.png b/py/_static/plus.png
new file mode 100644
index 0000000..7107cec
--- /dev/null
+++ b/py/_static/plus.png
Binary files differ
diff --git a/py/_static/pygments.css b/py/_static/pygments.css
new file mode 100644
index 0000000..57c7df3
--- /dev/null
+++ b/py/_static/pygments.css
@@ -0,0 +1,84 @@
+pre { line-height: 125%; }
+td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
+td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
+.highlight .hll { background-color: #ffffcc }
+.highlight { background: #f8f8f8; }
+.highlight .c { color: #8f5902; font-style: italic } /* Comment */
+.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
+.highlight .g { color: #000000 } /* Generic */
+.highlight .k { color: #004461; font-weight: bold } /* Keyword */
+.highlight .l { color: #000000 } /* Literal */
+.highlight .n { color: #000000 } /* Name */
+.highlight .o { color: #582800 } /* Operator */
+.highlight .x { color: #000000 } /* Other */
+.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
+.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
+.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
+.highlight .cp { color: #8f5902 } /* Comment.Preproc */
+.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
+.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
+.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
+.highlight .gd { color: #a40000 } /* Generic.Deleted */
+.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000 } /* Generic.EmphStrong */
+.highlight .gr { color: #ef2929 } /* Generic.Error */
+.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.highlight .gi { color: #00A000 } /* Generic.Inserted */
+.highlight .go { color: #888888 } /* Generic.Output */
+.highlight .gp { color: #745334 } /* Generic.Prompt */
+.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
+.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
+.highlight .kc { color: #004461; font-weight: bold } /* Keyword.Constant */
+.highlight .kd { color: #004461; font-weight: bold } /* Keyword.Declaration */
+.highlight .kn { color: #004461; font-weight: bold } /* Keyword.Namespace */
+.highlight .kp { color: #004461; font-weight: bold } /* Keyword.Pseudo */
+.highlight .kr { color: #004461; font-weight: bold } /* Keyword.Reserved */
+.highlight .kt { color: #004461; font-weight: bold } /* Keyword.Type */
+.highlight .ld { color: #000000 } /* Literal.Date */
+.highlight .m { color: #990000 } /* Literal.Number */
+.highlight .s { color: #4e9a06 } /* Literal.String */
+.highlight .na { color: #c4a000 } /* Name.Attribute */
+.highlight .nb { color: #004461 } /* Name.Builtin */
+.highlight .nc { color: #000000 } /* Name.Class */
+.highlight .no { color: #000000 } /* Name.Constant */
+.highlight .nd { color: #888888 } /* Name.Decorator */
+.highlight .ni { color: #ce5c00 } /* Name.Entity */
+.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
+.highlight .nf { color: #000000 } /* Name.Function */
+.highlight .nl { color: #f57900 } /* Name.Label */
+.highlight .nn { color: #000000 } /* Name.Namespace */
+.highlight .nx { color: #000000 } /* Name.Other */
+.highlight .py { color: #000000 } /* Name.Property */
+.highlight .nt { color: #004461; font-weight: bold } /* Name.Tag */
+.highlight .nv { color: #000000 } /* Name.Variable */
+.highlight .ow { color: #004461; font-weight: bold } /* Operator.Word */
+.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
+.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
+.highlight .mb { color: #990000 } /* Literal.Number.Bin */
+.highlight .mf { color: #990000 } /* Literal.Number.Float */
+.highlight .mh { color: #990000 } /* Literal.Number.Hex */
+.highlight .mi { color: #990000 } /* Literal.Number.Integer */
+.highlight .mo { color: #990000 } /* Literal.Number.Oct */
+.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
+.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
+.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
+.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
+.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
+.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
+.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
+.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
+.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
+.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
+.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
+.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
+.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
+.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
+.highlight .fm { color: #000000 } /* Name.Function.Magic */
+.highlight .vc { color: #000000 } /* Name.Variable.Class */
+.highlight .vg { color: #000000 } /* Name.Variable.Global */
+.highlight .vi { color: #000000 } /* Name.Variable.Instance */
+.highlight .vm { color: #000000 } /* Name.Variable.Magic */
+.highlight .il { color: #990000 } /* Literal.Number.Integer.Long */
\ No newline at end of file
diff --git a/py/_static/searchtools.js b/py/_static/searchtools.js
new file mode 100644
index 0000000..7918c3f
--- /dev/null
+++ b/py/_static/searchtools.js
@@ -0,0 +1,574 @@
+/*
+ * searchtools.js
+ * ~~~~~~~~~~~~~~~~
+ *
+ * Sphinx JavaScript utilities for the full-text search.
+ *
+ * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+"use strict";
+
+/**
+ * Simple result scoring code.
+ */
+if (typeof Scorer === "undefined") {
+  var Scorer = {
+    // Implement the following function to further tweak the score for each result
+    // The function takes a result array [docname, title, anchor, descr, score, filename]
+    // and returns the new score.
+    /*
+    score: result => {
+      const [docname, title, anchor, descr, score, filename] = result
+      return score
+    },
+    */
+
+    // query matches the full name of an object
+    objNameMatch: 11,
+    // or matches in the last dotted part of the object name
+    objPartialMatch: 6,
+    // Additive scores depending on the priority of the object
+    objPrio: {
+      0: 15, // used to be importantResults
+      1: 5, // used to be objectResults
+      2: -5, // used to be unimportantResults
+    },
+    //  Used when the priority is not in the mapping.
+    objPrioDefault: 0,
+
+    // query found in title
+    title: 15,
+    partialTitle: 7,
+    // query found in terms
+    term: 5,
+    partialTerm: 2,
+  };
+}
+
+const _removeChildren = (element) => {
+  while (element && element.lastChild) element.removeChild(element.lastChild);
+};
+
+/**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
+ */
+const _escapeRegExp = (string) =>
+  string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
+
+const _displayItem = (item, searchTerms, highlightTerms) => {
+  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
+  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
+  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
+  const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
+  const contentRoot = document.documentElement.dataset.content_root;
+
+  const [docName, title, anchor, descr, score, _filename] = item;
+
+  let listItem = document.createElement("li");
+  let requestUrl;
+  let linkUrl;
+  if (docBuilder === "dirhtml") {
+    // dirhtml builder
+    let dirname = docName + "/";
+    if (dirname.match(/\/index\/$/))
+      dirname = dirname.substring(0, dirname.length - 6);
+    else if (dirname === "index/") dirname = "";
+    requestUrl = contentRoot + dirname;
+    linkUrl = requestUrl;
+  } else {
+    // normal html builders
+    requestUrl = contentRoot + docName + docFileSuffix;
+    linkUrl = docName + docLinkSuffix;
+  }
+  let linkEl = listItem.appendChild(document.createElement("a"));
+  linkEl.href = linkUrl + anchor;
+  linkEl.dataset.score = score;
+  linkEl.innerHTML = title;
+  if (descr) {
+    listItem.appendChild(document.createElement("span")).innerHTML =
+      " (" + descr + ")";
+    // highlight search terms in the description
+    if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+      highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+  }
+  else if (showSearchSummary)
+    fetch(requestUrl)
+      .then((responseData) => responseData.text())
+      .then((data) => {
+        if (data)
+          listItem.appendChild(
+            Search.makeSearchSummary(data, searchTerms)
+          );
+        // highlight search terms in the summary
+        if (SPHINX_HIGHLIGHT_ENABLED)  // set in sphinx_highlight.js
+          highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
+      });
+  Search.output.appendChild(listItem);
+};
+const _finishSearch = (resultCount) => {
+  Search.stopPulse();
+  Search.title.innerText = _("Search Results");
+  if (!resultCount)
+    Search.status.innerText = Documentation.gettext(
+      "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+    );
+  else
+    Search.status.innerText = _(
+      `Search finished, found ${resultCount} page(s) matching the search query.`
+    );
+};
+const _displayNextItem = (
+  results,
+  resultCount,
+  searchTerms,
+  highlightTerms,
+) => {
+  // results left, load the summary and display it
+  // this is intended to be dynamic (don't sub resultsCount)
+  if (results.length) {
+    _displayItem(results.pop(), searchTerms, highlightTerms);
+    setTimeout(
+      () => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
+      5
+    );
+  }
+  // search finished, update title and status message
+  else _finishSearch(resultCount);
+};
+
+/**
+ * Default splitQuery function. Can be overridden in ``sphinx.search`` with a
+ * custom function per language.
+ *
+ * The regular expression works by splitting the string on consecutive characters
+ * that are not Unicode letters, numbers, underscores, or emoji characters.
+ * This is the same as ``\W+`` in Python, preserving the surrogate pair area.
+ */
+if (typeof splitQuery === "undefined") {
+  var splitQuery = (query) => query
+      .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
+      .filter(term => term)  // remove remaining empty strings
+}
+
+/**
+ * Search Module
+ */
+const Search = {
+  _index: null,
+  _queued_query: null,
+  _pulse_status: -1,
+
+  htmlToText: (htmlString) => {
+    const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
+    htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+    const docContent = htmlElement.querySelector('[role="main"]');
+    if (docContent !== undefined) return docContent.textContent;
+    console.warn(
+      "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+    );
+    return "";
+  },
+
+  init: () => {
+    const query = new URLSearchParams(window.location.search).get("q");
+    document
+      .querySelectorAll('input[name="q"]')
+      .forEach((el) => (el.value = query));
+    if (query) Search.performSearch(query);
+  },
+
+  loadIndex: (url) =>
+    (document.body.appendChild(document.createElement("script")).src = url),
+
+  setIndex: (index) => {
+    Search._index = index;
+    if (Search._queued_query !== null) {
+      const query = Search._queued_query;
+      Search._queued_query = null;
+      Search.query(query);
+    }
+  },
+
+  hasIndex: () => Search._index !== null,
+
+  deferQuery: (query) => (Search._queued_query = query),
+
+  stopPulse: () => (Search._pulse_status = -1),
+
+  startPulse: () => {
+    if (Search._pulse_status >= 0) return;
+
+    const pulse = () => {
+      Search._pulse_status = (Search._pulse_status + 1) % 4;
+      Search.dots.innerText = ".".repeat(Search._pulse_status);
+      if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
+    };
+    pulse();
+  },
+
+  /**
+   * perform a search for something (or wait until index is loaded)
+   */
+  performSearch: (query) => {
+    // create the required interface elements
+    const searchText = document.createElement("h2");
+    searchText.textContent = _("Searching");
+    const searchSummary = document.createElement("p");
+    searchSummary.classList.add("search-summary");
+    searchSummary.innerText = "";
+    const searchList = document.createElement("ul");
+    searchList.classList.add("search");
+
+    const out = document.getElementById("search-results");
+    Search.title = out.appendChild(searchText);
+    Search.dots = Search.title.appendChild(document.createElement("span"));
+    Search.status = out.appendChild(searchSummary);
+    Search.output = out.appendChild(searchList);
+
+    const searchProgress = document.getElementById("search-progress");
+    // Some themes don't use the search progress node
+    if (searchProgress) {
+      searchProgress.innerText = _("Preparing search...");
+    }
+    Search.startPulse();
+
+    // index already loaded, the browser was quick!
+    if (Search.hasIndex()) Search.query(query);
+    else Search.deferQuery(query);
+  },
+
+  /**
+   * execute search (requires search index to be loaded)
+   */
+  query: (query) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+    const allTitles = Search._index.alltitles;
+    const indexEntries = Search._index.indexentries;
+
+    // stem the search terms and add them to the correct list
+    const stemmer = new Stemmer();
+    const searchTerms = new Set();
+    const excludedTerms = new Set();
+    const highlightTerms = new Set();
+    const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
+    splitQuery(query.trim()).forEach((queryTerm) => {
+      const queryTermLower = queryTerm.toLowerCase();
+
+      // maybe skip this "word"
+      // stopwords array is from language_data.js
+      if (
+        stopwords.indexOf(queryTermLower) !== -1 ||
+        queryTerm.match(/^\d+$/)
+      )
+        return;
+
+      // stem the word
+      let word = stemmer.stemWord(queryTermLower);
+      // select the correct list
+      if (word[0] === "-") excludedTerms.add(word.substr(1));
+      else {
+        searchTerms.add(word);
+        highlightTerms.add(queryTermLower);
+      }
+    });
+
+    if (SPHINX_HIGHLIGHT_ENABLED) {  // set in sphinx_highlight.js
+      localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+    }
+
+    // console.debug("SEARCH: searching for:");
+    // console.info("required: ", [...searchTerms]);
+    // console.info("excluded: ", [...excludedTerms]);
+
+    // array of [docname, title, anchor, descr, score, filename]
+    let results = [];
+    _removeChildren(document.getElementById("search-progress"));
+
+    const queryLower = query.toLowerCase();
+    for (const [title, foundTitles] of Object.entries(allTitles)) {
+      if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+        for (const [file, id] of foundTitles) {
+          let score = Math.round(100 * queryLower.length / title.length)
+          results.push([
+            docNames[file],
+            titles[file] !== title ? `${titles[file]} > ${title}` : title,
+            id !== null ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // search for explicit entries in index directives
+    for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+      if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+        for (const [file, id] of foundEntries) {
+          let score = Math.round(100 * queryLower.length / entry.length)
+          results.push([
+            docNames[file],
+            titles[file],
+            id ? "#" + id : "",
+            null,
+            score,
+            filenames[file],
+          ]);
+        }
+      }
+    }
+
+    // lookup as object
+    objectTerms.forEach((term) =>
+      results.push(...Search.performObjectSearch(term, objectTerms))
+    );
+
+    // lookup as search terms in fulltext
+    results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+
+    // let the scorer override scores with a custom scoring function
+    if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
+
+    // now sort the results by score (in opposite order of appearance, since the
+    // display function below uses pop() to retrieve items) and then
+    // alphabetically
+    results.sort((a, b) => {
+      const leftScore = a[4];
+      const rightScore = b[4];
+      if (leftScore === rightScore) {
+        // same score: sort alphabetically
+        const leftTitle = a[1].toLowerCase();
+        const rightTitle = b[1].toLowerCase();
+        if (leftTitle === rightTitle) return 0;
+        return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+      }
+      return leftScore > rightScore ? 1 : -1;
+    });
+
+    // remove duplicate search results
+    // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
+    let seen = new Set();
+    results = results.reverse().reduce((acc, result) => {
+      let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
+      if (!seen.has(resultStr)) {
+        acc.push(result);
+        seen.add(resultStr);
+      }
+      return acc;
+    }, []);
+
+    results = results.reverse();
+
+    // for debugging
+    //Search.lastresults = results.slice();  // a copy
+    // console.info("search results:", Search.lastresults);
+
+    // print the results
+    _displayNextItem(results, results.length, searchTerms, highlightTerms);
+  },
+
+  /**
+   * search for object names
+   */
+  performObjectSearch: (object, objectTerms) => {
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const objects = Search._index.objects;
+    const objNames = Search._index.objnames;
+    const titles = Search._index.titles;
+
+    const results = [];
+
+    const objectSearchCallback = (prefix, match) => {
+      const name = match[4]
+      const fullname = (prefix ? prefix + "." : "") + name;
+      const fullnameLower = fullname.toLowerCase();
+      if (fullnameLower.indexOf(object) < 0) return;
+
+      let score = 0;
+      const parts = fullnameLower.split(".");
+
+      // check for different match types: exact matches of full name or
+      // "last name" (i.e. last dotted part)
+      if (fullnameLower === object || parts.slice(-1)[0] === object)
+        score += Scorer.objNameMatch;
+      else if (parts.slice(-1)[0].indexOf(object) > -1)
+        score += Scorer.objPartialMatch; // matches in last name
+
+      const objName = objNames[match[1]][2];
+      const title = titles[match[0]];
+
+      // If more than one term searched for, we require other words to be
+      // found in the name/title/description
+      const otherTerms = new Set(objectTerms);
+      otherTerms.delete(object);
+      if (otherTerms.size > 0) {
+        const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
+        if (
+          [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
+        )
+          return;
+      }
+
+      let anchor = match[3];
+      if (anchor === "") anchor = fullname;
+      else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
+
+      const descr = objName + _(", in ") + title;
+
+      // add custom score for some objects according to scorer
+      if (Scorer.objPrio.hasOwnProperty(match[2]))
+        score += Scorer.objPrio[match[2]];
+      else score += Scorer.objPrioDefault;
+
+      results.push([
+        docNames[match[0]],
+        fullname,
+        "#" + anchor,
+        descr,
+        score,
+        filenames[match[0]],
+      ]);
+    };
+    Object.keys(objects).forEach((prefix) =>
+      objects[prefix].forEach((array) =>
+        objectSearchCallback(prefix, array)
+      )
+    );
+    return results;
+  },
+
+  /**
+   * search for full-text terms in the index
+   */
+  performTermsSearch: (searchTerms, excludedTerms) => {
+    // prepare search
+    const terms = Search._index.terms;
+    const titleTerms = Search._index.titleterms;
+    const filenames = Search._index.filenames;
+    const docNames = Search._index.docnames;
+    const titles = Search._index.titles;
+
+    const scoreMap = new Map();
+    const fileMap = new Map();
+
+    // perform the search on the required terms
+    searchTerms.forEach((word) => {
+      const files = [];
+      const arr = [
+        { files: terms[word], score: Scorer.term },
+        { files: titleTerms[word], score: Scorer.title },
+      ];
+      // add support for partial matches
+      if (word.length > 2) {
+        const escapedWord = _escapeRegExp(word);
+        Object.keys(terms).forEach((term) => {
+          if (term.match(escapedWord) && !terms[word])
+            arr.push({ files: terms[term], score: Scorer.partialTerm });
+        });
+        Object.keys(titleTerms).forEach((term) => {
+          if (term.match(escapedWord) && !titleTerms[word])
+            arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
+        });
+      }
+
+      // no match but word was a required one
+      if (arr.every((record) => record.files === undefined)) return;
+
+      // found search word in contents
+      arr.forEach((record) => {
+        if (record.files === undefined) return;
+
+        let recordFiles = record.files;
+        if (recordFiles.length === undefined) recordFiles = [recordFiles];
+        files.push(...recordFiles);
+
+        // set score for the word in each file
+        recordFiles.forEach((file) => {
+          if (!scoreMap.has(file)) scoreMap.set(file, {});
+          scoreMap.get(file)[word] = record.score;
+        });
+      });
+
+      // create the mapping
+      files.forEach((file) => {
+        if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
+          fileMap.get(file).push(word);
+        else fileMap.set(file, [word]);
+      });
+    });
+
+    // now check if the files don't contain excluded terms
+    const results = [];
+    for (const [file, wordList] of fileMap) {
+      // check if all requirements are matched
+
+      // as search terms with length < 3 are discarded
+      const filteredTermCount = [...searchTerms].filter(
+        (term) => term.length > 2
+      ).length;
+      if (
+        wordList.length !== searchTerms.size &&
+        wordList.length !== filteredTermCount
+      )
+        continue;
+
+      // ensure that none of the excluded terms is in the search result
+      if (
+        [...excludedTerms].some(
+          (term) =>
+            terms[term] === file ||
+            titleTerms[term] === file ||
+            (terms[term] || []).includes(file) ||
+            (titleTerms[term] || []).includes(file)
+        )
+      )
+        break;
+
+      // select one (max) score for the file.
+      const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
+      // add result to the result list
+      results.push([
+        docNames[file],
+        titles[file],
+        "",
+        null,
+        score,
+        filenames[file],
+      ]);
+    }
+    return results;
+  },
+
+  /**
+   * helper function to return a node containing the
+   * search summary for a given text. keywords is a list
+   * of stemmed words.
+   */
+  makeSearchSummary: (htmlText, keywords) => {
+    const text = Search.htmlToText(htmlText);
+    if (text === "") return null;
+
+    const textLower = text.toLowerCase();
+    const actualStartPosition = [...keywords]
+      .map((k) => textLower.indexOf(k.toLowerCase()))
+      .filter((i) => i > -1)
+      .slice(-1)[0];
+    const startWithContext = Math.max(actualStartPosition - 120, 0);
+
+    const top = startWithContext === 0 ? "" : "...";
+    const tail = startWithContext + 240 < text.length ? "..." : "";
+
+    let summary = document.createElement("p");
+    summary.classList.add("context");
+    summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
+
+    return summary;
+  },
+};
+
+_ready(Search.init);
diff --git a/py/_static/sphinx_highlight.js b/py/_static/sphinx_highlight.js
new file mode 100644
index 0000000..8a96c69
--- /dev/null
+++ b/py/_static/sphinx_highlight.js
@@ -0,0 +1,154 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+  if (node.nodeType === Node.TEXT_NODE) {
+    const val = node.nodeValue;
+    const parent = node.parentNode;
+    const pos = val.toLowerCase().indexOf(text);
+    if (
+      pos >= 0 &&
+      !parent.classList.contains(className) &&
+      !parent.classList.contains("nohighlight")
+    ) {
+      let span;
+
+      const closestNode = parent.closest("body, svg, foreignObject");
+      const isInSVG = closestNode && closestNode.matches("svg");
+      if (isInSVG) {
+        span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+      } else {
+        span = document.createElement("span");
+        span.classList.add(className);
+      }
+
+      span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+      const rest = document.createTextNode(val.substr(pos + text.length));
+      parent.insertBefore(
+        span,
+        parent.insertBefore(
+          rest,
+          node.nextSibling
+        )
+      );
+      node.nodeValue = val.substr(0, pos);
+      /* There may be more occurrences of search term in this node. So call this
+       * function recursively on the remaining fragment.
+       */
+      _highlight(rest, addItems, text, className);
+
+      if (isInSVG) {
+        const rect = document.createElementNS(
+          "http://www.w3.org/2000/svg",
+          "rect"
+        );
+        const bbox = parent.getBBox();
+        rect.x.baseVal.value = bbox.x;
+        rect.y.baseVal.value = bbox.y;
+        rect.width.baseVal.value = bbox.width;
+        rect.height.baseVal.value = bbox.height;
+        rect.setAttribute("class", className);
+        addItems.push({ parent: parent, target: rect });
+      }
+    }
+  } else if (node.matches && !node.matches("button, select, textarea")) {
+    node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+  }
+};
+const _highlightText = (thisNode, text, className) => {
+  let addItems = [];
+  _highlight(thisNode, addItems, text, className);
+  addItems.forEach((obj) =>
+    obj.parent.insertAdjacentElement("beforebegin", obj.target)
+  );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+  /**
+   * highlight the search words provided in localstorage in the text
+   */
+  highlightSearchWords: () => {
+    if (!SPHINX_HIGHLIGHT_ENABLED) return;  // bail if no highlight
+
+    // get and clear terms from localstorage
+    const url = new URL(window.location);
+    const highlight =
+        localStorage.getItem("sphinx_highlight_terms")
+        || url.searchParams.get("highlight")
+        || "";
+    localStorage.removeItem("sphinx_highlight_terms")
+    url.searchParams.delete("highlight");
+    window.history.replaceState({}, "", url);
+
+    // get individual terms from highlight string
+    const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+    if (terms.length === 0) return; // nothing to do
+
+    // There should never be more than one element matching "div.body"
+    const divBody = document.querySelectorAll("div.body");
+    const body = divBody.length ? divBody[0] : document.querySelector("body");
+    window.setTimeout(() => {
+      terms.forEach((term) => _highlightText(body, term, "highlighted"));
+    }, 10);
+
+    const searchBox = document.getElementById("searchbox");
+    if (searchBox === null) return;
+    searchBox.appendChild(
+      document
+        .createRange()
+        .createContextualFragment(
+          '<p class="highlight-link">' +
+            '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
+            _("Hide Search Matches") +
+            "</a></p>"
+        )
+    );
+  },
+
+  /**
+   * helper function to hide the search marks again
+   */
+  hideSearchWords: () => {
+    document
+      .querySelectorAll("#searchbox .highlight-link")
+      .forEach((el) => el.remove());
+    document
+      .querySelectorAll("span.highlighted")
+      .forEach((el) => el.classList.remove("highlighted"));
+    localStorage.removeItem("sphinx_highlight_terms")
+  },
+
+  initEscapeListener: () => {
+    // only install a listener if it is really needed
+    if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+    document.addEventListener("keydown", (event) => {
+      // bail for input elements
+      if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+      // bail with special keys
+      if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+      if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+        SphinxHighlight.hideSearchWords();
+        event.preventDefault();
+      }
+    });
+  },
+};
+
+_ready(() => {
+  /* Do not call highlightSearchWords() when we are on the search page.
+   * It will highlight words from the *previous* search query.
+   */
+  if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
+  SphinxHighlight.initEscapeListener();
+});
diff --git a/py/create.html b/py/create.html
new file mode 100644
index 0000000..cf0b814
--- /dev/null
+++ b/py/create.html
@@ -0,0 +1,419 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Creating Arrow Objects &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Working with Schema" href="schema.html" />
+    <link rel="prev" title="Reading and Writing Data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="creating-arrow-objects">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Creating Arrow Objects</a><a class="headerlink" href="#creating-arrow-objects" title="Link to this heading">¶</a></h1>
+<p>Recipes related to the creation of Arrays, Tables,
+Tensors and all other Arrow entities.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#creating-arrow-objects" id="id1">Creating Arrow Objects</a></p>
+<ul>
+<li><p><a class="reference internal" href="#creating-arrays" id="id2">Creating Arrays</a></p></li>
+<li><p><a class="reference internal" href="#creating-tables" id="id3">Creating Tables</a></p></li>
+<li><p><a class="reference internal" href="#create-table-from-plain-types" id="id4">Create Table from Plain Types</a></p></li>
+<li><p><a class="reference internal" href="#creating-record-batches" id="id5">Creating Record Batches</a></p></li>
+<li><p><a class="reference internal" href="#store-categorical-data" id="id6">Store Categorical Data</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="creating-arrays">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Creating Arrays</a><a class="headerlink" href="#creating-arrays" title="Link to this heading">¶</a></h2>
+<p>Arrow keeps data in continuous arrays optimised for memory footprint
+and SIMD analyses. In Python it’s possible to build <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Array</span></code></a>
+starting from Python <code class="docutils literal notranslate"><span class="pre">lists</span></code> (or sequence types in general),
+<code class="docutils literal notranslate"><span class="pre">numpy</span></code> arrays and <code class="docutils literal notranslate"><span class="pre">pandas</span></code> Series.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  1,
+  2,
+  3,
+  4,
+  5
+]
+</pre></div>
+</div>
+<p>Arrays can also provide a <code class="docutils literal notranslate"><span class="pre">mask</span></code> to specify which values should
+be considered nulls</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+                 <span class="n">mask</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">]))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  null,
+  2,
+  null,
+  4,
+  null
+]
+</pre></div>
+</div>
+<p>When building arrays from <code class="docutils literal notranslate"><span class="pre">numpy</span></code> or <code class="docutils literal notranslate"><span class="pre">pandas</span></code>, Arrow will leverage
+optimized code paths that rely on the internal in-memory representation
+of the data by <code class="docutils literal notranslate"><span class="pre">numpy</span></code> and <code class="docutils literal notranslate"><span class="pre">pandas</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
+
+<span class="n">array_from_numpy</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">5</span><span class="p">))</span>
+<span class="n">array_from_pandas</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">pd</span><span class="o">.</span><span class="n">Series</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]))</span>
+</pre></div>
+</div>
+</section>
+<section id="creating-tables">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Creating Tables</a><a class="headerlink" href="#creating-tables" title="Link to this heading">¶</a></h2>
+<p>Arrow supports tabular data in <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>: each column
+is represented by a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.ChunkedArray.html#pyarrow.ChunkedArray" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.ChunkedArray</span></code></a> and tables can be created
+by pairing multiple arrays with names for their columns</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="s2">&quot;col3&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+<section id="create-table-from-plain-types">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Create Table from Plain Types</a><a class="headerlink" href="#create-table-from-plain-types" title="Link to this heading">¶</a></h2>
+<p>Arrow allows fast zero copy creation of arrow arrays
+from numpy and pandas arrays and series, but it’s also
+possible to create Arrow Arrays and Tables from
+plain Python structures.</p>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.table.html#pyarrow.table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.table()</span></code></a> function allows creation of Tables
+from a variety of inputs, including plain python objects</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">({</span>
+    <span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+    <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">]</span>
+<span class="p">})</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>All values provided in the dictionary will be passed to
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.array.html#pyarrow.array" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.array()</span></code></a> for conversion to Arrow arrays,
+and will benefit from zero copy behaviour when possible.</p>
+</div>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.from_pylist" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.from_pylist()</span></code></a> method allows the creation
+of Tables from python lists of row dicts. Types are inferred if a
+schema is not explicitly passed.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_pylist</span><span class="p">([</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;a&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;b&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;c&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;d&quot;</span><span class="p">},</span>
+    <span class="p">{</span><span class="s2">&quot;col1&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> <span class="s2">&quot;col2&quot;</span><span class="p">:</span> <span class="s2">&quot;e&quot;</span><span class="p">}</span>
+<span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+col2: string
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+</pre></div>
+</div>
+</section>
+<section id="creating-record-batches">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Creating Record Batches</a><a class="headerlink" href="#creating-record-batches" title="Link to this heading">¶</a></h2>
+<p>Most I/O operations in Arrow happen when shipping batches of data
+to their destination.  <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> is the way
+Arrow represents batches of data.  A RecordBatch can be seen as a slice
+of a table.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">RecordBatch</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">9</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">10</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;odd&quot;</span><span class="p">,</span> <span class="s2">&quot;even&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Multiple batches can be combined into a table using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.from_batches" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.from_batches()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">second_batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">RecordBatch</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">11</span><span class="p">,</span> <span class="mi">13</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">17</span><span class="p">,</span> <span class="mi">19</span><span class="p">]),</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">12</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">18</span><span class="p">,</span> <span class="mi">20</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;odd&quot;</span><span class="p">,</span> <span class="s2">&quot;even&quot;</span><span class="p">])</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_batches</span><span class="p">([</span><span class="n">batch</span><span class="p">,</span> <span class="n">second_batch</span><span class="p">])</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+odd: int64
+even: int64
+----
+odd: [[1,3,5,7,9],[11,13,15,17,19]]
+even: [[2,4,6,8,10],[12,14,16,18,20]]
+</pre></div>
+</div>
+<p>Equally, <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> can be converted to a list of
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.to_batches" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.to_batches()</span></code></a>
+method</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">record_batches</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">to_batches</span><span class="p">(</span><span class="n">max_chunksize</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">record_batches</span><span class="p">))</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>2
+</pre></div>
+</div>
+</section>
+<section id="store-categorical-data">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Store Categorical Data</a><a class="headerlink" href="#store-categorical-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray</span></code></a> type
+to represent categorical data without the cost of
+storing and repeating the categories over and over.  This can reduce memory use
+when columns might have large values (such as text).</p>
+<p>If you have an array containing repeated categorical data,
+it is possible to convert it to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray</span></code></a>
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.dictionary_encode" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Array.dictionary_encode()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;red&quot;</span><span class="p">])</span>
+
+<span class="n">categorical</span> <span class="o">=</span> <span class="n">arr</span><span class="o">.</span><span class="n">dictionary_encode</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">categorical</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>...
+-- dictionary:
+  [
+    &quot;red&quot;,
+    &quot;green&quot;,
+    &quot;blue&quot;
+  ]
+-- indices:
+  [
+    0,
+    1,
+    2,
+    2,
+    1,
+    0
+  ]
+</pre></div>
+</div>
+<p>If you already know the categories and indices then you can skip the encode
+step and directly create the <code class="docutils literal notranslate"><span class="pre">DictionaryArray</span></code> using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html#pyarrow.DictionaryArray.from_arrays" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.DictionaryArray.from_arrays()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">categorical</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">DictionaryArray</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">(</span>
+    <span class="n">indices</span><span class="o">=</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span>
+    <span class="n">dictionary</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;red&quot;</span><span class="p">,</span> <span class="s2">&quot;green&quot;</span><span class="p">,</span> <span class="s2">&quot;blue&quot;</span><span class="p">]</span>
+<span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">categorical</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>...
+-- dictionary:
+  [
+    &quot;red&quot;,
+    &quot;green&quot;,
+    &quot;blue&quot;
+  ]
+-- indices:
+  [
+    0,
+    1,
+    2,
+    2,
+    1,
+    0
+  ]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#creating-arrays">Creating Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-tables">Creating Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#create-table-from-plain-types">Create Table from Plain Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#creating-record-batches">Creating Record Batches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#store-categorical-data">Store Categorical Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="io.html" title="previous chapter">Reading and Writing Data</a></li>
+      <li>Next: <a href="schema.html" title="next chapter">Working with Schema</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/create.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/data.html b/py/data.html
new file mode 100644
index 0000000..219fe4d
--- /dev/null
+++ b/py/data.html
@@ -0,0 +1,631 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Data Manipulation &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Arrow Flight" href="flight.html" />
+    <link rel="prev" title="Working with Schema" href="schema.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="data-manipulation">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Data Manipulation</a><a class="headerlink" href="#data-manipulation" title="Link to this heading">¶</a></h1>
+<p>Recipes related to filtering or transforming data in
+arrays and tables.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#data-manipulation" id="id1">Data Manipulation</a></p>
+<ul>
+<li><p><a class="reference internal" href="#computing-mean-min-max-values-of-an-array" id="id2">Computing Mean/Min/Max values of an array</a></p></li>
+<li><p><a class="reference internal" href="#counting-occurrences-of-elements" id="id3">Counting Occurrences of Elements</a></p></li>
+<li><p><a class="reference internal" href="#applying-arithmetic-functions-to-arrays" id="id4">Applying arithmetic functions to arrays.</a></p></li>
+<li><p><a class="reference internal" href="#appending-tables-to-an-existing-table" id="id5">Appending tables to an existing table</a></p></li>
+<li><p><a class="reference internal" href="#adding-a-column-to-an-existing-table" id="id6">Adding a column to an existing Table</a></p></li>
+<li><p><a class="reference internal" href="#replacing-a-column-in-an-existing-table" id="id7">Replacing a column in an existing Table</a></p></li>
+<li><p><a class="reference internal" href="#group-a-table" id="id8">Group a Table</a></p></li>
+<li><p><a class="reference internal" href="#sort-a-table" id="id9">Sort a Table</a></p></li>
+<li><p><a class="reference internal" href="#searching-for-values-matching-a-predicate-in-arrays" id="id10">Searching for values matching a predicate in Arrays</a></p></li>
+<li><p><a class="reference internal" href="#filtering-arrays-using-a-mask" id="id11">Filtering Arrays using a mask</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<p>See <a class="reference external" href="https://arrow.apache.org/docs/python/compute.html#compute" title="(in Apache Arrow v14.0.1)"><span>Compute Functions</span></a> for a complete list of all available compute functions</p>
+<section id="computing-mean-min-max-values-of-an-array">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Computing Mean/Min/Max values of an array</a><a class="headerlink" href="#computing-mean-min-max-values-of-an-array" title="Link to this heading">¶</a></h2>
+<p>Arrow provides compute functions that can be applied to arrays.
+Those compute functions are exposed through the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code>
+module.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can compute the <code class="docutils literal notranslate"><span class="pre">mean</span></code> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.mean.html#pyarrow.compute.mean" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.mean()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">mean</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">mean</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">mean</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>49.5
+</pre></div>
+</div>
+<p>And the <code class="docutils literal notranslate"><span class="pre">min</span></code> and <code class="docutils literal notranslate"><span class="pre">max</span></code> using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.min_max.html#pyarrow.compute.min_max" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.min_max()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">min_max</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">min_max</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">min_max</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[(&#39;min&#39;, 0), (&#39;max&#39;, 99)]
+</pre></div>
+</div>
+</section>
+<section id="counting-occurrences-of-elements">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Counting Occurrences of Elements</a><a class="headerlink" href="#counting-occurrences-of-elements" title="Link to this heading">¶</a></h2>
+<p>Arrow provides compute functions that can be applied to arrays,
+those compute functions are exposed through the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code>
+module.</p>
+<p>Given an array with all numbers from 0 to 9 repeated 10 times</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;LEN: </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">nums_arr</span><span class="p">)</span><span class="si">}</span><span class="s2">, MIN/MAX: </span><span class="si">{</span><span class="n">nums_arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">nums_arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>LEN: 100, MIN/MAX: 0 .. 9
+</pre></div>
+</div>
+<p>We can count occurrences of all entries in the array using the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.value_counts.html#pyarrow.compute.value_counts" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.value_counts()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">counts</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">value_counts</span><span class="p">(</span><span class="n">nums_arr</span><span class="p">)</span>
+<span class="k">for</span> <span class="n">pair</span> <span class="ow">in</span> <span class="n">counts</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">pair</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[(&#39;values&#39;, 0), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 1), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 2), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 3), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 4), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 5), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 6), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 7), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 8), (&#39;counts&#39;, 10)]
+[(&#39;values&#39;, 9), (&#39;counts&#39;, 10)]
+</pre></div>
+</div>
+</section>
+<section id="applying-arithmetic-functions-to-arrays">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Applying arithmetic functions to arrays.</a><a class="headerlink" href="#applying-arithmetic-functions-to-arrays" title="Link to this heading">¶</a></h2>
+<p>The compute functions in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> also include
+common transformations such as arithmetic functions.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can multiply all values by 2 using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.multiply.html#pyarrow.compute.multiply" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.multiply()</span></code></a>
+function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">doubles</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">multiply</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">doubles</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">doubles</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 198
+</pre></div>
+</div>
+</section>
+<section id="appending-tables-to-an-existing-table">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Appending tables to an existing table</a><a class="headerlink" href="#appending-tables-to-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have data split across two different tables, it is possible
+to concatenate their rows into a single table.</p>
+<p>If we have the list of Oscar nominations divided between two different tables:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">oscar_nominations_1</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Meryl Streep&quot;</span><span class="p">,</span> <span class="s2">&quot;Katharine Hepburn&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+
+<span class="n">oscar_nominations_2</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Jack Nicholson&quot;</span><span class="p">,</span> <span class="s2">&quot;Bette Davis&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>We can combine them into a single table using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.concat_tables.html#pyarrow.concat_tables" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.concat_tables()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">concat_tables</span><span class="p">([</span><span class="n">oscar_nominations_1</span><span class="p">,</span>
+                                      <span class="n">oscar_nominations_2</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;],[&quot;Jack Nicholson&quot;,&quot;Bette Davis&quot;]]
+nominations: [[21,12],[12,10]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>By default, appending two tables is a zero-copy operation that doesn’t need to
+copy or rewrite data. As tables are made of <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.ChunkedArray.html#pyarrow.ChunkedArray" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.ChunkedArray</span></code></a>,
+the result will be a table with multiple chunks, each pointing to the original
+data that has been appended. Under some conditions, Arrow might have to
+cast data from one type to another (if <cite>promote=True</cite>).  In such cases the data
+will need to be copied and an extra cost will occur.</p>
+</div>
+</section>
+<section id="adding-a-column-to-an-existing-table">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Adding a column to an existing Table</a><a class="headerlink" href="#adding-a-column-to-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table it is possible to extend its columns using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.append_column" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.append_column()</span></code></a></p>
+<p>Suppose we have a table with oscar nominations for each actress</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Meryl Streep&quot;</span><span class="p">,</span> <span class="s2">&quot;Katharine Hepburn&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;actor&quot;</span><span class="p">,</span> <span class="s2">&quot;nominations&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;]]
+nominations: [[21,12]]
+</pre></div>
+</div>
+<p>it’s possible to append an additional column to track the years the
+nomination was won using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.append_column" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.append_column()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">oscar_nominations</span> <span class="o">=</span> <span class="n">oscar_nominations</span><span class="o">.</span><span class="n">append_column</span><span class="p">(</span>
+  <span class="s2">&quot;wonyears&quot;</span><span class="p">,</span>
+  <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span>
+    <span class="p">[</span><span class="mi">1980</span><span class="p">,</span> <span class="mi">1983</span><span class="p">,</span> <span class="mi">2012</span><span class="p">],</span>
+    <span class="p">[</span><span class="mi">1934</span><span class="p">,</span> <span class="mi">1968</span><span class="p">,</span> <span class="mi">1969</span><span class="p">,</span> <span class="mi">1982</span><span class="p">]</span>
+  <span class="p">])</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">oscar_nominations</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+actor: string
+nominations: int64
+wonyears: list&lt;item: int64&gt;
+  child 0, item: int64
+----
+actor: [[&quot;Meryl Streep&quot;,&quot;Katharine Hepburn&quot;]]
+nominations: [[21,12]]
+wonyears: [[[1980,1983,2012],[1934,1968,1969,1982]]]
+</pre></div>
+</div>
+</section>
+<section id="replacing-a-column-in-an-existing-table">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Replacing a column in an existing Table</a><a class="headerlink" href="#replacing-a-column-in-an-existing-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table it is possible to replace an existing column using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.set_column" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.set_column()</span></code></a></p>
+<p>Suppose we have a table with information about items sold at a supermarket
+on a particular day.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">sales_data</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+  <span class="p">[</span><span class="s2">&quot;Potato&quot;</span><span class="p">,</span> <span class="s2">&quot;Bean&quot;</span><span class="p">,</span> <span class="s2">&quot;Cucumber&quot;</span><span class="p">,</span> <span class="s2">&quot;Eggs&quot;</span><span class="p">],</span>
+  <span class="p">[</span><span class="mi">21</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">30</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;item&quot;</span><span class="p">,</span> <span class="s2">&quot;amount&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">sales_data</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+item: string
+amount: int64
+----
+item: [[&quot;Potato&quot;,&quot;Bean&quot;,&quot;Cucumber&quot;,&quot;Eggs&quot;]]
+amount: [[21,12,10,30]]
+</pre></div>
+</div>
+<p>it’s possible to replace the existing column <cite>amount</cite>
+in index <cite>1</cite> to update the sales
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.set_column" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.set_column()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">new_sales_data</span> <span class="o">=</span> <span class="n">sales_data</span><span class="o">.</span><span class="n">set_column</span><span class="p">(</span>
+  <span class="mi">1</span><span class="p">,</span>
+  <span class="s2">&quot;new_amount&quot;</span><span class="p">,</span>
+  <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">30</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">40</span><span class="p">])</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">new_sales_data</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+item: string
+new_amount: int64
+----
+item: [[&quot;Potato&quot;,&quot;Bean&quot;,&quot;Cucumber&quot;,&quot;Eggs&quot;]]
+new_amount: [[30,20,15,40]]
+</pre></div>
+</div>
+</section>
+<section id="group-a-table">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Group a Table</a><a class="headerlink" href="#group-a-table" title="Link to this heading">¶</a></h2>
+<p>If you have a table which needs to be grouped by a particular key,
+you can use <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.group_by" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.group_by()</span></code></a> followed by an aggregation
+operation <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.TableGroupBy.html#pyarrow.TableGroupBy.aggregate" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.TableGroupBy.aggregate()</span></code></a>. Learn more about
+groupby operations <a class="reference external" href="https://arrow.apache.org/docs/python/compute.html#grouped-aggregations">here</a>.</p>
+<p>For example, let’s say we have some data with a particular set of keys
+and values associated with that key. And we want to group the data by
+those keys and apply an aggregate function like sum to evaluate
+how many items are for each unique key.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+     <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+     <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">11</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">10</span><span class="p">]),</span>
+    <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[11,20,3,4,5,1,4,10]]
+</pre></div>
+</div>
+<p>Now we let’s apply a groupby operation. The table will be grouped
+by the field <code class="docutils literal notranslate"><span class="pre">key</span></code> and an aggregation operation, <code class="docutils literal notranslate"><span class="pre">sum</span></code> is applied
+on the column <code class="docutils literal notranslate"><span class="pre">values</span></code>. Note that, an aggregation operation pairs with a column name.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">aggregated_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">group_by</span><span class="p">(</span><span class="s2">&quot;keys&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">aggregate</span><span class="p">([(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span> <span class="s2">&quot;sum&quot;</span><span class="p">)])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">aggregated_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values_sum: int64
+----
+keys: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+values_sum: [[31,7,15,1,4]]
+</pre></div>
+</div>
+<p>If you observe carefully, the new table returns the aggregated column
+as <code class="docutils literal notranslate"><span class="pre">values_sum</span></code> which is formed by the column name and aggregation operation name.</p>
+<p>Aggregation operations can be applied with options. Let’s take a case where
+we have null values included in our dataset, but we want to take the
+count of the unique groups excluding the null values.</p>
+<p>A sample dataset can be formed as follows.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">None</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="kc">None</span><span class="p">]),</span>
+      <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[null,20,3,4,5,6,10,1,4,null]]
+</pre></div>
+</div>
+<p>Let’s apply an aggregation operation <code class="docutils literal notranslate"><span class="pre">count</span></code> with the option to exclude
+null values.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">grouped_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">group_by</span><span class="p">(</span><span class="s2">&quot;keys&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">aggregate</span><span class="p">(</span>
+  <span class="p">[(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span>
+  <span class="s2">&quot;count&quot;</span><span class="p">,</span>
+  <span class="n">pc</span><span class="o">.</span><span class="n">CountOptions</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s2">&quot;only_valid&quot;</span><span class="p">))]</span>
+<span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">grouped_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values_count: int64
+----
+keys: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+values_count: [[1,3,1,2,1]]
+</pre></div>
+</div>
+</section>
+<section id="sort-a-table">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Sort a Table</a><a class="headerlink" href="#sort-a-table" title="Link to this heading">¶</a></h2>
+<p>Let’s discusse how to sort a table. We can sort a table,
+based on values of a given column. Data can be either sorted <code class="docutils literal notranslate"><span class="pre">ascending</span></code>
+or <code class="docutils literal notranslate"><span class="pre">descending</span></code>.</p>
+<p>Prepare data;</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">]),</span>
+      <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">15</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">14</span><span class="p">,</span> <span class="mi">123</span><span class="p">]),</span>
+      <span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;keys&quot;</span><span class="p">,</span> <span class="s2">&quot;values&quot;</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;a&quot;,&quot;a&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;d&quot;,&quot;e&quot;,&quot;c&quot;]]
+values: [[15,20,3,4,5,6,10,1,14,123]]
+</pre></div>
+</div>
+<p>Then applying sort with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table.sort_by" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Table.sort_by()</span></code></a>;</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sorted_table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">sort_by</span><span class="p">([(</span><span class="s2">&quot;values&quot;</span><span class="p">,</span> <span class="s2">&quot;ascending&quot;</span><span class="p">)])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">sorted_table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+keys: string
+values: int64
+----
+keys: [[&quot;d&quot;,&quot;b&quot;,&quot;b&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;a&quot;,&quot;a&quot;,&quot;c&quot;]]
+values: [[1,3,4,5,6,10,14,15,20,123]]
+</pre></div>
+</div>
+</section>
+<section id="searching-for-values-matching-a-predicate-in-arrays">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Searching for values matching a predicate in Arrays</a><a class="headerlink" href="#searching-for-values-matching-a-predicate-in-arrays" title="Link to this heading">¶</a></h2>
+<p>If you have to look for values matching a predicate in Arrow arrays
+the <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> module provides several methods that
+can be used to find the values you are looking for.</p>
+<p>For example, given an array with numbers from 0 to 9, if we
+want to look only for those greater than 5 we could use the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.greater.html#pyarrow.compute.greater" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.greater()</span></code></a> method and get back the elements
+that fit our predicate</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span>
+<span class="n">gtfive</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">greater</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">gtfive</span><span class="o">.</span><span class="n">to_string</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  false,
+  false,
+  false,
+  false,
+  false,
+  false,
+  true,
+  true,
+  true,
+  true
+]
+</pre></div>
+</div>
+<p>Furthermore we can filter the array to get only the entries
+that match our predicate with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.filter.html#pyarrow.compute.filter" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.filter()</span></code></a></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">filtered_array</span> <span class="o">=</span> <span class="n">pc</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">arr</span><span class="p">,</span> <span class="n">gtfive</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  6,
+  7,
+  8,
+  9
+]
+</pre></div>
+</div>
+</section>
+<section id="filtering-arrays-using-a-mask">
+<h2><a class="toc-backref" href="#id11" role="doc-backlink">Filtering Arrays using a mask</a><a class="headerlink" href="#filtering-arrays-using-a-mask" title="Link to this heading">¶</a></h2>
+<p>In many cases, when you are searching for something in an array
+you will end up with a mask that tells you the positions at which
+your search matched the values.</p>
+<p>For example in an array of four items, we might have a mask that
+matches the first and the last items only:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">array</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">])</span>
+<span class="n">mask</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="kc">True</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">,</span> <span class="kc">True</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>We can then filter the array according to the mask using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Array.html#pyarrow.Array.filter" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.Array.filter()</span></code></a> to get back a new array with
+only the values matching the mask:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">filtered_array</span> <span class="o">=</span> <span class="n">array</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">mask</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  1,
+  4
+]
+</pre></div>
+</div>
+<p>Most search functions in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.compute</span></code> will produce
+a mask as the output, so you can use them to filter your arrays
+for the values that have been found by the function.</p>
+<p>For example we might filter our arrays for the values equal to <code class="docutils literal notranslate"><span class="pre">2</span></code>
+using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.compute.equal.html#pyarrow.compute.equal" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.compute.equal()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.compute</span> <span class="k">as</span> <span class="nn">pc</span>
+
+<span class="n">filtered_array</span> <span class="o">=</span> <span class="n">array</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">pc</span><span class="o">.</span><span class="n">equal</span><span class="p">(</span><span class="n">array</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">filtered_array</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[
+  2
+]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Data Manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#computing-mean-min-max-values-of-an-array">Computing Mean/Min/Max values of an array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#counting-occurrences-of-elements">Counting Occurrences of Elements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#applying-arithmetic-functions-to-arrays">Applying arithmetic functions to arrays.</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#appending-tables-to-an-existing-table">Appending tables to an existing table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#adding-a-column-to-an-existing-table">Adding a column to an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#replacing-a-column-in-an-existing-table">Replacing a column in an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#group-a-table">Group a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#sort-a-table">Sort a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#searching-for-values-matching-a-predicate-in-arrays">Searching for values matching a predicate in Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#filtering-arrays-using-a-mask">Filtering Arrays using a mask</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="schema.html" title="previous chapter">Working with Schema</a></li>
+      <li>Next: <a href="flight.html" title="next chapter">Arrow Flight</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/data.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/flight.html b/py/flight.html
new file mode 100644
index 0000000..24a27f7
--- /dev/null
+++ b/py/flight.html
@@ -0,0 +1,931 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Arrow Flight &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="prev" title="Data Manipulation" href="data.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="arrow-flight">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Arrow Flight</a><a class="headerlink" href="#arrow-flight" title="Link to this heading">¶</a></h1>
+<p>Recipes related to leveraging Arrow Flight protocol</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#arrow-flight" id="id1">Arrow Flight</a></p>
+<ul>
+<li><p><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight" id="id2">Simple Parquet storage service with Arrow Flight</a></p></li>
+<li><p><a class="reference internal" href="#streaming-parquet-storage-service" id="id3">Streaming Parquet Storage Service</a></p></li>
+<li><p><a class="reference internal" href="#authentication-with-user-password" id="id4">Authentication with user/password</a></p></li>
+<li><p><a class="reference internal" href="#securing-connections-with-tls" id="id5">Securing connections with TLS</a></p></li>
+<li><p><a class="reference internal" href="#propagating-opentelemetry-traces" id="id6">Propagating OpenTelemetry Traces</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="simple-parquet-storage-service-with-arrow-flight">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Simple Parquet storage service with Arrow Flight</a><a class="headerlink" href="#simple-parquet-storage-service-with-arrow-flight" title="Link to this heading">¶</a></h2>
+<p>Suppose you want to implement a service that can store, send and receive
+Parquet files using the Arrow Flight protocol,
+<code class="docutils literal notranslate"><span class="pre">pyarrow</span></code> provides an implementation framework in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pyarrow.flight</span></code>
+and particularly through the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase</span></code></a> class.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pathlib</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pyarrow.parquet</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">,</span>
+                <span class="n">repo</span><span class="o">=</span><span class="n">pathlib</span><span class="o">.</span><span class="n">Path</span><span class="p">(</span><span class="s2">&quot;./datasets&quot;</span><span class="p">),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_location</span> <span class="o">=</span> <span class="n">location</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">=</span> <span class="n">repo</span>
+
+    <span class="k">def</span> <span class="nf">_make_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_schema</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">metadata</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_metadata</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span>
+            <span class="n">dataset</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="p">)</span>
+        <span class="n">endpoints</span> <span class="o">=</span> <span class="p">[</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightEndpoint</span><span class="p">(</span><span class="n">dataset</span><span class="p">,</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_location</span><span class="p">])]</span>
+        <span class="k">return</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span>
+                                        <span class="n">descriptor</span><span class="p">,</span>
+                                        <span class="n">endpoints</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">num_rows</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">serialized_size</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">list_flights</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">criteria</span><span class="p">):</span>
+        <span class="k">for</span> <span class="n">dataset</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">iterdir</span><span class="p">():</span>
+            <span class="k">yield</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">get_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">data_table</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+        <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">data_table</span><span class="p">,</span> <span class="n">dataset_path</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">do_get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">ticket</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">ticket</span><span class="o">.</span><span class="n">ticket</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="k">return</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">RecordBatchStream</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">list_actions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span>
+            <span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;Delete a dataset.&quot;</span><span class="p">),</span>
+        <span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">action</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s2">&quot;drop_dataset&quot;</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_drop_dataset</span><span class="p">(</span><span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="ne">NotImplementedError</span>
+
+    <span class="k">def</span> <span class="nf">do_drop_dataset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">dataset_path</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>The example server exposes <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.list_flights" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.list_flights()</span></code></a>
+which is the method in charge of returning the list of data streams available
+for fetching.</p>
+<p>Likewise, <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.get_flight_info" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.get_flight_info()</span></code></a> provides
+the information regarding a single specific data stream.</p>
+<p>Then we expose <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_get" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_get()</span></code></a> which is in charge
+of actually fetching the exposed data streams and sending them to the client.</p>
+<p>Allowing to list and download data streams would be pretty useless if we didn’t
+expose a way to create them, this is the responsibility of
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_put" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_put()</span></code></a> which is in charge of receiving
+new data from the client and dealing with it (in this case saving it
+into a parquet file)</p>
+<p>This are the most common Arrow Flight requests, if we need to add more
+functionalities, we can do so using custom actions.</p>
+<p>In the previous example a <code class="docutils literal notranslate"><span class="pre">drop_dataset</span></code> custom action is added.
+All custom actions are executed through the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_action" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_action()</span></code></a> method, thus it’s up to
+the server subclass to dispatch them properly. In this case we invoke
+the <cite>do_drop_dataset</cite> method when the <cite>action.type</cite> is the one we expect.</p>
+<p>Our server can then be started with
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.serve" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.serve()</span></code></a></p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">()</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Once the server is started we can build a client to perform
+requests to it</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>We can create a new table and upload it so that it gets stored
+in a new parquet file:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Upload a new dataset</span>
+<span class="n">data_table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">(</span>
+    <span class="p">[[</span><span class="s2">&quot;Mario&quot;</span><span class="p">,</span> <span class="s2">&quot;Luigi&quot;</span><span class="p">,</span> <span class="s2">&quot;Peach&quot;</span><span class="p">]],</span>
+    <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;Character&quot;</span><span class="p">]</span>
+<span class="p">)</span>
+<span class="n">upload_descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="s2">&quot;uploaded.parquet&quot;</span><span class="p">)</span>
+<span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">,</span> <span class="n">data_table</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">data_table</span><span class="p">)</span>
+<span class="n">writer</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Once uploaded we should be able to retrieve the metadata for our
+newly uploaded table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Retrieve metadata of newly uploaded dataset</span>
+<span class="n">flight</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_flight_info</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">)</span>
+<span class="n">descriptor</span> <span class="o">=</span> <span class="n">flight</span><span class="o">.</span><span class="n">descriptor</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Path:&quot;</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">),</span> <span class="s2">&quot;Rows:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_records</span><span class="p">,</span> <span class="s2">&quot;Size:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_bytes</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;=== Schema ===&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;==============&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Path: uploaded.parquet Rows: 3 Size: ...
+=== Schema ===
+Character: string
+==============
+</pre></div>
+</div>
+<p>And we can fetch the content of the dataset:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Read content of the dataset</span>
+<span class="n">reader</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_get</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">endpoints</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ticket</span><span class="p">)</span>
+<span class="n">read_table</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">read_table</span><span class="o">.</span><span class="n">to_pandas</span><span class="p">()</span><span class="o">.</span><span class="n">head</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>  Character
+0     Mario
+1     Luigi
+2     Peach
+</pre></div>
+</div>
+<p>Once we finished we can invoke our custom action to delete the
+dataset we newly uploaded:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Drop the newly uploaded dataset</span>
+<span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;uploaded.parquet&quot;</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)))</span>
+</pre></div>
+</div>
+<p>To confirm our dataset was deleted,
+we might list all parquet files that are currently stored by the server:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># List existing datasets.</span>
+<span class="k">for</span> <span class="n">flight</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">list_flights</span><span class="p">():</span>
+    <span class="n">descriptor</span> <span class="o">=</span> <span class="n">flight</span><span class="o">.</span><span class="n">descriptor</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Path:&quot;</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">),</span> <span class="s2">&quot;Rows:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_records</span><span class="p">,</span> <span class="s2">&quot;Size:&quot;</span><span class="p">,</span> <span class="n">flight</span><span class="o">.</span><span class="n">total_bytes</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;=== Schema ===&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;==============&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="streaming-parquet-storage-service">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Streaming Parquet Storage Service</a><a class="headerlink" href="#streaming-parquet-storage-service" title="Link to this heading">¶</a></h2>
+<p>We can improve the Parquet storage service and avoid holding entire datasets in
+memory by streaming data. Flight readers and writers, like others in PyArrow,
+can be iterated through, so let’s update the server from before to take
+advantage of this:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pathlib</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pyarrow.parquet</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">,</span>
+                <span class="n">repo</span><span class="o">=</span><span class="n">pathlib</span><span class="o">.</span><span class="n">Path</span><span class="p">(</span><span class="s2">&quot;./datasets&quot;</span><span class="p">),</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">location</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_location</span> <span class="o">=</span> <span class="n">location</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">=</span> <span class="n">repo</span>
+
+    <span class="k">def</span> <span class="nf">_make_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_schema</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">metadata</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_metadata</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="n">descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span>
+            <span class="n">dataset</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="p">)</span>
+        <span class="n">endpoints</span> <span class="o">=</span> <span class="p">[</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightEndpoint</span><span class="p">(</span><span class="n">dataset</span><span class="p">,</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_location</span><span class="p">])]</span>
+        <span class="k">return</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightInfo</span><span class="p">(</span><span class="n">schema</span><span class="p">,</span>
+                                        <span class="n">descriptor</span><span class="p">,</span>
+                                        <span class="n">endpoints</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">num_rows</span><span class="p">,</span>
+                                        <span class="n">metadata</span><span class="o">.</span><span class="n">serialized_size</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">list_flights</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">criteria</span><span class="p">):</span>
+        <span class="k">for</span> <span class="n">dataset</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">iterdir</span><span class="p">():</span>
+            <span class="k">yield</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">get_flight_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_make_flight_info</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">path</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="c1"># Read the uploaded data and write to Parquet incrementally</span>
+        <span class="k">with</span> <span class="n">dataset_path</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s2">&quot;wb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">sink</span><span class="p">:</span>
+            <span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">ParquetWriter</span><span class="p">(</span><span class="n">sink</span><span class="p">,</span> <span class="n">reader</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+                <span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="n">reader</span><span class="p">:</span>
+                    <span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_batches</span><span class="p">([</span><span class="n">chunk</span><span class="o">.</span><span class="n">data</span><span class="p">]))</span>
+
+    <span class="k">def</span> <span class="nf">do_get</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">ticket</span><span class="p">):</span>
+        <span class="n">dataset</span> <span class="o">=</span> <span class="n">ticket</span><span class="o">.</span><span class="n">ticket</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">)</span>
+        <span class="c1"># Stream data from a file</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">reader</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">ParquetFile</span><span class="p">(</span><span class="n">dataset_path</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">GeneratorStream</span><span class="p">(</span>
+            <span class="n">reader</span><span class="o">.</span><span class="n">schema_arrow</span><span class="p">,</span> <span class="n">reader</span><span class="o">.</span><span class="n">iter_batches</span><span class="p">())</span>
+
+    <span class="k">def</span> <span class="nf">list_actions</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span>
+            <span class="p">(</span><span class="s2">&quot;drop_dataset&quot;</span><span class="p">,</span> <span class="s2">&quot;Delete a dataset.&quot;</span><span class="p">),</span>
+        <span class="p">]</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">action</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s2">&quot;drop_dataset&quot;</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">do_drop_dataset</span><span class="p">(</span><span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="ne">NotImplementedError</span>
+
+    <span class="k">def</span> <span class="nf">do_drop_dataset</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dataset</span><span class="p">):</span>
+        <span class="n">dataset_path</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_repo</span> <span class="o">/</span> <span class="n">dataset</span>
+        <span class="n">dataset_path</span><span class="o">.</span><span class="n">unlink</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>First, we’ve modified <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_put" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_put()</span></code></a>. Instead
+of reading all the uploaded data into a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> before writing,
+we instead iterate through each batch as it comes and add it to a Parquet file.</p>
+<p>Then, we’ve modified <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightServerBase.html#pyarrow.flight.FlightServerBase.do_get" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.flight.FlightServerBase.do_get()</span></code></a> to stream
+data to the client. This uses <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.GeneratorStream.html#pyarrow.flight.GeneratorStream" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.GeneratorStream</span></code></a>, which
+takes a schema and any iterable or iterator. Flight then iterates through and
+sends each record batch to the client, allowing us to handle even large Parquet
+files that don’t fit into memory.</p>
+<p>While GeneratorStream has the advantage that it can stream data, that means
+Flight must call back into Python for each record batch to send. In contrast,
+RecordBatchStream requires that all data is in-memory up front, but once
+created, all data transfer is handled purely in C++, without needing to call
+Python code.</p>
+<p>Let’s give the server a spin. As before, we’ll start the server:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">()</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">_repo</span><span class="o">.</span><span class="n">mkdir</span><span class="p">(</span><span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>We create a client, and this time, we’ll write batches to the writer, as if we
+had a stream of data instead of a table in memory:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8815&quot;</span><span class="p">)</span>
+
+<span class="c1"># Upload a new dataset</span>
+<span class="n">NUM_BATCHES</span> <span class="o">=</span> <span class="mi">1024</span>
+<span class="n">ROWS_PER_BATCH</span> <span class="o">=</span> <span class="mi">4096</span>
+<span class="n">upload_descriptor</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="s2">&quot;streamed.parquet&quot;</span><span class="p">)</span>
+<span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">record_batch</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="n">ROWS_PER_BATCH</span><span class="p">)),</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;ints&quot;</span><span class="p">])</span>
+<span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">,</span> <span class="n">batch</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+<span class="k">with</span> <span class="n">writer</span><span class="p">:</span>
+    <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">NUM_BATCHES</span><span class="p">):</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write_batch</span><span class="p">(</span><span class="n">batch</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>As before, we can then read it back. Again, we’ll read each batch from the
+stream as it arrives, instead of reading them all into a table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Read content of the dataset</span>
+<span class="n">flight</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_flight_info</span><span class="p">(</span><span class="n">upload_descriptor</span><span class="p">)</span>
+<span class="n">reader</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_get</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">endpoints</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">ticket</span><span class="p">)</span>
+<span class="n">total_rows</span> <span class="o">=</span> <span class="mi">0</span>
+<span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="n">reader</span><span class="p">:</span>
+    <span class="n">total_rows</span> <span class="o">+=</span> <span class="n">chunk</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">num_rows</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Got&quot;</span><span class="p">,</span> <span class="n">total_rows</span><span class="p">,</span> <span class="s2">&quot;rows total, expected&quot;</span><span class="p">,</span> <span class="n">NUM_BATCHES</span> <span class="o">*</span> <span class="n">ROWS_PER_BATCH</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Got 4194304 rows total, expected 4194304
+</pre></div>
+</div>
+</section>
+<section id="authentication-with-user-password">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Authentication with user/password</a><a class="headerlink" href="#authentication-with-user-password" title="Link to this heading">¶</a></h2>
+<p>Often, services need a way to authenticate the user and identify who
+they are. Flight provides <a class="reference external" href="https://arrow.apache.org/docs/format/Flight.html" title="(in Apache Arrow v14.0.1)"><span class="xref std std-doc">several ways to implement
+authentication</span></a>; the simplest uses a
+user-password scheme. At startup, the client authenticates itself with
+the server using a username and password. The server returns an
+authorization token to include on future requests.</p>
+<div class="admonition warning">
+<p class="admonition-title">Warning</p>
+<p>Authentication should only be used over a secure encrypted
+channel, i.e. TLS should be enabled.</p>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>While the scheme is described as “<a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme">(HTTP) basic
+authentication</a>”, it does not actually implement HTTP
+authentication (RFC 7325) per se.</p>
+</div>
+<p>While Flight provides some interfaces to implement such a scheme, the
+server must provide the actual implementation, as demonstrated
+below. <strong>The implementation here is not secure and is provided as a
+minimal example only.</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">base64</span>
+<span class="kn">import</span> <span class="nn">secrets</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+
+<span class="k">class</span> <span class="nc">EchoServer</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;A simple server that just echoes any requests from DoAction.&quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="nf">do_action</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">action</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">[</span><span class="n">action</span><span class="o">.</span><span class="n">type</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">),</span> <span class="n">action</span><span class="o">.</span><span class="n">body</span><span class="p">]</span>
+
+
+<span class="k">class</span> <span class="nc">BasicAuthServerMiddlewareFactory</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddlewareFactory</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    Middleware that implements username-password authentication.</span>
+
+<span class="sd">    Parameters</span>
+<span class="sd">    ----------</span>
+<span class="sd">    creds: Dict[str, str]</span>
+<span class="sd">        A dictionary of username-password values to accept.</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">creds</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">creds</span> <span class="o">=</span> <span class="n">creds</span>
+        <span class="c1"># Map generated bearer tokens to users</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">,</span> <span class="n">headers</span><span class="p">):</span>
+<span class="w">        </span><span class="sd">&quot;&quot;&quot;Validate credentials at the start of every call.&quot;&quot;&quot;</span>
+        <span class="c1"># Search for the authentication header (case-insensitive)</span>
+        <span class="n">auth_header</span> <span class="o">=</span> <span class="kc">None</span>
+        <span class="k">for</span> <span class="n">header</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span>
+            <span class="k">if</span> <span class="n">header</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="o">==</span> <span class="s2">&quot;authorization&quot;</span><span class="p">:</span>
+                <span class="n">auth_header</span> <span class="o">=</span> <span class="n">headers</span><span class="p">[</span><span class="n">header</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
+                <span class="k">break</span>
+
+        <span class="k">if</span> <span class="ow">not</span> <span class="n">auth_header</span><span class="p">:</span>
+            <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;No credentials supplied&quot;</span><span class="p">)</span>
+
+        <span class="c1"># The header has the structure &quot;AuthType TokenValue&quot;, e.g.</span>
+        <span class="c1"># &quot;Basic &lt;encoded username+password&gt;&quot; or &quot;Bearer &lt;random token&gt;&quot;.</span>
+        <span class="n">auth_type</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">auth_header</span><span class="o">.</span><span class="n">partition</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">auth_type</span> <span class="o">==</span> <span class="s2">&quot;Basic&quot;</span><span class="p">:</span>
+            <span class="c1"># Initial &quot;login&quot;. The user provided a username/password</span>
+            <span class="c1"># combination encoded in the same way as HTTP Basic Auth.</span>
+            <span class="n">decoded</span> <span class="o">=</span> <span class="n">base64</span><span class="o">.</span><span class="n">b64decode</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
+            <span class="n">username</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">password</span> <span class="o">=</span> <span class="n">decoded</span><span class="o">.</span><span class="n">partition</span><span class="p">(</span><span class="s1">&#39;:&#39;</span><span class="p">)</span>
+            <span class="k">if</span> <span class="ow">not</span> <span class="n">password</span> <span class="ow">or</span> <span class="n">password</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">creds</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">username</span><span class="p">):</span>
+                <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;Unknown user or invalid password&quot;</span><span class="p">)</span>
+            <span class="c1"># Generate a secret, random bearer token for future calls.</span>
+            <span class="n">token</span> <span class="o">=</span> <span class="n">secrets</span><span class="o">.</span><span class="n">token_urlsafe</span><span class="p">(</span><span class="mi">32</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="n">token</span><span class="p">]</span> <span class="o">=</span> <span class="n">username</span>
+            <span class="k">return</span> <span class="n">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">token</span><span class="p">)</span>
+        <span class="k">elif</span> <span class="n">auth_type</span> <span class="o">==</span> <span class="s2">&quot;Bearer&quot;</span><span class="p">:</span>
+            <span class="c1"># An actual call. Validate the bearer token.</span>
+            <span class="n">username</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+            <span class="k">if</span> <span class="n">username</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+                <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;Invalid token&quot;</span><span class="p">)</span>
+            <span class="k">return</span> <span class="n">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
+
+        <span class="k">raise</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span><span class="p">(</span><span class="s2">&quot;No credentials supplied&quot;</span><span class="p">)</span>
+
+
+<span class="k">class</span> <span class="nc">BasicAuthServerMiddleware</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddleware</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;Middleware that implements username-password authentication.&quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">token</span> <span class="o">=</span> <span class="n">token</span>
+
+    <span class="k">def</span> <span class="nf">sending_headers</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+<span class="w">        </span><span class="sd">&quot;&quot;&quot;Return the authentication token to the client.&quot;&quot;&quot;</span>
+        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;authorization&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;Bearer </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">token</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">}</span>
+
+
+<span class="k">class</span> <span class="nc">NoOpAuthHandler</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerAuthHandler</span><span class="p">):</span>
+<span class="w">    </span><span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">    A handler that implements username-password authentication.</span>
+
+<span class="sd">    This is required only so that the server will respond to the internal</span>
+<span class="sd">    Handshake RPC call, which the client calls when authenticate_basic_token</span>
+<span class="sd">    is called. Otherwise, it should be a no-op as the actual authentication is</span>
+<span class="sd">    implemented in middleware.</span>
+<span class="sd">    &quot;&quot;&quot;</span>
+
+    <span class="k">def</span> <span class="nf">authenticate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">outgoing</span><span class="p">,</span> <span class="n">incoming</span><span class="p">):</span>
+        <span class="k">pass</span>
+
+    <span class="k">def</span> <span class="nf">is_valid</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token</span><span class="p">):</span>
+        <span class="k">return</span> <span class="s2">&quot;&quot;</span>
+</pre></div>
+</div>
+<p>We can then start the server:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">EchoServer</span><span class="p">(</span>
+        <span class="n">auth_handler</span><span class="o">=</span><span class="n">NoOpAuthHandler</span><span class="p">(),</span>
+        <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+        <span class="n">middleware</span><span class="o">=</span><span class="p">{</span>
+            <span class="s2">&quot;basic&quot;</span><span class="p">:</span> <span class="n">BasicAuthServerMiddlewareFactory</span><span class="p">({</span>
+                <span class="s2">&quot;test&quot;</span><span class="p">:</span> <span class="s2">&quot;password&quot;</span><span class="p">,</span>
+            <span class="p">})</span>
+        <span class="p">},</span>
+    <span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Then, we can make a client and log in:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+<span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">)</span>
+
+<span class="n">token_pair</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">authenticate_basic_token</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;test&#39;</span><span class="p">,</span> <span class="sa">b</span><span class="s1">&#39;password&#39;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">token_pair</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>(b&#39;authorization&#39;, b&#39;Bearer ...&#39;)
+</pre></div>
+</div>
+<p>For future calls, we include the authentication token with the call:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">action</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;echo&quot;</span><span class="p">,</span> <span class="sa">b</span><span class="s2">&quot;Hello, world!&quot;</span><span class="p">)</span>
+<span class="n">options</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightCallOptions</span><span class="p">(</span><span class="n">headers</span><span class="o">=</span><span class="p">[</span><span class="n">token_pair</span><span class="p">])</span>
+<span class="k">for</span> <span class="n">response</span> <span class="ow">in</span> <span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="n">options</span><span class="p">):</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">response</span><span class="o">.</span><span class="n">body</span><span class="o">.</span><span class="n">to_pybytes</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>b&#39;echo&#39;
+b&#39;Hello, world!&#39;
+</pre></div>
+</div>
+<p>If we fail to do so, we get an authentication error:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span>
+    <span class="nb">list</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">))</span>
+<span class="k">except</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Unauthenticated:&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+<span class="k">else</span><span class="p">:</span>
+    <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Expected call to fail&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unauthenticated: No credentials supplied. Detail: Unauthenticated
+</pre></div>
+</div>
+<p>Or if we use the wrong credentials on login, we also get an error:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">try</span><span class="p">:</span>
+    <span class="n">client</span><span class="o">.</span><span class="n">authenticate_basic_token</span><span class="p">(</span><span class="sa">b</span><span class="s1">&#39;invalid&#39;</span><span class="p">,</span> <span class="sa">b</span><span class="s1">&#39;password&#39;</span><span class="p">)</span>
+<span class="k">except</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightUnauthenticatedError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Unauthenticated:&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
+<span class="k">else</span><span class="p">:</span>
+    <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Expected call to fail&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unauthenticated: Unknown user or invalid password. Detail: Unauthenticated
+</pre></div>
+</div>
+</section>
+<section id="securing-connections-with-tls">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Securing connections with TLS</a><a class="headerlink" href="#securing-connections-with-tls" title="Link to this heading">¶</a></h2>
+<p>Following on from the previous scenario where traffic to the server is managed via a username and password,
+HTTPS (more specifically TLS) communication allows an additional layer of security by encrypting messages
+between the client and server. This is achieved using certificates. During development, the easiest
+approach is developing with self-signed certificates. At startup, the server loads the public and private
+key and the client authenticates the server with the TLS root certificate.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>In production environments it is recommended to make use of a certificate signed by a certificate authority.</p>
+</div>
+<p><strong>Step 1 - Generating the Self Signed Certificate</strong></p>
+<p>Generate a self-signed certificate by using dotnet on <a class="reference external" href="https://docs.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide">Windows</a>, or <a class="reference external" href="https://www.ibm.com/docs/en/api-connect/2018.x?topic=overview-generating-self-signed-certificate-using-openssl">openssl</a> on Linux or MacOS.
+Alternatively, the self-signed certificate from the <a class="reference external" href="https://github.com/apache/arrow-testing/tree/master/data/flight">Arrow testing data repository</a> can be used.
+Depending on the file generated, you may need to convert it to a .crt and .key file as required for the Arrow server.
+One method to achieve this is openssl, please visit this <a class="reference external" href="https://www.ibm.com/docs/en/arl/9.7?topic=certification-extracting-certificate-keys-from-pfx-file">IBM article</a> for more info.</p>
+<p><strong>Step 2 - Running a server with TLS enabled</strong></p>
+<p>The code below is a minimal working example of an Arrow server used to receive data with TLS.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">argparse</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+
+
+<span class="k">class</span> <span class="nc">FlightServer</span><span class="p">(</span><span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightServerBase</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">host</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span> <span class="n">location</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                 <span class="n">tls_certificates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">verify_client</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+                 <span class="n">root_certificates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">auth_handler</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
+        <span class="nb">super</span><span class="p">(</span><span class="n">FlightServer</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span>
+            <span class="n">location</span><span class="p">,</span> <span class="n">auth_handler</span><span class="p">,</span> <span class="n">tls_certificates</span><span class="p">,</span> <span class="n">verify_client</span><span class="p">,</span>
+            <span class="n">root_certificates</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">flights</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="nd">@classmethod</span>
+    <span class="k">def</span> <span class="nf">descriptor_to_key</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">):</span>
+        <span class="k">return</span> <span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">descriptor_type</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">descriptor</span><span class="o">.</span><span class="n">command</span><span class="p">,</span>
+                <span class="nb">tuple</span><span class="p">(</span><span class="n">descriptor</span><span class="o">.</span><span class="n">path</span> <span class="ow">or</span> <span class="nb">tuple</span><span class="p">()))</span>
+
+    <span class="k">def</span> <span class="nf">do_put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">,</span> <span class="n">descriptor</span><span class="p">,</span> <span class="n">reader</span><span class="p">,</span> <span class="n">writer</span><span class="p">):</span>
+        <span class="n">key</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="o">.</span><span class="n">descriptor_to_key</span><span class="p">(</span><span class="n">descriptor</span><span class="p">)</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">flights</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">reader</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+        <span class="nb">print</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">flights</span><span class="p">[</span><span class="n">key</span><span class="p">])</span>
+
+
+<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">()</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s2">&quot;--tls&quot;</span><span class="p">,</span> <span class="n">nargs</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">metavar</span><span class="o">=</span><span class="p">(</span><span class="s1">&#39;CERTFILE&#39;</span><span class="p">,</span> <span class="s1">&#39;KEYFILE&#39;</span><span class="p">))</span>
+    <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+    <span class="n">tls_certificates</span> <span class="o">=</span> <span class="p">[]</span>
+
+    <span class="n">scheme</span> <span class="o">=</span> <span class="s2">&quot;grpc+tls&quot;</span>
+    <span class="n">host</span> <span class="o">=</span> <span class="s2">&quot;localhost&quot;</span>
+    <span class="n">port</span> <span class="o">=</span> <span class="s2">&quot;5005&quot;</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">cert_file</span><span class="p">:</span>
+        <span class="n">tls_cert_chain</span> <span class="o">=</span> <span class="n">cert_file</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">key_file</span><span class="p">:</span>
+        <span class="n">tls_private_key</span> <span class="o">=</span> <span class="n">key_file</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+
+    <span class="n">tls_certificates</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">tls_cert_chain</span><span class="p">,</span> <span class="n">tls_private_key</span><span class="p">))</span>
+
+    <span class="n">location</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{}</span><span class="s2">://</span><span class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">scheme</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="n">port</span><span class="p">)</span>
+
+    <span class="n">server</span> <span class="o">=</span> <span class="n">FlightServer</span><span class="p">(</span><span class="n">host</span><span class="p">,</span> <span class="n">location</span><span class="p">,</span>
+                          <span class="n">tls_certificates</span><span class="o">=</span><span class="n">tls_certificates</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Serving on&quot;</span><span class="p">,</span> <span class="n">location</span><span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">main</span><span class="p">()</span>
+</pre></div>
+</div>
+<p>Running the server, you should see <code class="docutils literal notranslate"><span class="pre">Serving</span> <span class="pre">on</span> <span class="pre">grpc+tls://localhost:5005</span></code>.</p>
+<p><strong>Step 3 - Securely Connecting to the Server</strong>
+Suppose we want to connect to the client and push some data to it. The following code securely sends information to the server using TLS encryption.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">argparse</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span>
+<span class="kn">import</span> <span class="nn">pyarrow.flight</span>
+<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
+
+<span class="c1"># Assumes incoming data object is a Pandas Dataframe</span>
+<span class="k">def</span> <span class="nf">push_to_server</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">client</span><span class="p">):</span>
+    <span class="n">object_to_send</span> <span class="o">=</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_pandas</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
+    <span class="n">writer</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">do_put</span><span class="p">(</span><span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightDescriptor</span><span class="o">.</span><span class="n">for_path</span><span class="p">(</span><span class="n">name</span><span class="p">),</span> <span class="n">object_to_send</span><span class="o">.</span><span class="n">schema</span><span class="p">)</span>
+    <span class="n">writer</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">object_to_send</span><span class="p">)</span>
+    <span class="n">writer</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
+
+<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
+    <span class="n">parser</span> <span class="o">=</span> <span class="n">argparse</span><span class="o">.</span><span class="n">ArgumentParser</span><span class="p">()</span>
+
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--tls-roots&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Path to trusted TLS certificate(s)&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--host&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Host endpoint&#39;</span><span class="p">)</span>
+    <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span><span class="s1">&#39;--port&#39;</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="mi">5005</span><span class="p">,</span>
+                        <span class="n">help</span><span class="o">=</span><span class="s1">&#39;Host port&#39;</span><span class="p">)</span>
+    <span class="n">args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
+    <span class="n">kwargs</span> <span class="o">=</span> <span class="p">{}</span>
+
+    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">args</span><span class="o">.</span><span class="n">tls_roots</span><span class="p">,</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">root_certs</span><span class="p">:</span>
+        <span class="n">kwargs</span><span class="p">[</span><span class="s2">&quot;tls_root_certs&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">root_certs</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
+
+    <span class="n">client</span> <span class="o">=</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">FlightClient</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;grpc+tls://</span><span class="si">{</span><span class="n">args</span><span class="o">.</span><span class="n">host</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">args</span><span class="o">.</span><span class="n">port</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+    <span class="n">data</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;Animal&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;Dog&#39;</span><span class="p">,</span> <span class="s1">&#39;Cat&#39;</span><span class="p">,</span> <span class="s1">&#39;Mouse&#39;</span><span class="p">],</span> <span class="s1">&#39;Size&#39;</span><span class="p">:</span> <span class="p">[</span><span class="s1">&#39;Big&#39;</span><span class="p">,</span> <span class="s1">&#39;Small&#39;</span><span class="p">,</span> <span class="s1">&#39;Tiny&#39;</span><span class="p">]}</span>
+    <span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;Animal&#39;</span><span class="p">,</span> <span class="s1">&#39;Size&#39;</span><span class="p">])</span>
+    <span class="n">push_to_server</span><span class="p">(</span><span class="s2">&quot;AnimalData&quot;</span><span class="p">,</span> <span class="n">df</span><span class="p">,</span> <span class="n">client</span><span class="p">)</span>
+
+<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="k">try</span><span class="p">:</span>
+        <span class="n">main</span><span class="p">()</span>
+    <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Running the client script, you should see the server printing out information about the data it just received.</p>
+</section>
+<section id="propagating-opentelemetry-traces">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Propagating OpenTelemetry Traces</a><a class="headerlink" href="#propagating-opentelemetry-traces" title="Link to this heading">¶</a></h2>
+<p>Distributed tracing with <a class="reference external" href="https://opentelemetry.io/docs/instrumentation/python/getting-started/">OpenTelemetry</a> allows collecting call-level performance
+measurements across a Flight service. In order to correlate spans across a Flight
+client and server, trace context must be passed between the two. This can be passed
+manually through headers in <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightCallOptions.html#pyarrow.flight.FlightCallOptions" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.flight.FlightCallOptions</span></code></a>, or can
+be automatically propagated using middleware.</p>
+<p>This example shows how to accomplish trace propagation through middleware.
+The client middleware needs to inject the trace context into the call headers.
+The server middleware needs to extract the trace context from the headers and
+pass the context into a new span. Optionally, the client middleware can also
+create a new span to time the client-side call.</p>
+<p><strong>Step 1: define the client middleware:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.flight</span> <span class="k">as</span> <span class="nn">flight</span>
+<span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.propagate</span> <span class="kn">import</span> <span class="n">inject</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.trace.status</span> <span class="kn">import</span> <span class="n">StatusCode</span>
+
+<span class="k">class</span> <span class="nc">ClientTracingMiddlewareFactory</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ClientMiddlewareFactory</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">):</span>
+        <span class="n">span</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span><span class="o">.</span><span class="n">start_span</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;client.</span><span class="si">{</span><span class="n">info</span><span class="o">.</span><span class="n">method</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">ClientTracingMiddleware</span><span class="p">(</span><span class="n">span</span><span class="p">)</span>
+
+<span class="k">class</span> <span class="nc">ClientTracingMiddleware</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ClientMiddleware</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">span</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span> <span class="o">=</span> <span class="n">span</span>
+
+    <span class="k">def</span> <span class="nf">sending_headers</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="n">ctx</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">set_span_in_context</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="p">)</span>
+        <span class="n">carrier</span> <span class="o">=</span> <span class="p">{}</span>
+        <span class="n">inject</span><span class="p">(</span><span class="n">carrier</span><span class="o">=</span><span class="n">carrier</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">ctx</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">carrier</span>
+
+    <span class="k">def</span> <span class="nf">call_completed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exception</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">exception</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">record_exception</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">OK</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 2: define the server middleware:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.flight</span> <span class="k">as</span> <span class="nn">flight</span>
+<span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.propagate</span> <span class="kn">import</span> <span class="n">extract</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.trace.status</span> <span class="kn">import</span> <span class="n">StatusCode</span>
+
+<span class="k">class</span> <span class="nc">ServerTracingMiddlewareFactory</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddlewareFactory</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">start_call</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">info</span><span class="p">,</span> <span class="n">headers</span><span class="p">):</span>
+        <span class="n">context</span> <span class="o">=</span> <span class="n">extract</span><span class="p">(</span><span class="n">headers</span><span class="p">)</span>
+        <span class="n">span</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_tracer</span><span class="o">.</span><span class="n">start_span</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;server.</span><span class="si">{</span><span class="n">info</span><span class="o">.</span><span class="n">method</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">context</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">ServerTracingMiddleware</span><span class="p">(</span><span class="n">span</span><span class="p">)</span>
+
+<span class="k">class</span> <span class="nc">ServerTracingMiddleware</span><span class="p">(</span><span class="n">flight</span><span class="o">.</span><span class="n">ServerMiddleware</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">span</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span> <span class="o">=</span> <span class="n">span</span>
+
+    <span class="k">def</span> <span class="nf">call_completed</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exception</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">exception</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">record_exception</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">ERROR</span><span class="p">)</span>
+            <span class="nb">print</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="n">StatusCode</span><span class="o">.</span><span class="n">OK</span><span class="p">)</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">_span</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 3: configure the trace exporter, processor, and provider:</strong></p>
+<p>Both the server and client will need to be configured with the OpenTelemetry SDK
+to record spans and export them somewhere. For the sake of the example, we’ll
+collect the spans into a Python list, but this is normally where you would set
+them up to be exported to some service like <a class="reference external" href="https://www.jaegertracing.io/">Jaeger</a>. See other examples of
+exporters at <a class="reference external" href="https://opentelemetry.io/docs/instrumentation/python/exporters/">OpenTelemetry Exporters</a>.</p>
+<p>As part of this, you will need to define the resource where spans are running.
+At a minimum this is the service name, but it could include other information like
+a hostname, process id, service version, and operating system.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace</span> <span class="kn">import</span> <span class="n">TracerProvider</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace.export</span> <span class="kn">import</span> <span class="n">SimpleSpanProcessor</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.resources</span> <span class="kn">import</span> <span class="n">SERVICE_NAME</span><span class="p">,</span> <span class="n">Resource</span>
+<span class="kn">from</span> <span class="nn">opentelemetry.sdk.trace.export</span> <span class="kn">import</span> <span class="n">SpanExporter</span><span class="p">,</span> <span class="n">SpanExportResult</span>
+
+<span class="k">class</span> <span class="nc">TestSpanExporter</span><span class="p">(</span><span class="n">SpanExporter</span><span class="p">):</span>
+    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">spans</span> <span class="o">=</span> <span class="p">[]</span>
+
+    <span class="k">def</span> <span class="nf">export</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">spans</span><span class="p">):</span>
+        <span class="bp">self</span><span class="o">.</span><span class="n">spans</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">spans</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">SpanExportResult</span><span class="o">.</span><span class="n">SUCCESS</span>
+
+<span class="k">def</span> <span class="nf">configure_tracing</span><span class="p">():</span>
+    <span class="c1"># Service name is required for most backends,</span>
+    <span class="c1"># and although it&#39;s not necessary for console export,</span>
+    <span class="c1"># it&#39;s good to set service name anyways.</span>
+    <span class="n">resource</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="n">attributes</span><span class="o">=</span><span class="p">{</span>
+        <span class="n">SERVICE_NAME</span><span class="p">:</span> <span class="s2">&quot;my-service&quot;</span>
+    <span class="p">})</span>
+    <span class="n">exporter</span> <span class="o">=</span> <span class="n">TestSpanExporter</span><span class="p">()</span>
+    <span class="n">provider</span> <span class="o">=</span> <span class="n">TracerProvider</span><span class="p">(</span><span class="n">resource</span><span class="o">=</span><span class="n">resource</span><span class="p">)</span>
+    <span class="n">processor</span> <span class="o">=</span> <span class="n">SimpleSpanProcessor</span><span class="p">(</span><span class="n">exporter</span><span class="p">)</span>
+    <span class="n">provider</span><span class="o">.</span><span class="n">add_span_processor</span><span class="p">(</span><span class="n">processor</span><span class="p">)</span>
+    <span class="n">trace</span><span class="o">.</span><span class="n">set_tracer_provider</span><span class="p">(</span><span class="n">provider</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">exporter</span>
+</pre></div>
+</div>
+<p><strong>Step 4: add the middleware to the server:</strong></p>
+<p>We can use the middleware now in our EchoServer from earlier.</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s1">&#39;__main__&#39;</span><span class="p">:</span>
+    <span class="n">exporter</span> <span class="o">=</span> <span class="n">configure_tracing</span><span class="p">()</span>
+    <span class="n">server</span> <span class="o">=</span> <span class="n">EchoServer</span><span class="p">(</span>
+        <span class="n">location</span><span class="o">=</span><span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+        <span class="n">middleware</span><span class="o">=</span><span class="p">{</span>
+            <span class="s2">&quot;tracing&quot;</span><span class="p">:</span> <span class="n">ServerTracingMiddlewareFactory</span><span class="p">()</span>
+        <span class="p">},</span>
+    <span class="p">)</span>
+    <span class="n">server</span><span class="o">.</span><span class="n">serve</span><span class="p">()</span>
+</pre></div>
+</div>
+<p><strong>Step 5: add the middleware to the client:</strong></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">client</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span>
+    <span class="s2">&quot;grpc://0.0.0.0:8816&quot;</span><span class="p">,</span>
+    <span class="n">middleware</span><span class="o">=</span><span class="p">[</span><span class="n">ClientTracingMiddlewareFactory</span><span class="p">()],</span>
+<span class="p">)</span>
+</pre></div>
+</div>
+<p><strong>Step 6: use the client within active spans:</strong></p>
+<p>When we make a call with our client within an OpenTelemetry span, our client
+middleware will create a child span for the client-side Flight call and then
+propagate the span context to the server. Our server middleware will pick up
+that trace context and create another child span.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">opentelemetry</span> <span class="kn">import</span> <span class="n">trace</span>
+
+<span class="c1"># Client would normally also need to configure tracing, but for this example</span>
+<span class="c1"># the client and server are running in the same Python process.</span>
+<span class="c1"># exporter = configure_tracing()</span>
+
+<span class="n">tracer</span> <span class="o">=</span> <span class="n">trace</span><span class="o">.</span><span class="n">get_tracer</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
+
+<span class="k">with</span> <span class="n">tracer</span><span class="o">.</span><span class="n">start_as_current_span</span><span class="p">(</span><span class="s2">&quot;hello_world&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">span</span><span class="p">:</span>
+    <span class="n">action</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">flight</span><span class="o">.</span><span class="n">Action</span><span class="p">(</span><span class="s2">&quot;echo&quot;</span><span class="p">,</span> <span class="sa">b</span><span class="s2">&quot;Hello, world!&quot;</span><span class="p">)</span>
+    <span class="c1"># Call list() on do_action to drain all results.</span>
+    <span class="nb">list</span><span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">do_action</span><span class="p">(</span><span class="n">action</span><span class="o">=</span><span class="n">action</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;There are </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2"> spans.&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The span names are:</span><span class="se">\n</span><span class="s2">  </span><span class="si">{</span><span class="nb">list</span><span class="p">(</span><span class="n">span</span><span class="o">.</span><span class="n">name</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">span</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;The span status codes are:</span><span class="se">\n</span><span class="s2">  &quot;</span>
+      <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">list</span><span class="p">(</span><span class="n">span</span><span class="o">.</span><span class="n">status</span><span class="o">.</span><span class="n">status_code</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">span</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">exporter</span><span class="o">.</span><span class="n">spans</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>There are 3 spans.
+The span names are:
+  [&#39;server.FlightMethod.DO_ACTION&#39;, &#39;client.FlightMethod.DO_ACTION&#39;, &#39;hello_world&#39;].
+The span status codes are:
+  [&lt;StatusCode.OK: 1&gt;, &lt;StatusCode.OK: 1&gt;, &lt;StatusCode.UNSET: 0&gt;].
+</pre></div>
+</div>
+<p>As expected, we have three spans: one in our client code, one in the client
+middleware, and one in the server middleware.</p>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#streaming-parquet-storage-service">Streaming Parquet Storage Service</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#authentication-with-user-password">Authentication with user/password</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#securing-connections-with-tls">Securing connections with TLS</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#propagating-opentelemetry-traces">Propagating OpenTelemetry Traces</a></li>
+</ul>
+</li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="data.html" title="previous chapter">Data Manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/flight.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/genindex.html b/py/genindex.html
new file mode 100644
index 0000000..78529a3
--- /dev/null
+++ b/py/genindex.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Index &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="#" />
+    <link rel="search" title="Search" href="search.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/index.html b/py/index.html
new file mode 100644
index 0000000..870a3d7
--- /dev/null
+++ b/py/index.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Apache Arrow Python Cookbook &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Reading and Writing Data" href="io.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="apache-arrow-python-cookbook">
+<h1>Apache Arrow Python Cookbook<a class="headerlink" href="#apache-arrow-python-cookbook" title="Link to this heading">¶</a></h1>
+<p>The Apache Arrow Cookbook is a collection of recipes which demonstrate
+how to solve many common tasks that users might need to perform
+when working with arrow data.  The examples in this cookbook will also
+serve as robust and well performing solutions to those tasks.</p>
+<p>This cookbook is tested with pyarrow 14.0.0.</p>
+<div class="toctree-wrapper compound">
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="io.html#write-a-parquet-file">Write a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-parquet-file">Reading a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-subset-of-parquet-data">Reading a subset of Parquet data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#saving-arrow-arrays-to-disk">Saving Arrow Arrays to disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#memory-mapping-arrow-arrays-from-disk">Memory Mapping Arrow Arrays from disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-csv-files">Writing CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-csv-files-incrementally">Writing CSV files incrementally</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-csv-files">Reading CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-partitioned-datasets">Writing Partitioned Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-partitioned-data">Reading Partitioned data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-partitioned-data-from-s3">Reading Partitioned Data from S3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#write-a-feather-file">Write a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-a-feather-file">Reading a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-line-delimited-json">Reading Line Delimited JSON</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#writing-compressed-data">Writing Compressed Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="io.html#reading-compressed-data">Reading Compressed Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-arrays">Creating Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-tables">Creating Tables</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#create-table-from-plain-types">Create Table from Plain Types</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#creating-record-batches">Creating Record Batches</a></li>
+<li class="toctree-l2"><a class="reference internal" href="create.html#store-categorical-data">Store Categorical Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#setting-the-data-type-of-an-arrow-array">Setting the data type of an Arrow Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#setting-the-schema-of-a-table">Setting the schema of a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="schema.html#merging-multiple-schemas">Merging multiple schemas</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="data.html#computing-mean-min-max-values-of-an-array">Computing Mean/Min/Max values of an array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#counting-occurrences-of-elements">Counting Occurrences of Elements</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#applying-arithmetic-functions-to-arrays">Applying arithmetic functions to arrays.</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#appending-tables-to-an-existing-table">Appending tables to an existing table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#adding-a-column-to-an-existing-table">Adding a column to an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#replacing-a-column-in-an-existing-table">Replacing a column in an existing Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#group-a-table">Group a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#sort-a-table">Sort a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#searching-for-values-matching-a-predicate-in-arrays">Searching for values matching a predicate in Arrays</a></li>
+<li class="toctree-l2"><a class="reference internal" href="data.html#filtering-arrays-using-a-mask">Filtering Arrays using a mask</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#simple-parquet-storage-service-with-arrow-flight">Simple Parquet storage service with Arrow Flight</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#streaming-parquet-storage-service">Streaming Parquet Storage Service</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#authentication-with-user-password">Authentication with user/password</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#securing-connections-with-tls">Securing connections with TLS</a></li>
+<li class="toctree-l2"><a class="reference internal" href="flight.html#propagating-opentelemetry-traces">Propagating OpenTelemetry Traces</a></li>
+</ul>
+</li>
+</ul>
+</div>
+</section>
+<section id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Link to this heading">¶</a></h1>
+<ul class="simple">
+<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
+<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
+<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
+</ul>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="#">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="#">Documentation overview</a><ul>
+      <li>Next: <a href="io.html" title="next chapter">Reading and Writing Data</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/index.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/io.html b/py/io.html
new file mode 100644
index 0000000..42b13bd
--- /dev/null
+++ b/py/io.html
@@ -0,0 +1,744 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Reading and Writing Data &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Creating Arrow Objects" href="create.html" />
+    <link rel="prev" title="Apache Arrow Python Cookbook" href="index.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="reading-and-writing-data">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Reading and Writing Data</a><a class="headerlink" href="#reading-and-writing-data" title="Link to this heading">¶</a></h1>
+<p>Recipes related to reading and writing data from disk using
+Apache Arrow.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#reading-and-writing-data" id="id1">Reading and Writing Data</a></p>
+<ul>
+<li><p><a class="reference internal" href="#write-a-parquet-file" id="id2">Write a Parquet file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-parquet-file" id="id3">Reading a Parquet file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-subset-of-parquet-data" id="id4">Reading a subset of Parquet data</a></p></li>
+<li><p><a class="reference internal" href="#saving-arrow-arrays-to-disk" id="id5">Saving Arrow Arrays to disk</a></p></li>
+<li><p><a class="reference internal" href="#memory-mapping-arrow-arrays-from-disk" id="id6">Memory Mapping Arrow Arrays from disk</a></p></li>
+<li><p><a class="reference internal" href="#writing-csv-files" id="id7">Writing CSV files</a></p></li>
+<li><p><a class="reference internal" href="#writing-csv-files-incrementally" id="id8">Writing CSV files incrementally</a></p></li>
+<li><p><a class="reference internal" href="#reading-csv-files" id="id9">Reading CSV files</a></p></li>
+<li><p><a class="reference internal" href="#writing-partitioned-datasets" id="id10">Writing Partitioned Datasets</a></p></li>
+<li><p><a class="reference internal" href="#reading-partitioned-data" id="id11">Reading Partitioned data</a></p></li>
+<li><p><a class="reference internal" href="#reading-partitioned-data-from-s3" id="id12">Reading Partitioned Data from S3</a></p></li>
+<li><p><a class="reference internal" href="#write-a-feather-file" id="id13">Write a Feather file</a></p></li>
+<li><p><a class="reference internal" href="#reading-a-feather-file" id="id14">Reading a Feather file</a></p></li>
+<li><p><a class="reference internal" href="#reading-line-delimited-json" id="id15">Reading Line Delimited JSON</a></p></li>
+<li><p><a class="reference internal" href="#writing-compressed-data" id="id16">Writing Compressed Data</a></p></li>
+<li><p><a class="reference internal" href="#reading-compressed-data" id="id17">Reading Compressed Data</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="write-a-parquet-file">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Write a Parquet file</a><a class="headerlink" href="#write-a-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>To write it to a Parquet file,
+as Parquet is a format that contains multiple named columns,
+we must create a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> out of it,
+so that we get a table of a single column which can then be
+written to a Parquet file.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Once we have a table, it can be written to a Parquet File
+using the functions provided by the <code class="docutils literal notranslate"><span class="pre">pyarrow.parquet</span></code> module</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">pq</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;example.parquet&quot;</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="reading-a-parquet-file">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Reading a Parquet file</a><a class="headerlink" href="#reading-a-parquet-file" title="Link to this heading">¶</a></h2>
+<p>Given a Parquet file, it can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>
+by using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pq</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.parquet&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The resulting table will contain the same columns that existed in
+the parquet file as <code class="xref py py-class docutils literal notranslate"><span class="pre">ChunkedArray</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="reading-a-subset-of-parquet-data">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Reading a subset of Parquet data</a><a class="headerlink" href="#reading-a-subset-of-parquet-data" title="Link to this heading">¶</a></h2>
+<p>When reading a Parquet file with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a>
+it is possible to restrict which Columns and Rows will be read
+into memory by using the <code class="docutils literal notranslate"><span class="pre">filters</span></code> and <code class="docutils literal notranslate"><span class="pre">columns</span></code> arguments</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.parquet</span> <span class="k">as</span> <span class="nn">pq</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pq</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.parquet&quot;</span><span class="p">,</span>
+                      <span class="n">columns</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">],</span>
+                      <span class="n">filters</span><span class="o">=</span><span class="p">[</span>
+                          <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;&gt;&quot;</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span>
+                          <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="s2">&quot;&lt;&quot;</span><span class="p">,</span> <span class="mi">10</span><span class="p">),</span>
+                      <span class="p">])</span>
+</pre></div>
+</div>
+<p>The resulting table will contain only the projected columns
+and filtered rows. Refer to <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.read_table.html#pyarrow.parquet.read_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code></a>
+documentation for details about the syntax for filters.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[6,7,8,9]]
+</pre></div>
+</div>
+</section>
+<section id="saving-arrow-arrays-to-disk">
+<h2><a class="toc-backref" href="#id5" role="doc-backlink">Saving Arrow Arrays to disk</a><a class="headerlink" href="#saving-arrow-arrays-to-disk" title="Link to this heading">¶</a></h2>
+<p>Apart from using arrow to read and save common file formats like Parquet,
+it is possible to dump data in the raw arrow format which allows
+direct memory mapping of data from disk. This format is called
+the Arrow IPC format.</p>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>We can save the array by making a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> out
+of it and writing the record batch to disk.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">field</span><span class="p">(</span><span class="s1">&#39;nums&#39;</span><span class="p">,</span> <span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+<span class="p">])</span>
+
+<span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">OSFile</span><span class="p">(</span><span class="s1">&#39;arraydata.arrow&#39;</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">sink</span><span class="p">:</span>
+    <span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">ipc</span><span class="o">.</span><span class="n">new_file</span><span class="p">(</span><span class="n">sink</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+        <span class="n">batch</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">record_batch</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">batch</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>If we were to save multiple arrays into the same file,
+we would just have to adapt the <code class="docutils literal notranslate"><span class="pre">schema</span></code> accordingly and add
+them all to the <code class="docutils literal notranslate"><span class="pre">record_batch</span></code> call.</p>
+</section>
+<section id="memory-mapping-arrow-arrays-from-disk">
+<h2><a class="toc-backref" href="#id6" role="doc-backlink">Memory Mapping Arrow Arrays from disk</a><a class="headerlink" href="#memory-mapping-arrow-arrays-from-disk" title="Link to this heading">¶</a></h2>
+<p>Arrow arrays that have been written to disk in the Arrow IPC
+format can be memory mapped back directly from the disk.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">memory_map</span><span class="p">(</span><span class="s1">&#39;arraydata.arrow&#39;</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">source</span><span class="p">:</span>
+    <span class="n">loaded_arrays</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">ipc</span><span class="o">.</span><span class="n">open_file</span><span class="p">(</span><span class="n">source</span><span class="p">)</span><span class="o">.</span><span class="n">read_all</span><span class="p">()</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">loaded_arrays</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+</section>
+<section id="writing-csv-files">
+<h2><a class="toc-backref" href="#id7" role="doc-backlink">Writing CSV files</a><a class="headerlink" href="#writing-csv-files" title="Link to this heading">¶</a></h2>
+<p>It is possible to write an Arrow <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> to
+a CSV file using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.write_csv.html#pyarrow.csv.write_csv" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.csv.write_csv()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+
+<span class="kn">import</span> <span class="nn">pyarrow.csv</span>
+<span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">write_csv</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;table.csv&quot;</span><span class="p">,</span>
+                 <span class="n">write_options</span><span class="o">=</span><span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">WriteOptions</span><span class="p">(</span><span class="n">include_header</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
+</pre></div>
+</div>
+</section>
+<section id="writing-csv-files-incrementally">
+<h2><a class="toc-backref" href="#id8" role="doc-backlink">Writing CSV files incrementally</a><a class="headerlink" href="#writing-csv-files-incrementally" title="Link to this heading">¶</a></h2>
+<p>If you need to write data to a CSV file incrementally
+as you generate or retrieve the data and you don’t want to keep
+in memory the whole table to write it at once, it’s possible to use
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.CSVWriter.html#pyarrow.csv.CSVWriter" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.csv.CSVWriter</span></code></a> to write data incrementally</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">())])</span>
+<span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">CSVWriter</span><span class="p">(</span><span class="s2">&quot;table.csv&quot;</span><span class="p">,</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span> <span class="k">as</span> <span class="n">writer</span><span class="p">:</span>
+    <span class="k">for</span> <span class="n">chunk</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">10</span><span class="p">):</span>
+        <span class="n">datachunk</span> <span class="o">=</span> <span class="nb">range</span><span class="p">(</span><span class="n">chunk</span><span class="o">*</span><span class="mi">10</span><span class="p">,</span> <span class="p">(</span><span class="n">chunk</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="o">*</span><span class="mi">10</span><span class="p">)</span>
+        <span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">datachunk</span><span class="p">)],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+        <span class="n">writer</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>It’s equally possible to write <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a>
+by passing them as you would for tables.</p>
+</section>
+<section id="reading-csv-files">
+<h2><a class="toc-backref" href="#id9" role="doc-backlink">Reading CSV files</a><a class="headerlink" href="#reading-csv-files" title="Link to this heading">¶</a></h2>
+<p>Arrow can read <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> entities from CSV using an
+optimized codepath that can leverage multiple threads.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.csv</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&quot;table.csv&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>Arrow will do its best to infer data types.  Further options can be
+provided to <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.read_csv.html#pyarrow.csv.read_csv" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.csv.read_csv()</span></code></a> to drive
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.csv.ConvertOptions.html#pyarrow.csv.ConvertOptions" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.csv.ConvertOptions</span></code></a>.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="writing-partitioned-datasets">
+<h2><a class="toc-backref" href="#id10" role="doc-backlink">Writing Partitioned Datasets</a><a class="headerlink" href="#writing-partitioned-datasets" title="Link to this heading">¶</a></h2>
+<p>When your dataset is big it usually makes sense to split it into
+multiple separate files. You can do this manually or use
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html#pyarrow.dataset.write_dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.write_dataset()</span></code></a> to let Arrow do the effort
+of splitting the data in chunks for you.</p>
+<p>The <code class="docutils literal notranslate"><span class="pre">partitioning</span></code> argument allows to tell <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.write_dataset.html#pyarrow.dataset.write_dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.write_dataset()</span></code></a>
+for which columns the data should be split.</p>
+<p>For example given 100 birthdays, within 2000 and 2009</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy.random</span>
+<span class="n">data</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">({</span><span class="s2">&quot;day&quot;</span><span class="p">:</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">31</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">100</span><span class="p">),</span>
+                 <span class="s2">&quot;month&quot;</span><span class="p">:</span> <span class="n">numpy</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">randint</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">100</span><span class="p">),</span>
+                 <span class="s2">&quot;year&quot;</span><span class="p">:</span> <span class="p">[</span><span class="mi">2000</span> <span class="o">+</span> <span class="n">x</span> <span class="o">//</span> <span class="mi">10</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">100</span><span class="p">)]})</span>
+</pre></div>
+</div>
+<p>Then we could partition the data by the year column so that it
+gets saved in 10 different files:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.dataset</span> <span class="k">as</span> <span class="nn">ds</span>
+
+<span class="n">ds</span><span class="o">.</span><span class="n">write_dataset</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="s2">&quot;./partitioned&quot;</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s2">&quot;parquet&quot;</span><span class="p">,</span>
+                 <span class="n">partitioning</span><span class="o">=</span><span class="n">ds</span><span class="o">.</span><span class="n">partitioning</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([(</span><span class="s2">&quot;year&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int16</span><span class="p">())])))</span>
+</pre></div>
+</div>
+<p>Arrow will partition datasets in subdirectories by default, which will
+result in 10 different directories named with the value of the partitioning
+column each with a file containing the subset of the data for that partition:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyarrow</span> <span class="kn">import</span> <span class="n">fs</span>
+
+<span class="n">localfs</span> <span class="o">=</span> <span class="n">fs</span><span class="o">.</span><span class="n">LocalFileSystem</span><span class="p">()</span>
+<span class="n">partitioned_dir_content</span> <span class="o">=</span> <span class="n">localfs</span><span class="o">.</span><span class="n">get_file_info</span><span class="p">(</span><span class="n">fs</span><span class="o">.</span><span class="n">FileSelector</span><span class="p">(</span><span class="s2">&quot;./partitioned&quot;</span><span class="p">,</span> <span class="n">recursive</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
+<span class="n">files</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">((</span><span class="n">f</span><span class="o">.</span><span class="n">path</span> <span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">partitioned_dir_content</span> <span class="k">if</span> <span class="n">f</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="n">fs</span><span class="o">.</span><span class="n">FileType</span><span class="o">.</span><span class="n">File</span><span class="p">))</span>
+
+<span class="k">for</span> <span class="n">file</span> <span class="ow">in</span> <span class="n">files</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">file</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>./partitioned/2000/part-0.parquet
+./partitioned/2001/part-0.parquet
+./partitioned/2002/part-0.parquet
+./partitioned/2003/part-0.parquet
+./partitioned/2004/part-0.parquet
+./partitioned/2005/part-0.parquet
+./partitioned/2006/part-0.parquet
+./partitioned/2007/part-0.parquet
+./partitioned/2008/part-0.parquet
+./partitioned/2009/part-0.parquet
+</pre></div>
+</div>
+</section>
+<section id="reading-partitioned-data">
+<h2><a class="toc-backref" href="#id11" role="doc-backlink">Reading Partitioned data</a><a class="headerlink" href="#reading-partitioned-data" title="Link to this heading">¶</a></h2>
+<p>In some cases, your dataset might be composed by multiple separate
+files each containing a piece of the data.</p>
+<p>In this case the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.dataset.html#pyarrow.dataset.dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.dataset()</span></code></a> function provides
+an interface to discover and read all those files as a single big dataset.</p>
+<p>For example if we have a structure like:</p>
+<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>examples/
+├── dataset1.parquet
+├── dataset2.parquet
+└── dataset3.parquet
+</pre></div>
+</div>
+<p>Then, pointing the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.dataset.html#pyarrow.dataset.dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.dataset.dataset()</span></code></a> function to the <code class="docutils literal notranslate"><span class="pre">examples</span></code> directory
+will discover those parquet files and will expose them all as a single
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.dataset</span> <span class="k">as</span> <span class="nn">ds</span>
+
+<span class="n">dataset</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">dataset</span><span class="p">(</span><span class="s2">&quot;./examples&quot;</span><span class="p">,</span> <span class="nb">format</span><span class="o">=</span><span class="s2">&quot;parquet&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">dataset</span><span class="o">.</span><span class="n">files</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>[&#39;./examples/dataset1.parquet&#39;, &#39;./examples/dataset2.parquet&#39;, &#39;./examples/dataset3.parquet&#39;]
+</pre></div>
+</div>
+<p>The whole dataset can be viewed as a single big table using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_table()</span></code></a>. While each parquet file
+contains only 10 rows, converting the dataset to a table will
+expose them as a single Table.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">dataset</span><span class="o">.</span><span class="n">to_table</span><span class="p">()</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19],[20,21,22,23,24,25,26,27,28,29]]
+</pre></div>
+</div>
+<p>Notice that converting to a table will force all data to be loaded
+in memory.  For big datasets is usually not what you want.</p>
+<p>For this reason, it might be better to rely on the
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_batches" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_batches()</span></code></a> method, which will
+iteratively load the dataset one chunk of data at the time returning a
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.RecordBatch</span></code></a> for each one of them.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">record_batch</span> <span class="ow">in</span> <span class="n">dataset</span><span class="o">.</span><span class="n">to_batches</span><span class="p">():</span>
+    <span class="n">col1</span> <span class="o">=</span> <span class="n">record_batch</span><span class="o">.</span><span class="n">column</span><span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">col1</span><span class="o">.</span><span class="n">_name</span><span class="si">}</span><span class="s2"> = </span><span class="si">{</span><span class="n">col1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">col1</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>col1 = 0 .. 9
+col1 = 10 .. 19
+col1 = 20 .. 29
+</pre></div>
+</div>
+</section>
+<section id="reading-partitioned-data-from-s3">
+<h2><a class="toc-backref" href="#id12" role="doc-backlink">Reading Partitioned Data from S3</a><a class="headerlink" href="#reading-partitioned-data-from-s3" title="Link to this heading">¶</a></h2>
+<p>The <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset</span></code></a> is also able to abstract
+partitioned data coming from remote sources like S3 or HDFS.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pyarrow</span> <span class="kn">import</span> <span class="n">fs</span>
+
+<span class="c1"># List content of s3://ursa-labs-taxi-data/2011</span>
+<span class="n">s3</span> <span class="o">=</span> <span class="n">fs</span><span class="o">.</span><span class="n">SubTreeFileSystem</span><span class="p">(</span>
+    <span class="s2">&quot;ursa-labs-taxi-data&quot;</span><span class="p">,</span>
+    <span class="n">fs</span><span class="o">.</span><span class="n">S3FileSystem</span><span class="p">(</span><span class="n">region</span><span class="o">=</span><span class="s2">&quot;us-east-2&quot;</span><span class="p">,</span> <span class="n">anonymous</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
+<span class="p">)</span>
+<span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">s3</span><span class="o">.</span><span class="n">get_file_info</span><span class="p">(</span><span class="n">fs</span><span class="o">.</span><span class="n">FileSelector</span><span class="p">(</span><span class="s2">&quot;2011&quot;</span><span class="p">,</span> <span class="n">recursive</span><span class="o">=</span><span class="kc">True</span><span class="p">)):</span>
+    <span class="k">if</span> <span class="n">entry</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="n">fs</span><span class="o">.</span><span class="n">FileType</span><span class="o">.</span><span class="n">File</span><span class="p">:</span>
+        <span class="nb">print</span><span class="p">(</span><span class="n">entry</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>2011/01/data.parquet
+2011/02/data.parquet
+2011/03/data.parquet
+2011/04/data.parquet
+2011/05/data.parquet
+2011/06/data.parquet
+2011/07/data.parquet
+2011/08/data.parquet
+2011/09/data.parquet
+2011/10/data.parquet
+2011/11/data.parquet
+2011/12/data.parquet
+</pre></div>
+</div>
+<p>The data in the bucket can be loaded as a single big dataset partitioned
+by <code class="docutils literal notranslate"><span class="pre">month</span></code> using</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">dataset</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">dataset</span><span class="p">(</span><span class="s2">&quot;s3://ursa-labs-taxi-data/2011&quot;</span><span class="p">,</span>
+                     <span class="n">partitioning</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;month&quot;</span><span class="p">])</span>
+<span class="k">for</span> <span class="n">f</span> <span class="ow">in</span> <span class="n">dataset</span><span class="o">.</span><span class="n">files</span><span class="p">[:</span><span class="mi">10</span><span class="p">]:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;...&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ursa-labs-taxi-data/2011/01/data.parquet
+ursa-labs-taxi-data/2011/02/data.parquet
+ursa-labs-taxi-data/2011/03/data.parquet
+ursa-labs-taxi-data/2011/04/data.parquet
+ursa-labs-taxi-data/2011/05/data.parquet
+ursa-labs-taxi-data/2011/06/data.parquet
+ursa-labs-taxi-data/2011/07/data.parquet
+ursa-labs-taxi-data/2011/08/data.parquet
+ursa-labs-taxi-data/2011/09/data.parquet
+ursa-labs-taxi-data/2011/10/data.parquet
+...
+</pre></div>
+</div>
+<p>The dataset can then be used with <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_table()</span></code></a>
+or <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html#pyarrow.dataset.Dataset.to_batches" title="(in Apache Arrow v14.0.1)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.dataset.Dataset.to_batches()</span></code></a> like you would for a local one.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>It is possible to load partitioned data also in the ipc arrow
+format or in feather format.</p>
+</div>
+<div class="admonition warning">
+<p class="admonition-title">Warning</p>
+<p>If the above code throws an error most likely the reason is your
+AWS credentials are not set. Follow these instructions to get
+<code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">Access</span> <span class="pre">Key</span> <span class="pre">Id</span></code> and <code class="docutils literal notranslate"><span class="pre">AWS</span> <span class="pre">Secret</span> <span class="pre">Access</span> <span class="pre">Key</span></code>:
+<a class="reference external" href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">AWS Credentials</a>.</p>
+<p>The credentials are normally stored in <code class="docutils literal notranslate"><span class="pre">~/.aws/credentials</span></code> (on Mac or Linux)
+or in <code class="docutils literal notranslate"><span class="pre">C:\Users\&lt;USERNAME&gt;\.aws\credentials</span></code> (on Windows) file.
+You will need to either create or update this file in the appropriate location.</p>
+<p>The contents of the file should look like this:</p>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>default<span class="o">]</span>
+<span class="nv">aws_access_key_id</span><span class="o">=</span>&lt;YOUR_AWS_ACCESS_KEY_ID&gt;
+<span class="nv">aws_secret_access_key</span><span class="o">=</span>&lt;YOUR_AWS_SECRET_ACCESS_KEY&gt;
+</pre></div>
+</div>
+</div>
+</section>
+<section id="write-a-feather-file">
+<h2><a class="toc-backref" href="#id13" role="doc-backlink">Write a Feather file</a><a class="headerlink" href="#write-a-feather-file" title="Link to this heading">¶</a></h2>
+<p>Given an array with 100 numbers, from 0 to 99</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
+<span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">100</span><span class="p">))</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2"> .. </span><span class="si">{</span><span class="n">arr</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>0 .. 99
+</pre></div>
+</div>
+<p>To write it to a Feather file, as Feather stores multiple columns,
+we must create a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> out of it,
+so that we get a table of a single column which can then be
+written to a Feather file.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_arrays</span><span class="p">([</span><span class="n">arr</span><span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;col1&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Once we have a table, it can be written to a Feather File
+using the functions provided by the <code class="docutils literal notranslate"><span class="pre">pyarrow.feather</span></code> module</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.feather</span> <span class="k">as</span> <span class="nn">ft</span>
+
+<span class="n">ft</span><span class="o">.</span><span class="n">write_feather</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s1">&#39;example.feather&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+</section>
+<section id="reading-a-feather-file">
+<h2><a class="toc-backref" href="#id14" role="doc-backlink">Reading a Feather file</a><a class="headerlink" href="#reading-a-feather-file" title="Link to this heading">¶</a></h2>
+<p>Given a Feather file, it can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a>
+by using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.feather.read_table.html#pyarrow.feather.read_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.feather.read_table()</span></code></a> function</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow.feather</span> <span class="k">as</span> <span class="nn">ft</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">ft</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;example.feather&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The resulting table will contain the same columns that existed in
+the parquet file as <code class="xref py py-class docutils literal notranslate"><span class="pre">ChunkedArray</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int64
+----
+col1: [[0,1,2,3,4,...,95,96,97,98,99]]
+</pre></div>
+</div>
+</section>
+<section id="reading-line-delimited-json">
+<h2><a class="toc-backref" href="#id15" role="doc-backlink">Reading Line Delimited JSON</a><a class="headerlink" href="#reading-line-delimited-json" title="Link to this heading">¶</a></h2>
+<p>Arrow has builtin support for line-delimited JSON.
+Each line represents a row of data as a JSON object.</p>
+<p>Given some data in a file where each line is a JSON object
+containing a row of data:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">tempfile</span>
+
+<span class="k">with</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">NamedTemporaryFile</span><span class="p">(</span><span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s2">&quot;w+&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 1, &quot;b&quot;: 2.0, &quot;c&quot;: 1}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 3, &quot;b&quot;: 3.0, &quot;c&quot;: 2}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 5, &quot;b&quot;: 4.0, &quot;c&quot;: 3}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+    <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">&#39;{&quot;a&quot;: 7, &quot;b&quot;: 5.0, &quot;c&quot;: 4}</span><span class="se">\n</span><span class="s1">&#39;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>The content of the file can be read back to a <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.Table.html#pyarrow.Table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.Table</span></code></a> using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.json.read_json.html#pyarrow.json.read_json" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.json.read_json()</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+<span class="kn">import</span> <span class="nn">pyarrow.json</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">json</span><span class="o">.</span><span class="n">read_json</span><span class="p">(</span><span class="n">f</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="o">.</span><span class="n">to_pydict</span><span class="p">())</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>{&#39;a&#39;: [1, 3, 5, 7], &#39;b&#39;: [2.0, 3.0, 4.0, 5.0], &#39;c&#39;: [1, 2, 3, 4]}
+</pre></div>
+</div>
+</section>
+<section id="writing-compressed-data">
+<h2><a class="toc-backref" href="#id16" role="doc-backlink">Writing Compressed Data</a><a class="headerlink" href="#writing-compressed-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides support for writing files in compressed formats,
+both for formats that provide compression natively like Parquet or Feather,
+and for formats that don’t support compression out of the box like CSV.</p>
+<p>Given a table:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+<span class="p">],</span> <span class="n">names</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;numbers&quot;</span><span class="p">])</span>
+</pre></div>
+</div>
+<p>Writing compressed Parquet or Feather data is driven by the
+<code class="docutils literal notranslate"><span class="pre">compression</span></code> argument to the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.feather.write_feather.html#pyarrow.feather.write_feather" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.feather.write_feather()</span></code></a> and
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.parquet.write_table.html#pyarrow.parquet.write_table" title="(in Apache Arrow v14.0.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">pyarrow.parquet.write_table()</span></code></a> functions:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">pa</span><span class="o">.</span><span class="n">feather</span><span class="o">.</span><span class="n">write_feather</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;compressed.feather&quot;</span><span class="p">,</span>
+                         <span class="n">compression</span><span class="o">=</span><span class="s2">&quot;lz4&quot;</span><span class="p">)</span>
+<span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">write_table</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;compressed.parquet&quot;</span><span class="p">,</span>
+                       <span class="n">compression</span><span class="o">=</span><span class="s2">&quot;lz4&quot;</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>You can refer to each of those functions’ documentation for a complete
+list of supported compression formats.</p>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>Arrow actually uses compression by default when writing
+Parquet or Feather files. Feather is compressed using <code class="docutils literal notranslate"><span class="pre">lz4</span></code>
+by default and Parquet uses <code class="docutils literal notranslate"><span class="pre">snappy</span></code> by default.</p>
+</div>
+<p>For formats that don’t support compression natively, like CSV,
+it’s possible to save compressed data using
+<a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedOutputStream.html#pyarrow.CompressedOutputStream" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedOutputStream</span></code></a>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">CompressedOutputStream</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">,</span> <span class="s2">&quot;gzip&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">out</span><span class="p">:</span>
+    <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">write_csv</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span>
+</pre></div>
+</div>
+<p>This requires decompressing the file when reading it back,
+which can be done using <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedInputStream.html#pyarrow.CompressedInputStream" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedInputStream</span></code></a>
+as explained in the next recipe.</p>
+</section>
+<section id="reading-compressed-data">
+<h2><a class="toc-backref" href="#id17" role="doc-backlink">Reading Compressed Data</a><a class="headerlink" href="#reading-compressed-data" title="Link to this heading">¶</a></h2>
+<p>Arrow provides support for reading compressed files,
+both for formats that provide it natively like Parquet or Feather,
+and for files in formats that don’t support compression natively,
+like CSV, but have been compressed by an application.</p>
+<p>Reading compressed formats that have native support for compression
+doesn’t require any special handling. We can for example read back
+the Parquet and Feather files we wrote in the previous recipe
+by simply invoking <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.feather.read_table()</span></code> and
+<code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.parquet.read_table()</span></code>:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_feather</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">feather</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;compressed.feather&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_feather</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_parquet</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;compressed.parquet&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_parquet</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<p>Reading data from formats that don’t have native support for
+compression instead involves decompressing them before decoding them.
+This can be done using the <a class="reference external" href="https://arrow.apache.org/docs/python/generated/pyarrow.CompressedInputStream.html#pyarrow.CompressedInputStream" title="(in Apache Arrow v14.0.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.CompressedInputStream</span></code></a> class
+which wraps files with a decompress operation before the result is
+provided to the actual read function.</p>
+<p>For example to read a compressed CSV file:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">pa</span><span class="o">.</span><span class="n">CompressedInputStream</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">OSFile</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">),</span> <span class="s2">&quot;gzip&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="nb">input</span><span class="p">:</span>
+    <span class="n">table_csv</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="nb">input</span><span class="p">)</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">table_csv</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<div class="admonition note">
+<p class="admonition-title">Note</p>
+<p>In the case of CSV, arrow is actually smart enough to try detecting
+compressed files using the file extension. So if your file is named
+<code class="docutils literal notranslate"><span class="pre">*.gz</span></code> or <code class="docutils literal notranslate"><span class="pre">*.bz2</span></code> the <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.csv.read_csv()</span></code> function will
+try to decompress it accordingly</p>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table_csv2</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">csv</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&quot;compressed.csv.gz&quot;</span><span class="p">)</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">table_csv2</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+numbers: int64
+----
+numbers: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Reading and Writing Data</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#write-a-parquet-file">Write a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-parquet-file">Reading a Parquet file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-subset-of-parquet-data">Reading a subset of Parquet data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#saving-arrow-arrays-to-disk">Saving Arrow Arrays to disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#memory-mapping-arrow-arrays-from-disk">Memory Mapping Arrow Arrays from disk</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-csv-files">Writing CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-csv-files-incrementally">Writing CSV files incrementally</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-csv-files">Reading CSV files</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-partitioned-datasets">Writing Partitioned Datasets</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-partitioned-data">Reading Partitioned data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-partitioned-data-from-s3">Reading Partitioned Data from S3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#write-a-feather-file">Write a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-a-feather-file">Reading a Feather file</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-line-delimited-json">Reading Line Delimited JSON</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#writing-compressed-data">Writing Compressed Data</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#reading-compressed-data">Reading Compressed Data</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="index.html" title="previous chapter">Apache Arrow Python Cookbook</a></li>
+      <li>Next: <a href="create.html" title="next chapter">Creating Arrow Objects</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/io.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/objects.inv b/py/objects.inv
new file mode 100644
index 0000000..cf08edc
--- /dev/null
+++ b/py/objects.inv
Binary files differ
diff --git a/py/schema.html b/py/schema.html
new file mode 100644
index 0000000..a785f5b
--- /dev/null
+++ b/py/schema.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
+
+    <title>Working with Schema &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="search.html" />
+    <link rel="next" title="Data Manipulation" href="data.html" />
+    <link rel="prev" title="Creating Arrow Objects" href="create.html" />
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <section id="working-with-schema">
+<h1><a class="toc-backref" href="#id1" role="doc-backlink">Working with Schema</a><a class="headerlink" href="#working-with-schema" title="Link to this heading">¶</a></h1>
+<p>Arrow automatically infers the most appropriate data type when reading in data
+or converting Python objects to Arrow objects.</p>
+<p>However, you might want to manually tell Arrow which data types to
+use, for example, to ensure interoperability with databases and data warehouse
+systems.  This chapter includes recipes for dealing with schemas.</p>
+<nav class="contents" id="contents">
+<p class="topic-title">Contents</p>
+<ul class="simple">
+<li><p><a class="reference internal" href="#working-with-schema" id="id1">Working with Schema</a></p>
+<ul>
+<li><p><a class="reference internal" href="#setting-the-data-type-of-an-arrow-array" id="id2">Setting the data type of an Arrow Array</a></p></li>
+<li><p><a class="reference internal" href="#setting-the-schema-of-a-table" id="id3">Setting the schema of a Table</a></p></li>
+<li><p><a class="reference internal" href="#merging-multiple-schemas" id="id4">Merging multiple schemas</a></p></li>
+</ul>
+</li>
+</ul>
+</nav>
+<section id="setting-the-data-type-of-an-arrow-array">
+<h2><a class="toc-backref" href="#id2" role="doc-backlink">Setting the data type of an Arrow Array</a><a class="headerlink" href="#setting-the-data-type-of-an-arrow-array" title="Link to this heading">¶</a></h2>
+<p>If you have an existing array and want to change its data type,
+that can be done through the <code class="docutils literal notranslate"><span class="pre">cast</span></code> function:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">])</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int64
+</pre></div>
+</div>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">arr</span> <span class="o">=</span> <span class="n">arr</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">())</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int8
+</pre></div>
+</div>
+<p>You can also create an array of the requested type by providing
+the type at array creation</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">arr</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span> <span class="nb">type</span><span class="o">=</span><span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">())</span>
+<span class="nb">print</span><span class="p">(</span><span class="n">arr</span><span class="o">.</span><span class="n">type</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>int8
+</pre></div>
+</div>
+</section>
+<section id="setting-the-schema-of-a-table">
+<h2><a class="toc-backref" href="#id3" role="doc-backlink">Setting the schema of a Table</a><a class="headerlink" href="#setting-the-schema-of-a-table" title="Link to this heading">¶</a></h2>
+<p>Tables detain multiple columns, each with its own name
+and type. The union of types and names is what defines a schema.</p>
+<p>A schema in Arrow can be defined using <code class="xref py py-meth docutils literal notranslate"><span class="pre">pyarrow.schema()</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int8</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col3&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float64</span><span class="p">())</span>
+<span class="p">])</span>
+</pre></div>
+</div>
+<p>The schema can then be provided to a table when created:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">table</span><span class="p">([</span>
+    <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">],</span>
+    <span class="p">[</span><span class="s2">&quot;a&quot;</span><span class="p">,</span> <span class="s2">&quot;b&quot;</span><span class="p">,</span> <span class="s2">&quot;c&quot;</span><span class="p">,</span> <span class="s2">&quot;d&quot;</span><span class="p">,</span> <span class="s2">&quot;e&quot;</span><span class="p">],</span>
+    <span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="mf">3.0</span><span class="p">,</span> <span class="mf">4.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">]</span>
+<span class="p">],</span> <span class="n">schema</span><span class="o">=</span><span class="n">schema</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int8
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+<p>Like for arrays, it’s possible to cast tables to different schemas
+as far as they are compatible</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">schema_int32</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;col1&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col2&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;col3&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float64</span><span class="p">())</span>
+<span class="p">])</span>
+
+<span class="n">table</span> <span class="o">=</span> <span class="n">table</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="n">schema_int32</span><span class="p">)</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">table</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pyarrow.Table
+col1: int32
+col2: string
+col3: double
+----
+col1: [[1,2,3,4,5]]
+col2: [[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;]]
+col3: [[1,2,3,4,5]]
+</pre></div>
+</div>
+</section>
+<section id="merging-multiple-schemas">
+<h2><a class="toc-backref" href="#id4" role="doc-backlink">Merging multiple schemas</a><a class="headerlink" href="#merging-multiple-schemas" title="Link to this heading">¶</a></h2>
+<p>When you have multiple separate groups of data that you want to combine
+it might be necessary to unify their schemas to create a superset of them
+that applies to all data sources.</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>
+
+<span class="n">first_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;population&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">())</span>
+<span class="p">])</span>
+
+<span class="n">second_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;language&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">())</span>
+<span class="p">])</span>
+</pre></div>
+</div>
+<p><code class="xref py py-func docutils literal notranslate"><span class="pre">unify_schemas()</span></code> can be used to combine multiple schemas into
+a single one:</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">union_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">union_schema</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>country: string
+population: int32
+country_code: string
+language: string
+</pre></div>
+</div>
+<p>If the combined schemas have overlapping columns, they can still be combined
+as far as the colliding columns retain the same type (<code class="docutils literal notranslate"><span class="pre">country_code</span></code>):</p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">third_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">string</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;lat&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;long&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+<span class="p">])</span>
+
+<span class="n">union_schema</span> <span class="o">=</span>  <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">,</span> <span class="n">third_schema</span><span class="p">])</span>
+
+<span class="nb">print</span><span class="p">(</span><span class="n">union_schema</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>country: string
+population: int32
+country_code: string
+language: string
+lat: float
+long: float
+</pre></div>
+</div>
+<p>If a merged field has instead diverging types in the combined schemas
+then trying to merge the schemas will fail. For example if <code class="docutils literal notranslate"><span class="pre">country_code</span></code>
+was a numeric instead of a string we would be unable to unify the schemas
+because in <code class="docutils literal notranslate"><span class="pre">second_schema</span></code> it was already declared as a <code class="docutils literal notranslate"><span class="pre">pa.string()</span></code></p>
+<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">third_schema</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">schema</span><span class="p">([</span>
+    <span class="p">(</span><span class="s2">&quot;country_code&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">int32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;lat&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+    <span class="p">(</span><span class="s2">&quot;long&quot;</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">float32</span><span class="p">()),</span>
+<span class="p">])</span>
+
+<span class="k">try</span><span class="p">:</span>
+    <span class="n">union_schema</span> <span class="o">=</span>  <span class="n">pa</span><span class="o">.</span><span class="n">unify_schemas</span><span class="p">([</span><span class="n">first_schema</span><span class="p">,</span> <span class="n">second_schema</span><span class="p">,</span> <span class="n">third_schema</span><span class="p">])</span>
+<span class="k">except</span> <span class="p">(</span><span class="n">pa</span><span class="o">.</span><span class="n">ArrowInvalid</span><span class="p">,</span> <span class="n">pa</span><span class="o">.</span><span class="n">ArrowTypeError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+    <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
+</pre></div>
+</div>
+<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Unable to merge: Field country_code has incompatible types: string vs int32
+</pre></div>
+</div>
+</section>
+</section>
+
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul class="current">
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Working with Schema</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#setting-the-data-type-of-an-arrow-array">Setting the data type of an Arrow Array</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#setting-the-schema-of-a-table">Setting the schema of a Table</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#merging-multiple-schemas">Merging multiple schemas</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+      <li>Previous: <a href="create.html" title="previous chapter">Creating Arrow Objects</a></li>
+      <li>Next: <a href="data.html" title="next chapter">Data Manipulation</a></li>
+  </ul></li>
+</ul>
+</div>
+<div id="searchbox" style="display: none" role="search">
+  <h3 id="searchlabel">Quick search</h3>
+    <div class="searchformwrapper">
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+      <input type="submit" value="Go" />
+    </form>
+    </div>
+</div>
+<script>document.getElementById('searchbox').style.display = "block"</script>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+      |
+      <a href="_sources/schema.rst.txt"
+          rel="nofollow">Page source</a>
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/search.html b/py/search.html
new file mode 100644
index 0000000..8e6f476
--- /dev/null
+++ b/py/search.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+
+<html lang="en" data-content_root="./">
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>Search &#8212; Apache Arrow Python Cookbook  documentation</title>
+    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4f649999" />
+    <link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=39aeeac0" />
+    
+    <script src="_static/documentation_options.js?v=5929fcd5"></script>
+    <script src="_static/doctools.js?v=888ff710"></script>
+    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
+    <script src="_static/searchtools.js"></script>
+    <script src="_static/language_data.js"></script>
+    <link rel="icon" href="_static/favicon.ico"/>
+    <link rel="index" title="Index" href="genindex.html" />
+    <link rel="search" title="Search" href="#" />
+  <script src="searchindex.js" defer></script>
+  
+  
+   
+  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
+  
+  
+  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
+  <!-- Matomo -->
+  <script>
+    var _paq = window._paq = window._paq || [];
+    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+    /* We explicitly disable cookie tracking to avoid privacy issues */
+    _paq.push(['disableCookies']);
+    _paq.push(['trackPageView']);
+    _paq.push(['enableLinkTracking']);
+    (function() {
+      var u="https://analytics.apache.org/";
+      _paq.push(['setTrackerUrl', u+'matomo.php']);
+      _paq.push(['setSiteId', '20']);
+      var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+      g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+    })();
+  </script>
+  <!-- End Matomo Code -->
+
+
+  </head><body>
+  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          
+
+          <div class="body" role="main">
+            
+  <h1 id="search-documentation">Search</h1>
+  
+  <noscript>
+  <div class="admonition warning">
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  </noscript>
+  
+  
+  <p>
+    Searching for multiple words only shows matches that contain
+    all words.
+  </p>
+  
+  
+  <form action="" method="get">
+    <input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  
+  
+  <div id="search-results">
+  
+  </div>
+  
+
+          </div>
+          
+        </div>
+      </div>
+      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
+        <div class="sphinxsidebarwrapper">
+<p class="logo">
+  <a href="index.html">
+    <img class="logo" src="_static/arrow-logo_vertical_black-txt_transparent-bg.svg" alt="Logo"/>
+    
+  </a>
+</p>
+
+
+
+
+
+
+<p>
+<iframe src="https://ghbtns.com/github-btn.html?user=apache&repo=arrow-cookbook&type=none&count=true&size=large&v=2"
+  allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="35px"></iframe>
+</p>
+
+
+
+
+
+<h3>Navigation</h3>
+<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="io.html">Reading and Writing Data</a></li>
+<li class="toctree-l1"><a class="reference internal" href="create.html">Creating Arrow Objects</a></li>
+<li class="toctree-l1"><a class="reference internal" href="schema.html">Working with Schema</a></li>
+<li class="toctree-l1"><a class="reference internal" href="data.html">Data Manipulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="flight.html">Arrow Flight</a></li>
+</ul>
+
+
+<hr />
+<ul>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/index.html">User Guide</a></li>
+    
+    <li class="toctree-l1"><a href="https://arrow.apache.org/docs/python/api.html">API Reference</a></li>
+    
+</ul>
+<div class="relations">
+<h3>Related Topics</h3>
+<ul>
+  <li><a href="index.html">Documentation overview</a><ul>
+  </ul></li>
+</ul>
+</div>
+
+
+
+
+
+
+
+
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="footer">
+      &copy;2022, Apache Software Foundation.
+      
+      |
+      Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
+      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>
+      
+    </div>
+
+    
+
+    
+  </body>
+</html>
\ No newline at end of file
diff --git a/py/searchindex.js b/py/searchindex.js
new file mode 100644
index 0000000..c189318
--- /dev/null
+++ b/py/searchindex.js
@@ -0,0 +1 @@
+Search.setIndex({"docnames": ["create", "data", "flight", "index", "io", "schema"], "filenames": ["create.rst", "data.rst", "flight.rst", "index.rst", "io.rst", "schema.rst"], "titles": ["Creating Arrow Objects", "Data Manipulation", "Arrow Flight", "Apache Arrow Python Cookbook", "Reading and Writing Data", "Working with Schema"], "terms": {"recip": [0, 1, 2, 3, 4, 5], "relat": [0, 1, 2, 4], "creation": [0, 5], "tensor": 0, "all": [0, 1, 2, 4, 5], "other": [0, 2], "entiti": [0, 4], "keep": [0, 4], "continu": 0, "optimis": 0, "memori": [0, 2, 3], "footprint": 0, "simd": 0, "analys": 0, "In": [0, 1, 2, 4], "python": [0, 2, 5], "": [0, 1, 2, 4, 5], "possibl": [0, 1, 4, 5], "build": [0, 2], "pyarrow": [0, 1, 2, 3, 4, 5], "start": [0, 2], "list": [0, 1, 2, 4], "sequenc": 0, "gener": [0, 2, 4], "numpi": [0, 4], "panda": [0, 2], "seri": 0, "import": [0, 1, 2, 4, 5], "pa": [0, 1, 2, 4, 5], "1": [0, 1, 2, 4, 5], "2": [0, 1, 2, 4, 5], "3": [0, 1, 2, 4, 5], "4": [0, 1, 2, 4, 5], "5": [0, 1, 2, 4, 5], "print": [0, 1, 2, 4, 5], "can": [0, 1, 2, 4, 5], "also": [0, 1, 2, 3, 4, 5], "provid": [0, 1, 2, 4, 5], "mask": [0, 3], "specifi": 0, "which": [0, 1, 2, 3, 4, 5], "valu": [0, 2, 3, 4], "should": [0, 2, 4], "consid": 0, "null": [0, 1], "np": [0, 4], "true": [0, 1, 2, 4], "fals": [0, 1, 2, 4], "when": [0, 1, 2, 3, 4, 5], "leverag": [0, 2, 4], "optim": [0, 4], "code": [0, 2, 4], "path": [0, 2, 4], "reli": [0, 4], "intern": [0, 2], "represent": 0, "pd": [0, 2], "array_from_numpi": 0, "arang": [0, 4], "array_from_panda": 0, "support": [0, 4], "tabular": 0, "each": [0, 1, 2, 4, 5], "column": [0, 2, 3, 4, 5], "i": [0, 1, 2, 3, 4, 5], "repres": [0, 4], "chunkedarrai": [0, 1, 4], "pair": [0, 1], "multipl": [0, 1, 3, 4], "name": [0, 1, 2, 4, 5], "b": [0, 1, 2, 4, 5], "c": [0, 1, 2, 4, 5], "d": [0, 1, 4, 5], "e": [0, 1, 2, 5], "0": [0, 1, 2, 3, 4, 5], "col1": [0, 4, 5], "col2": [0, 5], "col3": [0, 5], "int64": [0, 1, 4, 5], "string": [0, 1, 2, 5], "doubl": [0, 1, 5], "allow": [0, 2, 4], "fast": 0, "zero": [0, 1], "copi": [0, 1], "structur": [0, 2, 4], "The": [0, 1, 2, 3, 4, 5], "function": [0, 2, 3, 4, 5], "varieti": 0, "input": [0, 4], "includ": [0, 1, 2, 5], "dictionari": [0, 2], "pass": [0, 2, 4], "convers": 0, "benefit": 0, "behaviour": 0, "from_pylist": 0, "method": [0, 1, 2, 4], "row": [0, 1, 2, 4], "dict": [0, 2], "ar": [0, 1, 2, 4, 5], "infer": [0, 4, 5], "schema": [0, 2, 3, 4], "explicitli": 0, "most": [0, 1, 2, 4, 5], "o": 0, "oper": [0, 1, 2, 4], "happen": 0, "ship": 0, "destin": 0, "recordbatch": [0, 4], "wai": [0, 2], "A": [0, 1, 2, 5], "seen": 0, "slice": 0, "from_arrai": [0, 4], "7": [0, 1, 4], "9": [0, 1, 4], "6": [0, 1, 2, 4], "8": [0, 1, 2, 4], "10": [0, 1, 4], "odd": 0, "even": [0, 2], "combin": [0, 1, 2, 5], "us": [0, 2, 3, 4, 5], "from_batch": [0, 2], "second_batch": 0, "11": [0, 1, 4], "13": [0, 4], "15": [0, 1, 4], "17": [0, 4], "19": [0, 4], "12": [0, 1, 4], "14": [0, 1, 3, 4], "16": [0, 4], "18": [0, 4], "20": [0, 1, 4], "equal": [0, 1, 4], "convert": [0, 2, 4, 5], "to_batch": [0, 4], "record_batch": [0, 2, 4], "max_chunks": 0, "len": [0, 1, 2], "dictionaryarrai": 0, "without": [0, 2], "cost": [0, 1], "repeat": [0, 1], "categori": 0, "over": [0, 2], "thi": [0, 2, 3, 4, 5], "reduc": 0, "might": [0, 1, 2, 3, 4, 5], "have": [0, 1, 2, 4, 5], "larg": [0, 2], "text": 0, "If": [0, 1, 2, 4, 5], "you": [0, 1, 2, 4, 5], "an": [0, 2, 3, 4], "contain": [0, 4], "dictionary_encod": 0, "arr": [0, 1, 4, 5], "red": 0, "green": 0, "blue": 0, "indic": 0, "alreadi": [0, 5], "know": 0, "skip": 0, "encod": [0, 2], "step": [0, 2], "directli": [0, 4], "transform": 1, "see": [1, 2], "complet": [1, 4], "avail": [1, 2], "arrow": 1, "those": [1, 3, 4], "expos": [1, 2, 4], "through": [1, 2, 5], "modul": [1, 3, 4], "given": [1, 4], "100": [1, 4], "number": [1, 4], "from": [1, 2, 3], "99": [1, 4], "f": [1, 2, 4], "we": [1, 2, 4, 5], "pc": 1, "49": 1, "And": [1, 2], "min_max": 1, "time": [1, 2, 4], "nums_arr": 1, "entri": [1, 4], "value_count": 1, "common": [1, 2, 3, 4], "multipli": 1, "198": 1, "split": [1, 4], "across": [1, 2], "two": [1, 2], "differ": [1, 4, 5], "concaten": 1, "singl": [1, 2, 4, 5], "oscar": 1, "nomin": 1, "divid": 1, "between": [1, 2], "oscar_nominations_1": 1, "meryl": 1, "streep": 1, "katharin": 1, "hepburn": 1, "21": [1, 4], "actor": 1, "oscar_nominations_2": 1, "jack": 1, "nicholson": 1, "bett": 1, "davi": 1, "them": [1, 2, 4, 5], "concat_t": 1, "oscar_nomin": 1, "By": 1, "default": [1, 2, 4], "doesn": [1, 4], "t": [1, 2, 4], "need": [1, 2, 3, 4], "rewrit": 1, "As": [1, 2], "made": 1, "result": [1, 2, 4], "chunk": [1, 2, 4], "point": [1, 4], "origin": 1, "ha": [1, 2, 4, 5], "been": [1, 4], "under": 1, "some": [1, 2, 4], "condit": 1, "cast": [1, 5], "one": [1, 2, 4, 5], "type": [1, 2, 3, 4], "anoth": [1, 2], "promot": 1, "case": [1, 2, 4], "extra": 1, "occur": 1, "extend": [1, 2], "its": [1, 4, 5], "append_column": 1, "suppos": [1, 2], "actress": 1, "addit": [1, 2], "track": 1, "year": [1, 4], "wa": [1, 2, 5], "won": 1, "wonyear": 1, "1980": 1, "1983": 1, "2012": 1, "1934": 1, "1968": 1, "1969": 1, "1982": 1, "item": 1, "child": [1, 2], "set_column": 1, "inform": [1, 2], "about": [1, 2, 4], "sold": 1, "supermarket": 1, "particular": 1, "dai": [1, 4], "sales_data": 1, "potato": 1, "bean": 1, "cucumb": 1, "egg": 1, "30": 1, "amount": 1, "index": [1, 3], "updat": [1, 2, 4], "sale": 1, "new_sales_data": 1, "new_amount": 1, "40": 1, "kei": [1, 2, 4], "group_bi": 1, "follow": [1, 2, 4], "aggreg": 1, "tablegroupbi": 1, "learn": 1, "more": [1, 2], "groupbi": 1, "here": [1, 2], "For": [1, 2, 4, 5], "exampl": [1, 2, 3, 4, 5], "let": [1, 2, 4], "sai": 1, "set": [1, 2, 3, 4], "associ": 1, "want": [1, 2, 4, 5], "like": [1, 2, 4, 5], "sum": 1, "evalu": 1, "how": [1, 2, 3], "mani": [1, 3], "uniqu": 1, "now": [1, 2], "field": [1, 4, 5], "note": 1, "aggregated_t": 1, "values_sum": 1, "31": [1, 4], "observ": 1, "carefulli": 1, "new": [1, 2], "return": [1, 2, 4], "form": 1, "option": [1, 2, 4], "take": [1, 2], "where": [1, 2, 4], "our": [1, 2], "dataset": [1, 2, 3], "exclud": 1, "sampl": 1, "none": [1, 2, 4], "grouped_t": 1, "countopt": 1, "mode": [1, 4], "only_valid": 1, "values_count": 1, "discuss": 1, "base": 1, "either": [1, 4], "ascend": 1, "descend": 1, "prepar": 1, "123": 1, "Then": [1, 2, 4], "sort_bi": 1, "sorted_t": 1, "look": [1, 4], "sever": [1, 2], "find": 1, "onli": [1, 2, 4], "greater": 1, "than": 1, "could": [1, 2, 4], "get": [1, 2, 4], "back": [1, 2, 4], "fit": [1, 2], "rang": [1, 2, 4], "gtfive": 1, "to_str": 1, "furthermor": 1, "filtered_arrai": 1, "someth": 1, "end": [1, 2], "up": [1, 2], "tell": [1, 4, 5], "posit": 1, "your": [1, 4], "four": 1, "first": [1, 2], "last": 1, "accord": 1, "produc": 1, "output": 1, "so": [1, 2, 4], "found": 1, "protocol": 2, "implement": 2, "store": [2, 3, 4], "send": 2, "receiv": 2, "file": [2, 3], "framework": 2, "particularli": 2, "flightserverbas": 2, "class": [2, 4], "pathlib": 2, "flightserv": 2, "def": 2, "__init__": 2, "self": 2, "locat": [2, 4], "grpc": 2, "8815": 2, "repo": 2, "kwarg": 2, "super": 2, "_locat": 2, "_repo": 2, "_make_flight_info": 2, "dataset_path": 2, "read_schema": 2, "metadata": 2, "read_metadata": 2, "descriptor": 2, "flightdescriptor": 2, "for_path": 2, "utf": 2, "endpoint": 2, "flightendpoint": 2, "flightinfo": 2, "num_row": 2, "serialized_s": 2, "list_flight": 2, "context": 2, "criteria": 2, "iterdir": 2, "yield": 2, "get_flight_info": 2, "decod": [2, 4], "do_put": 2, "reader": 2, "writer": [2, 4], "data_t": 2, "read_al": [2, 4], "write_t": [2, 4], "do_get": 2, "ticket": 2, "recordbatchstream": 2, "read_tabl": [2, 4], "list_act": 2, "drop_dataset": 2, "delet": [2, 4], "do_act": 2, "action": 2, "do_drop_dataset": 2, "bodi": 2, "to_pybyt": 2, "els": 2, "rais": 2, "notimplementederror": 2, "unlink": 2, "server": 2, "charg": 2, "data": [2, 3], "fetch": 2, "likewis": 2, "regard": 2, "specif": 2, "actual": [2, 4], "client": 2, "download": 2, "would": [2, 4, 5], "pretti": 2, "useless": 2, "didn": 2, "creat": [2, 3, 4, 5], "respons": 2, "deal": [2, 5], "save": [2, 3], "request": [2, 5], "add": [2, 4], "do": [2, 4], "custom": 2, "previou": [2, 4], "ad": [2, 3], "execut": 2, "thu": 2, "subclass": 2, "dispatch": 2, "properli": 2, "invok": [2, 4], "expect": 2, "serv": [2, 3], "__name__": 2, "__main__": 2, "mkdir": 2, "exist_ok": 2, "onc": [2, 4], "perform": [2, 3], "tabl": [2, 4], "upload": 2, "mario": 2, "luigi": 2, "peach": 2, "charact": 2, "upload_descriptor": 2, "_": 2, "close": 2, "abl": [2, 4], "retriev": [2, 4], "newli": 2, "total_record": 2, "size": [2, 4], "total_byt": 2, "read": [2, 3, 5], "to_panda": 2, "head": 2, "finish": 2, "drop": 2, "To": [2, 4], "confirm": 2, "current": 2, "exist": [2, 3, 4, 5], "improv": 2, "avoid": 2, "hold": 2, "entir": 2, "iter": [2, 4], "befor": [2, 4], "advantag": 2, "write": [2, 3], "increment": [2, 3], "open": 2, "wb": [2, 4], "sink": [2, 4], "parquetwrit": 2, "parquetfil": 2, "generatorstream": 2, "schema_arrow": 2, "iter_batch": 2, "ve": 2, "modifi": 2, "instead": [2, 4, 5], "batch": [2, 3, 4], "come": [2, 4], "ani": [2, 4], "record": [2, 3, 4], "u": [2, 4], "handl": [2, 4], "don": [2, 4], "while": [2, 4], "mean": [2, 3], "must": [2, 4], "call": [2, 4], "contrast": 2, "requir": [2, 4], "front": 2, "transfer": 2, "pure": 2, "give": 2, "spin": 2, "ll": 2, "had": 2, "num_batch": 2, "1024": 2, "rows_per_batch": 2, "4096": 2, "arrai": [2, 3], "int": 2, "write_batch": 2, "again": 2, "arriv": 2, "total_row": 2, "got": 2, "total": 2, "4194304": 2, "often": 2, "identifi": 2, "who": 2, "thei": [2, 5], "simplest": 2, "scheme": 2, "At": 2, "startup": 2, "itself": 2, "usernam": [2, 4], "author": 2, "token": 2, "futur": 2, "encrypt": 2, "channel": 2, "enabl": 2, "describ": 2, "http": 2, "basic": 2, "doe": 2, "rfc": 2, "7325": 2, "per": 2, "se": 2, "interfac": [2, 4], "demonstr": [2, 3], "below": 2, "minim": 2, "base64": 2, "secret": [2, 4], "echoserv": 2, "just": [2, 4], "echo": 2, "doaction": 2, "basicauthservermiddlewarefactori": 2, "servermiddlewarefactori": 2, "middlewar": 2, "paramet": 2, "cred": 2, "str": 2, "accept": 2, "map": [2, 3], "bearer": 2, "start_cal": 2, "info": 2, "header": 2, "valid": 2, "credenti": [2, 4], "everi": 2, "search": [2, 3], "insensit": 2, "auth_head": 2, "lower": 2, "break": 2, "flightunauthenticatederror": 2, "No": 2, "suppli": 2, "authtyp": 2, "tokenvalu": 2, "g": 2, "random": [2, 4], "auth_typ": 2, "partit": [2, 3], "initi": 2, "login": 2, "same": [2, 4, 5], "auth": 2, "b64decod": 2, "unknown": 2, "invalid": 2, "token_urlsaf": 2, "32": 2, "basicauthservermiddlewar": 2, "elif": 2, "servermiddlewar": 2, "sending_head": 2, "noopauthhandl": 2, "serverauthhandl": 2, "handler": 2, "respond": 2, "handshak": 2, "rpc": 2, "authenticate_basic_token": 2, "otherwis": 2, "op": 2, "outgo": 2, "incom": 2, "is_valid": 2, "auth_handl": 2, "8816": 2, "test": [2, 3], "make": [2, 4], "log": 2, "token_pair": 2, "hello": 2, "world": 2, "flightcallopt": 2, "fail": [2, 5], "error": [2, 4], "try": [2, 4, 5], "except": [2, 5], "unauthent": 2, "runtimeerror": 2, "detail": [2, 4], "Or": 2, "wrong": 2, "scenario": 2, "traffic": 2, "manag": 2, "via": 2, "commun": 2, "layer": 2, "messag": 2, "achiev": 2, "certif": 2, "dure": 2, "develop": 2, "easiest": 2, "approach": 2, "sign": 2, "load": [2, 4], "public": 2, "privat": 2, "root": 2, "product": 2, "environ": 2, "recommend": 2, "dotnet": 2, "window": [2, 4], "openssl": 2, "linux": [2, 4], "maco": 2, "altern": 2, "repositori": 2, "depend": 2, "mai": 2, "crt": 2, "One": 2, "pleas": 2, "visit": 2, "ibm": 2, "articl": 2, "run": 2, "work": [2, 3], "argpars": 2, "host": 2, "localhost": 2, "tls_certif": 2, "verify_cli": 2, "root_certif": 2, "classmethod": 2, "descriptor_to_kei": 2, "descriptor_typ": 2, "command": 2, "tupl": 2, "main": 2, "parser": 2, "argumentpars": 2, "add_argu": 2, "narg": 2, "metavar": 2, "certfil": 2, "keyfil": 2, "arg": 2, "parse_arg": 2, "port": 2, "5005": 2, "rb": 2, "cert_fil": 2, "tls_cert_chain": 2, "key_fil": 2, "tls_private_kei": 2, "append": [2, 3], "format": [2, 4], "push": 2, "assum": 2, "object": [2, 3, 4, 5], "datafram": 2, "push_to_serv": 2, "object_to_send": 2, "from_panda": 2, "help": 2, "trust": 2, "tls_root": 2, "root_cert": 2, "tls_root_cert": 2, "flightclient": 2, "anim": 2, "dog": 2, "cat": 2, "mous": 2, "big": [2, 4], "small": 2, "tini": 2, "df": 2, "animaldata": 2, "script": 2, "out": [2, 4], "distribut": 2, "collect": [2, 3], "level": 2, "measur": 2, "order": 2, "correl": 2, "span": 2, "manual": [2, 4, 5], "automat": [2, 5], "show": 2, "accomplish": 2, "inject": 2, "extract": 2, "side": 2, "defin": [2, 5], "statu": 2, "statuscod": 2, "clienttracingmiddlewarefactori": 2, "clientmiddlewarefactori": 2, "_tracer": 2, "get_trac": 2, "start_span": 2, "clienttracingmiddlewar": 2, "clientmiddlewar": 2, "_span": 2, "ctx": 2, "set_span_in_context": 2, "carrier": 2, "call_complet": 2, "record_except": 2, "set_statu": 2, "ok": 2, "servertracingmiddlewarefactori": 2, "servertracingmiddlewar": 2, "configur": 2, "export": 2, "processor": 2, "both": [2, 4], "sdk": 2, "somewher": 2, "sake": 2, "normal": [2, 4], "jaeger": 2, "part": [2, 4], "resourc": 2, "minimum": 2, "hostnam": 2, "process": 2, "id": [2, 4], "version": 2, "system": [2, 5], "tracerprovid": 2, "simplespanprocessor": 2, "service_nam": 2, "spanexport": 2, "spanexportresult": 2, "testspanexport": 2, "success": 2, "configure_trac": 2, "backend": 2, "although": 2, "necessari": [2, 5], "consol": 2, "good": 2, "anywai": 2, "attribut": 2, "my": 2, "add_span_processor": 2, "set_tracer_provid": 2, "earlier": 2, "within": [2, 4], "activ": 2, "pick": 2, "tracer": 2, "start_as_current_span": 2, "hello_world": 2, "drain": 2, "There": 2, "n": [2, 4], "status_cod": 2, "flightmethod": 2, "unset": 2, "three": 2, "solv": 3, "task": 3, "user": [3, 4], "robust": 3, "well": 3, "solut": 3, "parquet": 3, "subset": 3, "disk": 3, "csv": 3, "s3": 3, "feather": 3, "line": 3, "delimit": 3, "json": 3, "compress": 3, "plain": 3, "categor": 3, "merg": 3, "manipul": 3, "comput": 3, "min": 3, "max": 3, "count": 3, "occurr": 3, "element": 3, "appli": [3, 5], "arithmet": 3, "replac": 3, "group": [3, 5], "sort": [3, 4], "match": 3, "predic": 3, "filter": [3, 4], "flight": 3, "simpl": 3, "storag": 3, "servic": 3, "stream": 3, "authent": 3, "password": 3, "secur": 3, "connect": 3, "tl": 3, "propag": 3, "opentelemetri": 3, "trace": 3, "page": 3, "apach": 4, "written": 4, "pq": 4, "95": 4, "96": 4, "97": 4, "98": 4, "restrict": 4, "argument": 4, "project": 4, "refer": 4, "document": 4, "syntax": 4, "apart": 4, "dump": 4, "raw": 4, "direct": 4, "ipc": 4, "num": 4, "osfil": 4, "arraydata": 4, "new_fil": 4, "were": 4, "adapt": 4, "accordingli": 4, "memory_map": 4, "r": 4, "sourc": [4, 5], "loaded_arrai": 4, "open_fil": 4, "It": 4, "write_csv": 4, "write_opt": 4, "writeopt": 4, "include_head": 4, "whole": 4, "csvwriter": 4, "int32": [4, 5], "datachunk": 4, "codepath": 4, "thread": 4, "read_csv": 4, "best": 4, "further": 4, "drive": 4, "convertopt": 4, "usual": 4, "sens": 4, "separ": [4, 5], "write_dataset": 4, "effort": 4, "birthdai": 4, "2000": 4, "2009": 4, "randint": 4, "month": 4, "x": 4, "int16": 4, "subdirectori": 4, "directori": 4, "localf": 4, "localfilesystem": 4, "partitioned_dir_cont": 4, "get_file_info": 4, "fileselector": 4, "recurs": 4, "filetyp": 4, "2001": 4, "2002": 4, "2003": 4, "2004": 4, "2005": 4, "2006": 4, "2007": 4, "2008": 4, "compos": 4, "piec": 4, "discov": 4, "dataset1": 4, "dataset2": 4, "dataset3": 4, "view": 4, "to_tabl": 4, "22": 4, "23": 4, "24": 4, "25": 4, "26": 4, "27": 4, "28": 4, "29": 4, "notic": 4, "forc": 4, "what": [4, 5], "reason": 4, "better": 4, "_name": 4, "abstract": 4, "remot": 4, "hdf": 4, "ursa": 4, "lab": 4, "taxi": 4, "2011": 4, "subtreefilesystem": 4, "s3filesystem": 4, "region": 4, "east": 4, "anonym": 4, "01": 4, "02": 4, "03": 4, "04": 4, "05": 4, "06": 4, "07": 4, "08": 4, "09": 4, "bucket": 4, "local": 4, "abov": 4, "throw": 4, "aw": 4, "instruct": 4, "access": 4, "mac": 4, "appropri": [4, 5], "aws_access_key_id": 4, "your_aws_access_key_id": 4, "aws_secret_access_kei": 4, "your_aws_secret_access_kei": 4, "ft": 4, "write_feath": 4, "builtin": 4, "tempfil": 4, "namedtemporaryfil": 4, "w": 4, "read_json": 4, "to_pydict": 4, "nativ": 4, "box": 4, "driven": 4, "lz4": 4, "snappi": 4, "compressedoutputstream": 4, "gz": 4, "gzip": 4, "decompress": 4, "done": [4, 5], "compressedinputstream": 4, "explain": 4, "next": 4, "applic": 4, "special": 4, "wrote": 4, "simpli": 4, "table_feath": 4, "table_parquet": 4, "involv": 4, "wrap": 4, "table_csv": 4, "smart": 4, "enough": 4, "detect": 4, "extens": 4, "bz2": 4, "table_csv2": 4, "howev": 5, "ensur": 5, "interoper": 5, "databas": 5, "warehous": 5, "chapter": 5, "chang": 5, "int8": 5, "detain": 5, "own": 5, "union": 5, "float64": 5, "far": 5, "compat": 5, "schema_int32": 5, "unifi": 5, "superset": 5, "first_schema": 5, "countri": 5, "popul": 5, "second_schema": 5, "country_cod": 5, "languag": 5, "unify_schema": 5, "union_schema": 5, "overlap": 5, "still": 5, "collid": 5, "retain": 5, "third_schema": 5, "lat": 5, "float32": 5, "long": 5, "float": 5, "diverg": 5, "numer": 5, "unabl": 5, "becaus": 5, "declar": 5, "arrowinvalid": 5, "arrowtypeerror": 5, "incompat": 5, "v": 5}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"creat": 0, "arrow": [0, 2, 3, 4, 5], "object": 0, "content": [0, 1, 2, 3, 4, 5], "arrai": [0, 1, 4, 5], "tabl": [0, 1, 3, 5], "from": [0, 4], "plain": 0, "type": [0, 5], "record": 0, "batch": 0, "store": 0, "categor": 0, "data": [0, 1, 4, 5], "manipul": 1, "comput": 1, "mean": 1, "min": 1, "max": 1, "valu": 1, "an": [1, 5], "count": 1, "occurr": 1, "element": 1, "appli": 1, "arithmet": 1, "function": 1, "append": 1, "exist": 1, "ad": 1, "column": 1, "replac": 1, "group": 1, "sort": 1, "search": 1, "match": 1, "predic": 1, "filter": 1, "us": 1, "mask": 1, "flight": 2, "simpl": 2, "parquet": [2, 4], "storag": 2, "servic": 2, "stream": 2, "authent": 2, "user": 2, "password": 2, "secur": 2, "connect": 2, "tl": 2, "propag": 2, "opentelemetri": 2, "trace": 2, "apach": 3, "python": 3, "cookbook": 3, "indic": 3, "read": 4, "write": 4, "file": 4, "subset": 4, "save": 4, "disk": 4, "memori": 4, "map": 4, "csv": 4, "increment": 4, "partit": 4, "dataset": 4, "s3": 4, "feather": 4, "line": 4, "delimit": 4, "json": 4, "compress": 4, "work": 5, "schema": 5, "set": 5, "merg": 5, "multipl": 5}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Reading and Writing Data": [[4, "reading-and-writing-data"]], "Contents": [[4, "contents"], [5, "contents"], [1, "contents"], [0, "contents"], [2, "contents"]], "Write a Parquet file": [[4, "write-a-parquet-file"]], "Reading a Parquet file": [[4, "reading-a-parquet-file"]], "Reading a subset of Parquet data": [[4, "reading-a-subset-of-parquet-data"]], "Saving Arrow Arrays to disk": [[4, "saving-arrow-arrays-to-disk"]], "Memory Mapping Arrow Arrays from disk": [[4, "memory-mapping-arrow-arrays-from-disk"]], "Writing CSV files": [[4, "writing-csv-files"]], "Writing CSV files incrementally": [[4, "writing-csv-files-incrementally"]], "Reading CSV files": [[4, "reading-csv-files"]], "Writing Partitioned Datasets": [[4, "writing-partitioned-datasets"]], "Reading Partitioned data": [[4, "reading-partitioned-data"]], "Reading Partitioned Data from S3": [[4, "reading-partitioned-data-from-s3"]], "Write a Feather file": [[4, "write-a-feather-file"]], "Reading a Feather file": [[4, "reading-a-feather-file"]], "Reading Line Delimited JSON": [[4, "reading-line-delimited-json"]], "Writing Compressed Data": [[4, "writing-compressed-data"]], "Reading Compressed Data": [[4, "reading-compressed-data"]], "Apache Arrow Python Cookbook": [[3, "apache-arrow-python-cookbook"]], "Contents:": [[3, null]], "Indices and tables": [[3, "indices-and-tables"]], "Working with Schema": [[5, "working-with-schema"]], "Setting the data type of an Arrow Array": [[5, "setting-the-data-type-of-an-arrow-array"]], "Setting the schema of a Table": [[5, "setting-the-schema-of-a-table"]], "Merging multiple schemas": [[5, "merging-multiple-schemas"]], "Data Manipulation": [[1, "data-manipulation"]], "Computing Mean/Min/Max values of an array": [[1, "computing-mean-min-max-values-of-an-array"]], "Counting Occurrences of Elements": [[1, "counting-occurrences-of-elements"]], "Applying arithmetic functions to arrays.": [[1, "applying-arithmetic-functions-to-arrays"]], "Appending tables to an existing table": [[1, "appending-tables-to-an-existing-table"]], "Adding a column to an existing Table": [[1, "adding-a-column-to-an-existing-table"]], "Replacing a column in an existing Table": [[1, "replacing-a-column-in-an-existing-table"]], "Group a Table": [[1, "group-a-table"]], "Sort a Table": [[1, "sort-a-table"]], "Searching for values matching a predicate in Arrays": [[1, "searching-for-values-matching-a-predicate-in-arrays"]], "Filtering Arrays using a mask": [[1, "filtering-arrays-using-a-mask"]], "Creating Arrow Objects": [[0, "creating-arrow-objects"]], "Creating Arrays": [[0, "creating-arrays"]], "Creating Tables": [[0, "creating-tables"]], "Create Table from Plain Types": [[0, "create-table-from-plain-types"]], "Creating Record Batches": [[0, "creating-record-batches"]], "Store Categorical Data": [[0, "store-categorical-data"]], "Arrow Flight": [[2, "arrow-flight"]], "Simple Parquet storage service with Arrow Flight": [[2, "simple-parquet-storage-service-with-arrow-flight"]], "Streaming Parquet Storage Service": [[2, "streaming-parquet-storage-service"]], "Authentication with user/password": [[2, "authentication-with-user-password"]], "Securing connections with TLS": [[2, "securing-connections-with-tls"]], "Propagating OpenTelemetry Traces": [[2, "propagating-opentelemetry-traces"]]}, "indexentries": {}})
\ No newline at end of file
diff --git a/r/404.html b/r/404.html
new file mode 100644
index 0000000..0ee72a2
--- /dev/null
+++ b/r/404.html
@@ -0,0 +1,476 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>Page not found | Apache Arrow R Cookbook</title>
+  <meta name="description" content="Page not found | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="Page not found | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="Page not found | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+
+
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="page-not-found" class="section level1">
+<h1>Page not found</h1>
+<p>The page you requested cannot be found (perhaps it was moved or renamed).</p>
+<p>You may want to try searching to find the page's new location, or use
+the table of contents to find the page you are looking for.</p>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+
+
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/%s",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/creating-arrow-objects.html b/r/creating-arrow-objects.html
new file mode 100644
index 0000000..a85a222
--- /dev/null
+++ b/r/creating-arrow-objects.html
@@ -0,0 +1,563 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>4 Creating Arrow Objects | Apache Arrow R Cookbook</title>
+  <meta name="description" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="4 Creating Arrow Objects | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="reading-and-writing-data---multiple-files.html"/>
+<link rel="next" href="defining-data-types.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="creating-arrow-objects" class="section level1 hasAnchor" number="4">
+<h1><span class="header-section-number">4</span> Creating Arrow Objects<a href="creating-arrow-objects.html#creating-arrow-objects" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="create-an-arrow-array-from-an-r-object" class="section level2 hasAnchor" number="4.1">
+<h2><span class="header-section-number">4.1</span> Create an Arrow Array from an R object<a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing vector in R to an Arrow Array object.</p>
+<div id="solution-25" class="section level3 hasAnchor" number="4.1.1">
+<h3><span class="header-section-number">4.1.1</span> Solution<a href="creating-arrow-objects.html#solution-25" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb63"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb63-1"><a href="creating-arrow-objects.html#cb63-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create an example vector</span></span>
+<span id="cb63-2"><a href="creating-arrow-objects.html#cb63-2" aria-hidden="true" tabindex="-1"></a>score <span class="ot">=</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)</span>
+<span id="cb63-3"><a href="creating-arrow-objects.html#cb63-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb63-4"><a href="creating-arrow-objects.html#cb63-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Convert to Arrow Array</span></span>
+<span id="cb63-5"><a href="creating-arrow-objects.html#cb63-5" aria-hidden="true" tabindex="-1"></a>score_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(score)</span>
+<span id="cb63-6"><a href="creating-arrow-objects.html#cb63-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb63-7"><a href="creating-arrow-objects.html#cb63-7" aria-hidden="true" tabindex="-1"></a><span class="co"># View Array</span></span>
+<span id="cb63-8"><a href="creating-arrow-objects.html#cb63-8" aria-hidden="true" tabindex="-1"></a>score_array</span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   99,
+##   97,
+##   99
+## ]</code></pre>
+</div>
+</div>
+<div id="create-a-arrow-table-from-an-r-object" class="section level2 hasAnchor" number="4.2">
+<h2><span class="header-section-number">4.2</span> Create a Arrow Table from an R object<a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing data frame in R to an Arrow Table object.</p>
+<div id="solution-26" class="section level3 hasAnchor" number="4.2.1">
+<h3><span class="header-section-number">4.2.1</span> Solution<a href="creating-arrow-objects.html#solution-26" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb65"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb65-1"><a href="creating-arrow-objects.html#cb65-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create an example data frame</span></span>
+<span id="cb65-2"><a href="creating-arrow-objects.html#cb65-2" aria-hidden="true" tabindex="-1"></a>my_tibble <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>))</span>
+<span id="cb65-3"><a href="creating-arrow-objects.html#cb65-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Convert to Arrow Table</span></span>
+<span id="cb65-4"><a href="creating-arrow-objects.html#cb65-4" aria-hidden="true" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(my_tibble)</span>
+<span id="cb65-5"><a href="creating-arrow-objects.html#cb65-5" aria-hidden="true" tabindex="-1"></a><span class="co"># View table</span></span>
+<span id="cb65-6"><a href="creating-arrow-objects.html#cb65-6" aria-hidden="true" tabindex="-1"></a>my_table</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+</div>
+</div>
+<div id="view-the-contents-of-an-arrow-table-or-recordbatch" class="section level2 hasAnchor" number="4.3">
+<h2><span class="header-section-number">4.3</span> View the contents of an Arrow Table or RecordBatch<a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to view the contents of an Arrow Table or RecordBatch.</p>
+<div id="solution-27" class="section level3 hasAnchor" number="4.3.1">
+<h3><span class="header-section-number">4.3.1</span> Solution<a href="creating-arrow-objects.html#solution-27" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb67"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb67-1"><a href="creating-arrow-objects.html#cb67-1" aria-hidden="true" tabindex="-1"></a><span class="co"># View Table</span></span>
+<span id="cb67-2"><a href="creating-arrow-objects.html#cb67-2" aria-hidden="true" tabindex="-1"></a>dplyr<span class="sc">::</span><span class="fu">collect</span>(my_table)</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 2
+##   group score
+##   &lt;chr&gt; &lt;dbl&gt;
+## 1 A        99
+## 2 B        97
+## 3 C        99</code></pre>
+</div>
+</div>
+<div id="manually-create-a-recordbatch-from-an-r-object." class="section level2 hasAnchor" number="4.4">
+<h2><span class="header-section-number">4.4</span> Manually create a RecordBatch from an R object.<a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object." class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing data frame in R to an Arrow RecordBatch object.</p>
+<div id="solution-28" class="section level3 hasAnchor" number="4.4.1">
+<h3><span class="header-section-number">4.4.1</span> Solution<a href="creating-arrow-objects.html#solution-28" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb69"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb69-1"><a href="creating-arrow-objects.html#cb69-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create an example data frame</span></span>
+<span id="cb69-2"><a href="creating-arrow-objects.html#cb69-2" aria-hidden="true" tabindex="-1"></a>my_tibble <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>))</span>
+<span id="cb69-3"><a href="creating-arrow-objects.html#cb69-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Convert to Arrow RecordBatch</span></span>
+<span id="cb69-4"><a href="creating-arrow-objects.html#cb69-4" aria-hidden="true" tabindex="-1"></a>my_record_batch <span class="ot">&lt;-</span> <span class="fu">record_batch</span>(my_tibble)</span>
+<span id="cb69-5"><a href="creating-arrow-objects.html#cb69-5" aria-hidden="true" tabindex="-1"></a><span class="co"># View RecordBatch</span></span>
+<span id="cb69-6"><a href="creating-arrow-objects.html#cb69-6" aria-hidden="true" tabindex="-1"></a>my_record_batch</span></code></pre></div>
+<pre><code>## RecordBatch
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="reading-and-writing-data---multiple-files.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="defining-data-types.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/creating_arrow_objects.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/defining-data-types.html b/r/defining-data-types.html
new file mode 100644
index 0000000..f3d54cb
--- /dev/null
+++ b/r/defining-data-types.html
@@ -0,0 +1,644 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>5 Defining Data Types | Apache Arrow R Cookbook</title>
+  <meta name="description" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="5 Defining Data Types | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="creating-arrow-objects.html"/>
+<link rel="next" href="manipulating-data---arrays.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="defining-data-types" class="section level1 hasAnchor" number="5">
+<h1><span class="header-section-number">5</span> Defining Data Types<a href="defining-data-types.html#defining-data-types" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-2" class="section level2 hasAnchor" number="5.1">
+<h2><span class="header-section-number">5.1</span> Introduction<a href="defining-data-types.html#introduction-2" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>As discussed in previous chapters, Arrow automatically infers the most
+appropriate data type when reading in data or converting R objects to Arrow
+objects. However, you might want to manually tell Arrow which data types to
+use, for example, to ensure interoperability with databases and data warehouse
+systems. This chapter includes recipes for:</p>
+<ul>
+<li>changing the data types of existing Arrow objects</li>
+<li>defining data types during the process of creating Arrow objects</li>
+</ul>
+<p>A table showing the default mappings between R and Arrow data types can be found
+in <a href="https://arrow.apache.org/docs/r/articles/arrow.html#r-to-arrow">R data type to Arrow data type mappings</a>.</p>
+<p>A table containing Arrow data types, and their R equivalents can be found in
+<a href="https://arrow.apache.org/docs/r/articles/arrow.html#arrow-to-r">Arrow data type to R data type mapping</a>.</p>
+</div>
+<div id="update-data-type-of-an-existing-arrow-array" class="section level2 hasAnchor" number="5.2">
+<h2><span class="header-section-number">5.2</span> Update data type of an existing Arrow Array<a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to change the data type of an existing Arrow Array.</p>
+<div id="solution-29" class="section level3 hasAnchor" number="5.2.1">
+<h3><span class="header-section-number">5.2.1</span> Solution<a href="defining-data-types.html#solution-29" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb71"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb71-1"><a href="defining-data-types.html#cb71-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create an Array to cast</span></span>
+<span id="cb71-2"><a href="defining-data-types.html#cb71-2" aria-hidden="true" tabindex="-1"></a>integer_arr <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>)</span>
+<span id="cb71-3"><a href="defining-data-types.html#cb71-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb71-4"><a href="defining-data-types.html#cb71-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Cast to an unsigned int8 type</span></span>
+<span id="cb71-5"><a href="defining-data-types.html#cb71-5" aria-hidden="true" tabindex="-1"></a>uint_arr <span class="ot">&lt;-</span> integer_arr<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_type =</span> <span class="fu">uint8</span>())</span>
+<span id="cb71-6"><a href="defining-data-types.html#cb71-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb71-7"><a href="defining-data-types.html#cb71-7" aria-hidden="true" tabindex="-1"></a>uint_arr</span></code></pre></div>
+<pre><code>## Array
+## &lt;uint8&gt;
+## [
+##   1,
+##   2,
+##   3,
+##   4,
+##   5
+## ]</code></pre>
+</div>
+<div id="discussion-10" class="section level3 hasAnchor" number="5.2.2">
+<h3><span class="header-section-number">5.2.2</span> Discussion<a href="defining-data-types.html#discussion-10" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>There are some data types which are not compatible with each other. Errors will
+occur if you try to cast between incompatible data types.</p>
+<div class="sourceCode" id="cb73"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb73-1"><a href="defining-data-types.html#cb73-1" aria-hidden="true" tabindex="-1"></a>int_arr <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>)</span>
+<span id="cb73-2"><a href="defining-data-types.html#cb73-2" aria-hidden="true" tabindex="-1"></a>int_arr<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_type =</span> <span class="fu">binary</span>())</span></code></pre></div>
+<div class="sourceCode" id="cb74"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb74-1"><a href="defining-data-types.html#cb74-1" aria-hidden="true" tabindex="-1"></a><span class="do">## Error: NotImplemented: Unsupported cast from int32 to binary using function cast_binary</span></span></code></pre></div>
+</div>
+</div>
+<div id="update-data-type-of-a-field-in-an-existing-arrow-table" class="section level2 hasAnchor" number="5.3">
+<h2><span class="header-section-number">5.3</span> Update data type of a field in an existing Arrow Table<a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to change the type of one or more fields in an existing Arrow Table.</p>
+<div id="solution-30" class="section level3 hasAnchor" number="5.3.1">
+<h3><span class="header-section-number">5.3.1</span> Solution<a href="defining-data-types.html#solution-30" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb75"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb75-1"><a href="defining-data-types.html#cb75-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb75-2"><a href="defining-data-types.html#cb75-2" aria-hidden="true" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb75-3"><a href="defining-data-types.html#cb75-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb75-4"><a href="defining-data-types.html#cb75-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb75-5"><a href="defining-data-types.html#cb75-5" aria-hidden="true" tabindex="-1"></a>)</span>
+<span id="cb75-6"><a href="defining-data-types.html#cb75-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb75-7"><a href="defining-data-types.html#cb75-7" aria-hidden="true" tabindex="-1"></a><span class="co"># Convert tibble to an Arrow table</span></span>
+<span id="cb75-8"><a href="defining-data-types.html#cb75-8" aria-hidden="true" tabindex="-1"></a>oscars_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars)</span>
+<span id="cb75-9"><a href="defining-data-types.html#cb75-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb75-10"><a href="defining-data-types.html#cb75-10" aria-hidden="true" tabindex="-1"></a><span class="co"># The default mapping from numeric column &quot;num_awards&quot; is to a double</span></span>
+<span id="cb75-11"><a href="defining-data-types.html#cb75-11" aria-hidden="true" tabindex="-1"></a>oscars_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;double&gt;</code></pre>
+<div class="sourceCode" id="cb77"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb77-1"><a href="defining-data-types.html#cb77-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb77-2"><a href="defining-data-types.html#cb77-2" aria-hidden="true" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb77-3"><a href="defining-data-types.html#cb77-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb77-4"><a href="defining-data-types.html#cb77-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Cast to an int16</span></span>
+<span id="cb77-5"><a href="defining-data-types.html#cb77-5" aria-hidden="true" tabindex="-1"></a>oscars_arrow_int <span class="ot">&lt;-</span> oscars_arrow<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_schema =</span> oscars_schema)</span>
+<span id="cb77-6"><a href="defining-data-types.html#cb77-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb77-7"><a href="defining-data-types.html#cb77-7" aria-hidden="true" tabindex="-1"></a>oscars_arrow_int</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;int16&gt;</code></pre>
+</div>
+<div id="no-compat-type" class="section level3 hasAnchor" number="5.3.2">
+<h3><span class="header-section-number">5.3.2</span> Discussion<a href="defining-data-types.html#no-compat-type" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>There are some Arrow data types which do not have any R equivalent. Attempting
+to cast to these data types or using a schema which contains them will result in
+an error.</p>
+<div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb79-1"><a href="defining-data-types.html#cb79-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb79-2"><a href="defining-data-types.html#cb79-2" aria-hidden="true" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb79-3"><a href="defining-data-types.html#cb79-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb79-4"><a href="defining-data-types.html#cb79-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb79-5"><a href="defining-data-types.html#cb79-5" aria-hidden="true" tabindex="-1"></a>)</span>
+<span id="cb79-6"><a href="defining-data-types.html#cb79-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb79-7"><a href="defining-data-types.html#cb79-7" aria-hidden="true" tabindex="-1"></a><span class="co"># Convert tibble to an Arrow table</span></span>
+<span id="cb79-8"><a href="defining-data-types.html#cb79-8" aria-hidden="true" tabindex="-1"></a>oscars_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars)</span>
+<span id="cb79-9"><a href="defining-data-types.html#cb79-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb79-10"><a href="defining-data-types.html#cb79-10" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as float16 which doesn&#39;t have an R equivalent</span></span>
+<span id="cb79-11"><a href="defining-data-types.html#cb79-11" aria-hidden="true" tabindex="-1"></a>oscars_schema_invalid <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">float16</span>())</span>
+<span id="cb79-12"><a href="defining-data-types.html#cb79-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb79-13"><a href="defining-data-types.html#cb79-13" aria-hidden="true" tabindex="-1"></a><span class="co"># The default mapping from numeric column &quot;num_awards&quot; is to a double</span></span>
+<span id="cb79-14"><a href="defining-data-types.html#cb79-14" aria-hidden="true" tabindex="-1"></a>oscars_arrow<span class="sc">$</span><span class="fu">cast</span>(<span class="at">target_schema =</span> oscars_schema_invalid)</span></code></pre></div>
+<div class="sourceCode" id="cb80"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb80-1"><a href="defining-data-types.html#cb80-1" aria-hidden="true" tabindex="-1"></a><span class="do">## Error: NotImplemented: Unsupported cast from double to halffloat using function cast_half_float</span></span></code></pre></div>
+</div>
+</div>
+<div id="specify-data-types-when-creating-an-arrow-table-from-an-r-object" class="section level2 hasAnchor" number="5.4">
+<h2><span class="header-section-number">5.4</span> Specify data types when creating an Arrow table from an R object<a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to manually specify Arrow data types when converting an object from a
+data frame to an Arrow object.</p>
+<div id="solution-31" class="section level3 hasAnchor" number="5.4.1">
+<h3><span class="header-section-number">5.4.1</span> Solution<a href="defining-data-types.html#solution-31" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb81"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb81-1"><a href="defining-data-types.html#cb81-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb81-2"><a href="defining-data-types.html#cb81-2" aria-hidden="true" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb81-3"><a href="defining-data-types.html#cb81-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb81-4"><a href="defining-data-types.html#cb81-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb81-5"><a href="defining-data-types.html#cb81-5" aria-hidden="true" tabindex="-1"></a>)</span>
+<span id="cb81-6"><a href="defining-data-types.html#cb81-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb81-7"><a href="defining-data-types.html#cb81-7" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb81-8"><a href="defining-data-types.html#cb81-8" aria-hidden="true" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb81-9"><a href="defining-data-types.html#cb81-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb81-10"><a href="defining-data-types.html#cb81-10" aria-hidden="true" tabindex="-1"></a><span class="co"># create arrow Table containing data and schema</span></span>
+<span id="cb81-11"><a href="defining-data-types.html#cb81-11" aria-hidden="true" tabindex="-1"></a>oscars_data_arrow <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(oscars, <span class="at">schema =</span> oscars_schema)</span>
+<span id="cb81-12"><a href="defining-data-types.html#cb81-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb81-13"><a href="defining-data-types.html#cb81-13" aria-hidden="true" tabindex="-1"></a>oscars_data_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $actor &lt;string&gt;
+## $num_awards &lt;int16&gt;</code></pre>
+</div>
+</div>
+<div id="specify-data-types-when-reading-in-files" class="section level2 hasAnchor" number="5.5">
+<h2><span class="header-section-number">5.5</span> Specify data types when reading in files<a href="defining-data-types.html#specify-data-types-when-reading-in-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to manually specify Arrow data types when reading in files.</p>
+<div id="solution-32" class="section level3 hasAnchor" number="5.5.1">
+<h3><span class="header-section-number">5.5.1</span> Solution<a href="defining-data-types.html#solution-32" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb83"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb83-1"><a href="defining-data-types.html#cb83-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up a tibble to use in this example</span></span>
+<span id="cb83-2"><a href="defining-data-types.html#cb83-2" aria-hidden="true" tabindex="-1"></a>oscars <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(</span>
+<span id="cb83-3"><a href="defining-data-types.html#cb83-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">actor =</span> <span class="fu">c</span>(<span class="st">&quot;Katharine Hepburn&quot;</span>, <span class="st">&quot;Meryl Streep&quot;</span>, <span class="st">&quot;Jack Nicholson&quot;</span>),</span>
+<span id="cb83-4"><a href="defining-data-types.html#cb83-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">num_awards =</span> <span class="fu">c</span>(<span class="dv">4</span>, <span class="dv">3</span>, <span class="dv">3</span>)</span>
+<span id="cb83-5"><a href="defining-data-types.html#cb83-5" aria-hidden="true" tabindex="-1"></a>)</span>
+<span id="cb83-6"><a href="defining-data-types.html#cb83-6" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb83-7"><a href="defining-data-types.html#cb83-7" aria-hidden="true" tabindex="-1"></a><span class="co"># write dataset to disk</span></span>
+<span id="cb83-8"><a href="defining-data-types.html#cb83-8" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(oscars, <span class="at">path =</span> <span class="st">&quot;oscars_data&quot;</span>)</span>
+<span id="cb83-9"><a href="defining-data-types.html#cb83-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb83-10"><a href="defining-data-types.html#cb83-10" aria-hidden="true" tabindex="-1"></a><span class="co"># Set up schema with &quot;num_awards&quot; as integer</span></span>
+<span id="cb83-11"><a href="defining-data-types.html#cb83-11" aria-hidden="true" tabindex="-1"></a>oscars_schema <span class="ot">&lt;-</span> <span class="fu">schema</span>(<span class="at">actor =</span> <span class="fu">string</span>(), <span class="at">num_awards =</span> <span class="fu">int16</span>())</span>
+<span id="cb83-12"><a href="defining-data-types.html#cb83-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb83-13"><a href="defining-data-types.html#cb83-13" aria-hidden="true" tabindex="-1"></a><span class="co"># read the dataset in, using the schema instead of inferring the type automatically</span></span>
+<span id="cb83-14"><a href="defining-data-types.html#cb83-14" aria-hidden="true" tabindex="-1"></a>oscars_dataset_arrow <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(<span class="st">&quot;oscars_data&quot;</span>, <span class="at">schema =</span> oscars_schema)</span>
+<span id="cb83-15"><a href="defining-data-types.html#cb83-15" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb83-16"><a href="defining-data-types.html#cb83-16" aria-hidden="true" tabindex="-1"></a>oscars_dataset_arrow</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 Parquet file
+## actor: string
+## num_awards: int16</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="creating-arrow-objects.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="manipulating-data---arrays.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/specify_data_types_and_schemas.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/flight.html b/r/flight.html
new file mode 100644
index 0000000..f17d04b
--- /dev/null
+++ b/r/flight.html
@@ -0,0 +1,560 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>9 Flight | Apache Arrow R Cookbook</title>
+  <meta name="description" content="9 Flight | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="9 Flight | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="9 Flight | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="using-pyarrow-from-r.html"/>
+
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="flight" class="section level1 hasAnchor" number="9">
+<h1><span class="header-section-number">9</span> Flight<a href="flight.html#flight" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-6" class="section level2 hasAnchor" number="9.1">
+<h2><span class="header-section-number">9.1</span> Introduction<a href="flight.html#introduction-6" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>Flight is a general-purpose client-server framework for high performance
+transport of large datasets over network interfaces, built as part of the
+Apache Arrow project.</p>
+<p>Flight allows for highly efficient data transfer as it:</p>
+<ul>
+<li>removes the need for serialization during data transfer</li>
+<li>allows for parallel data streaming</li>
+<li>is highly optimized to take advantage of Arrow’s columnar format.</li>
+</ul>
+<p>The arrow package provides methods for connecting to Flight RPC servers to send
+and receive data.</p>
+<p>It should be noted that the Flight implementation in the R package depends on
+<a href="https://arrow.apache.org/docs/python/">PyArrow</a> which is called via
+<a href="https://rstudio.github.io/reticulate/">reticulate</a>. This is quite different
+from the other capabilities in the R package, nearly all of which are all
+implemented directly.</p>
+</div>
+<div id="connect-to-a-flight-server" class="section level2 hasAnchor" number="9.2">
+<h2><span class="header-section-number">9.2</span> Connect to a Flight server<a href="flight.html#connect-to-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to connect to a Flight server running on a specified host and port.</p>
+<div id="solution-44" class="section level3 hasAnchor" number="9.2.1">
+<h3><span class="header-section-number">9.2.1</span> Solution<a href="flight.html#solution-44" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb133"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb133-1"><a href="flight.html#cb133-1" aria-hidden="true" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span></code></pre></div>
+</div>
+<div id="see-also-4" class="section level3 hasAnchor" number="9.2.2">
+<h3><span class="header-section-number">9.2.2</span> See also<a href="flight.html#see-also-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For an example of how to set up a Flight server from R, see
+<a href="https://arrow.apache.org/docs/r/articles/flight.html">the Flight vignette</a>.</p>
+</div>
+</div>
+<div id="send-data-to-a-flight-server" class="section level2 hasAnchor" number="9.3">
+<h2><span class="header-section-number">9.3</span> Send data to a Flight server<a href="flight.html#send-data-to-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to send data that you have in memory to a Flight server</p>
+<div id="solution-45" class="section level3 hasAnchor" number="9.3.1">
+<h3><span class="header-section-number">9.3.1</span> Solution<a href="flight.html#solution-45" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb134"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb134-1"><a href="flight.html#cb134-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb134-2"><a href="flight.html#cb134-2" aria-hidden="true" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb134-3"><a href="flight.html#cb134-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb134-4"><a href="flight.html#cb134-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Send the data</span></span>
+<span id="cb134-5"><a href="flight.html#cb134-5" aria-hidden="true" tabindex="-1"></a><span class="fu">flight_put</span>(</span>
+<span id="cb134-6"><a href="flight.html#cb134-6" aria-hidden="true" tabindex="-1"></a>  local_client,</span>
+<span id="cb134-7"><a href="flight.html#cb134-7" aria-hidden="true" tabindex="-1"></a>  <span class="at">data =</span> airquality,</span>
+<span id="cb134-8"><a href="flight.html#cb134-8" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;pollution_data&quot;</span></span>
+<span id="cb134-9"><a href="flight.html#cb134-9" aria-hidden="true" tabindex="-1"></a>)</span></code></pre></div>
+</div>
+</div>
+<div id="check-what-resources-exist-on-a-flight-server" class="section level2 hasAnchor" number="9.4">
+<h2><span class="header-section-number">9.4</span> Check what resources exist on a Flight server<a href="flight.html#check-what-resources-exist-on-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to see what paths are available on a Flight server.</p>
+<div id="solution-46" class="section level3 hasAnchor" number="9.4.1">
+<h3><span class="header-section-number">9.4.1</span> Solution<a href="flight.html#solution-46" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb135"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb135-1"><a href="flight.html#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb135-2"><a href="flight.html#cb135-2" aria-hidden="true" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb135-3"><a href="flight.html#cb135-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb135-4"><a href="flight.html#cb135-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Retrieve path listing</span></span>
+<span id="cb135-5"><a href="flight.html#cb135-5" aria-hidden="true" tabindex="-1"></a><span class="fu">list_flights</span>(local_client)</span></code></pre></div>
+<div class="sourceCode" id="cb136"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb136-1"><a href="flight.html#cb136-1" aria-hidden="true" tabindex="-1"></a><span class="co"># [1] &quot;pollution_data&quot;</span></span></code></pre></div>
+</div>
+</div>
+<div id="retrieve-data-from-a-flight-server" class="section level2 hasAnchor" number="9.5">
+<h2><span class="header-section-number">9.5</span> Retrieve data from a Flight server<a href="flight.html#retrieve-data-from-a-flight-server" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to retrieve data on a Flight server from a specified path.</p>
+<div id="solution-47" class="section level3 hasAnchor" number="9.5.1">
+<h3><span class="header-section-number">9.5.1</span> Solution<a href="flight.html#solution-47" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb137"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb137-1"><a href="flight.html#cb137-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Connect to the Flight server</span></span>
+<span id="cb137-2"><a href="flight.html#cb137-2" aria-hidden="true" tabindex="-1"></a>local_client <span class="ot">&lt;-</span> <span class="fu">flight_connect</span>(<span class="at">host =</span> <span class="st">&quot;127.0.0.1&quot;</span>, <span class="at">port =</span> <span class="dv">8089</span>)</span>
+<span id="cb137-3"><a href="flight.html#cb137-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb137-4"><a href="flight.html#cb137-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Retrieve data</span></span>
+<span id="cb137-5"><a href="flight.html#cb137-5" aria-hidden="true" tabindex="-1"></a><span class="fu">flight_get</span>(</span>
+<span id="cb137-6"><a href="flight.html#cb137-6" aria-hidden="true" tabindex="-1"></a>  local_client,</span>
+<span id="cb137-7"><a href="flight.html#cb137-7" aria-hidden="true" tabindex="-1"></a>  <span class="st">&quot;pollution_data&quot;</span></span>
+<span id="cb137-8"><a href="flight.html#cb137-8" aria-hidden="true" tabindex="-1"></a>)</span></code></pre></div>
+<div class="sourceCode" id="cb138"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb138-1"><a href="flight.html#cb138-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Table</span></span>
+<span id="cb138-2"><a href="flight.html#cb138-2" aria-hidden="true" tabindex="-1"></a><span class="co"># 153 rows x 6 columns</span></span>
+<span id="cb138-3"><a href="flight.html#cb138-3" aria-hidden="true" tabindex="-1"></a><span class="co"># $Ozone &lt;int32&gt;</span></span>
+<span id="cb138-4"><a href="flight.html#cb138-4" aria-hidden="true" tabindex="-1"></a><span class="co"># $Solar.R &lt;int32&gt;</span></span>
+<span id="cb138-5"><a href="flight.html#cb138-5" aria-hidden="true" tabindex="-1"></a><span class="co"># $Wind &lt;double&gt;</span></span>
+<span id="cb138-6"><a href="flight.html#cb138-6" aria-hidden="true" tabindex="-1"></a><span class="co"># $Temp &lt;int32&gt;</span></span>
+<span id="cb138-7"><a href="flight.html#cb138-7" aria-hidden="true" tabindex="-1"></a><span class="co"># $Month &lt;int32&gt;</span></span>
+<span id="cb138-8"><a href="flight.html#cb138-8" aria-hidden="true" tabindex="-1"></a><span class="co"># $Day &lt;int32&gt;</span></span>
+<span id="cb138-9"><a href="flight.html#cb138-9" aria-hidden="true" tabindex="-1"></a><span class="co"># </span></span>
+<span id="cb138-10"><a href="flight.html#cb138-10" aria-hidden="true" tabindex="-1"></a><span class="co"># See $metadata for additional Schema metadata</span></span></code></pre></div>
+
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="using-pyarrow-from-r.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/flight.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/images/arrow.png b/r/images/arrow.png
new file mode 100644
index 0000000..72104b0
--- /dev/null
+++ b/r/images/arrow.png
Binary files differ
diff --git a/r/index.html b/r/index.html
new file mode 100644
index 0000000..f924f45
--- /dev/null
+++ b/r/index.html
@@ -0,0 +1,516 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>Apache Arrow R Cookbook</title>
+  <meta name="description" content="Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+
+<link rel="next" href="reading-and-writing-data---single-files.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="header">
+<h1 class="title">Apache Arrow R Cookbook</h1>
+</div>
+<div id="preface" class="section level1 hasAnchor" number="1">
+<h1><span class="header-section-number">1</span> Preface<a href="index.html#preface" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<p><img src="images/arrow.png" title="Apache Arrow logo" /></p>
+<p>This cookbook aims to provide a number of recipes showing how to perform common
+tasks using <a href="https://arrow.apache.org/docs/r/">arrow</a>. This version of the
+cookbook works with arrow &gt;= 6.0.0, but in future we will maintain different
+versions for the last few major R package releases.</p>
+<div id="what-is-arrow" class="section level2 hasAnchor" number="1.1">
+<h2><span class="header-section-number">1.1</span> What is Arrow?<a href="index.html#what-is-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>Apache Arrow is a cross-language development platform for in-memory analytics.<br />
+The arrow R package provides a low-level interface to much of the functionality
+available in the C++ implementation, as well as a higher-level interface to the
+compute functionality via an implementation of the <a href="https://dplyr.tidyverse.org/">dplyr</a> API.</p>
+</div>
+<div id="alternative-resources" class="section level2 hasAnchor" number="1.2">
+<h2><span class="header-section-number">1.2</span> Alternative resources<a href="index.html#alternative-resources" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>For a complete reference guide to the functions in arrow, as well as vignettes,
+see <a href="https://arrow.apache.org/docs/r/">the pkgdown site</a>.</p>
+<p>If you have any requests for new recipes, please open a ticket via
+<a href="https://github.com/apache/arrow-cookbook/issues">the cookbook’s GitHub Issues page</a>.</p>
+<p>If you have any Arrow feature requests to make or bugs to report, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a></p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+
+<a href="reading-and-writing-data---single-files.html" class="navigation navigation-next navigation-unique" aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/index.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css b/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css
new file mode 100644
index 0000000..b563ec9
--- /dev/null
+++ b/r/libs/anchor-sections-1.1.0/anchor-sections-hash.css
@@ -0,0 +1,2 @@
+/* Styles for section anchors */
+a.anchor-section::before {content: '#';font-size: 80%;}
diff --git a/r/libs/anchor-sections-1.1.0/anchor-sections.css b/r/libs/anchor-sections-1.1.0/anchor-sections.css
new file mode 100644
index 0000000..041905f
--- /dev/null
+++ b/r/libs/anchor-sections-1.1.0/anchor-sections.css
@@ -0,0 +1,4 @@
+/* Styles for section anchors */
+a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;}
+.hasAnchor:hover a.anchor-section {visibility: visible;}
+ul > li > .anchor-section {display: none;}
diff --git a/r/libs/anchor-sections-1.1.0/anchor-sections.js b/r/libs/anchor-sections-1.1.0/anchor-sections.js
new file mode 100644
index 0000000..fee005d
--- /dev/null
+++ b/r/libs/anchor-sections-1.1.0/anchor-sections.js
@@ -0,0 +1,11 @@
+document.addEventListener('DOMContentLoaded', function () {
+  // If section divs is used, we need to put the anchor in the child header
+  const headers = document.querySelectorAll("div.hasAnchor.section[class*='level'] > :first-child")
+
+  headers.forEach(function (x) {
+    // Add to the header node
+    if (!x.classList.contains('hasAnchor')) x.classList.add('hasAnchor')
+    // Remove from the section or div created by Pandoc
+    x.parentElement.classList.remove('hasAnchor')
+  })
+})
diff --git a/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf b/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf
new file mode 100644
index 0000000..35acda2
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/fontawesome/fontawesome-webfont.ttf
Binary files differ
diff --git a/r/libs/gitbook-2.6.7/css/plugin-bookdown.css b/r/libs/gitbook-2.6.7/css/plugin-bookdown.css
new file mode 100644
index 0000000..ab7c20e
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-bookdown.css
@@ -0,0 +1,105 @@
+.book .book-header h1 {
+  padding-left: 20px;
+  padding-right: 20px;
+}
+.book .book-header.fixed {
+  position: fixed;
+  right: 0;
+  top: 0;
+  left: 0;
+  border-bottom: 1px solid rgba(0,0,0,.07);
+}
+span.search-highlight {
+  background-color: #ffff88;
+}
+@media (min-width: 600px) {
+  .book.with-summary .book-header.fixed {
+    left: 300px;
+  }
+}
+@media (max-width: 1240px) {
+  .book .book-body.fixed {
+    top: 50px;
+  }
+  .book .book-body.fixed .body-inner {
+    top: auto;
+  }
+}
+@media (max-width: 600px) {
+  .book.with-summary .book-header.fixed {
+    left: calc(100% - 60px);
+    min-width: 300px;
+  }
+  .book.with-summary .book-body {
+    transform: none;
+    left: calc(100% - 60px);
+    min-width: 300px;
+  }
+  .book .book-body.fixed {
+    top: 0;
+  }
+}
+
+.book .book-body.fixed .body-inner {
+  top: 50px;
+}
+.book .book-body .page-wrapper .page-inner section.normal sub, .book .book-body .page-wrapper .page-inner section.normal sup {
+  font-size: 85%;
+}
+
+@media print {
+  .book .book-summary, .book .book-body .book-header, .fa {
+    display: none !important;
+  }
+  .book .book-body.fixed {
+    left: 0px;
+  }
+  .book .book-body,.book .book-body .body-inner, .book.with-summary {
+    overflow: visible !important;
+  }
+}
+.kable_wrapper {
+  border-spacing: 20px 0;
+  border-collapse: separate;
+  border: none;
+  margin: auto;
+}
+.kable_wrapper > tbody > tr > td {
+  vertical-align: top;
+}
+.book .book-body .page-wrapper .page-inner section.normal table tr.header {
+  border-top-width: 2px;
+}
+.book .book-body .page-wrapper .page-inner section.normal table tr:last-child td {
+  border-bottom-width: 2px;
+}
+.book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th {
+  border-left: none;
+  border-right: none;
+}
+.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr, .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr > td {
+  border-top: none;
+}
+.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr:last-child > td {
+    border-bottom: none;
+}
+
+div.theorem, div.lemma, div.corollary, div.proposition, div.conjecture {
+  font-style: italic;
+}
+span.theorem, span.lemma, span.corollary, span.proposition, span.conjecture {
+  font-style: normal;
+}
+div.proof>*:last-child:after {
+  content: "\25a2";
+  float: right;
+}
+.header-section-number {
+  padding-right: .5em;
+}
+#header .multi-author {
+  margin: 0.5em 0 -0.5em 0;
+}
+#header .date {
+  margin-top: 1.5em;
+}
diff --git a/r/libs/gitbook-2.6.7/css/plugin-clipboard.css b/r/libs/gitbook-2.6.7/css/plugin-clipboard.css
new file mode 100644
index 0000000..6844a70
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-clipboard.css
@@ -0,0 +1,18 @@
+div.sourceCode {
+  position: relative;
+}
+
+.copy-to-clipboard-button {
+  position: absolute;
+  right: 0;
+  top: 0;
+  visibility: hidden;
+}
+
+.copy-to-clipboard-button:focus {
+  outline: 0;
+}
+
+div.sourceCode:hover > .copy-to-clipboard-button {
+  visibility: visible;
+}
diff --git a/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css b/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css
new file mode 100644
index 0000000..3fa6f35
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-fontsettings.css
@@ -0,0 +1,303 @@
+/*
+ * Theme 1
+ */
+.color-theme-1 .dropdown-menu {
+  background-color: #111111;
+  border-color: #7e888b;
+}
+.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
+  border-bottom: 9px solid #111111;
+}
+.color-theme-1 .dropdown-menu .buttons {
+  border-color: #7e888b;
+}
+.color-theme-1 .dropdown-menu .button {
+  color: #afa790;
+}
+.color-theme-1 .dropdown-menu .button:hover {
+  color: #73553c;
+}
+/*
+ * Theme 2
+ */
+.color-theme-2 .dropdown-menu {
+  background-color: #2d3143;
+  border-color: #272a3a;
+}
+.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
+  border-bottom: 9px solid #2d3143;
+}
+.color-theme-2 .dropdown-menu .buttons {
+  border-color: #272a3a;
+}
+.color-theme-2 .dropdown-menu .button {
+  color: #62677f;
+}
+.color-theme-2 .dropdown-menu .button:hover {
+  color: #f4f4f5;
+}
+.book .book-header .font-settings .font-enlarge {
+  line-height: 30px;
+  font-size: 1.4em;
+}
+.book .book-header .font-settings .font-reduce {
+  line-height: 30px;
+  font-size: 1em;
+}
+
+/* sidebar transition background */
+div.book.color-theme-1 {
+  background: #f3eacb;
+}
+.book.color-theme-1 .book-body {
+  color: #704214;
+  background: #f3eacb;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section {
+  background: #f3eacb;
+}
+
+/* sidebar transition background */
+div.book.color-theme-2 {
+  background: #1c1f2b;
+}
+
+.book.color-theme-2 .book-body {
+  color: #bdcadb;
+  background: #1c1f2b;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section {
+  background: #1c1f2b;
+}
+.book.font-size-0 .book-body .page-inner section {
+  font-size: 1.2rem;
+}
+.book.font-size-1 .book-body .page-inner section {
+  font-size: 1.4rem;
+}
+.book.font-size-2 .book-body .page-inner section {
+  font-size: 1.6rem;
+}
+.book.font-size-3 .book-body .page-inner section {
+  font-size: 2.2rem;
+}
+.book.font-size-4 .book-body .page-inner section {
+  font-size: 4rem;
+}
+.book.font-family-0 {
+  font-family: Georgia, serif;
+}
+.book.font-family-1 {
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal {
+  color: #704214;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 {
+  border-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr {
+  background-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
+  border-color: #c4b29f;
+  opacity: 0.9;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
+  background: #fdf6e3;
+  color: #657b83;
+  border-color: #f8df9c;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight {
+  background-color: inherit;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td {
+  border-color: #f5d06c;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr {
+  color: inherit;
+  background-color: #fdf6e3;
+  border-color: #444444;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
+  background-color: #fbeecb;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
+  color: #bdcadb;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
+  color: #3eb1d0;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: #fffffa;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
+  border-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
+  color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
+  background-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
+  border-color: #373b4e;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
+  color: #9dbed8;
+  background: #2d3143;
+  border-color: #2d3143;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
+  background-color: #282a39;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
+  border-color: #3b3f54;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
+  color: #b6c2d2;
+  background-color: #2d3143;
+  border-color: #3b3f54;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
+  background-color: #35394b;
+}
+.book.color-theme-1 .book-header {
+  color: #afa790;
+  background: transparent;
+}
+.book.color-theme-1 .book-header .btn {
+  color: #afa790;
+}
+.book.color-theme-1 .book-header .btn:hover {
+  color: #73553c;
+  background: none;
+}
+.book.color-theme-1 .book-header h1 {
+  color: #704214;
+}
+.book.color-theme-2 .book-header {
+  color: #7e888b;
+  background: transparent;
+}
+.book.color-theme-2 .book-header .btn {
+  color: #3b3f54;
+}
+.book.color-theme-2 .book-header .btn:hover {
+  color: #fffff5;
+  background: none;
+}
+.book.color-theme-2 .book-header h1 {
+  color: #bdcadb;
+}
+.book.color-theme-1 .book-body .navigation {
+  color: #afa790;
+}
+.book.color-theme-1 .book-body .navigation:hover {
+  color: #73553c;
+}
+.book.color-theme-2 .book-body .navigation {
+  color: #383f52;
+}
+.book.color-theme-2 .book-body .navigation:hover {
+  color: #fffff5;
+}
+/*
+ * Theme 1
+ */
+.book.color-theme-1 .book-summary {
+  color: #afa790;
+  background: #111111;
+  border-right: 1px solid rgba(0, 0, 0, 0.07);
+}
+.book.color-theme-1 .book-summary .book-search {
+  background: transparent;
+}
+.book.color-theme-1 .book-summary .book-search input,
+.book.color-theme-1 .book-summary .book-search input:focus {
+  border: 1px solid transparent;
+}
+.book.color-theme-1 .book-summary ul.summary li.divider {
+  background: #7e888b;
+  box-shadow: none;
+}
+.book.color-theme-1 .book-summary ul.summary li i.fa-check {
+  color: #33cc33;
+}
+.book.color-theme-1 .book-summary ul.summary li.done > a {
+  color: #877f6a;
+}
+.book.color-theme-1 .book-summary ul.summary li a,
+.book.color-theme-1 .book-summary ul.summary li span {
+  color: #877f6a;
+  background: transparent;
+  font-weight: normal;
+}
+.book.color-theme-1 .book-summary ul.summary li.active > a,
+.book.color-theme-1 .book-summary ul.summary li a:hover {
+  color: #704214;
+  background: transparent;
+  font-weight: normal;
+}
+/*
+ * Theme 2
+ */
+.book.color-theme-2 .book-summary {
+  color: #bcc1d2;
+  background: #2d3143;
+  border-right: none;
+}
+.book.color-theme-2 .book-summary .book-search {
+  background: transparent;
+}
+.book.color-theme-2 .book-summary .book-search input,
+.book.color-theme-2 .book-summary .book-search input:focus {
+  border: 1px solid transparent;
+}
+.book.color-theme-2 .book-summary ul.summary li.divider {
+  background: #272a3a;
+  box-shadow: none;
+}
+.book.color-theme-2 .book-summary ul.summary li i.fa-check {
+  color: #33cc33;
+}
+.book.color-theme-2 .book-summary ul.summary li.done > a {
+  color: #62687f;
+}
+.book.color-theme-2 .book-summary ul.summary li a,
+.book.color-theme-2 .book-summary ul.summary li span {
+  color: #c1c6d7;
+  background: transparent;
+  font-weight: 600;
+}
+.book.color-theme-2 .book-summary ul.summary li.active > a,
+.book.color-theme-2 .book-summary ul.summary li a:hover {
+  color: #f4f4f5;
+  background: #252737;
+  font-weight: 600;
+}
diff --git a/r/libs/gitbook-2.6.7/css/plugin-highlight.css b/r/libs/gitbook-2.6.7/css/plugin-highlight.css
new file mode 100644
index 0000000..2aabd3d
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-highlight.css
@@ -0,0 +1,426 @@
+.book .book-body .page-wrapper .page-inner section.normal pre,
+.book .book-body .page-wrapper .page-inner section.normal code {
+  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+  /* Tomorrow Comment */
+  /* Tomorrow Red */
+  /* Tomorrow Orange */
+  /* Tomorrow Yellow */
+  /* Tomorrow Green */
+  /* Tomorrow Aqua */
+  /* Tomorrow Blue */
+  /* Tomorrow Purple */
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-title {
+  color: #8e908c;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
+  color: #c82829;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
+  color: #f5871f;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
+  color: #eab700;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  color: #718c00;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
+.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
+  color: #3e999f;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
+.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
+.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
+.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
+.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
+  color: #4271ae;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
+  color: #8959a8;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  background: white;
+  color: #4d4d4c;
+  padding: 0.5em;
+}
+.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
+.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
+.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
+.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
+.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .css,
+.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  opacity: 0.5;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
+  /*
+
+Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
+
+*/
+  /* Solarized Green */
+  /* Solarized Cyan */
+  /* Solarized Blue */
+  /* Solarized Yellow */
+  /* Solarized Orange */
+  /* Solarized Red */
+  /* Solarized Violet */
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  padding: 0.5em;
+  background: #fdf6e3;
+  color: #657b83;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc {
+  color: #93a1a1;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title {
+  color: #859900;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url {
+  color: #2aa198;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function {
+  color: #268bd2;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference {
+  color: #b58900;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header {
+  color: #cb4b16;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important {
+  color: #dc322f;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label {
+  color: #6c71c4;
+}
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula {
+  background: #eee8d5;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
+  /* Tomorrow Night Bright Theme */
+  /* Original theme - https://github.com/chriskempson/tomorrow-theme */
+  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+  /* Tomorrow Comment */
+  /* Tomorrow Red */
+  /* Tomorrow Orange */
+  /* Tomorrow Yellow */
+  /* Tomorrow Green */
+  /* Tomorrow Aqua */
+  /* Tomorrow Blue */
+  /* Tomorrow Purple */
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title {
+  color: #969896;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
+  color: #d54e53;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
+  color: #e78c45;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
+  color: #e7c547;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  color: #b9ca4a;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
+  color: #70c0b1;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
+  color: #7aa6da;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
+  color: #c397d8;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs {
+  display: block;
+  background: black;
+  color: #eaeaea;
+  padding: 0.5em;
+}
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
+.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/r/libs/gitbook-2.6.7/css/plugin-search.css b/r/libs/gitbook-2.6.7/css/plugin-search.css
new file mode 100644
index 0000000..c85e557
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-search.css
@@ -0,0 +1,31 @@
+.book .book-summary .book-search {
+  padding: 6px;
+  background: transparent;
+  position: absolute;
+  top: -50px;
+  left: 0px;
+  right: 0px;
+  transition: top 0.5s ease;
+}
+.book .book-summary .book-search input,
+.book .book-summary .book-search input:focus,
+.book .book-summary .book-search input:hover {
+  width: 100%;
+  background: transparent;
+  border: 1px solid #ccc;
+  box-shadow: none;
+  outline: none;
+  line-height: 22px;
+  padding: 7px 4px;
+  color: inherit;
+  box-sizing: border-box;
+}
+.book.with-search .book-summary .book-search {
+  top: 0px;
+}
+.book.with-search .book-summary ul.summary {
+  top: 50px;
+}
+.with-search .summary li[data-level] a[href*=".html#"] {
+  display: none;
+}
diff --git a/r/libs/gitbook-2.6.7/css/plugin-table.css b/r/libs/gitbook-2.6.7/css/plugin-table.css
new file mode 100644
index 0000000..7fba1b9
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/plugin-table.css
@@ -0,0 +1 @@
+.book .book-body .page-wrapper .page-inner section.normal table{display:table;width:100%;border-collapse:collapse;border-spacing:0;overflow:auto}.book .book-body .page-wrapper .page-inner section.normal table td,.book .book-body .page-wrapper .page-inner section.normal table th{padding:6px 13px;border:1px solid #ddd}.book .book-body .page-wrapper .page-inner section.normal table tr{background-color:#fff;border-top:1px solid #ccc}.book .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n){background-color:#f8f8f8}.book .book-body .page-wrapper .page-inner section.normal table th{font-weight:700}
diff --git a/r/libs/gitbook-2.6.7/css/style.css b/r/libs/gitbook-2.6.7/css/style.css
new file mode 100644
index 0000000..cba69b2
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/css/style.css
@@ -0,0 +1,13 @@
+/*! normalize.css v2.1.0 | MIT License | git.io/normalize */img,legend{border:0}*{-webkit-font-smoothing:antialiased}sub,sup{position:relative}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book-langs-index .inner .languages:after,.buttons:after,.dropdown-menu .buttons:after{clear:both}body,html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}.hidden,[hidden]{display:none}audio:not([controls]){display:none;height:0}html{font-family:sans-serif}body,figure{margin:0}a:focus{outline:dotted thin}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button{margin-right:10px;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}/*!
+ * Preboot v2
+ *
+ * Open sourced under MIT license by @mdo.
+ * Some variables and mixins from Bootstrap (Apache 2 license).
+ */.link-inherit,.link-inherit:focus,.link-inherit:hover{color:inherit}/*!
+ *  Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
+ *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('./fontawesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
+.book .book-header,.book .book-summary{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.book-langs-index{width:100%;height:100%;padding:40px 0;margin:0;overflow:auto}@media (max-width:600px){.book-langs-index{padding:0}}.book-langs-index .inner{max-width:600px;width:100%;margin:0 auto;padding:30px;background:#fff;border-radius:3px}.book-langs-index .inner h3{margin:0}.book-langs-index .inner .languages{list-style:none;padding:20px 30px;margin-top:20px;border-top:1px solid #eee}.book-langs-index .inner .languages:after,.book-langs-index .inner .languages:before{content:" ";display:table;line-height:0}.book-langs-index .inner .languages li{width:50%;float:left;padding:10px 5px;font-size:16px}@media (max-width:600px){.book-langs-index .inner .languages li{width:100%;max-width:100%}}.book .book-header{overflow:visible;height:50px;padding:0 8px;z-index:2;font-size:.85em;color:#7e888b;background:0 0}.book .book-header .btn{display:block;height:50px;padding:0 15px;border-bottom:none;color:#ccc;text-transform:uppercase;line-height:50px;-webkit-box-shadow:none!important;box-shadow:none!important;position:relative;font-size:14px}.book .book-header .btn:hover{position:relative;text-decoration:none;color:#444;background:0 0}.book .book-header h1{margin:0;font-size:20px;font-weight:200;text-align:center;line-height:50px;opacity:0;padding-left:200px;padding-right:200px;-webkit-transition:opacity .2s ease;-moz-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book .book-header h1 a,.book .book-header h1 a:hover{color:inherit;text-decoration:none}@media (max-width:1000px){.book .book-header h1{display:none}}.book .book-header h1 i{display:none}.book .book-header:hover h1{opacity:1}.book.is-loading .book-header h1 i{display:inline-block}.book.is-loading .book-header h1 a{display:none}.dropdown{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;z-index:100;display:none;float:left;min-width:160px;padding:0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:1px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu.open{display:block}.dropdown-menu.dropdown-left{left:auto;right:4%}.dropdown-menu.dropdown-left .dropdown-caret{right:14px;left:auto}.dropdown-menu .dropdown-caret{position:absolute;top:-8px;left:14px;width:18px;height:10px;float:left;overflow:hidden}.dropdown-menu .dropdown-caret .caret-inner,.dropdown-menu .dropdown-caret .caret-outer{display:inline-block;top:0;border-left:9px solid transparent;border-right:9px solid transparent;position:absolute}.dropdown-menu .dropdown-caret .caret-outer{border-bottom:9px solid rgba(0,0,0,.1);height:auto;left:0;width:auto;margin-left:-1px}.dropdown-menu .dropdown-caret .caret-inner{margin-top:-1px;top:1px;border-bottom:9px solid #fafafa}.dropdown-menu .buttons{border-bottom:1px solid rgba(0,0,0,.07)}.dropdown-menu .buttons:after,.dropdown-menu .buttons:before{content:" ";display:table;line-height:0}.dropdown-menu .buttons:last-child{border-bottom:none}.dropdown-menu .buttons .button{border:0;background-color:transparent;color:#a6a6a6;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.alert,.dropdown-menu .buttons .button:hover{color:#444}.dropdown-menu .buttons .button:focus,.dropdown-menu .buttons .button:hover{outline:0}.dropdown-menu .buttons .button.size-2{width:50%}.dropdown-menu .buttons .button.size-3{width:33%}.alert{padding:15px;margin-bottom:20px;background:#eee;border-bottom:5px solid #ddd}.alert-success{background:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-info{background:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-danger{background:#f2dede;border-color:#ebccd1;color:#a94442}.alert-warning{background:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.book .book-summary{position:absolute;top:0;left:-300px;bottom:0;z-index:1;width:300px;color:#364149;background:#fafafa;border-right:1px solid rgba(0,0,0,.07);-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-summary ul.summary{position:absolute;top:0;left:0;right:0;bottom:0;overflow-y:auto;list-style:none;margin:0;padding:0;-webkit-transition:top .5s ease;-moz-transition:top .5s ease;-o-transition:top .5s ease;transition:top .5s ease}.book .book-summary ul.summary li{list-style:none}.book .book-summary ul.summary li.divider{height:1px;margin:7px 0;overflow:hidden;background:rgba(0,0,0,.07)}.book .book-summary ul.summary li i.fa-check{display:none;position:absolute;right:9px;top:16px;font-size:9px;color:#3c3}.book .book-summary ul.summary li.done>a{color:#364149;font-weight:400}.book .book-summary ul.summary li.done>a i{display:inline}.book .book-summary ul.summary li a,.book .book-summary ul.summary li span{display:block;padding:10px 15px;border-bottom:none;color:#364149;background:0 0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative}.book .book-summary ul.summary li span{cursor:not-allowed;opacity:.3;filter:alpha(opacity=30)}.book .book-summary ul.summary li a:hover,.book .book-summary ul.summary li.active>a{color:#008cff;background:0 0;text-decoration:none}.book .book-summary ul.summary li ul{padding-left:20px}@media (max-width:600px){.book .book-summary{width:calc(100% - 60px);bottom:0;left:-100%}}.book.with-summary .book-summary{left:0}.book.without-animation .book-summary{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.book{position:relative;width:100%;height:100%}.book .book-body,.book .book-body .body-inner{position:absolute;top:0;left:0;overflow-y:auto;bottom:0;right:0}.book .book-body{color:#000;background:#fff;-webkit-transition:left 250ms ease;-moz-transition:left 250ms ease;-o-transition:left 250ms ease;transition:left 250ms ease}.book .book-body .page-wrapper{position:relative;outline:0}.book .book-body .page-wrapper .page-inner{max-width:800px;margin:0 auto;padding:20px 0 40px}.book .book-body .page-wrapper .page-inner section{margin:0;padding:5px 15px;background:#fff;border-radius:2px;line-height:1.7;font-size:1.6rem}.book .book-body .page-wrapper .page-inner .btn-group .btn{border-radius:0;background:#eee;border:0}@media (max-width:1240px){.book .book-body{-webkit-transition:-webkit-transform 250ms ease;-moz-transition:-moz-transform 250ms ease;-o-transition:-o-transform 250ms ease;transition:transform 250ms ease;padding-bottom:20px}.book .book-body .body-inner{position:static;min-height:calc(100% - 50px)}}@media (min-width:600px){.book.with-summary .book-body{left:300px}}@media (max-width:600px){.book.with-summary{overflow:hidden}.book.with-summary .book-body{-webkit-transform:translate(calc(100% - 60px),0);-moz-transform:translate(calc(100% - 60px),0);-ms-transform:translate(calc(100% - 60px),0);-o-transform:translate(calc(100% - 60px),0);transform:translate(calc(100% - 60px),0)}}.book.without-animation .book-body{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;transition:none!important}.buttons:after,.buttons:before{content:" ";display:table;line-height:0}.button{border:0;background:#eee;color:#666;width:100%;text-align:center;float:left;line-height:1.42857143;padding:8px 4px}.button:hover{color:#444}.button:focus,.button:hover{outline:0}.button.size-2{width:50%}.button.size-3{width:33%}.book .book-body .page-wrapper .page-inner section{display:none}.book .book-body .page-wrapper .page-inner section.normal{display:block;word-wrap:break-word;overflow:hidden;color:#333;line-height:1.7;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%}.book .book-body .page-wrapper .page-inner section.normal *{box-sizing:border-box;-webkit-box-sizing:border-box;}.book .book-body .page-wrapper .page-inner section.normal>:first-child{margin-top:0!important}.book .book-body .page-wrapper .page-inner section.normal>:last-child{margin-bottom:0!important}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal figure,.book .book-body .page-wrapper .page-inner section.normal img,.book .book-body .page-wrapper .page-inner section.normal pre,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal tr{page-break-inside:avoid}.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal p{orphans:3;widows:3}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5{page-break-after:avoid}.book .book-body .page-wrapper .page-inner section.normal b,.book .book-body .page-wrapper .page-inner section.normal strong{font-weight:700}.book .book-body .page-wrapper .page-inner section.normal em{font-style:italic}.book .book-body .page-wrapper .page-inner section.normal blockquote,.book .book-body .page-wrapper .page-inner section.normal dl,.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal p,.book .book-body .page-wrapper .page-inner section.normal table,.book .book-body .page-wrapper .page-inner section.normal ul{margin-top:0;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal a{color:#4183c4;text-decoration:none;background:0 0}.book .book-body .page-wrapper .page-inner section.normal a:active,.book .book-body .page-wrapper .page-inner section.normal a:focus,.book .book-body .page-wrapper .page-inner section.normal a:hover{outline:0;text-decoration:underline}.book .book-body .page-wrapper .page-inner section.normal img{border:0;max-width:100%}.book .book-body .page-wrapper .page-inner section.normal hr{height:4px;padding:0;margin:1.7em 0;overflow:hidden;background-color:#e7e7e7;border:none}.book .book-body .page-wrapper .page-inner section.normal hr:after,.book .book-body .page-wrapper .page-inner section.normal hr:before{display:table;content:" "}.book .book-body .page-wrapper .page-inner section.normal h1,.book .book-body .page-wrapper .page-inner section.normal h2,.book .book-body .page-wrapper .page-inner section.normal h3,.book .book-body .page-wrapper .page-inner section.normal h4,.book .book-body .page-wrapper .page-inner section.normal h5,.book .book-body .page-wrapper .page-inner section.normal h6{margin-top:1.275em;margin-bottom:.85em;}.book .book-body .page-wrapper .page-inner section.normal h1{font-size:2em}.book .book-body .page-wrapper .page-inner section.normal h2{font-size:1.75em}.book .book-body .page-wrapper .page-inner section.normal h3{font-size:1.5em}.book .book-body .page-wrapper .page-inner section.normal h4{font-size:1.25em}.book .book-body .page-wrapper .page-inner section.normal h5{font-size:1em}.book .book-body .page-wrapper .page-inner section.normal h6{font-size:1em;color:#777}.book .book-body .page-wrapper .page-inner section.normal code,.book .book-body .page-wrapper .page-inner section.normal pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;direction:ltr;border:none;color:inherit}.book .book-body .page-wrapper .page-inner section.normal pre{overflow:auto;word-wrap:normal;margin:0 0 1.275em;padding:.85em 1em;background:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal pre>code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;font-size:.85em;white-space:pre;background:0 0}.book .book-body .page-wrapper .page-inner section.normal pre>code:after,.book .book-body .page-wrapper .page-inner section.normal pre>code:before{content:normal}.book .book-body .page-wrapper .page-inner section.normal code{padding:.2em;margin:0;font-size:.85em;background-color:#f7f7f7}.book .book-body .page-wrapper .page-inner section.normal code:after,.book .book-body .page-wrapper .page-inner section.normal code:before{letter-spacing:-.2em;content:"\00a0"}.book .book-body .page-wrapper .page-inner section.normal ol,.book .book-body .page-wrapper .page-inner section.normal ul{padding:0 0 0 2em;margin:0 0 .85em}.book .book-body .page-wrapper .page-inner section.normal ol ol,.book .book-body .page-wrapper .page-inner section.normal ol ul,.book .book-body .page-wrapper .page-inner section.normal ul ol,.book .book-body .page-wrapper .page-inner section.normal ul ul{margin-top:0;margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal ol ol{list-style-type:lower-roman}.book .book-body .page-wrapper .page-inner section.normal blockquote{margin:0 0 .85em;padding:0 15px;opacity:0.75;border-left:4px solid #dcdcdc}.book .book-body .page-wrapper .page-inner section.normal blockquote:first-child{margin-top:0}.book .book-body .page-wrapper .page-inner section.normal blockquote:last-child{margin-bottom:0}.book .book-body .page-wrapper .page-inner section.normal dl{padding:0}.book .book-body .page-wrapper .page-inner section.normal dl dt{padding:0;margin-top:.85em;font-style:italic;font-weight:700}.book .book-body .page-wrapper .page-inner section.normal dl dd{padding:0 .85em;margin-bottom:.85em}.book .book-body .page-wrapper .page-inner section.normal dd{margin-left:0}.book .book-body .page-wrapper .page-inner section.normal .glossary-term{cursor:help;text-decoration:underline}.book .book-body .navigation{position:absolute;top:50px;bottom:0;margin:0;max-width:150px;min-width:90px;display:flex;justify-content:center;align-content:center;flex-direction:column;font-size:40px;color:#ccc;text-align:center;-webkit-transition:all 350ms ease;-moz-transition:all 350ms ease;-o-transition:all 350ms ease;transition:all 350ms ease}.book .book-body .navigation:hover{text-decoration:none;color:#444}.book .book-body .navigation.navigation-next{right:0}.book .book-body .navigation.navigation-prev{left:0}@media (max-width:1240px){.book .book-body .navigation{position:static;top:auto;max-width:50%;width:50%;display:inline-block;float:left}.book .book-body .navigation.navigation-unique{max-width:100%;width:100%}}.book .book-body .page-wrapper .page-inner section.glossary{margin-bottom:40px}.book .book-body .page-wrapper .page-inner section.glossary h2 a,.book .book-body .page-wrapper .page-inner section.glossary h2 a:hover{color:inherit;text-decoration:none}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index{list-style:none;margin:0;padding:0}.book .book-body .page-wrapper .page-inner section.glossary .glossary-index li{display:inline;margin:0 8px;white-space:nowrap}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:auto;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:none;-webkit-touch-callout:none}a{text-decoration:none}body,html{height:100%}html{font-size:62.5%}body{text-rendering:optimizeLegibility;font-smoothing:antialiased;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:.2px;text-size-adjust:100%}
+.book .book-summary ul.summary li a span {display:inline;padding:initial;overflow:visible;cursor:auto;opacity:1;}
+/* show arrow before summary tag as in bootstrap */
+details > summary {display:list-item;cursor:pointer;}
diff --git a/r/libs/gitbook-2.6.7/js/app.min.js b/r/libs/gitbook-2.6.7/js/app.min.js
new file mode 100644
index 0000000..643f1f9
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/app.min.js
@@ -0,0 +1 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=jQuery}},{}],2:[function(require,module,exports){(function(global){(function(){var undefined;var VERSION="3.10.1";var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256;var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...";var HOT_COUNT=150,HOT_SPAN=16;var LARGE_ARRAY_SIZE=200;var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2;var FUNC_ERROR_TEXT="Expected a function";var PLACEHOLDER="__lodash_placeholder__";var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEscapedHtml=/&(?:amp|lt|gt|quot|#39|#96);/g,reUnescapedHtml=/[&<>"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;var reRegExpChars=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,reHasRegExpChars=RegExp(reRegExpChars.source);var reComboMark=/[\u0300-\u036f\ufe20-\ufe23]/g;var reEscapeChar=/\\(\\)?/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reHasHexPrefix=/^0[xX]/;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsUint=/^\d+$/;var reLatin1=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;var reNoMatch=/($^)/;var reUnescapedString=/['\n\r\u2028\u2029\\]/g;var reWords=function(){var upper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lower="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(upper+"+(?="+upper+lower+")|"+upper+"?"+lower+"|"+upper+"+|[0-9]+","g")}();var contextProps=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"];var templateCounter=-1;var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=false;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"};var htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"};var htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"};var objectTypes={function:true,object:true};var regexpEscapes={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global&&global.Object&&global;var freeSelf=objectTypes[typeof self]&&self&&self.Object&&self;var freeWindow=objectTypes[typeof window]&&window&&window.Object&&window;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this;function baseCompareAscending(value,other){if(value!==other){var valIsNull=value===null,valIsUndef=value===undefined,valIsReflexive=value===value;var othIsNull=other===null,othIsUndef=other===undefined,othIsReflexive=other===other;if(value>other&&!othIsNull||!valIsReflexive||valIsNull&&!othIsUndef&&othIsReflexive||valIsUndef&&othIsReflexive){return 1}if(value<other&&!valIsNull||!othIsReflexive||othIsNull&&!valIsUndef&&valIsReflexive||othIsUndef&&valIsReflexive){return-1}}return 0}function baseFindIndex(array,predicate,fromRight){var length=array.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIndexOf(array,value,fromIndex){if(value!==value){return indexOfNaN(array,fromIndex)}var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function baseIsFunction(value){return typeof value=="function"||false}function baseToString(value){return value==null?"":value+""}function charsLeftIndex(string,chars){var index=-1,length=string.length;while(++index<length&&chars.indexOf(string.charAt(index))>-1){}return index}function charsRightIndex(string,chars){var index=string.length;while(index--&&chars.indexOf(string.charAt(index))>-1){}return index}function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=baseCompareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result}var order=orders[index];return result*(order==="asc"||order===true?1:-1)}}return object.index-other.index}function deburrLetter(letter){return deburredLetters[letter]}function escapeHtmlChar(chr){return htmlEscapes[chr]}function escapeRegExpChar(chr,leadingChar,whitespaceChar){if(leadingChar){chr=regexpEscapes[chr]}else if(whitespaceChar){chr=stringEscapes[chr]}return"\\"+chr}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function indexOfNaN(array,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?0:-1);while(fromRight?index--:++index<length){var other=array[index];if(other!==other){return index}}return-1}function isObjectLike(value){return!!value&&typeof value=="object"}function isSpace(charCode){return charCode<=160&&(charCode>=9&&charCode<=13)||charCode==32||charCode==160||charCode==5760||charCode==6158||charCode>=8192&&(charCode<=8202||charCode==8232||charCode==8233||charCode==8239||charCode==8287||charCode==12288||charCode==65279)}function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){if(array[index]===placeholder){array[index]=PLACEHOLDER;result[++resIndex]=index}}return result}function sortedUniq(array,iteratee){var seen,index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(!index||seen!==computed){seen=computed;result[++resIndex]=value}}return result}function trimmedLeftIndex(string){var index=-1,length=string.length;while(++index<length&&isSpace(string.charCodeAt(index))){}return index}function trimmedRightIndex(string){var index=string.length;while(index--&&isSpace(string.charCodeAt(index))){}return index}function unescapeHtmlChar(chr){return htmlUnescapes[chr]}function runInContext(context){context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;var arrayProto=Array.prototype,objectProto=Object.prototype,stringProto=String.prototype;var fnToString=Function.prototype.toString;var hasOwnProperty=objectProto.hasOwnProperty;var idCounter=0;var objToString=objectProto.toString;var oldDash=root._;var reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ArrayBuffer=context.ArrayBuffer,clearTimeout=context.clearTimeout,parseFloat=context.parseFloat,pow=Math.pow,propertyIsEnumerable=objectProto.propertyIsEnumerable,Set=getNative(context,"Set"),setTimeout=context.setTimeout,splice=arrayProto.splice,Uint8Array=context.Uint8Array,WeakMap=getNative(context,"WeakMap");var nativeCeil=Math.ceil,nativeCreate=getNative(Object,"create"),nativeFloor=Math.floor,nativeIsArray=getNative(Array,"isArray"),nativeIsFinite=context.isFinite,nativeKeys=getNative(Object,"keys"),nativeMax=Math.max,nativeMin=Math.min,nativeNow=getNative(Date,"now"),nativeParseInt=context.parseInt,nativeRandom=Math.random;var NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,POSITIVE_INFINITY=Number.POSITIVE_INFINITY;var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;var MAX_SAFE_INTEGER=9007199254740991;var metaMap=WeakMap&&new WeakMap;var realNames={};function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty.call(value,"__chain__")&&hasOwnProperty.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}function baseLodash(){}function LodashWrapper(value,chainAll,actions){this.__wrapped__=value;this.__actions__=actions||[];this.__chain__=!!chainAll}var support=lodash.support={};lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=POSITIVE_INFINITY;this.__views__=[]}function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=arrayCopy(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=arrayCopy(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=arrayCopy(this.__views__);return result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true}else{result=this.clone();result.__dir__*=-1}return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||arrLength<LARGE_ARRAY_SIZE||arrLength==length&&takeCount==length){return baseWrapperValue(isRight&&isArr?array.reverse():array,this.__actions__)}var result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer}else{break outer}}}result[resIndex++]=value}return result}function MapCache(){this.__data__={}}function mapDelete(key){return this.has(key)&&delete this.__data__[key]}function mapGet(key){return key=="__proto__"?undefined:this.__data__[key]}function mapHas(key){return key!="__proto__"&&hasOwnProperty.call(this.__data__,key)}function mapSet(key,value){if(key!="__proto__"){this.__data__[key]=value}return this}function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}function cacheIndexOf(cache,value){var data=cache.data,result=typeof value=="string"||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}function cachePush(value){var data=this.data;if(typeof value=="string"||isObject(value)){data.set.add(value)}else{data.hash[value]=true}}function arrayConcat(array,other){var index=-1,length=array.length,othIndex=-1,othLength=other.length,result=Array(length+othLength);while(++index<length){result[index]=array[index]}while(++othIndex<othLength){result[index++]=other[othIndex]}return result}function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function arrayEach(array,iteratee){var index=-1,length=array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function arrayEachRight(array,iteratee){var length=array.length;while(length--){if(iteratee(array[length],length,array)===false){break}}return array}function arrayEvery(array,predicate){var index=-1,length=array.length;while(++index<length){if(!predicate(array[index],index,array)){return false}}return true}function arrayExtremum(array,iteratee,comparator,exValue){var index=-1,length=array.length,computed=exValue,result=computed;while(++index<length){var value=array[index],current=+iteratee(value);if(comparator(current,computed)){computed=current;result=value}}return result}function arrayFilter(array,predicate){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[++resIndex]=value}}return result}function arrayMap(array,iteratee){var index=-1,length=array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}function arrayReduce(array,iteratee,accumulator,initFromArray){var index=-1,length=array.length;if(initFromArray&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function arrayReduceRight(array,iteratee,accumulator,initFromArray){var length=array.length;if(initFromArray&&length){accumulator=array[--length]}while(length--){accumulator=iteratee(accumulator,array[length],length,array)}return accumulator}function arraySome(array,predicate){var index=-1,length=array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}function arraySum(array,iteratee){var length=array.length,result=0;while(length--){result+=+iteratee(array[length])||0}return result}function assignDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:objectValue}function assignOwnDefaults(objectValue,sourceValue,key,object){return objectValue===undefined||!hasOwnProperty.call(object,key)?sourceValue:objectValue}function assignWith(object,source,customizer){var index=-1,props=keys(source),length=props.length;while(++index<length){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);if((result===result?result!==value:value===value)||value===undefined&&!(key in object)){object[key]=result}}return object}function baseAssign(object,source){return source==null?object:baseCopy(source,keys(source),object)}function baseAt(collection,props){var index=-1,isNil=collection==null,isArr=!isNil&&isArrayLike(collection),length=isArr?collection.length:0,propsLength=props.length,result=Array(propsLength);while(++index<propsLength){var key=props[index];if(isArr){result[index]=isIndex(key,length)?collection[key]:undefined}else{result[index]=isNil?undefined:collection[key]}}return result}function baseCopy(source,props,object){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;if(type=="function"){return thisArg===undefined?func:bindCallback(func,thisArg,argCount)}if(func==null){return identity}if(type=="object"){return baseMatches(func)}return thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer){result=object?customizer(value,key,object):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return arrayCopy(value,result)}}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag==objectTag||tag==argsTag||isFunc&&!object){result=initCloneObject(isFunc?{}:value);if(!isDeep){return baseAssign(result,value)}}else{return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{}}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}stackA.push(value);stackB.push(result);(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)});return result}var baseCreate=function(){function object(){}return function(prototype){if(isObject(prototype)){object.prototype=prototype;var result=new object;object.prototype=undefined}return result||{}}}();function baseDelay(func,wait,args){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values){var length=array?array.length:0,result=[];if(!length){return result}var index=-1,indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,cache=isCommon&&values.length>=LARGE_ARRAY_SIZE?createCache(values):null,valuesLength=values.length;if(cache){indexOf=cacheIndexOf;isCommon=false;values=cache}outer:while(++index<length){var value=array[index];if(isCommon&&value===value){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===value){continue outer}}result.push(value)}else if(indexOf(values,value,0)<0){result.push(value)}}return result}var baseEach=createBaseEach(baseForOwn);var baseEachRight=createBaseEach(baseForOwnRight,true);function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result});return result}function baseExtremum(collection,iteratee,comparator,exValue){var computed=exValue,result=computed;baseEach(collection,function(value,index,collection){var current=+iteratee(value,index,collection);if(comparator(current,computed)||current===exValue&&current===result){computed=current;result=value}});return result}function baseFill(array,value,start,end){var length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end>>>0;start>>>=0;while(start<length){array[start++]=value}return array}function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value)}});return result}function baseFind(collection,predicate,eachFunc,retKey){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=retKey?key:value;return false}});return result}function baseFlatten(array,isDeep,isStrict,result){result||(result=[]);var index=-1,length=array.length;while(++index<length){var value=array[index];if(isObjectLike(value)&&isArrayLike(value)&&(isStrict||isArray(value)||isArguments(value))){if(isDeep){baseFlatten(value,isDeep,isStrict,result)}else{arrayPush(result,value)}}else if(!isStrict){result[result.length]=value}}return result}var baseFor=createBaseFor();var baseForRight=createBaseFor(true);function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return baseForRight(object,iteratee,keys)}function baseFunctions(object,props){var index=-1,length=props.length,resIndex=-1,result=[];while(++index<length){var key=props[index];if(isFunction(object[key])){result[++resIndex]=key}}return result}function baseGet(object,path,pathKey){if(object==null){return}if(pathKey!==undefined&&pathKey in toObject(object)){path=[pathKey]}var index=0,length=path.length;while(object!=null&&index<length){object=object[path[index++]]}return index&&index==length?object:undefined}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other){return true}if(value==null||other==null||!isObject(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;if(!objIsArr){objTag=objToString.call(object);if(objTag==argsTag){objTag=objectTag}else if(objTag!=objectTag){objIsArr=isTypedArray(object)}}if(!othIsArr){othTag=objToString.call(other);if(othTag==argsTag){othTag=objectTag}else if(othTag!=objectTag){othIsArr=isTypedArray(other)}}var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!(objIsArr||objIsObj)){return equalByTag(object,other,objTag)}if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}}if(!isSameTag){return false}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==object){return stackB[length]==other}}stackA.push(object);stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);stackA.pop();stackB.pop();return result}function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return!length}object=toObject(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object)){return false}}else{var result=customizer?customizer(objValue,srcValue,key):undefined;if(!(result===undefined?baseIsEqual(srcValue,objValue,customizer,true):result)){return false}}}return true}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)});return result}function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){var key=matchData[0][0],value=matchData[0][1];return function(object){if(object==null){return false}return object[key]===value&&(value!==undefined||key in toObject(object))}}return function(object){return baseIsMatch(object,matchData)}}function baseMatchesProperty(path,srcValue){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(srcValue),pathKey=path+"";path=toPath(path);return function(object){if(object==null){return false}var key=pathKey;object=toObject(object);if((isArr||!isCommon)&&!(key in object)){object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));if(object==null){return false}key=last(path);object=toObject(object)}return object[key]===srcValue?srcValue!==undefined||key in object:baseIsEqual(srcValue,object[key],undefined,true)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object)){return object}var isSrcArr=isArrayLike(source)&&(isArray(source)||isTypedArray(source)),props=isSrcArr?undefined:keys(source);arrayEach(props||source,function(srcValue,key){if(props){key=srcValue;srcValue=source[key]}if(isObjectLike(srcValue)){stackA||(stackA=[]);stackB||(stackB=[]);baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB)}else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;if(isCommon){result=srcValue}if((result!==undefined||isSrcArr&&!(key in object))&&(isCommon||(result===result?result!==value:value===value))){object[key]=result}}});return object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){var length=stackA.length,srcValue=source[key];while(length--){if(stackA[length]==srcValue){object[key]=stackB[length];return}}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;if(isCommon){result=srcValue;if(isArrayLike(srcValue)&&(isArray(srcValue)||isTypedArray(srcValue))){result=isArray(value)?value:isArrayLike(value)?arrayCopy(value):[]}else if(isPlainObject(srcValue)||isArguments(srcValue)){result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}}else{isCommon=false}}stackA.push(srcValue);stackB.push(result);if(isCommon){object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB)}else if(result===result?result!==value:value===value){object[key]=result}}function baseProperty(key){return function(object){return object==null?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";path=toPath(path);return function(object){return baseGet(object,path,pathKey)}}function basePullAt(array,indexes){var length=array?indexes.length:0;while(length--){var index=indexes[length];if(index!=previous&&isIndex(index)){var previous=index;splice.call(array,index,1)}}return array}function baseRandom(min,max){return min+nativeFloor(nativeRandom()*(max-min+1))}function baseReduce(collection,iteratee,accumulator,initFromCollection,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initFromCollection?(initFromCollection=false,value):iteratee(accumulator,value,index,collection)});return accumulator}var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};function baseSlice(array,start,end){var index=-1,length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}function baseSortByOrder(collection,iteratees,orders){var callback=getCallback(),index=-1;iteratees=arrayMap(iteratees,function(iteratee){return callback(iteratee)});var result=baseMap(collection,function(value){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function baseSum(collection,iteratee){var result=0;baseEach(collection,function(value,index,collection){result+=+iteratee(value,index,collection)||0});return result}function baseUniq(array,iteratee){var index=-1,indexOf=getIndexOf(),length=array.length,isCommon=indexOf==baseIndexOf,isLarge=isCommon&&length>=LARGE_ARRAY_SIZE,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(indexOf(seen,computed,0)<0){if(iteratee||isLarge){seen.push(computed)}result.push(value)}}return result}function baseValues(object,props){var index=-1,length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value()}var index=-1,length=actions.length;while(++index<length){var action=actions[index];result=action.func.apply(action.thisArg,arrayPush([result],action.args))}return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(typeof value=="number"&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if((retHighest?computed<=value:computed<value)&&computed!==null){low=mid+1}else{high=mid}}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsNull=value===null,valIsUndef=value===undefined;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),isDef=computed!==undefined,isReflexive=computed===computed;if(valIsNaN){var setLow=isReflexive||retHighest}else if(valIsNull){setLow=isReflexive&&isDef&&(retHighest||computed!=null)}else if(valIsUndef){setLow=isReflexive&&(retHighest||isDef)}else if(computed==null){setLow=false}else{setLow=retHighest?computed<=value:computed<value}if(setLow){low=mid+1}else{high=mid}}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(thisArg===undefined){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){var result=new ArrayBuffer(buffer.byteLength),view=new Uint8Array(result);view.set(new Uint8Array(buffer));return result}function composeArgs(args,partials,holders){var holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),leftIndex=-1,leftLength=partials.length,result=Array(leftLength+argsLength);while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){result[holders[argsIndex]]=args[argsIndex]}while(argsLength--){result[leftIndex++]=args[argsIndex++]}return result}function composeArgsRight(args,partials,holders){var holdersIndex=-1,holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),rightIndex=-1,rightLength=partials.length,result=Array(argsLength+rightLength);while(++argsIndex<argsLength){result[argsIndex]=args[argsIndex]}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){result[offset+holders[holdersIndex]]=args[argsIndex++]}return result}function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};iteratee=getCallback(iteratee,thisArg,3);if(isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}}else{baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)})}return result}}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=object==null?0:sources.length,customizer=length>2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;if(typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=typeof thisArg=="function"?thisArg:undefined;length-=customizer?1:0}if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}while(++index<length){var source=sources[index];if(source){assigner(object,source,customizer)}}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length)){return eachFunc(collection,iteratee)}var index=fromRight?length:-1,iterable=toObject(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){var key=props[index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}function createBindWrapper(func,thisArg){var Ctor=createCtorWrapper(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(thisArg,arguments)}return wrapper}function createCache(values){return nativeCreate&&Set?new SetCache(values):null}function createCompounder(callback){return function(string){var index=-1,array=words(deburr(string)),length=array.length,result="";while(++index<length){result=callback(result,array[index],index)}return result}}function createCtorWrapper(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(flag){function curryFunc(func,arity,guard){if(guard&&isIterateeCall(func,arity,guard)){arity=undefined}var result=createWrapper(func,flag,undefined,undefined,undefined,undefined,undefined,arity);result.placeholder=curryFunc.placeholder;return result}return curryFunc}function createDefaults(assigner,customizer){return restParam(function(args){var object=args[0];if(object==null){return object}args.push(customizer);return assigner.apply(undefined,args)})}function createExtremum(comparator,exValue){return function(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}iteratee=getCallback(iteratee,thisArg,3);if(iteratee.length==1){collection=isArray(collection)?collection:toIterable(collection);var result=arrayExtremum(collection,iteratee,comparator,exValue);if(!(collection.length&&result===exValue)){return result}}return baseExtremum(collection,iteratee,comparator,exValue)}}function createFind(eachFunc,fromRight){return function(collection,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);if(isArray(collection)){var index=baseFindIndex(collection,predicate,fromRight);return index>-1?collection[index]:undefined}return baseFind(collection,predicate,eachFunc)}}function createFindIndex(fromRight){return function(array,predicate,thisArg){if(!(array&&array.length)){return-1}predicate=getCallback(predicate,thisArg,3);return baseFindIndex(array,predicate,fromRight)}}function createFindKey(objectFunc){return function(object,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(object,predicate,objectFunc,true)}}function createFlow(fromRight){return function(){var wrapper,length=arguments.length,index=fromRight?length:-1,leftIndex=0,funcs=Array(length);while(fromRight?index--:++index<length){var func=funcs[leftIndex++]=arguments[index];if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(!wrapper&&LodashWrapper.prototype.thru&&getFuncName(func)=="wrapper"){wrapper=new LodashWrapper([],true)}}index=wrapper?-1:length;while(++index<length){func=funcs[index];var funcName=getFuncName(func),data=funcName=="wrapper"?getData(func):undefined;if(data&&isLaziable(data[0])&&data[1]==(ARY_FLAG|CURRY_FLAG|PARTIAL_FLAG|REARG_FLAG)&&!data[4].length&&data[9]==1){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3])}else{wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}}return function(){var args=arguments,value=args[0];if(wrapper&&args.length==1&&isArray(value)&&value.length>=LARGE_ARRAY_SIZE){return wrapper.plant(value).value()}var index=0,result=length?funcs[index].apply(this,args):value;while(++index<length){result=funcs[index].call(this,result)}return result}}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return typeof iteratee=="function"&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function createForIn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||thisArg!==undefined){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee,keysIn)}}function createForOwn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||thisArg!==undefined){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee)}}function createObjectMapper(isMapKeys){return function(object,iteratee,thisArg){var result={};iteratee=getCallback(iteratee,thisArg,3);baseForOwn(object,function(value,key,object){var mapped=iteratee(value,key,object);key=isMapKeys?mapped:key;value=isMapKeys?value:mapped;result[key]=value});return result}}function createPadDir(fromRight){return function(string,length,chars){string=baseToString(string);return(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}function createPartial(flag){var partialFunc=restParam(function(func,partials){var holders=replaceHolders(partials,partialFunc.placeholder);return createWrapper(func,flag,undefined,partials,holders)});return partialFunc}function createReduce(arrayFunc,eachFunc){return function(collection,iteratee,accumulator,thisArg){var initFromArray=arguments.length<3;return typeof iteratee=="function"&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee,accumulator,initFromArray):baseReduce(collection,getCallback(iteratee,thisArg,4),accumulator,initFromArray,eachFunc)}}function createHybridWrapper(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&ARY_FLAG,isBind=bitmask&BIND_FLAG,isBindKey=bitmask&BIND_KEY_FLAG,isCurry=bitmask&CURRY_FLAG,isCurryBound=bitmask&CURRY_BOUND_FLAG,isCurryRight=bitmask&CURRY_RIGHT_FLAG,Ctor=isBindKey?undefined:createCtorWrapper(func);function wrapper(){var length=arguments.length,index=length,args=Array(length);while(index--){args[index]=arguments[index]}if(partials){args=composeArgs(args,partials,holders)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight)}if(isCurry||isCurryRight){var placeholder=wrapper.placeholder,argsHolders=replaceHolders(args,placeholder);length-=argsHolders.length;if(length<arity){var newArgPos=argPos?arrayCopy(argPos):undefined,newArity=nativeMax(arity-length,0),newsHolders=isCurry?argsHolders:undefined,newHoldersRight=isCurry?undefined:argsHolders,newPartials=isCurry?args:undefined,newPartialsRight=isCurry?undefined:args;bitmask|=isCurry?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG);if(!isCurryBound){bitmask&=~(BIND_FLAG|BIND_KEY_FLAG)}var newData=[func,bitmask,thisArg,newPartials,newsHolders,newPartialsRight,newHoldersRight,newArgPos,ary,newArity],result=createHybridWrapper.apply(undefined,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return result}}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;if(argPos){args=reorder(args,argPos)}if(isAry&&ary<args.length){args.length=ary}if(this&&this!==root&&this instanceof wrapper){fn=Ctor||createCtorWrapper(func)}return fn.apply(thisBinding,args)}return wrapper}function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}function createPartialWrapper(func,bitmask,thisArg,partials){var isBind=bitmask&BIND_FLAG,Ctor=createCtorWrapper(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength);while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,args)}return wrapper}function createRound(methodName){var func=Math[methodName];return function(number,precision){precision=precision===undefined?0:+precision||0;if(precision){precision=pow(10,precision);return func(number*precision)/precision}return func(number)}}function createSortedIndex(retHighest){return function(array,value,iteratee,thisArg){var callback=getCallback(iteratee);return iteratee==null&&callback===baseCallback?binaryIndex(array,value,retHighest):binaryIndexBy(array,value,callback(iteratee,thisArg,1),retHighest)}}function createWrapper(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var length=partials?partials.length:0;if(!length){bitmask&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG);partials=holders=undefined}length-=holders?holders.length:0;if(bitmask&PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data);bitmask=newData[1];arity=newData[9]}newData[9]=arity==null?isBindKey?0:func.length:nativeMax(arity-length,0)||0;if(bitmask==BIND_FLAG){var result=createBindWrapper(newData[0],newData[2])}else if((bitmask==PARTIAL_FLAG||bitmask==(BIND_FLAG|PARTIAL_FLAG))&&!newData[4].length){result=createPartialWrapper.apply(undefined,newData)}else{result=createHybridWrapper.apply(undefined,newData)}var setter=data?baseSetData:setData;return setter(result,newData)}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength)){return false}while(++index<arrLength){var arrValue=array[index],othValue=other[index],result=customizer?customizer(isLoose?othValue:arrValue,isLoose?arrValue:othValue,index):undefined;if(result!==undefined){if(result){continue}return false}if(isLoose){if(!arraySome(other,function(othValue){return arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)})){return false}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))){return false}}return true}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==+other;case regexpTag:case stringTag:return object==other+""}return false}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isLoose?key in other:hasOwnProperty.call(other,key))){return false}}var skipCtor=isLoose;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key],result=customizer?customizer(isLoose?othValue:objValue,isLoose?objValue:othValue,key):undefined;if(!(result===undefined?equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB):result)){return false}skipCtor||(skipCtor=key=="constructor")}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){return false}}return true}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;result=result===callback?baseCallback:result;return argCount?result(func,thisArg,argCount):result}var getData=!metaMap?noop:function(func){return metaMap.get(func)};function getFuncName(func){var result=func.name,array=realNames[result],length=array?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;result=result===indexOf?baseIndexOf:result;return collection?result(collection,target,fromIndex):result}var getLength=baseProperty("length");function getMatchData(object){var result=pairs(object),length=result.length;while(length--){result[length][2]=isStrictComparable(result[length][1])}return result}function getNative(object,key){var value=object==null?undefined:object[key];return isNative(value)?value:undefined}function getView(start,end,transforms){var index=-1,length=transforms.length;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size);break}}return{start:start,end:end}}function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}function initCloneObject(object){var Ctor=object.constructor;if(!(typeof Ctor=="function"&&Ctor instanceof Ctor)){Ctor=Object}return new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function invokePath(object,path,args){if(object!=null&&!isKey(path,object)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));path=last(path)}var func=object==null?object:object[path];return func==null?undefined:func.apply(object,args)}function isArrayLike(value){return value!=null&&isLength(getLength(value))}function isIndex(value,length){value=typeof value=="number"||reIsUint.test(value)?+value:-1;length=length==null?MAX_SAFE_INTEGER:length;return value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){var other=object[index];return value===value?value===other:other!==other}return false}function isKey(value,object){var type=typeof value;if(type=="string"&&reIsPlainProp.test(value)||type=="number"){return true}if(isArray(value)){return false}var result=!reIsDeepProp.test(value);return result||object!=null&&value in toObject(object)}function isLaziable(func){var funcName=getFuncName(func);if(!(funcName in LazyWrapper.prototype)){return false}var other=lodash[funcName];if(func===other){return true}var data=getData(other);return!!data&&func===data[0]}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isStrictComparable(value){return value===value&&!isObject(value)}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<ARY_FLAG;var isCombo=srcBitmask==ARY_FLAG&&bitmask==CURRY_FLAG||srcBitmask==ARY_FLAG&&bitmask==REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(ARY_FLAG|REARG_FLAG)&&bitmask==CURRY_FLAG;if(!(isCommon||isCombo)){return data}if(srcBitmask&BIND_FLAG){data[2]=source[2];newBitmask|=bitmask&BIND_FLAG?0:CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):arrayCopy(value);data[4]=partials?replaceHolders(data[3],PLACEHOLDER):arrayCopy(source[4])}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):arrayCopy(value);data[6]=partials?replaceHolders(data[5],PLACEHOLDER):arrayCopy(source[6])}value=source[7];if(value){data[7]=arrayCopy(value)}if(srcBitmask&ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}function mergeDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:merge(objectValue,sourceValue,mergeDefaults)}function pickByArray(object,props){object=toObject(object);var index=-1,length=props.length,result={};while(++index<length){var key=props[index];if(key in object){result[key]=object[key]}}return result}function pickByCallback(object,predicate){var result={};baseForIn(object,function(value,key,object){if(predicate(value,key,object)){result[key]=value}});return result}function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=arrayCopy(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}var setData=function(){var count=0,lastCalled=0;return function(key,value){var stamp=now(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return key}}else{count=0}return baseSetData(key,value)}}();function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object));var index=-1,result=[];while(++index<propsLength){var key=props[index];if(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key)){result.push(key)}}return result}function toIterable(value){if(value==null){return[]}if(!isArrayLike(value)){return values(value)}return isObject(value)?value:Object(value)}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value)){return value}var result=[];baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)});return result}function wrapperClone(wrapper){return wrapper instanceof LazyWrapper?wrapper.clone():new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__,arrayCopy(wrapper.__actions__))}function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size==null){size=1}else{size=nativeMax(nativeFloor(size)||1,1)}var index=0,length=array?array.length:0,resIndex=-1,result=Array(nativeCeil(length/size));while(index<length){result[++resIndex]=baseSlice(array,index,index+=size)}return result}function compact(array){var index=-1,length=array?array.length:0,resIndex=-1,result=[];while(++index<length){var value=array[index];if(value){result[++resIndex]=value}}return result}var difference=restParam(function(array,values){return isObjectLike(array)&&isArrayLike(array)?baseDifference(array,baseFlatten(values,false,true)):[]});function drop(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,n<0?0:n)}function dropRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,0,n<0?0:n)}function dropRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true,true):[]}function dropWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true):[]}function fill(array,value,start,end){var length=array?array.length:0;if(!length){return[]}if(start&&typeof start!="number"&&isIterateeCall(array,value,start)){start=0;end=length}return baseFill(array,value,start,end)}var findIndex=createFindIndex();var findLastIndex=createFindIndex(true);function first(array){return array?array[0]:undefined}function flatten(array,isDeep,guard){var length=array?array.length:0;if(guard&&isIterateeCall(array,isDeep,guard)){isDeep=false}return length?baseFlatten(array,isDeep):[]}function flattenDeep(array){var length=array?array.length:0;return length?baseFlatten(array,true):[]}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex}else if(fromIndex){var index=binaryIndex(array,value);if(index<length&&(value===value?value===array[index]:array[index]!==array[index])){return index}return-1}return baseIndexOf(array,value,fromIndex||0)}function initial(array){return dropRight(array,1)}var intersection=restParam(function(arrays){var othLength=arrays.length,othIndex=othLength,caches=Array(length),indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,result=[];while(othIndex--){var value=arrays[othIndex]=isArrayLike(value=arrays[othIndex])?value:[];caches[othIndex]=isCommon&&value.length>=120?createCache(othIndex&&value):null}var array=arrays[0],index=-1,length=array?array.length:0,seen=caches[0];outer:while(++index<length){value=array[index];if((seen?cacheIndexOf(seen,value):indexOf(result,value,0))<0){var othIndex=othLength;while(--othIndex){var cache=caches[othIndex];if((cache?cacheIndexOf(cache,value):indexOf(arrays[othIndex],value,0))<0){continue outer}}if(seen){seen.push(value)}result.push(value)}}return result});function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}var index=length;if(typeof fromIndex=="number"){index=(fromIndex<0?nativeMax(length+fromIndex,0):nativeMin(fromIndex||0,length-1))+1}else if(fromIndex){index=binaryIndex(array,value,true)-1;var other=array[index];if(value===value?value===other:other!==other){return index}return-1}if(value!==value){return indexOfNaN(array,index,true)}while(index--){if(array[index]===value){return index}}return-1}function pull(){var args=arguments,array=args[0];if(!(array&&array.length)){return array}var index=0,indexOf=getIndexOf(),length=args.length;while(++index<length){var fromIndex=0,value=args[index];while((fromIndex=indexOf(array,value,fromIndex))>-1){splice.call(array,fromIndex,1)}}return array}var pullAt=restParam(function(array,indexes){indexes=baseFlatten(indexes);var result=baseAt(array,indexes);basePullAt(array,indexes.sort(baseCompareAscending));return result});function remove(array,predicate,thisArg){var result=[];if(!(array&&array.length)){return result}var index=-1,indexes=[],length=array.length;predicate=getCallback(predicate,thisArg,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index)}}basePullAt(array,indexes);return result}function rest(array){return drop(array,1)}function slice(array,start,end){var length=array?array.length:0;if(!length){return[]}if(end&&typeof end!="number"&&isIterateeCall(array,start,end)){start=0;end=length}return baseSlice(array,start,end)}var sortedIndex=createSortedIndex();var sortedLastIndex=createSortedIndex(true);function take(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,0,n<0?0:n)}function takeRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,n<0?0:n)}function takeRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),false,true):[]}function takeWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3)):[]}var union=restParam(function(arrays){return baseUniq(baseFlatten(arrays,false,true))});function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?undefined:isSorted;isSorted=false}var callback=getCallback();if(!(iteratee==null&&callback===baseCallback)){iteratee=callback(iteratee,thisArg,3)}return isSorted&&getIndexOf()==baseIndexOf?sortedUniq(array,iteratee):baseUniq(array,iteratee)}function unzip(array){if(!(array&&array.length)){return[]}var index=-1,length=0;array=arrayFilter(array,function(group){if(isArrayLike(group)){length=nativeMax(group.length,length);return true}});var result=Array(length);while(++index<length){result[index]=arrayMap(array,baseProperty(index))}return result}function unzipWith(array,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}var result=unzip(array);if(iteratee==null){return result}iteratee=bindCallback(iteratee,thisArg,4);return arrayMap(result,function(group){return arrayReduce(group,iteratee,undefined,true)})}var without=restParam(function(array,values){return isArrayLike(array)?baseDifference(array,values):[]});function xor(){var index=-1,length=arguments.length;while(++index<length){var array=arguments[index];if(isArrayLike(array)){var result=result?arrayPush(baseDifference(result,array),baseDifference(array,result)):array}}return result?baseUniq(result):[]}var zip=restParam(unzip);function zipObject(props,values){var index=-1,length=props?props.length:0,result={};if(length&&!values&&!isArray(props[0])){values=[]}while(++index<length){var key=props[index];if(values){result[key]=values[index]}else if(key){result[key[0]]=key[1]}}return result}var zipWith=restParam(function(arrays){var length=arrays.length,iteratee=length>2?arrays[length-2]:undefined,thisArg=length>1?arrays[length-1]:undefined;if(length>2&&typeof iteratee=="function"){length-=2}else{iteratee=length>1&&typeof thisArg=="function"?(--length,thisArg):undefined;thisArg=undefined}arrays.length=length;return unzipWith(arrays,iteratee,thisArg)});function chain(value){var result=lodash(value);result.__chain__=true;return result}function tap(value,interceptor,thisArg){interceptor.call(thisArg,value);return value}function thru(value,interceptor,thisArg){return interceptor.call(thisArg,value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}var wrapperConcat=restParam(function(values){values=baseFlatten(values);return this.thru(function(array){return arrayConcat(isArray(array)?array:[toObject(array)],values)})});function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);if(result){previous.__wrapped__=clone}else{result=clone}var previous=clone;parent=parent.__wrapped__}previous.__wrapped__=value;return result}function wrapperReverse(){var value=this.__wrapped__;var interceptor=function(value){return wrapped&&wrapped.__dir__<0?value:value.reverse()};if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this)}wrapped=wrapped.reverse();wrapped.__actions__.push({func:thru,args:[interceptor],thisArg:undefined});return new LodashWrapper(wrapped,this.__chain__)}return this.thru(interceptor)}function wrapperToString(){return this.value()+""}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var at=restParam(function(collection,props){return baseAt(collection,baseFlatten(props))});var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1});function every(collection,predicate,thisArg){var func=isArray(collection)?arrayEvery:baseEvery;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=undefined}if(typeof predicate!="function"||thisArg!==undefined){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function filter(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,predicate)}var find=createFind(baseEach);var findLast=createFind(baseEachRight,true);function findWhere(collection,source){return find(collection,baseMatches(source))}var forEach=createForEach(arrayEach,baseEach);var forEachRight=createForEach(arrayEachRight,baseEachRight);var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;if(!isLength(length)){collection=values(collection);length=collection.length}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<=length&&collection.indexOf(target,fromIndex)>-1:!!length&&getIndexOf(collection,target,fromIndex)>-1}var indexBy=createAggregator(function(result,value,key){result[key]=value});var invoke=restParam(function(collection,path,args){var index=-1,isFunc=typeof path=="function",isProp=isKey(path),result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){var func=isFunc?path:isProp&&value!=null?value[path]:undefined;result[++index]=func?func.apply(value,args):invokePath(value,path,args)});return result});function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=getCallback(iteratee,thisArg,3);return func(collection,iteratee)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function pluck(collection,path){return map(collection,property(path))}var reduce=createReduce(arrayReduce,baseEach);var reduceRight=createReduce(arrayReduceRight,baseEachRight);function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n==null){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var index=-1,result=toArray(collection),length=result.length,lastIndex=length-1;n=nativeMin(n<0?0:+n||0,length);while(++index<n){var rand=baseRandom(index,lastIndex),value=result[rand];result[rand]=result[index];result[index]=value}result.length=n;return result}function shuffle(collection){return sample(collection,POSITIVE_INFINITY)}function size(collection){var length=collection?getLength(collection):0;return isLength(length)?length:keys(collection).length}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=undefined}if(typeof predicate!="function"||thisArg!==undefined){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}var index=-1;iteratee=getCallback(iteratee,thisArg,3);var result=baseMap(collection,function(value,key,collection){return{criteria:iteratee(value,key,collection),index:++index,value:value}});return baseSortBy(result,compareAscending)}var sortByAll=restParam(function(collection,iteratees){if(collection==null){return[]}var guard=iteratees[2];if(guard&&isIterateeCall(iteratees[0],iteratees[1],guard)){iteratees.length=1}return baseSortByOrder(collection,baseFlatten(iteratees),[])});function sortByOrder(collection,iteratees,orders,guard){if(collection==null){return[]}if(guard&&isIterateeCall(iteratees,orders,guard)){orders=undefined}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees]}if(!isArray(orders)){orders=orders==null?[]:[orders]}return baseSortByOrder(collection,iteratees,orders)}function where(collection,source){return filter(collection,baseMatches(source))}var now=nativeNow||function(){return(new Date).getTime()};function after(n,func){if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}n=nativeIsFinite(n=+n)?n:0;return function(){if(--n<1){return func.apply(this,arguments)}}}function ary(func,n,guard){if(guard&&isIterateeCall(func,n,guard)){n=undefined}n=func&&n==null?func.length:nativeMax(+n||0,0);return createWrapper(func,ARY_FLAG,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}return function(){if(--n>0){result=func.apply(this,arguments)}if(n<=1){func=undefined}return result}}var bind=restParam(function(func,thisArg,partials){var bitmask=BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)});var bindAll=restParam(function(object,methodNames){methodNames=methodNames.length?baseFlatten(methodNames):functions(object);var index=-1,length=methodNames.length;while(++index<length){var key=methodNames[index];object[key]=createWrapper(object[key],BIND_FLAG,object)}return object});var bindKey=restParam(function(object,key,partials){var bitmask=BIND_FLAG|BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,bindKey.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(key,bitmask,object,partials,holders)});var curry=createCurry(CURRY_FLAG);var curryRight=createCurry(CURRY_RIGHT_FLAG);function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=!!options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?!!options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}lastCalled=0;maxTimeoutId=timeoutId=trailingCall=undefined}function complete(isCalled,id){if(id){clearTimeout(id)}maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=undefined}}}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){complete(trailingCall,maxTimeoutId)}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){complete(trailing,timeoutId)}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=undefined}return result}debounced.cancel=cancel;return debounced}var defer=restParam(function(func,args){return baseDelay(func,1,args)});var delay=restParam(function(func,wait,args){return baseDelay(func,wait,args)});var flow=createFlow();var flowRight=createFlow(true);function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new memoize.Cache;return memoized}var modArgs=restParam(function(func,transforms){transforms=baseFlatten(transforms);if(typeof func!="function"||!arrayEvery(transforms,baseIsFunction)){throw new TypeError(FUNC_ERROR_TEXT)}var length=transforms.length;return restParam(function(args){var index=nativeMin(args.length,length);while(index--){args[index]=transforms[index](args[index])}return func.apply(this,args)})});function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){return!predicate.apply(this,arguments)}}function once(func){return before(2,func)}var partial=createPartial(PARTIAL_FLAG);var partialRight=createPartial(PARTIAL_RIGHT_FLAG);var rearg=restParam(function(func,indexes){return createWrapper(func,REARG_FLAG,undefined,undefined,undefined,baseFlatten(indexes))});function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(start===undefined?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++index<length){rest[index]=args[start+index]}switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);index=-1;while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=rest;return func.apply(this,otherArgs)}}function spread(func){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(array){return func.apply(this,array)}}function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}return debounce(func,wait,{leading:leading,maxWait:+wait,trailing:trailing})}function wrap(value,wrapper){wrapper=wrapper==null?identity:wrapper;return createWrapper(wrapper,PARTIAL_FLAG,undefined,[value],[])}function clone(value,isDeep,customizer,thisArg){if(isDeep&&typeof isDeep!="boolean"&&isIterateeCall(value,isDeep,customizer)){isDeep=false}else if(typeof isDeep=="function"){thisArg=customizer;customizer=isDeep;isDeep=false}return typeof customizer=="function"?baseClone(value,isDeep,bindCallback(customizer,thisArg,1)):baseClone(value,isDeep)}function cloneDeep(value,customizer,thisArg){return typeof customizer=="function"?baseClone(value,true,bindCallback(customizer,thisArg,1)):baseClone(value,true)}function gt(value,other){return value>other}function gte(value,other){return value>=other}function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")}var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};function isBoolean(value){return value===true||value===false||isObjectLike(value)&&objToString.call(value)==boolTag}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag}function isElement(value){return!!value&&value.nodeType===1&&isObjectLike(value)&&!isPlainObject(value)}function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))){return!value.length}return!keys(value).length}function isEqual(value,other,customizer,thisArg){customizer=typeof customizer=="function"?bindCallback(customizer,thisArg,3):undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&typeof value.message=="string"&&objToString.call(value)==errorTag}function isFinite(value){return typeof value=="number"&&nativeIsFinite(value)}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isMatch(object,source,customizer,thisArg){customizer=typeof customizer=="function"?bindCallback(customizer,thisArg,3):undefined;return baseIsMatch(object,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(value==null){return false}if(isFunction(value)){return reIsNative.test(fnToString.call(value))}return isObjectLike(value)&&reIsHostCtor.test(value)}function isNull(value){return value===null}function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag}function isPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag&&!isArguments(value))||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return result===undefined||hasOwnProperty.call(value,result)}function isRegExp(value){return isObject(value)&&objToString.call(value)==regexpTag}function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function isUndefined(value){return value===undefined}function lt(value,other){return value<other}function lte(value,other){return value<=other}function toArray(value){var length=value?getLength(value):0;if(!isLength(length)){return values(value)}if(!length){return[]}return arrayCopy(value)}function toPlainObject(value){return baseCopy(value,keysIn(value))}var merge=createAssigner(baseMerge);var assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)});function create(prototype,properties,guard){var result=baseCreate(prototype);if(guard&&isIterateeCall(prototype,properties,guard)){properties=undefined}return properties?baseAssign(result,properties):result}var defaults=createDefaults(assign,assignDefaults);var defaultsDeep=createDefaults(merge,mergeDefaults);var findKey=createFindKey(baseForOwn);var findLastKey=createFindKey(baseForOwnRight);var forIn=createForIn(baseFor);var forInRight=createForIn(baseForRight);var forOwn=createForOwn(baseForOwn);var forOwnRight=createForOwn(baseForOwnRight);function functions(object){return baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=object==null?undefined:baseGet(object,toPath(path),path+"");return result===undefined?defaultValue:result}function has(object,path){if(object==null){return false}var result=hasOwnProperty.call(object,path);if(!result&&!isKey(path)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));if(object==null){return false}path=last(path);result=hasOwnProperty.call(object,path)}return result||isLength(object.length)&&isIndex(path,object.length)&&(isArray(object)||isArguments(object))}function invert(object,multiValue,guard){if(guard&&isIterateeCall(object,multiValue,guard)){multiValue=undefined}var index=-1,props=keys(object),length=props.length,result={};while(++index<length){var key=props[index],value=object[key];if(multiValue){if(hasOwnProperty.call(result,value)){result[value].push(key)}else{result[value]=[key]}}else{result[value]=key}}return result}var keys=!nativeKeys?shimKeys:function(object){var Ctor=object==null?undefined:object.constructor;if(typeof Ctor=="function"&&Ctor.prototype===object||typeof object!="function"&&isArrayLike(object)){return shimKeys(object)}return isObject(object)?nativeKeys(object):[]};function keysIn(object){if(object==null){return[]}if(!isObject(object)){object=Object(object)}var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;var Ctor=object.constructor,index=-1,isProto=typeof Ctor=="function"&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;while(++index<length){result[index]=index+""}for(var key in object){if(!(skipIndexes&&isIndex(key,length))&&!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}var mapKeys=createObjectMapper(true);var mapValues=createObjectMapper();var omit=restParam(function(object,props){if(object==null){return{}}if(typeof props[0]!="function"){var props=arrayMap(baseFlatten(props),String);return pickByArray(object,baseDifference(keysIn(object),props))}var predicate=bindCallback(props[0],props[1],3);return pickByCallback(object,function(value,key,object){return!predicate(value,key,object)})});function pairs(object){object=toObject(object);var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){var key=props[index];result[index]=[key,object[key]]}return result}var pick=restParam(function(object,props){if(object==null){return{}}return typeof props[0]=="function"?pickByCallback(object,bindCallback(props[0],props[1],3)):pickByArray(object,baseFlatten(props))});function result(object,path,defaultValue){var result=object==null?undefined:object[path];if(result===undefined){if(object!=null&&!isKey(path,object)){path=toPath(path);object=path.length==1?object:baseGet(object,baseSlice(path,0,-1));result=object==null?undefined:object[last(path)]}result=result===undefined?defaultValue:result}return isFunction(result)?result.call(object):result}function set(object,path,value){if(object==null){return object}var pathKey=path+"";path=object[pathKey]!=null||isKey(path,object)?[pathKey]:toPath(path);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=path[index];if(isObject(nested)){if(index==lastIndex){nested[key]=value}else if(nested[key]==null){nested[key]=isIndex(path[index+1])?[]:{}}}nested=nested[key]}return object}function transform(object,iteratee,accumulator,thisArg){var isArr=isArray(object)||isTypedArray(object);iteratee=getCallback(iteratee,thisArg,4);if(accumulator==null){if(isArr||isObject(object)){var Ctor=object.constructor;if(isArr){accumulator=isArray(object)?new Ctor:[]}else{accumulator=baseCreate(isFunction(Ctor)?Ctor.prototype:undefined)}}else{accumulator={}}}(isArr?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)});return accumulator}function values(object){return baseValues(object,keys(object))}function valuesIn(object){return baseValues(object,keysIn(object))}function inRange(value,start,end){start=+start||0;if(end===undefined){end=start;start=0}else{end=+end||0}return value>=nativeMin(start,end)&&value<nativeMax(start,end)}function random(min,max,floating){if(floating&&isIterateeCall(min,max,floating)){max=floating=undefined}var noMin=min==null,noMax=max==null;if(floating==null){if(noMax&&typeof min=="boolean"){floating=min;min=1}else if(typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1;noMax=false}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?word.charAt(0).toUpperCase()+word.slice(1):word)});function capitalize(string){string=baseToString(string);return string&&string.charAt(0).toUpperCase()+string.slice(1)}function deburr(string){string=baseToString(string);return string&&string.replace(reLatin1,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=baseToString(string);target=target+"";var length=string.length;position=position===undefined?length:nativeMin(position<0?0:+position||0,length);position-=target.length;return position>=0&&string.indexOf(target,position)==position}function escape(string){string=baseToString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,escapeRegExpChar):string||"(?:)"}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()});function pad(string,length,chars){string=baseToString(string);length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length)){return string}var mid=(length-strLength)/2,leftLength=nativeFloor(mid),rightLength=nativeCeil(mid);chars=createPadding("",rightLength,chars);return chars.slice(0,leftLength)+string+chars}var padLeft=createPadDir();var padRight=createPadDir(true);function parseInt(string,radix,guard){if(guard?isIterateeCall(string,radix,guard):radix==null){radix=0}else if(radix){radix=+radix}string=trim(string);return nativeParseInt(string,radix||(reHasHexPrefix.test(string)?16:10))}function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=nativeFloor(n/2);string+=string}while(n);return result}var snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()});var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+(word.charAt(0).toUpperCase()+word.slice(1))});function startsWith(string,target,position){string=baseToString(string);position=position==null?0:nativeMin(position<0?0:+position||0,string.length);return string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;if(otherOptions&&isIterateeCall(string,options,otherOptions)){options=otherOptions=undefined}string=baseToString(string);options=assignWith(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var imports=assignWith(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");var sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable;if(!variable){source="with (obj) {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});result.source=source;if(isError(result)){throw result}return result}function trim(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1)}chars=chars+"";return string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)}function trimLeft(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string))}return string.slice(charsLeftIndex(string,chars+""))}function trimRight(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(0,trimmedRightIndex(string)+1)}return string.slice(0,charsRightIndex(string,chars+"")+1)}function trunc(string,options,guard){if(guard&&isIterateeCall(string,options,guard)){options=undefined}var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(options!=null){if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length;omission="omission"in options?baseToString(options.omission):omission}else{length=+options||0}}string=baseToString(string);if(length>=string.length){return string}var end=length-omission.length;if(end<1){return omission}var result=string.slice(0,end);if(separator==null){return result+omission}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);if(!separator.global){separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")}separator.lastIndex=0;while(match=separator.exec(substring)){newEnd=match.index}result=result.slice(0,newEnd==null?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index)}}return result+omission}function unescape(string){string=baseToString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){if(guard&&isIterateeCall(string,pattern,guard)){pattern=undefined}string=baseToString(string);return string.match(pattern||reWords)||[]}var attempt=restParam(function(func,args){try{return func.apply(undefined,args)}catch(e){return isError(e)?e:new Error(e)}});function callback(func,thisArg,guard){if(guard&&isIterateeCall(func,thisArg,guard)){thisArg=undefined}return isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,true))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,true))}var method=restParam(function(path,args){return function(object){return invokePath(object,path,args)}});var methodOf=restParam(function(object,args){return function(path){return invokePath(object,path,args)}});function mixin(object,source,options){if(options==null){var isObj=isObject(source),props=isObj?keys(source):undefined,methodNames=props&&props.length?baseFunctions(source,props):undefined;if(!(methodNames?methodNames.length:isObj)){methodNames=false;options=source;source=object;object=this}}if(!methodNames){methodNames=baseFunctions(source,keys(source))}var chain=true,index=-1,isFunc=isFunction(object),length=methodNames.length;if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}while(++index<length){var methodName=methodNames[index],func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(func){return function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=arrayCopy(this.__actions__);actions.push({func:func,args:arguments,thisArg:object});result.__chain__=chainAll;return result}return func.apply(object,arrayPush([this.value()],arguments))}}(func)}}return object}function noConflict(){root._=oldDash;return this}function noop(){}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}function propertyOf(object){return function(path){return baseGet(object,toPath(path),path+"")}}function range(start,end,step){if(step&&isIterateeCall(start,end,step)){end=step=undefined}start=+start||0;step=step==null?1:+step||0;if(end==null){end=start;start=0}else{end=+end||0}var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(++index<length){result[index]=start;start+=step}return result}function times(n,iteratee,thisArg){n=nativeFloor(n);if(n<1||!nativeIsFinite(n)){return[]}var index=-1,result=Array(nativeMin(n,MAX_ARRAY_LENGTH));iteratee=bindCallback(iteratee,thisArg,1);while(++index<n){if(index<MAX_ARRAY_LENGTH){result[index]=iteratee(index)}else{iteratee(index)}}return result}function uniqueId(prefix){var id=++idCounter;return baseToString(prefix)+id}function add(augend,addend){return(+augend||0)+(+addend||0)}var ceil=createRound("ceil");var floor=createRound("floor");var max=createExtremum(gt,NEGATIVE_INFINITY);var min=createExtremum(lt,POSITIVE_INFINITY);var round=createRound("round");function sum(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=undefined}iteratee=getCallback(iteratee,thisArg,3);return iteratee.length==1?arraySum(isArray(collection)?collection:toIterable(collection),iteratee):baseSum(collection,iteratee)}lodash.prototype=baseLodash.prototype;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;MapCache.prototype["delete"]=mapDelete;MapCache.prototype.get=mapGet;MapCache.prototype.has=mapHas;MapCache.prototype.set=mapSet;SetCache.prototype.push=cachePush;memoize.Cache=MapCache;lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.callback=callback;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defaultsDeep=defaultsDeep;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flow=flow;lodash.flowRight=flowRight;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.functions=functions;lodash.groupBy=groupBy;lodash.indexBy=indexBy;lodash.initial=initial;lodash.intersection=intersection;lodash.invert=invert;lodash.invoke=invoke;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.modArgs=modArgs;lodash.negate=negate;lodash.omit=omit;lodash.once=once;lodash.pairs=pairs;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pluck=pluck;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAt=pullAt;lodash.range=range;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.restParam=restParam;lodash.set=set;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortByAll=sortByAll;lodash.sortByOrder=sortByOrder;lodash.spread=spread;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.times=times;lodash.toArray=toArray;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.union=union;lodash.uniq=uniq;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.where=where;lodash.without=without;lodash.wrap=wrap;lodash.xor=xor;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipWith=zipWith;lodash.backflow=flowRight;lodash.collect=map;lodash.compose=flowRight;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.extend=assign;lodash.iteratee=callback;lodash.methods=functions;lodash.object=zipObject;lodash.select=filter;lodash.tail=rest;lodash.unique=uniq;mixin(lodash,lodash);lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.deburr=deburr;lodash.endsWith=endsWith;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.findWhere=findWhere;lodash.first=first;lodash.floor=floor;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isBoolean=isBoolean;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isMatch=isMatch;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isString=isString;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.min=min;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padLeft=padLeft;lodash.padRight=padRight;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedLastIndex=sortedLastIndex;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.sum=sum;lodash.template=template;lodash.trim=trim;lodash.trimLeft=trimLeft;lodash.trimRight=trimRight;lodash.trunc=trunc;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.words=words;lodash.all=every;lodash.any=some;lodash.contains=includes;lodash.eq=isEqual;lodash.detect=find;lodash.foldl=reduce;lodash.foldr=reduceRight;lodash.head=first;lodash.include=includes;lodash.inject=reduce;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!lodash.prototype[methodName]){source[methodName]=func}});return source}(),false);lodash.sample=sample;lodash.prototype.sample=function(n){if(!this.__chain__&&n==null){return sample(this.value())}return this.thru(function(value){return sample(value,n)})};lodash.VERSION=VERSION;arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash});arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){var filtered=this.__filtered__;if(filtered&&!index){return new LazyWrapper(this)}n=n==null?1:nativeMax(nativeFloor(n)||0,0);var result=this.clone();if(filtered){result.__takeCount__=nativeMin(result.__takeCount__,n)}else{result.__views__.push({size:n,type:methodName+(result.__dir__<0?"Right":"")})}return result};LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}});arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type!=LAZY_MAP_FLAG;LazyWrapper.prototype[methodName]=function(iteratee,thisArg){var result=this.clone();result.__iteratees__.push({iteratee:getCallback(iteratee,thisArg,1),type:type});result.__filtered__=result.__filtered__||isFilter;return result}});arrayEach(["first","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}});arrayEach(["initial","rest"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}});arrayEach(["pluck","where"],function(methodName,index){var operationName=index?"filter":"map",createCallback=index?baseMatches:property;LazyWrapper.prototype[methodName]=function(value){return this[operationName](createCallback(value))}});LazyWrapper.prototype.compact=function(){return this.filter(identity)};LazyWrapper.prototype.reject=function(predicate,thisArg){predicate=getCallback(predicate,thisArg,1);return this.filter(function(value){return!predicate(value)})};LazyWrapper.prototype.slice=function(start,end){start=start==null?0:+start||0;var result=this;if(result.__filtered__&&(start>0||end<0)){return new LazyWrapper(result)}if(start<0){result=result.takeRight(-start)}else if(start){result=result.drop(start)}if(end!==undefined){end=+end||0;result=end<0?result.dropRight(-end):result.take(end-start)}return result};LazyWrapper.prototype.takeRightWhile=function(predicate,thisArg){return this.reverse().takeWhile(predicate,thisArg).reverse()};LazyWrapper.prototype.toArray=function(){return this.take(POSITIVE_INFINITY)};baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|map|reject)|While$/.test(methodName),retUnwrapped=/^(?:first|last)$/.test(methodName),lodashFunc=lodash[retUnwrapped?"take"+(methodName=="last"?"Right":""):methodName];if(!lodashFunc){return}lodash.prototype[methodName]=function(){var args=retUnwrapped?[1]:arguments,chainAll=this.__chain__,value=this.__wrapped__,isHybrid=!!this.__actions__.length,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);if(useLazy&&checkIteratee&&typeof iteratee=="function"&&iteratee.length!=1){isLazy=useLazy=false}var interceptor=function(value){return retUnwrapped&&chainAll?lodashFunc(value,1)[0]:lodashFunc.apply(undefined,arrayPush([value],args))};var action={func:thru,args:[interceptor],thisArg:undefined},onlyLazy=isLazy&&!isHybrid;if(retUnwrapped&&!chainAll){if(onlyLazy){value=value.clone();value.__actions__.push(action);return func.call(value)}return lodashFunc.call(undefined,this.value())[0]}if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);result.__actions__.push(action);return new LodashWrapper(result,chainAll)}return this.thru(interceptor)}});arrayEach(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(methodName){var func=(/^(?:replace|split)$/.test(methodName)?stringProto:arrayProto)[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:join|pop|replace|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){return func.apply(this.value(),args)}return this[chainName](function(value){return func.apply(value,args)})}});baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name,names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}});realNames[createHybridWrapper(undefined,BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.concat=wrapperConcat;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toString=wrapperToString;lodash.prototype.run=lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.collect=lodash.prototype.map;lodash.prototype.head=lodash.prototype.first;lodash.prototype.select=lodash.prototype.filter;lodash.prototype.tail=lodash.prototype.rest;return lodash}var _=runInContext();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root._=_;define(function(){return _})}else if(freeExports&&freeModule){if(moduleExports){(freeModule.exports=_)._=_}else{freeExports._=_}}else{root._=_}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){(function(window,document,undefined){var _MAP={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"};var _KEYCODE_MAP={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"};var _SHIFT_MAP={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"};var _SPECIAL_ALIASES={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};var _REVERSE_MAP;for(var i=1;i<20;++i){_MAP[111+i]="f"+i}for(i=0;i<=9;++i){_MAP[i+96]=i}function _addEvent(object,type,callback){if(object.addEventListener){object.addEventListener(type,callback,false);return}object.attachEvent("on"+type,callback)}function _characterFromEvent(e){if(e.type=="keypress"){var character=String.fromCharCode(e.which);if(!e.shiftKey){character=character.toLowerCase()}return character}if(_MAP[e.which]){return _MAP[e.which]}if(_KEYCODE_MAP[e.which]){return _KEYCODE_MAP[e.which]}return String.fromCharCode(e.which).toLowerCase()}function _modifiersMatch(modifiers1,modifiers2){return modifiers1.sort().join(",")===modifiers2.sort().join(",")}function _eventModifiers(e){var modifiers=[];if(e.shiftKey){modifiers.push("shift")}if(e.altKey){modifiers.push("alt")}if(e.ctrlKey){modifiers.push("ctrl")}if(e.metaKey){modifiers.push("meta")}return modifiers}function _preventDefault(e){if(e.preventDefault){e.preventDefault();return}e.returnValue=false}function _stopPropagation(e){if(e.stopPropagation){e.stopPropagation();return}e.cancelBubble=true}function _isModifier(key){return key=="shift"||key=="ctrl"||key=="alt"||key=="meta"}function _getReverseMap(){if(!_REVERSE_MAP){_REVERSE_MAP={};for(var key in _MAP){if(key>95&&key<112){continue}if(_MAP.hasOwnProperty(key)){_REVERSE_MAP[_MAP[key]]=key}}}return _REVERSE_MAP}function _pickBestAction(key,modifiers,action){if(!action){action=_getReverseMap()[key]?"keydown":"keypress"}if(action=="keypress"&&modifiers.length){action="keydown"}return action}function _keysFromString(combination){if(combination==="+"){return["+"]}combination=combination.replace(/\+{2}/g,"+plus");return combination.split("+")}function _getKeyInfo(combination,action){var keys;var key;var i;var modifiers=[];keys=_keysFromString(combination);for(i=0;i<keys.length;++i){key=keys[i];if(_SPECIAL_ALIASES[key]){key=_SPECIAL_ALIASES[key]}if(action&&action!="keypress"&&_SHIFT_MAP[key]){key=_SHIFT_MAP[key];modifiers.push("shift")}if(_isModifier(key)){modifiers.push(key)}}action=_pickBestAction(key,modifiers,action);return{key:key,modifiers:modifiers,action:action}}function _belongsTo(element,ancestor){if(element===null||element===document){return false}if(element===ancestor){return true}return _belongsTo(element.parentNode,ancestor)}function Mousetrap(targetElement){var self=this;targetElement=targetElement||document;if(!(self instanceof Mousetrap)){return new Mousetrap(targetElement)}self.target=targetElement;self._callbacks={};self._directMap={};var _sequenceLevels={};var _resetTimer;var _ignoreNextKeyup=false;var _ignoreNextKeypress=false;var _nextExpectedAction=false;function _resetSequences(doNotReset){doNotReset=doNotReset||{};var activeSequences=false,key;for(key in _sequenceLevels){if(doNotReset[key]){activeSequences=true;continue}_sequenceLevels[key]=0}if(!activeSequences){_nextExpectedAction=false}}function _getMatches(character,modifiers,e,sequenceName,combination,level){var i;var callback;var matches=[];var action=e.type;if(!self._callbacks[character]){return[]}if(action=="keyup"&&_isModifier(character)){modifiers=[character]}for(i=0;i<self._callbacks[character].length;++i){callback=self._callbacks[character][i];if(!sequenceName&&callback.seq&&_sequenceLevels[callback.seq]!=callback.level){continue}if(action!=callback.action){continue}if(action=="keypress"&&!e.metaKey&&!e.ctrlKey||_modifiersMatch(modifiers,callback.modifiers)){var deleteCombo=!sequenceName&&callback.combo==combination;var deleteSequence=sequenceName&&callback.seq==sequenceName&&callback.level==level;if(deleteCombo||deleteSequence){self._callbacks[character].splice(i,1)}matches.push(callback)}}return matches}function _fireCallback(callback,e,combo,sequence){if(self.stopCallback(e,e.target||e.srcElement,combo,sequence)){return}if(callback(e,combo)===false){_preventDefault(e);_stopPropagation(e)}}self._handleKey=function(character,modifiers,e){var callbacks=_getMatches(character,modifiers,e);var i;var doNotReset={};var maxLevel=0;var processedSequenceCallback=false;for(i=0;i<callbacks.length;++i){if(callbacks[i].seq){maxLevel=Math.max(maxLevel,callbacks[i].level)}}for(i=0;i<callbacks.length;++i){if(callbacks[i].seq){if(callbacks[i].level!=maxLevel){continue}processedSequenceCallback=true;doNotReset[callbacks[i].seq]=1;_fireCallback(callbacks[i].callback,e,callbacks[i].combo,callbacks[i].seq);continue}if(!processedSequenceCallback){_fireCallback(callbacks[i].callback,e,callbacks[i].combo)}}var ignoreThisKeypress=e.type=="keypress"&&_ignoreNextKeypress;if(e.type==_nextExpectedAction&&!_isModifier(character)&&!ignoreThisKeypress){_resetSequences(doNotReset)}_ignoreNextKeypress=processedSequenceCallback&&e.type=="keydown"};function _handleKeyEvent(e){if(typeof e.which!=="number"){e.which=e.keyCode}var character=_characterFromEvent(e);if(!character){return}if(e.type=="keyup"&&_ignoreNextKeyup===character){_ignoreNextKeyup=false;return}self.handleKey(character,_eventModifiers(e),e)}function _resetSequenceTimer(){clearTimeout(_resetTimer);_resetTimer=setTimeout(_resetSequences,1e3)}function _bindSequence(combo,keys,callback,action){_sequenceLevels[combo]=0;function _increaseSequence(nextAction){return function(){_nextExpectedAction=nextAction;++_sequenceLevels[combo];_resetSequenceTimer()}}function _callbackAndReset(e){_fireCallback(callback,e,combo);if(action!=="keyup"){_ignoreNextKeyup=_characterFromEvent(e)}setTimeout(_resetSequences,10)}for(var i=0;i<keys.length;++i){var isFinal=i+1===keys.length;var wrappedCallback=isFinal?_callbackAndReset:_increaseSequence(action||_getKeyInfo(keys[i+1]).action);_bindSingle(keys[i],wrappedCallback,action,combo,i)}}function _bindSingle(combination,callback,action,sequenceName,level){self._directMap[combination+":"+action]=callback;combination=combination.replace(/\s+/g," ");var sequence=combination.split(" ");var info;if(sequence.length>1){_bindSequence(combination,sequence,callback,action);return}info=_getKeyInfo(combination,action);self._callbacks[info.key]=self._callbacks[info.key]||[];_getMatches(info.key,info.modifiers,{type:info.action},sequenceName,combination,level);self._callbacks[info.key][sequenceName?"unshift":"push"]({callback:callback,modifiers:info.modifiers,action:info.action,seq:sequenceName,level:level,combo:combination})}self._bindMultiple=function(combinations,callback,action){for(var i=0;i<combinations.length;++i){_bindSingle(combinations[i],callback,action)}};_addEvent(targetElement,"keypress",_handleKeyEvent);_addEvent(targetElement,"keydown",_handleKeyEvent);_addEvent(targetElement,"keyup",_handleKeyEvent)}Mousetrap.prototype.bind=function(keys,callback,action){var self=this;keys=keys instanceof Array?keys:[keys];self._bindMultiple.call(self,keys,callback,action);return self};Mousetrap.prototype.unbind=function(keys,action){var self=this;return self.bind.call(self,keys,function(){},action)};Mousetrap.prototype.trigger=function(keys,action){var self=this;if(self._directMap[keys+":"+action]){self._directMap[keys+":"+action]({},keys)}return self};Mousetrap.prototype.reset=function(){var self=this;self._callbacks={};self._directMap={};return self};Mousetrap.prototype.stopCallback=function(e,element){var self=this;if((" "+element.className+" ").indexOf(" mousetrap ")>-1){return false}if(_belongsTo(element,self.target)){return false}return element.tagName=="INPUT"||element.tagName=="SELECT"||element.tagName=="TEXTAREA"||element.isContentEditable};Mousetrap.prototype.handleKey=function(){var self=this;return self._handleKey.apply(self,arguments)};Mousetrap.init=function(){var documentMousetrap=Mousetrap(document);for(var method in documentMousetrap){if(method.charAt(0)!=="_"){Mousetrap[method]=function(method){return function(){return documentMousetrap[method].apply(documentMousetrap,arguments)}}(method)}}};Mousetrap.init();window.Mousetrap=Mousetrap;if(typeof module!=="undefined"&&module.exports){module.exports=Mousetrap}if(typeof define==="function"&&define.amd){define(function(){return Mousetrap})}})(window,document)},{}],4:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:5}],5:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=setTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;clearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){setTimeout(drainQueue,0)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],6:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=="object"&&module&&!module.nodeType&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal}var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,key;function error(type){throw RangeError(errors[type])}function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length])}return result}function mapDomain(string,fn){var parts=string.split("@");var result="";if(parts.length>1){result=parts[0]+"@";string=parts[1]}string=string.replace(regexSeparators,".");var labels=string.split(".");var encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){extra=string.charCodeAt(counter++);if((extra&64512)==56320){output.push(((value&1023)<<10)+(extra&1023)+65536)}else{output.push(value);counter--}}else{output.push(value)}}return output}function ucs2encode(array){return map(array,function(value){var output="";if(value>65535){value-=65536;output+=stringFromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=stringFromCharCode(value);return output}).join("")}function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22}if(codePoint-65<26){return codePoint-65}if(codePoint-97<26){return codePoint-97}return base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)}function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin)}return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,baseMinusT;basic=input.lastIndexOf(delimiter);if(basic<0){basic=0}for(j=0;j<basic;++j){if(input.charCodeAt(j)>=128){error("not-basic")}output.push(input.charCodeAt(j))}for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error("invalid-input")}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error("overflow")}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error("overflow")}w*=baseMinusT}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);if(floor(i/out)>maxInt-n){error("overflow")}n+=floor(i/out);i%=out;output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;input=ucs2decode(input);inputLength=input.length;n=initialN;delta=0;bias=initialBias;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<128){output.push(stringFromCharCode(currentValue))}}handledCPCount=basicLength=output.length;if(basicLength){output.push(delimiter)}while(handledCPCount<inputLength){for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m){m=currentValue}}handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error("overflow")}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error("overflow")}if(currentValue==n){for(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount}}++delta;++n}return output.join("")}function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}punycode={version:"1.3.2",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define("punycode",function(){return punycode})}else if(freeExports&&freeModule){if(module.exports==freeExports){freeModule.exports=punycode}else{for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key])}}}else{root.punycode=punycode}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],7:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&";eq=eq||"=";var obj={};if(typeof qs!=="string"||qs.length===0){return obj}var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;if(options&&typeof options.maxKeys==="number"){maxKeys=options.maxKeys}var len=qs.length;if(maxKeys>0&&len>maxKeys){len=maxKeys}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1)}else{kstr=x;vstr=""}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v}else if(isArray(obj[k])){obj[k].push(v)}else{obj[k]=[obj[k],v]}}return obj};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"}},{}],8:[function(require,module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){sep=sep||"&";eq=eq||"=";if(obj===null){obj=undefined}if(typeof obj==="object"){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep)}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]))}}).join(sep)}if(!name)return"";return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj))};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==="[object Array]"};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i))}return res}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key)}return res}},{}],9:[function(require,module,exports){"use strict";exports.decode=exports.parse=require("./decode");exports.encode=exports.stringify=require("./encode")},{"./decode":7,"./encode":8}],10:[function(require,module,exports){var punycode=require("punycode");exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true},querystring=require("querystring");function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&isObject(url)&&url instanceof Url)return url;var u=new Url;u.parse(url,parseQueryString,slashesDenoteHost);return u}Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!isString(url)){throw new TypeError("Parameter 'url' must be a string, not "+typeof url)}var rest=url;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto;rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes=rest.substr(0,2)==="//";if(slashes&&!(proto&&hostlessProtocol[proto])){rest=rest.substr(2);this.slashes=true}}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){var hostEnd=-1;for(var i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}var auth,atSign;if(hostEnd===-1){atSign=rest.lastIndexOf("@")}else{atSign=rest.lastIndexOf("@",hostEnd)}if(atSign!==-1){auth=rest.slice(0,atSign);rest=rest.slice(atSign+1);this.auth=decodeURIComponent(auth)}hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);if(hec!==-1&&(hostEnd===-1||hec<hostEnd))hostEnd=hec}if(hostEnd===-1)hostEnd=rest.length;this.host=rest.slice(0,hostEnd);rest=rest.slice(hostEnd);this.parseHost();this.hostname=this.hostname||"";var ipv6Hostname=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ipv6Hostname){var hostparts=this.hostname.split(/\./);for(var i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(!part)continue;if(!part.match(hostnamePartPattern)){var newpart="";for(var j=0,k=part.length;j<k;j++){if(part.charCodeAt(j)>127){newpart+="x"}else{newpart+=part[j]}}if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i);var notHost=hostparts.slice(i+1);var bit=part.match(hostnamePartStart);if(bit){validParts.push(bit[1]);notHost.unshift(bit[2])}if(notHost.length){rest="/"+notHost.join(".")+rest}this.hostname=validParts.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!ipv6Hostname){var domainArray=this.hostname.split(".");var newOut=[];for(var i=0;i<domainArray.length;++i){var s=domainArray[i];newOut.push(s.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(s):s)}this.hostname=newOut.join(".")}var p=this.port?":"+this.port:"";var h=this.hostname||"";this.host=h+p;this.href+=this.host;if(ipv6Hostname){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(rest[0]!=="/"){rest="/"+rest}}}if(!unsafeProtocol[lowerProto]){for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];var esc=encodeURIComponent(ae);if(esc===ae){esc=escape(ae)}rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");if(hash!==-1){this.hash=rest.substr(hash);rest=rest.slice(0,hash)}var qm=rest.indexOf("?");if(qm!==-1){this.search=rest.substr(qm);this.query=rest.substr(qm+1);if(parseQueryString){this.query=querystring.parse(this.query)}rest=rest.slice(0,qm)}else if(parseQueryString){this.search="";this.query={}}if(rest)this.pathname=rest;if(slashedProtocol[lowerProto]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var p=this.pathname||"";var s=this.search||"";this.path=p+s}this.href=this.format();return this};function urlFormat(obj){if(isString(obj))obj=urlParse(obj);if(!(obj instanceof Url))return Url.prototype.format.call(obj);return obj.format()}Url.prototype.format=function(){var auth=this.auth||"";if(auth){auth=encodeURIComponent(auth);auth=auth.replace(/%3A/i,":");auth+="@"}var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=false,query="";if(this.host){host=auth+this.host}else if(this.hostname){host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){host+=":"+this.port}}if(this.query&&isObject(this.query)&&Object.keys(this.query).length){query=querystring.stringify(this.query)}var search=this.search||query&&"?"+query||"";if(protocol&&protocol.substr(-1)!==":")protocol+=":";if(this.slashes||(!protocol||slashedProtocol[protocol])&&host!==false){host="//"+(host||"");if(pathname&&pathname.charAt(0)!=="/")pathname="/"+pathname}else if(!host){host=""}if(hash&&hash.charAt(0)!=="#")hash="#"+hash;if(search&&search.charAt(0)!=="?")search="?"+search;pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)});search=search.replace("#","%23");return protocol+host+pathname+search+hash};function urlResolve(source,relative){return urlParse(source,false,true).resolve(relative)}Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,false,true)).format()};function urlResolveObject(source,relative){if(!source)return relative;return urlParse(source,false,true).resolveObject(relative)}Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,false,true);relative=rel}var result=new Url;Object.keys(this).forEach(function(k){result[k]=this[k]},this);result.hash=relative.hash;if(relative.href===""){result.href=result.format();return result}if(relative.slashes&&!relative.protocol){Object.keys(relative).forEach(function(k){if(k!=="protocol")result[k]=relative[k]});if(slashedProtocol[result.protocol]&&result.hostname&&!result.pathname){result.path=result.pathname="/"}result.href=result.format();return result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){Object.keys(relative).forEach(function(k){result[k]=relative[k]});result.href=result.format();return result}result.protocol=relative.protocol;if(!relative.host&&!hostlessProtocol[relative.protocol]){var relPath=(relative.pathname||"").split("/");while(relPath.length&&!(relative.host=relPath.shift()));if(!relative.host)relative.host="";if(!relative.hostname)relative.hostname="";if(relPath[0]!=="")relPath.unshift("");if(relPath.length<2)relPath.unshift("");result.pathname=relPath.join("/")}else{result.pathname=relative.pathname}result.search=relative.search;result.query=relative.query;result.host=relative.host||"";result.auth=relative.auth;result.hostname=relative.hostname||relative.host;result.port=relative.port;if(result.pathname||result.search){var p=result.pathname||"";var s=result.search||"";result.path=p+s}result.slashes=result.slashes||relative.slashes;result.href=result.format();return result}var isSourceAbs=result.pathname&&result.pathname.charAt(0)==="/",isRelAbs=relative.host||relative.pathname&&relative.pathname.charAt(0)==="/",mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic){result.hostname="";result.port=null;if(result.host){if(srcPath[0]==="")srcPath[0]=result.host;else srcPath.unshift(result.host)}result.host="";if(relative.protocol){relative.hostname=null;relative.port=null;if(relative.host){if(relPath[0]==="")relPath[0]=relative.host;else relPath.unshift(relative.host)}relative.host=null}mustEndAbs=mustEndAbs&&(relPath[0]===""||srcPath[0]==="")}if(isRelAbs){result.host=relative.host||relative.host===""?relative.host:result.host;result.hostname=relative.hostname||relative.hostname===""?relative.hostname:result.hostname;result.search=relative.search;result.query=relative.query;srcPath=relPath}else if(relPath.length){if(!srcPath)srcPath=[];srcPath.pop();srcPath=srcPath.concat(relPath);result.search=relative.search;result.query=relative.query}else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}result.search=relative.search;result.query=relative.query;if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.href=result.format();return result}if(!srcPath.length){result.pathname=null;if(result.search){result.path="/"+result.search}else{result.path=null}result.href=result.format();return result}var last=srcPath.slice(-1)[0];var hasTrailingSlash=(result.host||relative.host)&&(last==="."||last==="..")||last==="";var up=0;for(var i=srcPath.length;i>=0;i--){last=srcPath[i];if(last=="."){srcPath.splice(i,1)}else if(last===".."){srcPath.splice(i,1);up++}else if(up){srcPath.splice(i,1);up--}}if(!mustEndAbs&&!removeAllDots){for(;up--;up){srcPath.unshift("..")}}if(mustEndAbs&&srcPath[0]!==""&&(!srcPath[0]||srcPath[0].charAt(0)!=="/")){srcPath.unshift("")}if(hasTrailingSlash&&srcPath.join("/").substr(-1)!=="/"){srcPath.push("")}var isAbsolute=srcPath[0]===""||srcPath[0]&&srcPath[0].charAt(0)==="/";if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):false;if(authInHost){result.auth=authInHost.shift();result.host=result.hostname=authInHost.shift()}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift("")}if(!srcPath.length){result.pathname=null;result.path=null}else{result.pathname=srcPath.join("/")}if(!isNull(result.pathname)||!isNull(result.search)){result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==":"){this.port=port.substr(1)}host=host.substr(0,host.length-port.length)}if(host)this.hostname=host};function isString(arg){return typeof arg==="string"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isNull(arg){return arg===null}function isNullOrUndefined(arg){return arg==null}},{punycode:6,querystring:9}],11:[function(require,module,exports){var $=require("jquery");function toggleDropdown(e){var $dropdown=$(e.currentTarget).parent().find(".dropdown-menu");$dropdown.toggleClass("open");e.stopPropagation();e.preventDefault()}function closeDropdown(e){$(".dropdown-menu").removeClass("open")}function init(){$(document).on("click",".toggle-dropdown",toggleDropdown);$(document).on("click",".dropdown-menu",function(e){e.stopPropagation()});$(document).on("click",closeDropdown)}module.exports={init:init}},{jquery:1}],12:[function(require,module,exports){var $=require("jquery");module.exports=$({})},{jquery:1}],13:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var storage=require("./storage");var dropdown=require("./dropdown");var events=require("./events");var state=require("./state");var keyboard=require("./keyboard");var navigation=require("./navigation");var sidebar=require("./sidebar");var toolbar=require("./toolbar");function start(config){sidebar.init();keyboard.init();dropdown.init();navigation.init();toolbar.createButton({index:0,icon:"fa fa-align-justify",label:"Toggle Sidebar",onClick:function(e){e.preventDefault();sidebar.toggle()}});events.trigger("start",config);navigation.notify()}var gitbook={start:start,events:events,state:state,toolbar:toolbar,sidebar:sidebar,storage:storage,keyboard:keyboard};var MODULES={gitbook:gitbook,jquery:$,lodash:_};window.gitbook=gitbook;window.$=$;window.jQuery=$;gitbook.require=function(mods,fn){mods=_.map(mods,function(mod){mod=mod.toLowerCase();if(!MODULES[mod]){throw new Error("GitBook module "+mod+" doesn't exist")}return MODULES[mod]});fn.apply(null,mods)};module.exports={}},{"./dropdown":11,"./events":12,"./keyboard":14,"./navigation":16,"./sidebar":18,"./state":19,"./storage":20,"./toolbar":21,jquery:1,lodash:2}],14:[function(require,module,exports){var Mousetrap=require("mousetrap");var navigation=require("./navigation");var sidebar=require("./sidebar");function bindShortcut(keys,fn){Mousetrap.bind(keys,function(e){fn();return false})}function init(){bindShortcut(["right"],function(e){navigation.goNext()});bindShortcut(["left"],function(e){navigation.goPrev()});bindShortcut(["s"],function(e){sidebar.toggle()})}module.exports={init:init,bind:bindShortcut}},{"./navigation":16,"./sidebar":18,mousetrap:3}],15:[function(require,module,exports){var state=require("./state");function showLoading(p){state.$book.addClass("is-loading");p.always(function(){state.$book.removeClass("is-loading")});return p}module.exports={show:showLoading}},{"./state":19}],16:[function(require,module,exports){var $=require("jquery");var url=require("url");var events=require("./events");var state=require("./state");var loading=require("./loading");var usePushState=typeof history.pushState!=="undefined";function handleNavigation(relativeUrl,push){var uri=url.resolve(window.location.pathname,relativeUrl);notifyPageChange();location.href=relativeUrl;return}function updateNavigationPosition(){var bodyInnerWidth,pageWrapperWidth;bodyInnerWidth=parseInt($(".body-inner").css("width"),10);pageWrapperWidth=parseInt($(".page-wrapper").css("width"),10);$(".navigation-next").css("margin-right",bodyInnerWidth-pageWrapperWidth+"px")}function notifyPageChange(){events.trigger("page.change")}function preparePage(notify){var $bookBody=$(".book-body");var $bookInner=$bookBody.find(".body-inner");var $pageWrapper=$bookInner.find(".page-wrapper");updateNavigationPosition();$bookInner.scrollTop(0);$bookBody.scrollTop(0);if(notify!==false)notifyPageChange()}function isLeftClickEvent(e){return e.button===0}function isModifiedEvent(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function handlePagination(e){if(isModifiedEvent(e)||!isLeftClickEvent(e)){return}e.stopPropagation();e.preventDefault();var url=$(this).attr("href");if(url)handleNavigation(url,true)}function goNext(){var url=$(".navigation-next").attr("href");if(url)handleNavigation(url,true)}function goPrev(){var url=$(".navigation-prev").attr("href");if(url)handleNavigation(url,true)}function init(){$.ajaxSetup({});if(location.protocol!=="file:"){history.replaceState({path:window.location.href},"")}window.onpopstate=function(event){if(event.state===null){return}return handleNavigation(event.state.path,false)};$(document).on("click",".navigation-prev",handlePagination);$(document).on("click",".navigation-next",handlePagination);$(document).on("click",".summary [data-path] a",handlePagination);$(window).resize(updateNavigationPosition);preparePage(false)}module.exports={init:init,goNext:goNext,goPrev:goPrev,notify:notifyPageChange}},{"./events":12,"./loading":15,"./state":19,jquery:1,url:10}],17:[function(require,module,exports){module.exports={isMobile:function(){return document.body.clientWidth<=600}}},{}],18:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var storage=require("./storage");var platform=require("./platform");var state=require("./state");function toggleSidebar(_state,animation){if(state!=null&&isOpen()==_state)return;if(animation==null)animation=true;state.$book.toggleClass("without-animation",!animation);state.$book.toggleClass("with-summary",_state);storage.set("sidebar",isOpen())}function isOpen(){return state.$book.hasClass("with-summary")}function init(){if(platform.isMobile()){toggleSidebar(false,false)}else{toggleSidebar(storage.get("sidebar",true),false)}$(document).on("click",".book-summary li.chapter a",function(e){if(platform.isMobile())toggleSidebar(false,false)})}function filterSummary(paths){var $summary=$(".book-summary");$summary.find("li").each(function(){var path=$(this).data("path");var st=paths==null||_.contains(paths,path);$(this).toggle(st);if(st)$(this).parents("li").show()})}module.exports={init:init,isOpen:isOpen,toggle:toggleSidebar,filter:filterSummary}},{"./platform":17,"./state":19,"./storage":20,jquery:1,lodash:2}],19:[function(require,module,exports){var $=require("jquery");var url=require("url");var path=require("path");var state={};state.update=function(dom){var $book=$(dom.find(".book"));state.$book=$book;state.level=$book.data("level");state.basePath=$book.data("basepath");state.innerLanguage=$book.data("innerlanguage");state.revision=$book.data("revision");state.filepath=$book.data("filepath");state.chapterTitle=$book.data("chapter-title");state.root=url.resolve(location.protocol+"//"+location.host,path.dirname(path.resolve(location.pathname.replace(/\/$/,"/index.html"),state.basePath))).replace(/\/?$/,"/");state.bookRoot=state.innerLanguage?url.resolve(state.root,".."):state.root};state.update($);module.exports=state},{jquery:1,path:4,url:10}],20:[function(require,module,exports){var baseKey="";module.exports={setBaseKey:function(key){baseKey=key},set:function(key,value){key=baseKey+":"+key;try{sessionStorage[key]=JSON.stringify(value)}catch(e){}},get:function(key,def){key=baseKey+":"+key;if(sessionStorage[key]===undefined)return def;try{var v=JSON.parse(sessionStorage[key]);return v==null?def:v}catch(err){return sessionStorage[key]||def}},remove:function(key){key=baseKey+":"+key;sessionStorage.removeItem(key)}}},{}],21:[function(require,module,exports){var $=require("jquery");var _=require("lodash");var events=require("./events");var buttons=[];function insertAt(parent,selector,index,element){var lastIndex=parent.children(selector).length;if(index<0){index=Math.max(0,lastIndex+1+index)}parent.append(element);if(index<lastIndex){parent.children(selector).eq(index).before(parent.children(selector).last())}}function defaultOnClick(e){e.preventDefault()}function createDropdownMenu(dropdown){var $menu=$("<div>",{class:"dropdown-menu",html:'<div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div>'});if(_.isString(dropdown)){$menu.append(dropdown)}else{var groups=_.map(dropdown,function(group){if(_.isArray(group))return group;else return[group]});_.each(groups,function(group){var $group=$("<div>",{class:"buttons"});var sizeClass="size-"+group.length;_.each(group,function(btn){btn=_.defaults(btn||{},{text:"",className:"",onClick:defaultOnClick});var $btn=$("<button>",{class:"button "+sizeClass+" "+btn.className,text:btn.text});$btn.click(btn.onClick);$group.append($btn)});$menu.append($group)})}return $menu}function createButton(opts){opts=_.defaults(opts||{},{label:"",icon:"",text:"",position:"left",className:"",onClick:defaultOnClick,dropdown:null,index:null});buttons.push(opts);updateButton(opts)}function updateButton(opts){var $result;var $toolbar=$(".book-header");var $title=$toolbar.find("h1");var positionClass="pull-"+opts.position;var $btn=$("<a>",{class:"btn",text:opts.text?" "+opts.text:"","aria-label":opts.label,title:opts.label,href:"#"});$btn.click(opts.onClick);if(opts.icon){$("<i>",{class:opts.icon}).prependTo($btn)}if(opts.dropdown){var $container=$("<div>",{class:"dropdown "+positionClass+" "+opts.className});$btn.addClass("toggle-dropdown");$container.append($btn);var $menu=createDropdownMenu(opts.dropdown);$menu.addClass("dropdown-"+(opts.position=="right"?"left":"right"));$container.append($menu);$result=$container}else{$btn.addClass(positionClass);$btn.addClass(opts.className);$result=$btn}$result.addClass("js-toolbar-action");if(_.isNumber(opts.index)&&opts.index>=0){insertAt($toolbar,".btn, .dropdown, h1",opts.index,$result)}else{$result.insertBefore($title)}}module.exports={createButton:createButton}},{"./events":12,jquery:1,lodash:2}]},{},[13]);
diff --git a/r/libs/gitbook-2.6.7/js/clipboard.min.js b/r/libs/gitbook-2.6.7/js/clipboard.min.js
new file mode 100644
index 0000000..99561a0
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/clipboard.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clipboard.js v2.0.4
+ * https://zenorocha.github.io/clipboard.js
+ *
+ * Licensed MIT © Zeno Rocha
+ */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});
diff --git a/r/libs/gitbook-2.6.7/js/jquery.highlight.js b/r/libs/gitbook-2.6.7/js/jquery.highlight.js
new file mode 100644
index 0000000..8ff7a0b
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/jquery.highlight.js
@@ -0,0 +1,86 @@
+gitbook.require(["jQuery"], function(jQuery) {
+
+/*
+ * jQuery Highlight plugin
+ *
+ * Based on highlight v3 by Johann Burkard
+ * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html
+ *
+ * Code a little bit refactored and cleaned (in my humble opinion).
+ * Most important changes:
+ *  - has an option to highlight only entire words (wordsOnly - false by default),
+ *  - has an option to be case sensitive (caseSensitive - false by default)
+ *  - highlight element tag and class names can be specified in options
+ *
+ * Copyright (c) 2009 Bartek Szopka
+ *
+ * Licensed under MIT license.
+ *
+ */
+
+jQuery.extend({
+    highlight: function (node, re, nodeName, className) {
+        if (node.nodeType === 3) {
+            var match = node.data.match(re);
+            if (match) {
+                var highlight = document.createElement(nodeName || 'span');
+                highlight.className = className || 'highlight';
+                var wordNode = node.splitText(match.index);
+                wordNode.splitText(match[0].length);
+                var wordClone = wordNode.cloneNode(true);
+                highlight.appendChild(wordClone);
+                wordNode.parentNode.replaceChild(highlight, wordNode);
+                return 1; //skip added node in parent
+            }
+        } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children
+                !/(script|style)/i.test(node.tagName) && // ignore script and style nodes
+                !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted
+            for (var i = 0; i < node.childNodes.length; i++) {
+                i += jQuery.highlight(node.childNodes[i], re, nodeName, className);
+            }
+        }
+        return 0;
+    }
+});
+
+jQuery.fn.unhighlight = function (options) {
+    var settings = { className: 'highlight', element: 'span' };
+    jQuery.extend(settings, options);
+
+    return this.find(settings.element + "." + settings.className).each(function () {
+        var parent = this.parentNode;
+        parent.replaceChild(this.firstChild, this);
+        parent.normalize();
+    }).end();
+};
+
+jQuery.fn.highlight = function (words, options) {
+    var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false };
+    jQuery.extend(settings, options);
+
+    if (words.constructor === String) {
+        words = [words];
+        // also match 'foo-bar' if search for 'foo bar'
+        if (/\s/.test(words[0])) words.push(words[0].replace(/\s+/, '-'));
+    }
+    words = jQuery.grep(words, function(word, i){
+      return word !== '';
+    });
+    words = jQuery.map(words, function(word, i) {
+      return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+    });
+    if (words.length === 0) { return this; }
+
+    var flag = settings.caseSensitive ? "" : "i";
+    var pattern = "(" + words.join("|") + ")";
+    if (settings.wordsOnly) {
+        pattern = "\\b" + pattern + "\\b";
+    }
+    var re = new RegExp(pattern, flag);
+
+    return this.each(function () {
+        jQuery.highlight(this, re, settings.element, settings.className);
+    });
+};
+
+});
diff --git a/r/libs/gitbook-2.6.7/js/plugin-bookdown.js b/r/libs/gitbook-2.6.7/js/plugin-bookdown.js
new file mode 100644
index 0000000..0080966
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/plugin-bookdown.js
@@ -0,0 +1,259 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+
+  var gs = gitbook.storage;
+
+  gitbook.events.bind("start", function(e, config) {
+
+    // add the Edit button (edit on Github)
+    var edit = config.edit;
+    if (edit && edit.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-edit',
+      label: edit.text || 'Edit',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(edit.link);
+      }
+    });
+
+    // add the History button (file history on Github)
+    var history = config.history;
+    if (history && history.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-history',
+      label: history.text || 'History',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(history.link);
+      }
+    });
+
+    // add the View button (file view on Github)
+    var view = config.view;
+    if (view && view.link) gitbook.toolbar.createButton({
+      icon: 'fa fa-eye',
+      label: view.text || 'View Source',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.open(view.link);
+      }
+    });
+
+    // add the Download button
+    var down = config.download;
+    var normalizeDownload = function() {
+      if (!down || !(down instanceof Array) || down.length === 0) return;
+      if (down[0] instanceof Array) return down;
+      return $.map(down, function(file, i) {
+        return [[file, file.replace(/.*[.]/g, '').toUpperCase()]];
+      });
+    };
+    down = normalizeDownload(down);
+    if (down) if (down.length === 1 && /[.]pdf$/.test(down[0][0])) {
+      gitbook.toolbar.createButton({
+        icon: 'fa fa-file-pdf-o',
+        label: down[0][1],
+        position: 'left',
+        onClick: function(e) {
+          e.preventDefault();
+          window.open(down[0][0]);
+        }
+      });
+    } else {
+      gitbook.toolbar.createButton({
+        icon: 'fa fa-download',
+        label: 'Download',
+        position: 'left',
+        dropdown: $.map(down, function(item, i) {
+          return {
+            text: item[1],
+            onClick: function(e) {
+              e.preventDefault();
+              window.open(item[0]);
+            }
+          };
+        })
+      });
+    }
+
+    // add the Information button
+    var info = ['Keyboard shortcuts (<> indicates arrow keys):',
+      '<left>/<right>: navigate to previous/next page',
+      's: Toggle sidebar'];
+    if (config.search !== false) info.push('f: Toggle search input ' +
+      '(use <up>/<down>/Enter in the search input to navigate through search matches; ' +
+      'press Esc to cancel search)');
+    if (config.info !== false) gitbook.toolbar.createButton({
+      icon: 'fa fa-info',
+      label: 'Information about the toolbar',
+      position: 'left',
+      onClick: function(e) {
+        e.preventDefault();
+        window.alert(info.join('\n\n'));
+      }
+    });
+
+    // highlight the current section in TOC
+    var href = window.location.pathname;
+    href = href.substr(href.lastIndexOf('/') + 1);
+    // accentuated characters need to be decoded (#819)
+    href = decodeURIComponent(href);
+    if (href === '') href = 'index.html';
+    var li = $('a[href^="' + href + location.hash + '"]').parent('li.chapter').first();
+    var summary = $('ul.summary'), chaps = summary.find('li.chapter');
+    if (li.length === 0) li = chaps.first();
+    li.addClass('active');
+    chaps.on('click', function(e) {
+      chaps.removeClass('active');
+      $(this).addClass('active');
+      gs.set('tocScrollTop', summary.scrollTop());
+    });
+
+    var toc = config.toc;
+    // collapse TOC items that are not for the current chapter
+    if (toc && toc.collapse) (function() {
+      var type = toc.collapse;
+      if (type === 'none') return;
+      if (type !== 'section' && type !== 'subsection') return;
+      // sections under chapters
+      var toc_sub = summary.children('li[data-level]').children('ul');
+      if (type === 'section') {
+        toc_sub.hide()
+          .parent().has(li).children('ul').show();
+      } else {
+        toc_sub.children('li').children('ul').hide()
+          .parent().has(li).children('ul').show();
+      }
+      li.children('ul').show();
+      var toc_sub2 = toc_sub.children('li');
+      if (type === 'section') toc_sub2.children('ul').hide();
+      summary.children('li[data-level]').find('a')
+        .on('click.bookdown', function(e) {
+          if (href === $(this).attr('href').replace(/#.*/, ''))
+            $(this).parent('li').children('ul').toggle();
+        });
+    })();
+
+    // add tooltips to the <a>'s that are truncated
+    $('a').each(function(i, el) {
+      if (el.offsetWidth >= el.scrollWidth) return;
+      if (typeof el.title === 'undefined') return;
+      el.title = el.text;
+    });
+
+    // restore TOC scroll position
+    var pos = gs.get('tocScrollTop');
+    if (typeof pos !== 'undefined') summary.scrollTop(pos);
+
+    // highlight the TOC item that has same text as the heading in view as scrolling
+    if (toc && toc.scroll_highlight !== false && li.length > 0) (function() {
+      // scroll the current TOC item into viewport
+      var ht = $(window).height(), rect = li[0].getBoundingClientRect();
+      if (rect.top >= ht || rect.top <= 0 || rect.bottom <= 0) {
+        summary.scrollTop(li[0].offsetTop);
+      }
+      // current chapter TOC items
+      var items = $('a[href^="' + href + '"]').parent('li.chapter'),
+          m = items.length;
+      if (m === 0) {
+        items = summary.find('li.chapter');
+        m = items.length;
+      }
+      if (m === 0) return;
+      // all section titles on current page
+      var hs = bookInner.find('.page-inner').find('h1,h2,h3'), n = hs.length,
+          ts = hs.map(function(i, el) { return $(el).text(); });
+      if (n === 0) return;
+      var scrollHandler = function(e) {
+        var ht = $(window).height();
+        clearTimeout($.data(this, 'scrollTimer'));
+        $.data(this, 'scrollTimer', setTimeout(function() {
+          // find the first visible title in the viewport
+          for (var i = 0; i < n; i++) {
+            var rect = hs[i].getBoundingClientRect();
+            if (rect.top >= 0 && rect.bottom <= ht) break;
+          }
+          if (i === n) return;
+          items.removeClass('active');
+          for (var j = 0; j < m; j++) {
+            if (items.eq(j).children('a').first().text() === ts[i]) break;
+          }
+          if (j === m) j = 0;  // highlight the chapter title
+          // search bottom-up for a visible TOC item to highlight; if an item is
+          // hidden, we check if its parent is visible, and so on
+          while (j > 0 && items.eq(j).is(':hidden')) j--;
+          items.eq(j).addClass('active');
+        }, 250));
+      };
+      bookInner.on('scroll.bookdown', scrollHandler);
+      bookBody.on('scroll.bookdown', scrollHandler);
+    })();
+
+    // do not refresh the page if the TOC item points to the current page
+    $('a[href="' + href + '"]').parent('li.chapter').children('a')
+      .on('click', function(e) {
+        bookInner.scrollTop(0);
+        bookBody.scrollTop(0);
+        return false;
+      });
+
+    var toolbar = config.toolbar;
+    if (!toolbar || toolbar.position !== 'static') {
+      var bookHeader = $('.book-header');
+      bookBody.addClass('fixed');
+      bookHeader.addClass('fixed')
+      .css('background-color', bookBody.css('background-color'))
+      .on('click.bookdown', function(e) {
+        // the theme may have changed after user clicks the theme button
+        bookHeader.css('background-color', bookBody.css('background-color'));
+      });
+    }
+
+  });
+
+  gitbook.events.bind("page.change", function(e) {
+    // store TOC scroll position
+    var summary = $('ul.summary');
+    gs.set('tocScrollTop', summary.scrollTop());
+  });
+
+  var bookBody = $('.book-body'), bookInner = bookBody.find('.body-inner');
+  var chapterTitle = function() {
+    return bookInner.find('.page-inner').find('h1,h2').first().text();
+  };
+  var saveScrollPos = function(e) {
+    // save scroll position before page is reloaded
+    gs.set('bodyScrollTop', {
+      body: bookBody.scrollTop(),
+      inner: bookInner.scrollTop(),
+      focused: document.hasFocus(),
+      title: chapterTitle()
+    });
+  };
+  $(document).on('servr:reload', saveScrollPos);
+
+  // check if the page is loaded in an iframe (e.g. the RStudio preview window)
+  var inIFrame = function() {
+    var inIframe = true;
+    try { inIframe = window.self !== window.top; } catch (e) {}
+    return inIframe;
+  };
+  if (inIFrame()) {
+    $(window).on('blur unload', saveScrollPos);
+  }
+
+  $(function(e) {
+    var pos = gs.get('bodyScrollTop');
+    if (pos) {
+      if (pos.title === chapterTitle()) {
+        if (pos.body !== 0) bookBody.scrollTop(pos.body);
+        if (pos.inner !== 0) bookInner.scrollTop(pos.inner);
+      }
+    }
+    if ((pos && pos.focused) || !inIFrame()) bookInner.find('.page-wrapper').focus();
+    // clear book body scroll position
+    gs.remove('bodyScrollTop');
+  });
+
+});
diff --git a/r/libs/gitbook-2.6.7/js/plugin-clipboard.js b/r/libs/gitbook-2.6.7/js/plugin-clipboard.js
new file mode 100644
index 0000000..f0880be
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/plugin-clipboard.js
@@ -0,0 +1,33 @@
+gitbook.require(["gitbook", "jQuery"], function(gitbook, $) {
+
+  var copyButton = '<button type="button" class="copy-to-clipboard-button" title="Copy to clipboard" aria-label="Copy to clipboard"><i class="fa fa-copy"></i></button>';
+  var clipboard;
+
+  gitbook.events.bind("page.change", function() {
+
+    if (!ClipboardJS.isSupported()) return;
+
+    // the page.change event is thrown twice: before and after the page changes
+    if (clipboard) {
+      // clipboard is already defined but we are on the same page
+      if (clipboard._prevPage === window.location.pathname) return;
+      // clipboard is already defined and url path change
+      // we can deduct that we are before page changes
+      clipboard.destroy(); // destroy the previous events listeners
+      clipboard = undefined; // reset the clipboard object
+      return;
+    }
+
+    $(copyButton).prependTo("div.sourceCode");
+
+    clipboard = new ClipboardJS(".copy-to-clipboard-button", {
+      text: function(trigger) {
+        return trigger.parentNode.textContent;
+      }
+    });
+
+    clipboard._prevPage = window.location.pathname
+
+  });
+
+});
diff --git a/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js b/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js
new file mode 100644
index 0000000..a70f0fb
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/plugin-fontsettings.js
@@ -0,0 +1,152 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var fontState;
+
+    var THEMES = {
+        "white": 0,
+        "sepia": 1,
+        "night": 2
+    };
+
+    var FAMILY = {
+        "serif": 0,
+        "sans": 1
+    };
+
+    // Save current font settings
+    function saveFontSettings() {
+        gitbook.storage.set("fontState", fontState);
+        update();
+    }
+
+    // Increase font size
+    function enlargeFontSize(e) {
+        e.preventDefault();
+        if (fontState.size >= 4) return;
+
+        fontState.size++;
+        saveFontSettings();
+    };
+
+    // Decrease font size
+    function reduceFontSize(e) {
+        e.preventDefault();
+        if (fontState.size <= 0) return;
+
+        fontState.size--;
+        saveFontSettings();
+    };
+
+    // Change font family
+    function changeFontFamily(index, e) {
+        e.preventDefault();
+
+        fontState.family = index;
+        saveFontSettings();
+    };
+
+    // Change type of color
+    function changeColorTheme(index, e) {
+        e.preventDefault();
+
+        var $book = $(".book");
+
+        if (fontState.theme !== 0)
+            $book.removeClass("color-theme-"+fontState.theme);
+
+        fontState.theme = index;
+        if (fontState.theme !== 0)
+            $book.addClass("color-theme-"+fontState.theme);
+
+        saveFontSettings();
+    };
+
+    function update() {
+        var $book = gitbook.state.$book;
+
+        $(".font-settings .font-family-list li").removeClass("active");
+        $(".font-settings .font-family-list li:nth-child("+(fontState.family+1)+")").addClass("active");
+
+        $book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
+        $book.addClass("font-size-"+fontState.size);
+        $book.addClass("font-family-"+fontState.family);
+
+        if(fontState.theme !== 0) {
+            $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
+            $book.addClass("color-theme-"+fontState.theme);
+        }
+    };
+
+    function init(config) {
+        var $bookBody, $book;
+
+        //Find DOM elements.
+        $book = gitbook.state.$book;
+        $bookBody = $book.find(".book-body");
+
+        // Instantiate font state object
+        fontState = gitbook.storage.get("fontState", {
+            size: config.size || 2,
+            family: FAMILY[config.family || "sans"],
+            theme: THEMES[config.theme || "white"]
+        });
+
+        update();
+    };
+
+
+    gitbook.events.bind("start", function(e, config) {
+        var opts = config.fontsettings;
+        if (!opts) return;
+        
+        // Create buttons in toolbar
+        gitbook.toolbar.createButton({
+            icon: 'fa fa-font',
+            label: 'Font Settings',
+            className: 'font-settings',
+            dropdown: [
+                [
+                    {
+                        text: 'A',
+                        className: 'font-reduce',
+                        onClick: reduceFontSize
+                    },
+                    {
+                        text: 'A',
+                        className: 'font-enlarge',
+                        onClick: enlargeFontSize
+                    }
+                ],
+                [
+                    {
+                        text: 'Serif',
+                        onClick: _.partial(changeFontFamily, 0)
+                    },
+                    {
+                        text: 'Sans',
+                        onClick: _.partial(changeFontFamily, 1)
+                    }
+                ],
+                [
+                    {
+                        text: 'White',
+                        onClick: _.partial(changeColorTheme, 0)
+                    },
+                    {
+                        text: 'Sepia',
+                        onClick: _.partial(changeColorTheme, 1)
+                    },
+                    {
+                        text: 'Night',
+                        onClick: _.partial(changeColorTheme, 2)
+                    }
+                ]
+            ]
+        });
+
+
+        // Init current settings
+        init(opts);
+    });
+});
+
+
diff --git a/r/libs/gitbook-2.6.7/js/plugin-search.js b/r/libs/gitbook-2.6.7/js/plugin-search.js
new file mode 100644
index 0000000..747fcce
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/plugin-search.js
@@ -0,0 +1,270 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var index = null;
+    var fuse = null;
+    var _search = {engine: 'lunr', opts: {}};
+    var $searchInput, $searchLabel, $searchForm;
+    var $highlighted = [], hi, hiOpts = { className: 'search-highlight' };
+    var collapse = false, toc_visible = [];
+
+    function init(config) {
+        // Instantiate search settings
+        _search = gitbook.storage.get("search", {
+            engine: config.search.engine || 'lunr',
+            opts: config.search.options || {},
+        });
+    };
+
+    // Save current search settings
+    function saveSearchSettings() {
+        gitbook.storage.set("search", _search);
+    }
+
+    // Use a specific index
+    function loadIndex(data) {
+        // [Yihui] In bookdown, I use a character matrix to store the chapter
+        // content, and the index is dynamically built on the client side.
+        // Gitbook prebuilds the index data instead: https://github.com/GitbookIO/plugin-search
+        // We can certainly do that via R packages V8 and jsonlite, but let's
+        // see how slow it really is before improving it. On the other hand,
+        // lunr cannot handle non-English text very well, e.g. the default
+        // tokenizer cannot deal with Chinese text, so we may want to replace
+        // lunr with a dumb simple text matching approach.
+        if (_search.engine === 'lunr') {
+          index = lunr(function () {
+            this.ref('url');
+            this.field('title', { boost: 10 });
+            this.field('body');
+          });
+          data.map(function(item) {
+            index.add({
+              url: item[0],
+              title: item[1],
+              body: item[2]
+            });
+          });
+          return;
+        }
+        fuse = new Fuse(data.map((_data => {
+            return {
+                url: _data[0],
+                title: _data[1],
+                body: _data[2]
+            };
+        })), Object.assign(
+            {
+                includeScore: true,
+                threshold: 0.1,
+                ignoreLocation: true,
+                keys: ["title", "body"]
+            },
+            _search.opts
+        ));
+    }
+
+    // Fetch the search index
+    function fetchIndex() {
+        return $.getJSON(gitbook.state.basePath+"/search_index.json")
+                .then(loadIndex);  // [Yihui] we need to use this object later
+    }
+
+    // Search for a term and return results
+    function search(q) {
+        let results = [];
+        switch (_search.engine) {
+            case 'fuse':
+                if (!fuse) return;
+                results = fuse.search(q).map(function(result) {
+                    var parts = result.item.url.split('#');
+                    return {
+                        path: parts[0],
+                        hash: parts[1]
+                    };
+                });
+                break;
+            case 'lunr':
+            default:
+                if (!index) return;
+                results = _.chain(index.search(q)).map(function(result) {
+                    var parts = result.ref.split("#");
+                    return {
+                        path: parts[0],
+                        hash: parts[1]
+                    };
+                })
+                .value();
+        }
+
+        // [Yihui] Highlight the search keyword on current page
+        $highlighted = $('.page-inner')
+          .unhighlight(hiOpts).highlight(q, hiOpts).find('span.search-highlight');
+        scrollToHighlighted(0);
+
+        return results;
+    }
+
+    // [Yihui] Scroll the chapter body to the i-th highlighted string
+    function scrollToHighlighted(d) {
+      var n = $highlighted.length;
+      hi = hi === undefined ? 0 : hi + d;
+      // navignate to the previous/next page in the search results if reached the top/bottom
+      var b = hi < 0;
+      if (d !== 0 && (b || hi >= n)) {
+        var path = currentPath(), n2 = toc_visible.length;
+        if (n2 === 0) return;
+        for (var i = b ? 0 : n2; (b && i < n2) || (!b && i >= 0); i += b ? 1 : -1) {
+          if (toc_visible.eq(i).data('path') === path) break;
+        }
+        i += b ? -1 : 1;
+        if (i < 0) i = n2 - 1;
+        if (i >= n2) i = 0;
+        var lnk = toc_visible.eq(i).find('a[href$=".html"]');
+        if (lnk.length) lnk[0].click();
+        return;
+      }
+      if (n === 0) return;
+      var $p = $highlighted.eq(hi);
+      $p[0].scrollIntoView();
+      $highlighted.css('background-color', '');
+      // an orange background color on the current item and removed later
+      $p.css('background-color', 'orange');
+      setTimeout(function() {
+        $p.css('background-color', '');
+      }, 2000);
+    }
+
+    function currentPath() {
+      var href = window.location.pathname;
+      href = href.substr(href.lastIndexOf('/') + 1);
+      return href === '' ? 'index.html' : href;
+    }
+
+    // Create search form
+    function createForm(value) {
+        if ($searchForm) $searchForm.remove();
+        if ($searchLabel) $searchLabel.remove();
+        if ($searchInput) $searchInput.remove();
+
+        $searchForm = $('<div>', {
+            'class': 'book-search',
+            'role': 'search'
+        });
+
+        $searchLabel = $('<label>', {
+            'for': 'search-box',
+            'aria-hidden': 'false',
+            'hidden': ''
+        });
+
+        $searchInput = $('<input>', {
+            'id': 'search-box',
+            'type': 'search',
+            'class': 'form-control',
+            'val': value,
+            'placeholder': 'Type to search (Enter for navigation)',
+            'title': 'Use Enter or the <Down> key to navigate to the next match, or the <Up> key to the previous match'
+        });
+
+        $searchLabel.append("Type to search");
+        $searchLabel.appendTo($searchForm);
+        $searchInput.appendTo($searchForm);
+        $searchForm.prependTo(gitbook.state.$book.find('.book-summary'));
+    }
+
+    // Return true if search is open
+    function isSearchOpen() {
+        return gitbook.state.$book.hasClass("with-search");
+    }
+
+    // Toggle the search
+    function toggleSearch(_state) {
+        if (isSearchOpen() === _state) return;
+        if (!$searchInput) return;
+
+        gitbook.state.$book.toggleClass("with-search", _state);
+
+        // If search bar is open: focus input
+        if (isSearchOpen()) {
+            gitbook.sidebar.toggle(true);
+            $searchInput.focus();
+        } else {
+            $searchInput.blur();
+            $searchInput.val("");
+            gitbook.storage.remove("keyword");
+            gitbook.sidebar.filter(null);
+            $('.page-inner').unhighlight(hiOpts);
+        }
+    }
+
+    function sidebarFilter(results) {
+        gitbook.sidebar.filter(_.pluck(results, "path"));
+        toc_visible = $('ul.summary').find('li:visible');
+    }
+
+    // Recover current search when page changed
+    function recoverSearch() {
+        var keyword = gitbook.storage.get("keyword", "");
+
+        createForm(keyword);
+
+        if (keyword.length > 0) {
+            if(!isSearchOpen()) {
+                toggleSearch(true); // [Yihui] open the search box
+            }
+            sidebarFilter(search(keyword));
+        }
+    }
+
+
+    gitbook.events.bind("start", function(e, config) {
+        // [Yihui] disable search
+        if (config.search === false) return;
+        init(config);
+        collapse = !config.toc || config.toc.collapse === 'section' ||
+          config.toc.collapse === 'subsection';
+
+        // Pre-fetch search index and create the form
+        fetchIndex()
+        // [Yihui] recover search after the page is loaded
+        .then(recoverSearch);
+
+
+        // Type in search bar
+        $(document).on("keyup", ".book-search input", function(e) {
+            var key = (e.keyCode ? e.keyCode : e.which);
+            // [Yihui] Escape -> close search box; Up/Down/Enter: previous/next highlighted
+            if (key == 27) {
+                e.preventDefault();
+                toggleSearch(false);
+            } else if (key == 38) {
+              scrollToHighlighted(-1);
+            } else if (key == 40 || key == 13) {
+              scrollToHighlighted(1);
+            }
+        }).on("input", ".book-search input", function(e) {
+            var q = $(this).val().trim();
+            if (q.length === 0) {
+                gitbook.sidebar.filter(null);
+                gitbook.storage.remove("keyword");
+                $('.page-inner').unhighlight(hiOpts);
+            } else {
+                var results = search(q);
+                sidebarFilter(results);
+                gitbook.storage.set("keyword", q);
+            }
+        });
+
+        // Create the toggle search button
+        gitbook.toolbar.createButton({
+            icon: 'fa fa-search',
+            label: 'Search',
+            position: 'left',
+            onClick: toggleSearch
+        });
+
+        // Bind keyboard to toggle search
+        gitbook.keyboard.bind(['f'], toggleSearch);
+    });
+
+    // [Yihui] do not try to recover search; always start fresh
+    // gitbook.events.bind("page.change", recoverSearch);
+});
diff --git a/r/libs/gitbook-2.6.7/js/plugin-sharing.js b/r/libs/gitbook-2.6.7/js/plugin-sharing.js
new file mode 100644
index 0000000..9a01b0f
--- /dev/null
+++ b/r/libs/gitbook-2.6.7/js/plugin-sharing.js
@@ -0,0 +1,116 @@
+gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
+    var SITES = {
+        'github': {
+            'label': 'Github',
+            'icon': 'fa fa-github',
+            'onClick': function(e) {
+                e.preventDefault();
+                var repo = $('meta[name="github-repo"]').attr('content');
+                if (typeof repo === 'undefined') throw("Github repo not defined");
+                window.open("https://github.com/"+repo);
+            }
+        },
+        'facebook': {
+            'label': 'Facebook',
+            'icon': 'fa fa-facebook',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(location.href));
+            }
+        },
+        'twitter': {
+            'label': 'Twitter',
+            'icon': 'fa fa-twitter',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://twitter.com/intent/tweet?text="+encodeURIComponent(document.title)+"&url="+encodeURIComponent(location.href)+"&hashtags=rmarkdown,bookdown");
+            }
+        },
+        'linkedin': {
+            'label': 'LinkedIn',
+            'icon': 'fa fa-linkedin',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
+            }
+        },
+        'weibo': {
+            'label': 'Weibo',
+            'icon': 'fa fa-weibo',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://service.weibo.com/share/share.php?content=utf-8&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title));
+            }
+        },
+        'instapaper': {
+            'label': 'Instapaper',
+            'icon': 'fa fa-italic',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://www.instapaper.com/text?u="+encodeURIComponent(location.href));
+            }
+        },
+        'vk': {
+            'label': 'VK',
+            'icon': 'fa fa-vk',
+            'onClick': function(e) {
+                e.preventDefault();
+                window.open("http://vkontakte.ru/share.php?url="+encodeURIComponent(location.href));
+            }
+        },
+        'whatsapp': {
+            'label': 'Whatsapp',
+            'icon': 'fa fa-whatsapp',
+            'onClick': function(e) {
+                e.preventDefault();
+                var url = encodeURIComponent(location.href);
+                window.open((isMobile() ? "whatsapp://send" : "https://web.whatsapp.com/send") + "?text=" + url);
+            }
+        },
+    };
+
+    function isMobile() {
+      return !!navigator.maxTouchPoints;
+    }
+
+    gitbook.events.bind("start", function(e, config) {
+        var opts = config.sharing;
+        if (!opts) return;
+
+        // Create dropdown menu
+        var menu = _.chain(opts.all)
+            .map(function(id) {
+                var site = SITES[id];
+                if (!site) return;
+                return {
+                    text: site.label,
+                    onClick: site.onClick
+                };
+            })
+            .compact()
+            .value();
+
+        // Create main button with dropdown
+        if (menu.length > 0) {
+            gitbook.toolbar.createButton({
+                icon: 'fa fa-share-alt',
+                label: 'Share',
+                position: 'right',
+                dropdown: [menu]
+            });
+        }
+
+        // Direct actions to share
+        _.each(SITES, function(site, sideId) {
+            if (!opts[sideId]) return;
+
+            gitbook.toolbar.createButton({
+                icon: site.icon,
+                label: site.label,
+                title: site.label,
+                position: 'right',
+                onClick: site.onClick
+            });
+        });
+    });
+});
diff --git a/r/libs/jquery-3.6.0/jquery-3.6.0.min.js b/r/libs/jquery-3.6.0/jquery-3.6.0.min.js
new file mode 100644
index 0000000..c4c6022
--- /dev/null
+++ b/r/libs/jquery-3.6.0/jquery-3.6.0.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
diff --git a/r/manipulating-data---arrays.html b/r/manipulating-data---arrays.html
new file mode 100644
index 0000000..fc901be
--- /dev/null
+++ b/r/manipulating-data---arrays.html
@@ -0,0 +1,654 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>6 Manipulating Data - Arrays | Apache Arrow R Cookbook</title>
+  <meta name="description" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="6 Manipulating Data - Arrays | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="defining-data-types.html"/>
+<link rel="next" href="manipulating-data---tables.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="manipulating-data---arrays" class="section level1 hasAnchor" number="6">
+<h1><span class="header-section-number">6</span> Manipulating Data - Arrays<a href="manipulating-data---arrays.html#manipulating-data---arrays" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-3" class="section level2 hasAnchor" number="6.1">
+<h2><span class="header-section-number">6.1</span> Introduction<a href="manipulating-data---arrays.html#introduction-3" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>An Arrow Array is roughly equivalent to an R vector - it can be used to
+represent a single column of data, with all values having the same data type.</p>
+<p>A number of base R functions which have S3 generic methods have been implemented
+to work on Arrow Arrays; for example <code>mean</code>, <code>min</code>, and <code>max</code>.</p>
+</div>
+<div id="filter-by-values-matching-a-predicate-or-mask" class="section level2 hasAnchor" number="6.2">
+<h2><span class="header-section-number">6.2</span> Filter by values matching a predicate or mask<a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to search for values in an Array that match a predicate condition.</p>
+<div id="solution-33" class="section level3 hasAnchor" number="6.2.1">
+<h3><span class="header-section-number">6.2.1</span> Solution<a href="manipulating-data---arrays.html#solution-33" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb85-1"><a href="manipulating-data---arrays.html#cb85-1" aria-hidden="true" tabindex="-1"></a>my_values <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>, <span class="cn">NA</span>))</span>
+<span id="cb85-2"><a href="manipulating-data---arrays.html#cb85-2" aria-hidden="true" tabindex="-1"></a>my_values[my_values <span class="sc">&gt;</span> <span class="dv">3</span>]</span></code></pre></div>
+<pre><code>## Array
+## &lt;int32&gt;
+## [
+##   4,
+##   5,
+##   null
+## ]</code></pre>
+</div>
+<div id="discussion-11" class="section level3 hasAnchor" number="6.2.2">
+<h3><span class="header-section-number">6.2.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-11" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can refer to items in an Array using the square brackets <code>[]</code> like you can
+an R vector.</p>
+</div>
+</div>
+<div id="compute-meanminmax-etc-value-of-an-array" class="section level2 hasAnchor" number="6.3">
+<h2><span class="header-section-number">6.3</span> Compute Mean/Min/Max, etc value of an Array<a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to calculate the mean, minimum, or maximum of values in an array.</p>
+<div id="solution-34" class="section level3 hasAnchor" number="6.3.1">
+<h3><span class="header-section-number">6.3.1</span> Solution<a href="manipulating-data---arrays.html#solution-34" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb87"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb87-1"><a href="manipulating-data---arrays.html#cb87-1" aria-hidden="true" tabindex="-1"></a>my_values <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>, <span class="cn">NA</span>))</span>
+<span id="cb87-2"><a href="manipulating-data---arrays.html#cb87-2" aria-hidden="true" tabindex="-1"></a><span class="fu">mean</span>(my_values, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## Scalar
+## 3</code></pre>
+</div>
+<div id="discussion-12" class="section level3 hasAnchor" number="6.3.2">
+<h3><span class="header-section-number">6.3.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-12" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Many base R generic functions such as <code>mean()</code>, <code>min()</code>, and <code>max()</code> have been
+mapped to their Arrow equivalents, and so can be called on Arrow Array objects
+in the same way. They will return Arrow objects themselves.</p>
+<p>If you want to use an R function which does not have an Arrow mapping, you can
+use <code>as.vector()</code> to convert Arrow objects to base R vectors.</p>
+<div class="sourceCode" id="cb89"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb89-1"><a href="manipulating-data---arrays.html#cb89-1" aria-hidden="true" tabindex="-1"></a>arrow_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">100</span>)</span>
+<span id="cb89-2"><a href="manipulating-data---arrays.html#cb89-2" aria-hidden="true" tabindex="-1"></a><span class="co"># get Tukey&#39;s five-number summary</span></span>
+<span id="cb89-3"><a href="manipulating-data---arrays.html#cb89-3" aria-hidden="true" tabindex="-1"></a><span class="fu">fivenum</span>(<span class="fu">as.vector</span>(arrow_array))</span></code></pre></div>
+<pre><code>## [1]   1.0  25.5  50.5  75.5 100.0</code></pre>
+<p>You can tell if a function is a standard S3 generic function by looking
+at the body of the function - S3 generic functions call <code>UseMethod()</code>
+to determine the appropriate version of that function to use for the object.</p>
+<div class="sourceCode" id="cb91"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb91-1"><a href="manipulating-data---arrays.html#cb91-1" aria-hidden="true" tabindex="-1"></a>mean</span></code></pre></div>
+<pre><code>## function (x, ...) 
+## UseMethod(&quot;mean&quot;)
+## &lt;bytecode: 0x564a10424388&gt;
+## &lt;environment: namespace:base&gt;</code></pre>
+<p>You can also use <code>isS3stdGeneric()</code> to determine if a function is an S3 generic.</p>
+<div class="sourceCode" id="cb93"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb93-1"><a href="manipulating-data---arrays.html#cb93-1" aria-hidden="true" tabindex="-1"></a><span class="fu">isS3stdGeneric</span>(<span class="st">&quot;mean&quot;</span>)</span></code></pre></div>
+<pre><code>## mean 
+## TRUE</code></pre>
+<p>If you find an S3 generic function which isn’t implemented for Arrow objects
+but you would like to be able to use, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a>.</p>
+</div>
+</div>
+<div id="count-occurrences-of-elements-in-an-array" class="section level2 hasAnchor" number="6.4">
+<h2><span class="header-section-number">6.4</span> Count occurrences of elements in an Array<a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to count repeated values in an Array.</p>
+<div id="solution-35" class="section level3 hasAnchor" number="6.4.1">
+<h3><span class="header-section-number">6.4.1</span> Solution<a href="manipulating-data---arrays.html#solution-35" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb95"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb95-1"><a href="manipulating-data---arrays.html#cb95-1" aria-hidden="true" tabindex="-1"></a>repeated_vals <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="fu">c</span>(<span class="dv">1</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>, <span class="dv">3</span>))</span>
+<span id="cb95-2"><a href="manipulating-data---arrays.html#cb95-2" aria-hidden="true" tabindex="-1"></a><span class="fu">value_counts</span>(repeated_vals)</span></code></pre></div>
+<pre><code>## StructArray
+## &lt;struct&lt;values: double, counts: int64&gt;&gt;
+## -- is_valid: all not null
+## -- child 0 type: double
+##   [
+##     1,
+##     2,
+##     3
+##   ]
+## -- child 1 type: int64
+##   [
+##     2,
+##     1,
+##     5
+##   ]</code></pre>
+</div>
+<div id="discussion-13" class="section level3 hasAnchor" number="6.4.2">
+<h3><span class="header-section-number">6.4.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-13" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Some functions in the Arrow R package do not have base R equivalents. In other
+cases, the base R equivalents are not generic functions so they cannot be called
+directly on Arrow Array objects.</p>
+<p>For example, the <code>value_counts()</code> function in the Arrow R package is loosely
+equivalent to the base R function <code>table()</code>, which is not a generic function.</p>
+</div>
+</div>
+<div id="apply-arithmetic-functions-to-arrays." class="section level2 hasAnchor" number="6.5">
+<h2><span class="header-section-number">6.5</span> Apply arithmetic functions to Arrays.<a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays." class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use the various arithmetic operators on Array objects.</p>
+<div id="solution-36" class="section level3 hasAnchor" number="6.5.1">
+<h3><span class="header-section-number">6.5.1</span> Solution<a href="manipulating-data---arrays.html#solution-36" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb97"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb97-1"><a href="manipulating-data---arrays.html#cb97-1" aria-hidden="true" tabindex="-1"></a>num_array <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">10</span>)</span>
+<span id="cb97-2"><a href="manipulating-data---arrays.html#cb97-2" aria-hidden="true" tabindex="-1"></a>num_array <span class="sc">+</span> <span class="dv">10</span></span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   11,
+##   12,
+##   13,
+##   14,
+##   15,
+##   16,
+##   17,
+##   18,
+##   19,
+##   20
+## ]</code></pre>
+</div>
+<div id="discussion-14" class="section level3 hasAnchor" number="6.5.2">
+<h3><span class="header-section-number">6.5.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-14" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You will get the same result if you pass in the value you’re adding as an Arrow object.</p>
+<div class="sourceCode" id="cb99"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb99-1"><a href="manipulating-data---arrays.html#cb99-1" aria-hidden="true" tabindex="-1"></a>num_array <span class="sc">+</span> Scalar<span class="sc">$</span><span class="fu">create</span>(<span class="dv">10</span>)</span></code></pre></div>
+<pre><code>## Array
+## &lt;double&gt;
+## [
+##   11,
+##   12,
+##   13,
+##   14,
+##   15,
+##   16,
+##   17,
+##   18,
+##   19,
+##   20
+## ]</code></pre>
+</div>
+</div>
+<div id="call-arrow-compute-functions-directly-on-arrays" class="section level2 hasAnchor" number="6.6">
+<h2><span class="header-section-number">6.6</span> Call Arrow compute functions directly on Arrays<a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to call an Arrow compute function directly on an Array.</p>
+<div id="solution-37" class="section level3 hasAnchor" number="6.6.1">
+<h3><span class="header-section-number">6.6.1</span> Solution<a href="manipulating-data---arrays.html#solution-37" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb101"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb101-1"><a href="manipulating-data---arrays.html#cb101-1" aria-hidden="true" tabindex="-1"></a>first_100_numbers <span class="ot">&lt;-</span> Array<span class="sc">$</span><span class="fu">create</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">100</span>)</span>
+<span id="cb101-2"><a href="manipulating-data---arrays.html#cb101-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb101-3"><a href="manipulating-data---arrays.html#cb101-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Calculate the variance of 1 to 100, setting the delta degrees of freedom to 0.</span></span>
+<span id="cb101-4"><a href="manipulating-data---arrays.html#cb101-4" aria-hidden="true" tabindex="-1"></a><span class="fu">call_function</span>(<span class="st">&quot;variance&quot;</span>, first_100_numbers, <span class="at">options =</span> <span class="fu">list</span>(<span class="at">ddof =</span> <span class="dv">0</span>))</span></code></pre></div>
+<pre><code>## Scalar
+## 833.25</code></pre>
+</div>
+<div id="discussion-15" class="section level3 hasAnchor" number="6.6.2">
+<h3><span class="header-section-number">6.6.2</span> Discussion<a href="manipulating-data---arrays.html#discussion-15" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can use <code>call_function()</code> to call Arrow compute functions directly on
+Scalar, Array, and ChunkedArray objects. The returned object will be an Arrow object.</p>
+</div>
+<div id="see-also-2" class="section level3 hasAnchor" number="6.6.3">
+<h3><span class="header-section-number">6.6.3</span> See also<a href="manipulating-data---arrays.html#see-also-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For a more in-depth discussion of Arrow compute functions, see the section on <a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow">using arrow functions in dplyr verbs in arrow</a></p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="defining-data-types.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="manipulating-data---tables.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/arrays.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/manipulating-data---tables.html b/r/manipulating-data---tables.html
new file mode 100644
index 0000000..a6bf594
--- /dev/null
+++ b/r/manipulating-data---tables.html
@@ -0,0 +1,963 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>7 Manipulating Data - Tables | Apache Arrow R Cookbook</title>
+  <meta name="description" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="7 Manipulating Data - Tables | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="manipulating-data---arrays.html"/>
+<link rel="next" href="using-pyarrow-from-r.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="manipulating-data---tables" class="section level1 hasAnchor" number="7">
+<h1><span class="header-section-number">7</span> Manipulating Data - Tables<a href="manipulating-data---tables.html#manipulating-data---tables" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-4" class="section level2 hasAnchor" number="7.1">
+<h2><span class="header-section-number">7.1</span> Introduction<a href="manipulating-data---tables.html#introduction-4" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>One of the aims of the Arrow project is to reduce duplication between different
+data frame implementations. The underlying implementation of a data frame is a
+conceptually different thing to the code- or the application programming interface (API)-that you write to work with it.</p>
+<p>You may have seen this before in packages like dbplyr which allow you to use
+the dplyr API to interact with SQL databases.</p>
+<p>The Arrow R package has been written so that the underlying Arrow Table-like
+objects can be manipulated using the dplyr API, which allows you to use dplyr verbs.</p>
+<p>For example, here’s a short pipeline of data manipulation which uses dplyr exclusively:</p>
+<div class="sourceCode" id="cb103"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb103-1"><a href="manipulating-data---tables.html#cb103-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(dplyr)</span>
+<span id="cb103-2"><a href="manipulating-data---tables.html#cb103-2" aria-hidden="true" tabindex="-1"></a>starwars <span class="sc">%&gt;%</span></span>
+<span id="cb103-3"><a href="manipulating-data---tables.html#cb103-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb103-4"><a href="manipulating-data---tables.html#cb103-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">height_ft =</span> height<span class="sc">/</span><span class="fl">30.48</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb103-5"><a href="manipulating-data---tables.html#cb103-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(name, height_ft)</span></code></pre></div>
+<pre><code>## # A tibble: 35 × 2
+##    name               height_ft
+##    &lt;chr&gt;                  &lt;dbl&gt;
+##  1 Luke Skywalker          5.64
+##  2 Darth Vader             6.63
+##  3 Leia Organa             4.92
+##  4 Owen Lars               5.84
+##  5 Beru Whitesun lars      5.41
+##  6 Biggs Darklighter       6.00
+##  7 Obi-Wan Kenobi          5.97
+##  8 Anakin Skywalker        6.17
+##  9 Wilhuff Tarkin          5.91
+## 10 Han Solo                5.91
+## # ℹ 25 more rows</code></pre>
+<p>And the same results as using Arrow with dplyr syntax:</p>
+<div class="sourceCode" id="cb105"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb105-1"><a href="manipulating-data---tables.html#cb105-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb105-2"><a href="manipulating-data---tables.html#cb105-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb105-3"><a href="manipulating-data---tables.html#cb105-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">height_ft =</span> height<span class="sc">/</span><span class="fl">30.48</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb105-4"><a href="manipulating-data---tables.html#cb105-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(name, height_ft) <span class="sc">%&gt;%</span></span>
+<span id="cb105-5"><a href="manipulating-data---tables.html#cb105-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 35 × 2
+##    name               height_ft
+##    &lt;chr&gt;                  &lt;dbl&gt;
+##  1 Luke Skywalker          5.64
+##  2 Darth Vader             6.63
+##  3 Leia Organa             4.92
+##  4 Owen Lars               5.84
+##  5 Beru Whitesun lars      5.41
+##  6 Biggs Darklighter       6.00
+##  7 Obi-Wan Kenobi          5.97
+##  8 Anakin Skywalker        6.17
+##  9 Wilhuff Tarkin          5.91
+## 10 Han Solo                5.91
+## # ℹ 25 more rows</code></pre>
+<p>You’ll notice we’ve used <code>collect()</code> in the Arrow pipeline above. That’s because
+one of the ways in which Arrow is efficient is that it works out the instructions
+for the calculations it needs to perform (<em>expressions</em>) and only runs them
+using Arrow once you actually pull the data into your R session. This means
+instead of doing lots of separate operations, it does them all at once in a
+more optimised way. This is called <em>lazy evaluation</em>.</p>
+<p>It also means that you are able to manipulate data that is larger than you can
+fit into memory on the machine you’re running your code on, if you only pull
+data into R when you have selected the desired subset, or when using functions
+which can operate on chunks of data.</p>
+<p>You can also have data which is split across multiple files. For example, you
+might have files which are stored in multiple Parquet or Feather files,
+partitioned across different directories. You can open partitioned or multi-file datasets
+using <code>open_dataset()</code> as discussed in a previous chapter, and then manipulate
+this data using Arrow before even reading any of the data into R.</p>
+</div>
+<div id="use-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.2">
+<h2><span class="header-section-number">7.2</span> Use dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use a dplyr verb in Arrow.</p>
+<div id="solution-38" class="section level3 hasAnchor" number="7.2.1">
+<h3><span class="header-section-number">7.2.1</span> Solution<a href="manipulating-data---tables.html#solution-38" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb107"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb107-1"><a href="manipulating-data---tables.html#cb107-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(dplyr)</span>
+<span id="cb107-2"><a href="manipulating-data---tables.html#cb107-2" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb107-3"><a href="manipulating-data---tables.html#cb107-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(species <span class="sc">==</span> <span class="st">&quot;Human&quot;</span>, homeworld <span class="sc">==</span> <span class="st">&quot;Tatooine&quot;</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb107-4"><a href="manipulating-data---tables.html#cb107-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 8 × 14
+##   name      height  mass hair_color skin_color eye_color birth_year sex   gender
+##   &lt;chr&gt;      &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+## 1 Luke Sky…    172    77 blond      fair       blue            19   male  mascu…
+## 2 Darth Va…    202   136 none       white      yellow          41.9 male  mascu…
+## 3 Owen Lars    178   120 brown, gr… light      blue            52   male  mascu…
+## 4 Beru Whi…    165    75 brown      light      blue            47   fema… femin…
+## 5 Biggs Da…    183    84 black      light      brown           24   male  mascu…
+## 6 Anakin S…    188    84 blond      fair       blue            41.9 male  mascu…
+## 7 Shmi Sky…    163    NA black      fair       brown           72   fema… femin…
+## 8 Cliegg L…    183    NA brown      fair       blue            82   male  mascu…
+## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;</code></pre>
+</div>
+<div id="discussion-16" class="section level3 hasAnchor" number="7.2.2">
+<h3><span class="header-section-number">7.2.2</span> Discussion<a href="manipulating-data---tables.html#discussion-16" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can use most of the dplyr verbs directly from Arrow.</p>
+</div>
+<div id="see-also-3" class="section level3 hasAnchor" number="7.2.3">
+<h3><span class="header-section-number">7.2.3</span> See also<a href="manipulating-data---tables.html#see-also-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can find examples of the various dplyr verbs in “Introduction to dplyr” -
+run <code>vignette("dplyr", package = "dplyr")</code> or view on
+the <a href="https://dplyr.tidyverse.org/articles/dplyr.html">pkgdown site</a>.</p>
+<p>You can see more information about using <code>arrow_table()</code> to create Arrow Tables
+and <code>collect()</code> to view them as R data frames in <a href="creating-arrow-objects.html#creating-arrow-objects">Creating Arrow Objects</a>.</p>
+</div>
+</div>
+<div id="use-r-functions-in-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.3">
+<h2><span class="header-section-number">7.3</span> Use R functions in dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use an R function inside a dplyr verb in Arrow.</p>
+<div id="solution-39" class="section level3 hasAnchor" number="7.3.1">
+<h3><span class="header-section-number">7.3.1</span> Solution<a href="manipulating-data---tables.html#solution-39" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb109"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb109-1"><a href="manipulating-data---tables.html#cb109-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb109-2"><a href="manipulating-data---tables.html#cb109-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="fu">str_detect</span>(name, <span class="st">&quot;Darth&quot;</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb109-3"><a href="manipulating-data---tables.html#cb109-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 2 × 14
+##   name      height  mass hair_color skin_color eye_color birth_year sex   gender
+##   &lt;chr&gt;      &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+## 1 Darth Va…    202   136 none       white      yellow          41.9 male  mascu…
+## 2 Darth Ma…    175    80 none       red        yellow          54   male  mascu…
+## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;</code></pre>
+</div>
+<div id="discussion-17" class="section level3 hasAnchor" number="7.3.2">
+<h3><span class="header-section-number">7.3.2</span> Discussion<a href="manipulating-data---tables.html#discussion-17" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The Arrow R package allows you to use dplyr verbs containing expressions which
+include base R and many tidyverse functions, but call Arrow functions under the hood.
+If you find any base R or tidyverse functions which you would like to see a
+mapping of in Arrow, please
+<a href="https://issues.apache.org/jira/projects/ARROW/issues">open an issue on the project JIRA</a>.</p>
+<p>The following packages (amongst some from others) have had many function
+bindings/mappings written in arrow:</p>
+<ul>
+<li><a href="https://lubridate.tidyverse.org/">lubridate</a></li>
+<li><a href="https://stringr.tidyverse.org/">stringr</a></li>
+<li><a href="https://dplyr.tidyverse.org/">dplyr</a></li>
+</ul>
+<p>If you try to call a function which does not have arrow mapping, the data will
+be pulled back into R, and you will see a warning message.</p>
+<div class="sourceCode" id="cb111"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb111-1"><a href="manipulating-data---tables.html#cb111-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(stringr)</span>
+<span id="cb111-2"><a href="manipulating-data---tables.html#cb111-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb111-3"><a href="manipulating-data---tables.html#cb111-3" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb111-4"><a href="manipulating-data---tables.html#cb111-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">name_split =</span> <span class="fu">str_split_fixed</span>(name, <span class="st">&quot; &quot;</span>, <span class="dv">2</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb111-5"><a href="manipulating-data---tables.html#cb111-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## Warning: Expression str_split_fixed(name, &quot; &quot;, 2) not supported in Arrow;
+## pulling data into R</code></pre>
+<pre><code>## # A tibble: 87 × 15
+##    name     height  mass hair_color skin_color eye_color birth_year sex   gender
+##    &lt;chr&gt;     &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;      &lt;chr&gt;      &lt;chr&gt;          &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; 
+##  1 Luke Sk…    172    77 blond      fair       blue            19   male  mascu…
+##  2 C-3PO       167    75 &lt;NA&gt;       gold       yellow         112   none  mascu…
+##  3 R2-D2        96    32 &lt;NA&gt;       white, bl… red             33   none  mascu…
+##  4 Darth V…    202   136 none       white      yellow          41.9 male  mascu…
+##  5 Leia Or…    150    49 brown      light      brown           19   fema… femin…
+##  6 Owen La…    178   120 brown, gr… light      blue            52   male  mascu…
+##  7 Beru Wh…    165    75 brown      light      blue            47   fema… femin…
+##  8 R5-D4        97    32 &lt;NA&gt;       white, red red             NA   none  mascu…
+##  9 Biggs D…    183    84 black      light      brown           24   male  mascu…
+## 10 Obi-Wan…    182    77 auburn, w… fair       blue-gray       57   male  mascu…
+## # ℹ 77 more rows
+## # ℹ 6 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;,
+## #   vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;,
+## #   name_split &lt;chr[,2]&gt;</code></pre>
+</div>
+</div>
+<div id="use-arrow-functions-in-dplyr-verbs-in-arrow" class="section level2 hasAnchor" number="7.4">
+<h2><span class="header-section-number">7.4</span> Use Arrow functions in dplyr verbs in Arrow<a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use a function which is implemented in Arrow’s C++ library but either:</p>
+<ul>
+<li>it doesn’t have a mapping to a base R or tidyverse equivalent, or</li>
+<li>it has a mapping but nevertheless you want to call the C++ function directly</li>
+</ul>
+<div id="solution-40" class="section level3 hasAnchor" number="7.4.1">
+<h3><span class="header-section-number">7.4.1</span> Solution<a href="manipulating-data---tables.html#solution-40" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb114-1"><a href="manipulating-data---tables.html#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb114-2"><a href="manipulating-data---tables.html#cb114-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(name) <span class="sc">%&gt;%</span></span>
+<span id="cb114-3"><a href="manipulating-data---tables.html#cb114-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">padded_name =</span> <span class="fu">arrow_ascii_lpad</span>(name, <span class="at">options =</span> <span class="fu">list</span>(<span class="at">width =</span> <span class="dv">10</span>, <span class="at">padding =</span> <span class="st">&quot;*&quot;</span>))) <span class="sc">%&gt;%</span></span>
+<span id="cb114-4"><a href="manipulating-data---tables.html#cb114-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 87 × 2
+##    name               padded_name       
+##    &lt;chr&gt;              &lt;chr&gt;             
+##  1 Luke Skywalker     Luke Skywalker    
+##  2 C-3PO              *****C-3PO        
+##  3 R2-D2              *****R2-D2        
+##  4 Darth Vader        Darth Vader       
+##  5 Leia Organa        Leia Organa       
+##  6 Owen Lars          *Owen Lars        
+##  7 Beru Whitesun lars Beru Whitesun lars
+##  8 R5-D4              *****R5-D4        
+##  9 Biggs Darklighter  Biggs Darklighter 
+## 10 Obi-Wan Kenobi     Obi-Wan Kenobi    
+## # ℹ 77 more rows</code></pre>
+</div>
+<div id="discussion-18" class="section level3 hasAnchor" number="7.4.2">
+<h3><span class="header-section-number">7.4.2</span> Discussion<a href="manipulating-data---tables.html#discussion-18" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The vast majority of Arrow C++ compute functions have been mapped to their
+base R or tidyverse equivalents, and we strongly recommend that you use
+these mappings where possible, as the original functions are well documented
+and the mapped versions have been tested to ensure the results returned are as
+expected.</p>
+<p>However, there may be circumstances in which you might want to use a compute
+function from the Arrow C++ library which does not have a base R or tidyverse
+equivalent.</p>
+<p>You can find documentation of Arrow C++ compute functions in
+<a href="https://arrow.apache.org/docs/cpp/compute.html#available-functions">the C++ documention</a>.
+This documentation lists all available compute functions, any associated options classes
+they need, and the valid data types that they can be used with.</p>
+<p>You can list all available Arrow compute functions from R by calling
+<code>list_compute_functions()</code>.</p>
+<div class="sourceCode" id="cb116"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb116-1"><a href="manipulating-data---tables.html#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="fu">list_compute_functions</span>()</span></code></pre></div>
+<pre><code>##   [1] &quot;abs&quot;                             &quot;abs_checked&quot;                    
+##   [3] &quot;acos&quot;                            &quot;acos_checked&quot;                   
+##   [5] &quot;add&quot;                             &quot;add_checked&quot;                    
+##   [7] &quot;all&quot;                             &quot;and&quot;                            
+##   [9] &quot;and_kleene&quot;                      &quot;and_not&quot;                        
+##  [11] &quot;and_not_kleene&quot;                  &quot;any&quot;                            
+##  [13] &quot;approximate_median&quot;              &quot;array_filter&quot;                   
+##  [15] &quot;array_sort_indices&quot;              &quot;array_take&quot;                     
+##  [17] &quot;ascii_capitalize&quot;                &quot;ascii_center&quot;                   
+##  [19] &quot;ascii_is_alnum&quot;                  &quot;ascii_is_alpha&quot;                 
+##  [21] &quot;ascii_is_decimal&quot;                &quot;ascii_is_lower&quot;                 
+##  [23] &quot;ascii_is_printable&quot;              &quot;ascii_is_space&quot;                 
+##  [25] &quot;ascii_is_title&quot;                  &quot;ascii_is_upper&quot;                 
+##  [27] &quot;ascii_lower&quot;                     &quot;ascii_lpad&quot;                     
+##  [29] &quot;ascii_ltrim&quot;                     &quot;ascii_ltrim_whitespace&quot;         
+##  [31] &quot;ascii_reverse&quot;                   &quot;ascii_rpad&quot;                     
+##  [33] &quot;ascii_rtrim&quot;                     &quot;ascii_rtrim_whitespace&quot;         
+##  [35] &quot;ascii_split_whitespace&quot;          &quot;ascii_swapcase&quot;                 
+##  [37] &quot;ascii_title&quot;                     &quot;ascii_trim&quot;                     
+##  [39] &quot;ascii_trim_whitespace&quot;           &quot;ascii_upper&quot;                    
+##  [41] &quot;asin&quot;                            &quot;asin_checked&quot;                   
+##  [43] &quot;assume_timezone&quot;                 &quot;atan&quot;                           
+##  [45] &quot;atan2&quot;                           &quot;binary_join&quot;                    
+##  [47] &quot;binary_join_element_wise&quot;        &quot;binary_length&quot;                  
+##  [49] &quot;binary_repeat&quot;                   &quot;binary_replace_slice&quot;           
+##  [51] &quot;binary_reverse&quot;                  &quot;binary_slice&quot;                   
+##  [53] &quot;bit_wise_and&quot;                    &quot;bit_wise_not&quot;                   
+##  [55] &quot;bit_wise_or&quot;                     &quot;bit_wise_xor&quot;                   
+##  [57] &quot;case_when&quot;                       &quot;cast&quot;                           
+##  [59] &quot;ceil&quot;                            &quot;ceil_temporal&quot;                  
+##  [61] &quot;choose&quot;                          &quot;coalesce&quot;                       
+##  [63] &quot;cos&quot;                             &quot;cos_checked&quot;                    
+##  [65] &quot;count&quot;                           &quot;count_all&quot;                      
+##  [67] &quot;count_distinct&quot;                  &quot;count_substring&quot;                
+##  [69] &quot;count_substring_regex&quot;           &quot;cumulative_max&quot;                 
+##  [71] &quot;cumulative_min&quot;                  &quot;cumulative_prod&quot;                
+##  [73] &quot;cumulative_prod_checked&quot;         &quot;cumulative_sum&quot;                 
+##  [75] &quot;cumulative_sum_checked&quot;          &quot;day&quot;                            
+##  [77] &quot;day_of_week&quot;                     &quot;day_of_year&quot;                    
+##  [79] &quot;day_time_interval_between&quot;       &quot;days_between&quot;                   
+##  [81] &quot;dictionary_encode&quot;               &quot;divide&quot;                         
+##  [83] &quot;divide_checked&quot;                  &quot;drop_null&quot;                      
+##  [85] &quot;ends_with&quot;                       &quot;equal&quot;                          
+##  [87] &quot;exp&quot;                             &quot;extract_regex&quot;                  
+##  [89] &quot;fill_null_backward&quot;              &quot;fill_null_forward&quot;              
+##  [91] &quot;filter&quot;                          &quot;find_substring&quot;                 
+##  [93] &quot;find_substring_regex&quot;            &quot;first&quot;                          
+##  [95] &quot;first_last&quot;                      &quot;floor&quot;                          
+##  [97] &quot;floor_temporal&quot;                  &quot;greater&quot;                        
+##  [99] &quot;greater_equal&quot;                   &quot;hour&quot;                           
+## [101] &quot;hours_between&quot;                   &quot;if_else&quot;                        
+## [103] &quot;index&quot;                           &quot;index_in&quot;                       
+## [105] &quot;index_in_meta_binary&quot;            &quot;indices_nonzero&quot;                
+## [107] &quot;invert&quot;                          &quot;is_dst&quot;                         
+## [109] &quot;is_finite&quot;                       &quot;is_in&quot;                          
+## [111] &quot;is_in_meta_binary&quot;               &quot;is_inf&quot;                         
+## [113] &quot;is_leap_year&quot;                    &quot;is_nan&quot;                         
+## [115] &quot;is_null&quot;                         &quot;is_valid&quot;                       
+## [117] &quot;iso_calendar&quot;                    &quot;iso_week&quot;                       
+## [119] &quot;iso_year&quot;                        &quot;last&quot;                           
+## [121] &quot;less&quot;                            &quot;less_equal&quot;                     
+## [123] &quot;list_element&quot;                    &quot;list_flatten&quot;                   
+## [125] &quot;list_parent_indices&quot;             &quot;list_slice&quot;                     
+## [127] &quot;list_value_length&quot;               &quot;ln&quot;                             
+## [129] &quot;ln_checked&quot;                      &quot;local_timestamp&quot;                
+## [131] &quot;log10&quot;                           &quot;log10_checked&quot;                  
+## [133] &quot;log1p&quot;                           &quot;log1p_checked&quot;                  
+## [135] &quot;log2&quot;                            &quot;log2_checked&quot;                   
+## [137] &quot;logb&quot;                            &quot;logb_checked&quot;                   
+## [139] &quot;make_struct&quot;                     &quot;map_lookup&quot;                     
+## [141] &quot;match_like&quot;                      &quot;match_substring&quot;                
+## [143] &quot;match_substring_regex&quot;           &quot;max&quot;                            
+## [145] &quot;max_element_wise&quot;                &quot;mean&quot;                           
+## [147] &quot;microsecond&quot;                     &quot;microseconds_between&quot;           
+## [149] &quot;millisecond&quot;                     &quot;milliseconds_between&quot;           
+## [151] &quot;min&quot;                             &quot;min_element_wise&quot;               
+## [153] &quot;min_max&quot;                         &quot;minute&quot;                         
+## [155] &quot;minutes_between&quot;                 &quot;mode&quot;                           
+## [157] &quot;month&quot;                           &quot;month_day_nano_interval_between&quot;
+## [159] &quot;month_interval_between&quot;          &quot;multiply&quot;                       
+## [161] &quot;multiply_checked&quot;                &quot;nanosecond&quot;                     
+## [163] &quot;nanoseconds_between&quot;             &quot;negate&quot;                         
+## [165] &quot;negate_checked&quot;                  &quot;not_equal&quot;                      
+## [167] &quot;or&quot;                              &quot;or_kleene&quot;                      
+## [169] &quot;pairwise_diff&quot;                   &quot;pairwise_diff_checked&quot;          
+## [171] &quot;partition_nth_indices&quot;           &quot;power&quot;                          
+## [173] &quot;power_checked&quot;                   &quot;product&quot;                        
+## [175] &quot;quantile&quot;                        &quot;quarter&quot;                        
+## [177] &quot;quarters_between&quot;                &quot;random&quot;                         
+## [179] &quot;rank&quot;                            &quot;replace_substring&quot;              
+## [181] &quot;replace_substring_regex&quot;         &quot;replace_with_mask&quot;              
+## [183] &quot;round&quot;                           &quot;round_binary&quot;                   
+## [185] &quot;round_temporal&quot;                  &quot;round_to_multiple&quot;              
+## [187] &quot;run_end_decode&quot;                  &quot;run_end_encode&quot;                 
+## [189] &quot;second&quot;                          &quot;seconds_between&quot;                
+## [191] &quot;select_k_unstable&quot;               &quot;shift_left&quot;                     
+## [193] &quot;shift_left_checked&quot;              &quot;shift_right&quot;                    
+## [195] &quot;shift_right_checked&quot;             &quot;sign&quot;                           
+## [197] &quot;sin&quot;                             &quot;sin_checked&quot;                    
+## [199] &quot;sort_indices&quot;                    &quot;split_pattern&quot;                  
+## [201] &quot;split_pattern_regex&quot;             &quot;sqrt&quot;                           
+## [203] &quot;sqrt_checked&quot;                    &quot;starts_with&quot;                    
+## [205] &quot;stddev&quot;                          &quot;strftime&quot;                       
+## [207] &quot;string_is_ascii&quot;                 &quot;strptime&quot;                       
+## [209] &quot;struct_field&quot;                    &quot;subsecond&quot;                      
+## [211] &quot;subtract&quot;                        &quot;subtract_checked&quot;               
+## [213] &quot;sum&quot;                             &quot;take&quot;                           
+## [215] &quot;tan&quot;                             &quot;tan_checked&quot;                    
+## [217] &quot;tdigest&quot;                         &quot;true_unless_null&quot;               
+## [219] &quot;trunc&quot;                           &quot;unique&quot;                         
+## [221] &quot;us_week&quot;                         &quot;us_year&quot;                        
+## [223] &quot;utf8_capitalize&quot;                 &quot;utf8_center&quot;                    
+## [225] &quot;utf8_is_alnum&quot;                   &quot;utf8_is_alpha&quot;                  
+## [227] &quot;utf8_is_decimal&quot;                 &quot;utf8_is_digit&quot;                  
+## [229] &quot;utf8_is_lower&quot;                   &quot;utf8_is_numeric&quot;                
+## [231] &quot;utf8_is_printable&quot;               &quot;utf8_is_space&quot;                  
+## [233] &quot;utf8_is_title&quot;                   &quot;utf8_is_upper&quot;                  
+## [235] &quot;utf8_length&quot;                     &quot;utf8_lower&quot;                     
+## [237] &quot;utf8_lpad&quot;                       &quot;utf8_ltrim&quot;                     
+## [239] &quot;utf8_ltrim_whitespace&quot;           &quot;utf8_normalize&quot;                 
+## [241] &quot;utf8_replace_slice&quot;              &quot;utf8_reverse&quot;                   
+## [243] &quot;utf8_rpad&quot;                       &quot;utf8_rtrim&quot;                     
+## [245] &quot;utf8_rtrim_whitespace&quot;           &quot;utf8_slice_codeunits&quot;           
+## [247] &quot;utf8_split_whitespace&quot;           &quot;utf8_swapcase&quot;                  
+## [249] &quot;utf8_title&quot;                      &quot;utf8_trim&quot;                      
+## [251] &quot;utf8_trim_whitespace&quot;            &quot;utf8_upper&quot;                     
+## [253] &quot;value_counts&quot;                    &quot;variance&quot;                       
+## [255] &quot;week&quot;                            &quot;weeks_between&quot;                  
+## [257] &quot;xor&quot;                             &quot;year&quot;                           
+## [259] &quot;year_month_day&quot;                  &quot;years_between&quot;</code></pre>
+<p>The majority of functions here have been mapped to their base R or tidyverse
+equivalent and can be called within a dplyr query as usual. For functions which
+don’t have a base R or tidyverse equivalent, or you want to supply custom
+options, you can call them by prefixing their name with “arrow_”.</p>
+<p>For example, base R’s <code>is.na()</code> function is the equivalent of the Arrow C++
+compute function <code>is_null()</code> with the option <code>nan_is_null</code> set to <code>TRUE</code>.<br />
+A mapping between these functions (with <code>nan_is_null</code> set to <code>TRUE</code>) has been
+created in arrow.</p>
+<div class="sourceCode" id="cb118"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb118-1"><a href="manipulating-data---tables.html#cb118-1" aria-hidden="true" tabindex="-1"></a>demo_df <span class="ot">&lt;-</span> <span class="fu">data.frame</span>(<span class="at">x =</span> <span class="fu">c</span>(<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="cn">NA</span>, <span class="cn">NaN</span>))</span>
+<span id="cb118-2"><a href="manipulating-data---tables.html#cb118-2" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb118-3"><a href="manipulating-data---tables.html#cb118-3" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(demo_df) <span class="sc">%&gt;%</span></span>
+<span id="cb118-4"><a href="manipulating-data---tables.html#cb118-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">y =</span> <span class="fu">is.na</span>(x)) <span class="sc">%&gt;%</span> </span>
+<span id="cb118-5"><a href="manipulating-data---tables.html#cb118-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 5 × 2
+##       x y    
+##   &lt;dbl&gt; &lt;lgl&gt;
+## 1     1 FALSE
+## 2     2 FALSE
+## 3     3 FALSE
+## 4    NA TRUE 
+## 5   NaN TRUE</code></pre>
+<p>If you want to call Arrow’s <code>is_null()</code> function but with <code>nan_is_null</code> set to
+<code>FALSE</code> (so it returns <code>TRUE</code> when a value being examined is <code>NA</code> but <code>FALSE</code>
+when the value being examined is <code>NaN</code>), you must call <code>is_null()</code> directly and
+specify the option <code>nan_is_null = FALSE</code>.</p>
+<div class="sourceCode" id="cb120"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb120-1"><a href="manipulating-data---tables.html#cb120-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(demo_df) <span class="sc">%&gt;%</span></span>
+<span id="cb120-2"><a href="manipulating-data---tables.html#cb120-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">mutate</span>(<span class="at">y =</span> <span class="fu">arrow_is_null</span>(x, <span class="at">options  =</span> <span class="fu">list</span>(<span class="at">nan_is_null =</span> <span class="cn">FALSE</span>))) <span class="sc">%&gt;%</span> </span>
+<span id="cb120-3"><a href="manipulating-data---tables.html#cb120-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 5 × 2
+##       x y    
+##   &lt;dbl&gt; &lt;lgl&gt;
+## 1     1 FALSE
+## 2     2 FALSE
+## 3     3 FALSE
+## 4    NA TRUE 
+## 5   NaN FALSE</code></pre>
+<div id="compute-functions-with-options" class="section level4 hasAnchor" number="7.4.2.1">
+<h4><span class="header-section-number">7.4.2.1</span> Compute functions with options<a href="manipulating-data---tables.html#compute-functions-with-options" class="anchor-section" aria-label="Anchor link to header"></a></h4>
+<p>Although not all Arrow C++ compute functions require options to be specified,
+most do. For these functions to work in R, they must be linked up
+with the appropriate libarrow options C++ class via the R
+package’s C++ code. At the time of writing, all compute functions available in
+the development version of the Arrow R package had been associated with their options
+classes. However, as the Arrow C++ library’s functionality extends, compute
+functions may be added which do not yet have an R binding. If you find a C++
+compute function which you wish to use from the R package, please <a href="https://github.com/apache/arrow/issues">open an issue
+on the Github project</a>.</p>
+</div>
+</div>
+</div>
+<div id="compute-window-aggregates" class="section level2 hasAnchor" number="7.5">
+<h2><span class="header-section-number">7.5</span> Compute Window Aggregates<a href="manipulating-data---tables.html#compute-window-aggregates" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to apply an aggregation (e.g. <code>mean()</code>) on a grouped table or within a rowwise operation like <code>filter()</code>:</p>
+<div id="solution-41" class="section level3 hasAnchor" number="7.5.1">
+<h3><span class="header-section-number">7.5.1</span> Solution<a href="manipulating-data---tables.html#solution-41" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb122"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb122-1"><a href="manipulating-data---tables.html#cb122-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb122-2"><a href="manipulating-data---tables.html#cb122-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb122-3"><a href="manipulating-data---tables.html#cb122-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb122-4"><a href="manipulating-data---tables.html#cb122-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">left_join</span>(</span>
+<span id="cb122-5"><a href="manipulating-data---tables.html#cb122-5" aria-hidden="true" tabindex="-1"></a>    <span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb122-6"><a href="manipulating-data---tables.html#cb122-6" aria-hidden="true" tabindex="-1"></a>      <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb122-7"><a href="manipulating-data---tables.html#cb122-7" aria-hidden="true" tabindex="-1"></a>      <span class="fu">summarize</span>(<span class="at">mean_height =</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>))</span>
+<span id="cb122-8"><a href="manipulating-data---tables.html#cb122-8" aria-hidden="true" tabindex="-1"></a>  ) <span class="sc">%&gt;%</span></span>
+<span id="cb122-9"><a href="manipulating-data---tables.html#cb122-9" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> mean_height) <span class="sc">%&gt;%</span></span>
+<span id="cb122-10"><a href="manipulating-data---tables.html#cb122-10" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(<span class="sc">!</span>mean_height) <span class="sc">%&gt;%</span></span>
+<span id="cb122-11"><a href="manipulating-data---tables.html#cb122-11" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 29 × 4
+##    name                  height  mass hair_color
+##    &lt;chr&gt;                  &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Luke Skywalker           172    77 blond     
+##  2 Leia Organa              150    49 brown     
+##  3 Beru Whitesun lars       165    75 brown     
+##  4 Wedge Antilles           170    77 brown     
+##  5 Yoda                      66    17 white     
+##  6 Lobot                    175    79 none      
+##  7 Ackbar                   180    83 none      
+##  8 Wicket Systri Warrick     88    20 brown     
+##  9 Nien Nunb                160    68 none      
+## 10 Finis Valorum            170    NA blond     
+## # ℹ 19 more rows</code></pre>
+<p>Or using <code>to_duckdb()</code></p>
+<div class="sourceCode" id="cb124"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb124-1"><a href="manipulating-data---tables.html#cb124-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb124-2"><a href="manipulating-data---tables.html#cb124-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb124-3"><a href="manipulating-data---tables.html#cb124-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb124-4"><a href="manipulating-data---tables.html#cb124-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">to_duckdb</span>() <span class="sc">%&gt;%</span></span>
+<span id="cb124-5"><a href="manipulating-data---tables.html#cb124-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb124-6"><a href="manipulating-data---tables.html#cb124-6" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)) <span class="sc">%&gt;%</span></span>
+<span id="cb124-7"><a href="manipulating-data---tables.html#cb124-7" aria-hidden="true" tabindex="-1"></a>  <span class="fu">to_arrow</span>() <span class="sc">%&gt;%</span></span>
+<span id="cb124-8"><a href="manipulating-data---tables.html#cb124-8" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 29 × 4
+##    name                  height  mass hair_color
+##    &lt;chr&gt;                  &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Luke Skywalker           172    77 blond     
+##  2 Finis Valorum            170    NA blond     
+##  3 Yoda                      66    17 white     
+##  4 Leia Organa              150    49 brown     
+##  5 Beru Whitesun lars       165    75 brown     
+##  6 Wedge Antilles           170    77 brown     
+##  7 Wicket Systri Warrick     88    20 brown     
+##  8 Cordé                    157    NA brown     
+##  9 Dormé                    165    NA brown     
+## 10 Padmé Amidala            165    45 brown     
+## # ℹ 19 more rows</code></pre>
+</div>
+<div id="discusson" class="section level3 hasAnchor" number="7.5.2">
+<h3><span class="header-section-number">7.5.2</span> Discusson<a href="manipulating-data---tables.html#discusson" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Arrow does not support window functions, and pulls the data into R. For large tables, this sacrifices performance.</p>
+<div class="sourceCode" id="cb126"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb126-1"><a href="manipulating-data---tables.html#cb126-1" aria-hidden="true" tabindex="-1"></a><span class="fu">arrow_table</span>(starwars) <span class="sc">%&gt;%</span></span>
+<span id="cb126-2"><a href="manipulating-data---tables.html#cb126-2" aria-hidden="true" tabindex="-1"></a>  <span class="fu">select</span>(<span class="dv">1</span><span class="sc">:</span><span class="dv">4</span>) <span class="sc">%&gt;%</span></span>
+<span id="cb126-3"><a href="manipulating-data---tables.html#cb126-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(hair_color)) <span class="sc">%&gt;%</span></span>
+<span id="cb126-4"><a href="manipulating-data---tables.html#cb126-4" aria-hidden="true" tabindex="-1"></a>  <span class="fu">group_by</span>(hair_color) <span class="sc">%&gt;%</span></span>
+<span id="cb126-5"><a href="manipulating-data---tables.html#cb126-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">filter</span>(height <span class="sc">&lt;</span> <span class="fu">mean</span>(height, <span class="at">na.rm =</span> <span class="cn">TRUE</span>))</span></code></pre></div>
+<pre><code>## Warning: Expression height &lt; mean(height, na.rm = TRUE) not supported in Arrow;
+## pulling data into R</code></pre>
+<pre><code>## # A tibble: 29 × 4
+## # Groups:   hair_color [5]
+##    name                  height  mass hair_color
+##    &lt;chr&gt;                  &lt;int&gt; &lt;dbl&gt; &lt;chr&gt;     
+##  1 Luke Skywalker           172    77 blond     
+##  2 Leia Organa              150    49 brown     
+##  3 Beru Whitesun lars       165    75 brown     
+##  4 Wedge Antilles           170    77 brown     
+##  5 Yoda                      66    17 white     
+##  6 Lobot                    175    79 none      
+##  7 Ackbar                   180    83 none      
+##  8 Wicket Systri Warrick     88    20 brown     
+##  9 Nien Nunb                160    68 none      
+## 10 Finis Valorum            170    NA blond     
+## # ℹ 19 more rows</code></pre>
+<p>You can perform these window aggregate operations on Arrow tables by:</p>
+<ul>
+<li>Computing the aggregation separately, and joining the result</li>
+<li>Passing the data to DuckDB, and use the DuckDB query engine to perform the operations</li>
+</ul>
+<p>Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the <a href="https://arrow.apache.org/blog/2021/12/03/arrow-duckdb/">Arrow blog post</a>.</p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="manipulating-data---arrays.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="using-pyarrow-from-r.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/tables.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/reading-and-writing-data---multiple-files.html b/r/reading-and-writing-data---multiple-files.html
new file mode 100644
index 0000000..938bae5
--- /dev/null
+++ b/r/reading-and-writing-data---multiple-files.html
@@ -0,0 +1,842 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook</title>
+  <meta name="description" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="3 Reading and Writing Data - Multiple Files | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="reading-and-writing-data---single-files.html"/>
+<link rel="next" href="creating-arrow-objects.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="reading-and-writing-data---multiple-files" class="section level1 hasAnchor" number="3">
+<h1><span class="header-section-number">3</span> Reading and Writing Data - Multiple Files<a href="reading-and-writing-data---multiple-files.html#reading-and-writing-data---multiple-files" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-1" class="section level2 hasAnchor" number="3.1">
+<h2><span class="header-section-number">3.1</span> Introduction<a href="reading-and-writing-data---multiple-files.html#introduction-1" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>When reading files into R using Apache Arrow, you can read:</p>
+<ul>
+<li>a single file into memory as a data frame or an Arrow Table</li>
+<li>a single file that is too large to fit in memory as an Arrow Dataset</li>
+<li>multiple and partitioned files as an Arrow Dataset</li>
+</ul>
+<p>This chapter contains recipes related to using Apache Arrow to read and
+write files too large for memory and multiple or partitioned files as an
+Arrow Dataset. There are a number of
+circumstances in which you may want to read in the data as an Arrow Dataset:</p>
+<ul>
+<li>your single data file is too large to load into memory</li>
+<li>your data are partitioned among numerous files</li>
+<li>you want faster performance from your <code>dplyr</code> queries</li>
+<li>you want to be able to take advantage of Arrow’s compute functions</li>
+</ul>
+<p>It is possible to read in partitioned data in Parquet, Feather (also known as Arrow IPC), and CSV or
+other text-delimited formats. If you are choosing a partitioned multiple file format, we
+recommend Parquet or Feather (Arrow IPC ), both of which can have improved performance
+when compared to CSVs due to their capabilities around metadata and compression.</p>
+</div>
+<div id="write-data-to-disk---parquet" class="section level2 hasAnchor" number="3.2">
+<h2><span class="header-section-number">3.2</span> Write data to disk - Parquet<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single Parquet file.</p>
+<div id="solution-15" class="section level3 hasAnchor" number="3.2.1">
+<h3><span class="header-section-number">3.2.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-15" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb31"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb31-1"><a href="reading-and-writing-data---multiple-files.html#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality, <span class="at">path =</span> <span class="st">&quot;airquality_data&quot;</span>)</span></code></pre></div>
+</div>
+<div id="discussion-4" class="section level3 hasAnchor" number="3.2.2">
+<h3><span class="header-section-number">3.2.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The default format for <code>open_dataset()</code> and <code>write_dataset()</code> is Parquet.</p>
+</div>
+</div>
+<div id="write-partitioned-data---parquet" class="section level2 hasAnchor" number="3.3">
+<h2><span class="header-section-number">3.3</span> Write partitioned data - Parquet<a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save multiple Parquet data files to disk in partitions based on columns in the data.</p>
+<div id="solution-16" class="section level3 hasAnchor" number="3.3.1">
+<h3><span class="header-section-number">3.3.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-16" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb32-1"><a href="reading-and-writing-data---multiple-files.html#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(airquality, <span class="st">&quot;airquality_partitioned&quot;</span>, <span class="at">partitioning =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>))</span></code></pre></div>
+<p>As you can see, this has created folders based on the supplied partition variable <code>Month</code>.</p>
+<div class="sourceCode" id="cb33"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb33-1"><a href="reading-and-writing-data---multiple-files.html#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot;</code></pre>
+</div>
+<div id="discussion-5" class="section level3 hasAnchor" number="3.3.2">
+<h3><span class="header-section-number">3.3.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-5" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>The data is written to separate folders based on the values in the <code>Month</code>
+column. The default behaviour is to use Hive-style (i.e. “col_name=value” folder names)
+partitions.</p>
+<div class="sourceCode" id="cb35"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb35-1"><a href="reading-and-writing-data---multiple-files.html#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb35-2"><a href="reading-and-writing-data---multiple-files.html#cb35-2" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5/part-0.parquet&quot; &quot;Month=6/part-0.parquet&quot; &quot;Month=7/part-0.parquet&quot;
+## [4] &quot;Month=8/part-0.parquet&quot; &quot;Month=9/part-0.parquet&quot;</code></pre>
+<p>You can specify multiple partitioning variables to add extra levels of partitioning.</p>
+<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb37-1"><a href="reading-and-writing-data---multiple-files.html#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(airquality, <span class="st">&quot;airquality_partitioned_deeper&quot;</span>, <span class="at">partitioning =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>))</span>
+<span id="cb37-2"><a href="reading-and-writing-data---multiple-files.html#cb37-2" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned_deeper&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot;</code></pre>
+<p>If you take a look in one of these folders, you will see that the data is then partitioned by the second partition variable, <code>Day</code>.</p>
+<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb39-1"><a href="reading-and-writing-data---multiple-files.html#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb39-2"><a href="reading-and-writing-data---multiple-files.html#cb39-2" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_partitioned_deeper/Month=5&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>##  [1] &quot;Day=1/part-0.parquet&quot;  &quot;Day=10/part-0.parquet&quot; &quot;Day=11/part-0.parquet&quot;
+##  [4] &quot;Day=12/part-0.parquet&quot; &quot;Day=13/part-0.parquet&quot; &quot;Day=14/part-0.parquet&quot;
+##  [7] &quot;Day=15/part-0.parquet&quot; &quot;Day=16/part-0.parquet&quot; &quot;Day=17/part-0.parquet&quot;
+## [10] &quot;Day=18/part-0.parquet&quot; &quot;Day=19/part-0.parquet&quot; &quot;Day=2/part-0.parquet&quot; 
+## [13] &quot;Day=20/part-0.parquet&quot; &quot;Day=21/part-0.parquet&quot; &quot;Day=22/part-0.parquet&quot;
+## [16] &quot;Day=23/part-0.parquet&quot; &quot;Day=24/part-0.parquet&quot; &quot;Day=25/part-0.parquet&quot;
+## [19] &quot;Day=26/part-0.parquet&quot; &quot;Day=27/part-0.parquet&quot; &quot;Day=28/part-0.parquet&quot;
+## [22] &quot;Day=29/part-0.parquet&quot; &quot;Day=3/part-0.parquet&quot;  &quot;Day=30/part-0.parquet&quot;
+## [25] &quot;Day=31/part-0.parquet&quot; &quot;Day=4/part-0.parquet&quot;  &quot;Day=5/part-0.parquet&quot; 
+## [28] &quot;Day=6/part-0.parquet&quot;  &quot;Day=7/part-0.parquet&quot;  &quot;Day=8/part-0.parquet&quot; 
+## [31] &quot;Day=9/part-0.parquet&quot;</code></pre>
+<p>There are two different ways to specify variables to use for partitioning -
+either via the <code>partitioning</code> variable as above, or by using <code>dplyr::group_by()</code> on your data - the group variables will form the partitions.</p>
+<div class="sourceCode" id="cb41"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb41-1"><a href="reading-and-writing-data---multiple-files.html#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> <span class="fu">group_by</span>(airquality, Month, Day),</span>
+<span id="cb41-2"><a href="reading-and-writing-data---multiple-files.html#cb41-2" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_groupby&quot;</span>)</span></code></pre></div>
+<div class="sourceCode" id="cb42"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb42-1"><a href="reading-and-writing-data---multiple-files.html#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Take a look at the files in this directory</span></span>
+<span id="cb42-2"><a href="reading-and-writing-data---multiple-files.html#cb42-2" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_groupby&quot;</span>, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>##   [1] &quot;Month=5/Day=1/part-0.parquet&quot;  &quot;Month=5/Day=10/part-0.parquet&quot;
+##   [3] &quot;Month=5/Day=11/part-0.parquet&quot; &quot;Month=5/Day=12/part-0.parquet&quot;
+##   [5] &quot;Month=5/Day=13/part-0.parquet&quot; &quot;Month=5/Day=14/part-0.parquet&quot;
+##   [7] &quot;Month=5/Day=15/part-0.parquet&quot; &quot;Month=5/Day=16/part-0.parquet&quot;
+##   [9] &quot;Month=5/Day=17/part-0.parquet&quot; &quot;Month=5/Day=18/part-0.parquet&quot;
+##  [11] &quot;Month=5/Day=19/part-0.parquet&quot; &quot;Month=5/Day=2/part-0.parquet&quot; 
+##  [13] &quot;Month=5/Day=20/part-0.parquet&quot; &quot;Month=5/Day=21/part-0.parquet&quot;
+##  [15] &quot;Month=5/Day=22/part-0.parquet&quot; &quot;Month=5/Day=23/part-0.parquet&quot;
+##  [17] &quot;Month=5/Day=24/part-0.parquet&quot; &quot;Month=5/Day=25/part-0.parquet&quot;
+##  [19] &quot;Month=5/Day=26/part-0.parquet&quot; &quot;Month=5/Day=27/part-0.parquet&quot;
+##  [21] &quot;Month=5/Day=28/part-0.parquet&quot; &quot;Month=5/Day=29/part-0.parquet&quot;
+##  [23] &quot;Month=5/Day=3/part-0.parquet&quot;  &quot;Month=5/Day=30/part-0.parquet&quot;
+##  [25] &quot;Month=5/Day=31/part-0.parquet&quot; &quot;Month=5/Day=4/part-0.parquet&quot; 
+##  [27] &quot;Month=5/Day=5/part-0.parquet&quot;  &quot;Month=5/Day=6/part-0.parquet&quot; 
+##  [29] &quot;Month=5/Day=7/part-0.parquet&quot;  &quot;Month=5/Day=8/part-0.parquet&quot; 
+##  [31] &quot;Month=5/Day=9/part-0.parquet&quot;  &quot;Month=6/Day=1/part-0.parquet&quot; 
+##  [33] &quot;Month=6/Day=10/part-0.parquet&quot; &quot;Month=6/Day=11/part-0.parquet&quot;
+##  [35] &quot;Month=6/Day=12/part-0.parquet&quot; &quot;Month=6/Day=13/part-0.parquet&quot;
+##  [37] &quot;Month=6/Day=14/part-0.parquet&quot; &quot;Month=6/Day=15/part-0.parquet&quot;
+##  [39] &quot;Month=6/Day=16/part-0.parquet&quot; &quot;Month=6/Day=17/part-0.parquet&quot;
+##  [41] &quot;Month=6/Day=18/part-0.parquet&quot; &quot;Month=6/Day=19/part-0.parquet&quot;
+##  [43] &quot;Month=6/Day=2/part-0.parquet&quot;  &quot;Month=6/Day=20/part-0.parquet&quot;
+##  [45] &quot;Month=6/Day=21/part-0.parquet&quot; &quot;Month=6/Day=22/part-0.parquet&quot;
+##  [47] &quot;Month=6/Day=23/part-0.parquet&quot; &quot;Month=6/Day=24/part-0.parquet&quot;
+##  [49] &quot;Month=6/Day=25/part-0.parquet&quot; &quot;Month=6/Day=26/part-0.parquet&quot;
+##  [51] &quot;Month=6/Day=27/part-0.parquet&quot; &quot;Month=6/Day=28/part-0.parquet&quot;
+##  [53] &quot;Month=6/Day=29/part-0.parquet&quot; &quot;Month=6/Day=3/part-0.parquet&quot; 
+##  [55] &quot;Month=6/Day=30/part-0.parquet&quot; &quot;Month=6/Day=4/part-0.parquet&quot; 
+##  [57] &quot;Month=6/Day=5/part-0.parquet&quot;  &quot;Month=6/Day=6/part-0.parquet&quot; 
+##  [59] &quot;Month=6/Day=7/part-0.parquet&quot;  &quot;Month=6/Day=8/part-0.parquet&quot; 
+##  [61] &quot;Month=6/Day=9/part-0.parquet&quot;  &quot;Month=7/Day=1/part-0.parquet&quot; 
+##  [63] &quot;Month=7/Day=10/part-0.parquet&quot; &quot;Month=7/Day=11/part-0.parquet&quot;
+##  [65] &quot;Month=7/Day=12/part-0.parquet&quot; &quot;Month=7/Day=13/part-0.parquet&quot;
+##  [67] &quot;Month=7/Day=14/part-0.parquet&quot; &quot;Month=7/Day=15/part-0.parquet&quot;
+##  [69] &quot;Month=7/Day=16/part-0.parquet&quot; &quot;Month=7/Day=17/part-0.parquet&quot;
+##  [71] &quot;Month=7/Day=18/part-0.parquet&quot; &quot;Month=7/Day=19/part-0.parquet&quot;
+##  [73] &quot;Month=7/Day=2/part-0.parquet&quot;  &quot;Month=7/Day=20/part-0.parquet&quot;
+##  [75] &quot;Month=7/Day=21/part-0.parquet&quot; &quot;Month=7/Day=22/part-0.parquet&quot;
+##  [77] &quot;Month=7/Day=23/part-0.parquet&quot; &quot;Month=7/Day=24/part-0.parquet&quot;
+##  [79] &quot;Month=7/Day=25/part-0.parquet&quot; &quot;Month=7/Day=26/part-0.parquet&quot;
+##  [81] &quot;Month=7/Day=27/part-0.parquet&quot; &quot;Month=7/Day=28/part-0.parquet&quot;
+##  [83] &quot;Month=7/Day=29/part-0.parquet&quot; &quot;Month=7/Day=3/part-0.parquet&quot; 
+##  [85] &quot;Month=7/Day=30/part-0.parquet&quot; &quot;Month=7/Day=31/part-0.parquet&quot;
+##  [87] &quot;Month=7/Day=4/part-0.parquet&quot;  &quot;Month=7/Day=5/part-0.parquet&quot; 
+##  [89] &quot;Month=7/Day=6/part-0.parquet&quot;  &quot;Month=7/Day=7/part-0.parquet&quot; 
+##  [91] &quot;Month=7/Day=8/part-0.parquet&quot;  &quot;Month=7/Day=9/part-0.parquet&quot; 
+##  [93] &quot;Month=8/Day=1/part-0.parquet&quot;  &quot;Month=8/Day=10/part-0.parquet&quot;
+##  [95] &quot;Month=8/Day=11/part-0.parquet&quot; &quot;Month=8/Day=12/part-0.parquet&quot;
+##  [97] &quot;Month=8/Day=13/part-0.parquet&quot; &quot;Month=8/Day=14/part-0.parquet&quot;
+##  [99] &quot;Month=8/Day=15/part-0.parquet&quot; &quot;Month=8/Day=16/part-0.parquet&quot;
+## [101] &quot;Month=8/Day=17/part-0.parquet&quot; &quot;Month=8/Day=18/part-0.parquet&quot;
+## [103] &quot;Month=8/Day=19/part-0.parquet&quot; &quot;Month=8/Day=2/part-0.parquet&quot; 
+## [105] &quot;Month=8/Day=20/part-0.parquet&quot; &quot;Month=8/Day=21/part-0.parquet&quot;
+## [107] &quot;Month=8/Day=22/part-0.parquet&quot; &quot;Month=8/Day=23/part-0.parquet&quot;
+## [109] &quot;Month=8/Day=24/part-0.parquet&quot; &quot;Month=8/Day=25/part-0.parquet&quot;
+## [111] &quot;Month=8/Day=26/part-0.parquet&quot; &quot;Month=8/Day=27/part-0.parquet&quot;
+## [113] &quot;Month=8/Day=28/part-0.parquet&quot; &quot;Month=8/Day=29/part-0.parquet&quot;
+## [115] &quot;Month=8/Day=3/part-0.parquet&quot;  &quot;Month=8/Day=30/part-0.parquet&quot;
+## [117] &quot;Month=8/Day=31/part-0.parquet&quot; &quot;Month=8/Day=4/part-0.parquet&quot; 
+## [119] &quot;Month=8/Day=5/part-0.parquet&quot;  &quot;Month=8/Day=6/part-0.parquet&quot; 
+## [121] &quot;Month=8/Day=7/part-0.parquet&quot;  &quot;Month=8/Day=8/part-0.parquet&quot; 
+## [123] &quot;Month=8/Day=9/part-0.parquet&quot;  &quot;Month=9/Day=1/part-0.parquet&quot; 
+## [125] &quot;Month=9/Day=10/part-0.parquet&quot; &quot;Month=9/Day=11/part-0.parquet&quot;
+## [127] &quot;Month=9/Day=12/part-0.parquet&quot; &quot;Month=9/Day=13/part-0.parquet&quot;
+## [129] &quot;Month=9/Day=14/part-0.parquet&quot; &quot;Month=9/Day=15/part-0.parquet&quot;
+## [131] &quot;Month=9/Day=16/part-0.parquet&quot; &quot;Month=9/Day=17/part-0.parquet&quot;
+## [133] &quot;Month=9/Day=18/part-0.parquet&quot; &quot;Month=9/Day=19/part-0.parquet&quot;
+## [135] &quot;Month=9/Day=2/part-0.parquet&quot;  &quot;Month=9/Day=20/part-0.parquet&quot;
+## [137] &quot;Month=9/Day=21/part-0.parquet&quot; &quot;Month=9/Day=22/part-0.parquet&quot;
+## [139] &quot;Month=9/Day=23/part-0.parquet&quot; &quot;Month=9/Day=24/part-0.parquet&quot;
+## [141] &quot;Month=9/Day=25/part-0.parquet&quot; &quot;Month=9/Day=26/part-0.parquet&quot;
+## [143] &quot;Month=9/Day=27/part-0.parquet&quot; &quot;Month=9/Day=28/part-0.parquet&quot;
+## [145] &quot;Month=9/Day=29/part-0.parquet&quot; &quot;Month=9/Day=3/part-0.parquet&quot; 
+## [147] &quot;Month=9/Day=30/part-0.parquet&quot; &quot;Month=9/Day=4/part-0.parquet&quot; 
+## [149] &quot;Month=9/Day=5/part-0.parquet&quot;  &quot;Month=9/Day=6/part-0.parquet&quot; 
+## [151] &quot;Month=9/Day=7/part-0.parquet&quot;  &quot;Month=9/Day=8/part-0.parquet&quot; 
+## [153] &quot;Month=9/Day=9/part-0.parquet&quot;</code></pre>
+<p>Each of these folders contains 1 or more Parquet files containing the relevant partition of the data.</p>
+<div class="sourceCode" id="cb44"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb44-1"><a href="reading-and-writing-data---multiple-files.html#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(<span class="st">&quot;airquality_groupby/Month=5/Day=10&quot;</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;part-0.parquet&quot;</code></pre>
+<p>Note that when there was an <code>NA</code> value in the partition column,
+these values are written to the <code>col_name=__HIVE_DEFAULT_PARTITION__</code>
+directory.</p>
+</div>
+</div>
+<div id="read-partitioned-data" class="section level2 hasAnchor" number="3.4">
+<h2><span class="header-section-number">3.4</span> Read partitioned data<a href="reading-and-writing-data---multiple-files.html#read-partitioned-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read partitioned data files as an Arrow Dataset.</p>
+<div id="solution-17" class="section level3 hasAnchor" number="3.4.1">
+<h3><span class="header-section-number">3.4.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-17" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb46"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb46-1"><a href="reading-and-writing-data---multiple-files.html#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Read data from directory</span></span>
+<span id="cb46-2"><a href="reading-and-writing-data---multiple-files.html#cb46-2" aria-hidden="true" tabindex="-1"></a>air_data <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(<span class="st">&quot;airquality_partitioned_deeper&quot;</span>)</span>
+<span id="cb46-3"><a href="reading-and-writing-data---multiple-files.html#cb46-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb46-4"><a href="reading-and-writing-data---multiple-files.html#cb46-4" aria-hidden="true" tabindex="-1"></a><span class="co"># View data</span></span>
+<span id="cb46-5"><a href="reading-and-writing-data---multiple-files.html#cb46-5" aria-hidden="true" tabindex="-1"></a>air_data</span></code></pre></div>
+<pre><code>## FileSystemDataset with 153 Parquet files
+## Ozone: int32
+## Solar.R: int32
+## Wind: double
+## Temp: int32
+## Month: int32
+## Day: int32
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+<div id="discussion-6" class="section level3 hasAnchor" number="3.4.2">
+<h3><span class="header-section-number">3.4.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-6" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Partitioning allows you to split data across
+multiple files and folders, avoiding problems associated with storing all your data
+in a single file. This can provide further advantages when using Arrow, as Arrow will only
+read in the necessary partitioned files needed for any given analysis.</p>
+</div>
+</div>
+<div id="write-data-to-disk---featherarrow-ipc-format" class="section level2 hasAnchor" number="3.5">
+<h2><span class="header-section-number">3.5</span> Write data to disk - Feather/Arrow IPC format<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single Feather/Arrow IPC file.</p>
+<div id="solution-18" class="section level3 hasAnchor" number="3.5.1">
+<h3><span class="header-section-number">3.5.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-18" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb48"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb48-1"><a href="reading-and-writing-data---multiple-files.html#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb48-2"><a href="reading-and-writing-data---multiple-files.html#cb48-2" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_feather&quot;</span>,</span>
+<span id="cb48-3"><a href="reading-and-writing-data---multiple-files.html#cb48-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;feather&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-in-featherarrow-ipc-data-as-an-arrow-dataset" class="section level2 hasAnchor" number="3.6">
+<h2><span class="header-section-number">3.6</span> Read in Feather/Arrow IPC data as an Arrow Dataset<a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in Feather/Arrow IPC data as an Arrow Dataset</p>
+<div id="solution-19" class="section level3 hasAnchor" number="3.6.1">
+<h3><span class="header-section-number">3.6.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-19" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb49"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb49-1"><a href="reading-and-writing-data---multiple-files.html#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="co"># write Arrow file to use in this example</span></span>
+<span id="cb49-2"><a href="reading-and-writing-data---multiple-files.html#cb49-2" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb49-3"><a href="reading-and-writing-data---multiple-files.html#cb49-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_arrow&quot;</span>,</span>
+<span id="cb49-4"><a href="reading-and-writing-data---multiple-files.html#cb49-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;arrow&quot;</span>)</span>
+<span id="cb49-5"><a href="reading-and-writing-data---multiple-files.html#cb49-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb49-6"><a href="reading-and-writing-data---multiple-files.html#cb49-6" aria-hidden="true" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb49-7"><a href="reading-and-writing-data---multiple-files.html#cb49-7" aria-hidden="true" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality_data_arrow&quot;</span>, <span class="at">format =</span> <span class="st">&quot;arrow&quot;</span>)</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 Feather file
+## Ozone: int32
+## Solar.R: int32
+## Wind: double
+## Temp: int32
+## Month: int32
+## Day: int32
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+</div>
+<div id="write-data-to-disk---csv-format" class="section level2 hasAnchor" number="3.7">
+<h2><span class="header-section-number">3.7</span> Write data to disk - CSV format<a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write data to disk in a single CSV file.</p>
+<div id="solution-20" class="section level3 hasAnchor" number="3.7.1">
+<h3><span class="header-section-number">3.7.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-20" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb51"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb51-1"><a href="reading-and-writing-data---multiple-files.html#cb51-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb51-2"><a href="reading-and-writing-data---multiple-files.html#cb51-2" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_csv&quot;</span>,</span>
+<span id="cb51-3"><a href="reading-and-writing-data---multiple-files.html#cb51-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-in-csv-data-as-an-arrow-dataset" class="section level2 hasAnchor" number="3.8">
+<h2><span class="header-section-number">3.8</span> Read in CSV data as an Arrow Dataset<a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in CSV data as an Arrow Dataset</p>
+<div id="solution-21" class="section level3 hasAnchor" number="3.8.1">
+<h3><span class="header-section-number">3.8.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-21" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb52"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb52-1"><a href="reading-and-writing-data---multiple-files.html#cb52-1" aria-hidden="true" tabindex="-1"></a><span class="co"># write CSV file to use in this example</span></span>
+<span id="cb52-2"><a href="reading-and-writing-data---multiple-files.html#cb52-2" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(<span class="at">dataset =</span> airquality,</span>
+<span id="cb52-3"><a href="reading-and-writing-data---multiple-files.html#cb52-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">path =</span> <span class="st">&quot;airquality_data_csv&quot;</span>,</span>
+<span id="cb52-4"><a href="reading-and-writing-data---multiple-files.html#cb52-4" aria-hidden="true" tabindex="-1"></a>  <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span>
+<span id="cb52-5"><a href="reading-and-writing-data---multiple-files.html#cb52-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb52-6"><a href="reading-and-writing-data---multiple-files.html#cb52-6" aria-hidden="true" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb52-7"><a href="reading-and-writing-data---multiple-files.html#cb52-7" aria-hidden="true" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality_data_csv&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>)</span></code></pre></div>
+<pre><code>## FileSystemDataset with 1 csv file
+## Ozone: int64
+## Solar.R: int64
+## Wind: double
+## Temp: int64
+## Month: int64
+## Day: int64</code></pre>
+</div>
+</div>
+<div id="read-in-a-csv-dataset-no-headers" class="section level2 hasAnchor" number="3.9">
+<h2><span class="header-section-number">3.9</span> Read in a CSV dataset (no headers)<a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in a dataset containing CSVs with no headers</p>
+<div id="solution-22" class="section level3 hasAnchor" number="3.9.1">
+<h3><span class="header-section-number">3.9.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-22" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb54"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb54-1"><a href="reading-and-writing-data---multiple-files.html#cb54-1" aria-hidden="true" tabindex="-1"></a><span class="co"># write CSV file to use in this example</span></span>
+<span id="cb54-2"><a href="reading-and-writing-data---multiple-files.html#cb54-2" aria-hidden="true" tabindex="-1"></a>dataset_1 <span class="ot">&lt;-</span> airquality[<span class="dv">1</span><span class="sc">:</span><span class="dv">40</span>, <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>)]</span>
+<span id="cb54-3"><a href="reading-and-writing-data---multiple-files.html#cb54-3" aria-hidden="true" tabindex="-1"></a>dataset_2 <span class="ot">&lt;-</span> airquality[<span class="dv">41</span><span class="sc">:</span><span class="dv">80</span>, <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>)]</span>
+<span id="cb54-4"><a href="reading-and-writing-data---multiple-files.html#cb54-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb54-5"><a href="reading-and-writing-data---multiple-files.html#cb54-5" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(<span class="st">&quot;airquality&quot;</span>)</span>
+<span id="cb54-6"><a href="reading-and-writing-data---multiple-files.html#cb54-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write.table</span>(dataset_1, <span class="st">&quot;airquality/part-1.csv&quot;</span>, <span class="at">sep =</span> <span class="st">&quot;,&quot;</span>, <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">col.names =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb54-7"><a href="reading-and-writing-data---multiple-files.html#cb54-7" aria-hidden="true" tabindex="-1"></a><span class="fu">write.table</span>(dataset_2, <span class="st">&quot;airquality/part-2.csv&quot;</span>, <span class="at">sep =</span> <span class="st">&quot;,&quot;</span>, <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">col.names =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb54-8"><a href="reading-and-writing-data---multiple-files.html#cb54-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb54-9"><a href="reading-and-writing-data---multiple-files.html#cb54-9" aria-hidden="true" tabindex="-1"></a><span class="co"># read into R</span></span>
+<span id="cb54-10"><a href="reading-and-writing-data---multiple-files.html#cb54-10" aria-hidden="true" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>, <span class="at">column_names =</span> <span class="fu">c</span>(<span class="st">&quot;Month&quot;</span>, <span class="st">&quot;Day&quot;</span>, <span class="st">&quot;Temp&quot;</span>))</span></code></pre></div>
+<pre><code>## FileSystemDataset with 2 csv files
+## Month: int64
+## Day: int64
+## Temp: int64</code></pre>
+</div>
+<div id="discussion-7" class="section level3 hasAnchor" number="3.9.2">
+<h3><span class="header-section-number">3.9.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-7" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>If your dataset is made up of headerless CSV files, you must supply the names of
+each column. You can do this in multiple ways - either via the <code>column_names</code>
+parameter (as shown above) or via a schema:</p>
+<div class="sourceCode" id="cb56"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb56-1"><a href="reading-and-writing-data---multiple-files.html#cb56-1" aria-hidden="true" tabindex="-1"></a><span class="fu">open_dataset</span>(<span class="st">&quot;airquality&quot;</span>, <span class="at">format =</span> <span class="st">&quot;csv&quot;</span>, <span class="at">schema =</span> <span class="fu">schema</span>(<span class="st">&quot;Month&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>(), <span class="st">&quot;Day&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>(), <span class="st">&quot;Temp&quot;</span> <span class="ot">=</span> <span class="fu">int32</span>()))</span></code></pre></div>
+<pre><code>## FileSystemDataset with 2 csv files
+## Month: int32
+## Day: int32
+## Temp: int32</code></pre>
+<p>One additional advantage of using a schema is that you also have control of the
+data types of the columns. If you provide both column names and a schema, the values
+in <code>column_names</code> must match the <code>schema</code> field names.</p>
+</div>
+</div>
+<div id="write-compressed-partitioned-data" class="section level2 hasAnchor" number="3.10">
+<h2><span class="header-section-number">3.10</span> Write compressed partitioned data<a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save partitioned files, compressed with a specified compression algorithm.</p>
+<div id="solution-23" class="section level3 hasAnchor" number="3.10.1">
+<h3><span class="header-section-number">3.10.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-23" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb58"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb58-1"><a href="reading-and-writing-data---multiple-files.html#cb58-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb58-2"><a href="reading-and-writing-data---multiple-files.html#cb58-2" aria-hidden="true" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb58-3"><a href="reading-and-writing-data---multiple-files.html#cb58-3" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb58-4"><a href="reading-and-writing-data---multiple-files.html#cb58-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb58-5"><a href="reading-and-writing-data---multiple-files.html#cb58-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Write dataset to file</span></span>
+<span id="cb58-6"><a href="reading-and-writing-data---multiple-files.html#cb58-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(iris, <span class="at">path =</span> td, <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span></code></pre></div>
+<div class="sourceCode" id="cb59"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb59-1"><a href="reading-and-writing-data---multiple-files.html#cb59-1" aria-hidden="true" tabindex="-1"></a><span class="co"># View files in the directory</span></span>
+<span id="cb59-2"><a href="reading-and-writing-data---multiple-files.html#cb59-2" aria-hidden="true" tabindex="-1"></a><span class="fu">list.files</span>(td, <span class="at">recursive =</span> <span class="cn">TRUE</span>)</span></code></pre></div>
+<pre><code>## [1] &quot;part-0.parquet&quot;</code></pre>
+</div>
+<div id="discussion-8" class="section level3 hasAnchor" number="3.10.2">
+<h3><span class="header-section-number">3.10.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-8" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can supply the <code>compression</code> argument to <code>write_dataset()</code> as long as
+the compression algorithm is compatible with the chosen format. See <code>?write_dataset()</code>
+for more information on supported compression algorithms and default settings.</p>
+</div>
+</div>
+<div id="read-compressed-data-1" class="section level2 hasAnchor" number="3.11">
+<h2><span class="header-section-number">3.11</span> Read compressed data<a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in data which has been compressed.</p>
+<div id="solution-24" class="section level3 hasAnchor" number="3.11.1">
+<h3><span class="header-section-number">3.11.1</span> Solution<a href="reading-and-writing-data---multiple-files.html#solution-24" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb61"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb61-1"><a href="reading-and-writing-data---multiple-files.html#cb61-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb61-2"><a href="reading-and-writing-data---multiple-files.html#cb61-2" aria-hidden="true" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb61-3"><a href="reading-and-writing-data---multiple-files.html#cb61-3" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb61-4"><a href="reading-and-writing-data---multiple-files.html#cb61-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb61-5"><a href="reading-and-writing-data---multiple-files.html#cb61-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Write dataset to file</span></span>
+<span id="cb61-6"><a href="reading-and-writing-data---multiple-files.html#cb61-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write_dataset</span>(iris, <span class="at">path =</span> td, <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span>
+<span id="cb61-7"><a href="reading-and-writing-data---multiple-files.html#cb61-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb61-8"><a href="reading-and-writing-data---multiple-files.html#cb61-8" aria-hidden="true" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb61-9"><a href="reading-and-writing-data---multiple-files.html#cb61-9" aria-hidden="true" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">open_dataset</span>(td) <span class="sc">%&gt;%</span></span>
+<span id="cb61-10"><a href="reading-and-writing-data---multiple-files.html#cb61-10" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span>
+<span id="cb61-11"><a href="reading-and-writing-data---multiple-files.html#cb61-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb61-12"><a href="reading-and-writing-data---multiple-files.html#cb61-12" aria-hidden="true" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;fct&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+</div>
+<div id="discussion-9" class="section level3 hasAnchor" number="3.11.2">
+<h3><span class="header-section-number">3.11.2</span> Discussion<a href="reading-and-writing-data---multiple-files.html#discussion-9" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Note that Arrow automatically detects the compression and you do not have to
+supply it in the call to <code>open_dataset()</code> or the <code>read_*()</code> functions.</p>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="reading-and-writing-data---single-files.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="creating-arrow-objects.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/datasets.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/reading-and-writing-data---single-files.html b/r/reading-and-writing-data---single-files.html
new file mode 100644
index 0000000..4758284
--- /dev/null
+++ b/r/reading-and-writing-data---single-files.html
@@ -0,0 +1,946 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook</title>
+  <meta name="description" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="2 Reading and Writing Data - Single Files | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="index.html"/>
+<link rel="next" href="reading-and-writing-data---multiple-files.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="reading-and-writing-data---single-files" class="section level1 hasAnchor" number="2">
+<h1><span class="header-section-number">2</span> Reading and Writing Data - Single Files<a href="reading-and-writing-data---single-files.html#reading-and-writing-data---single-files" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction" class="section level2 hasAnchor" number="2.1">
+<h2><span class="header-section-number">2.1</span> Introduction<a href="reading-and-writing-data---single-files.html#introduction" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>When reading files into R using Apache Arrow, you can read:</p>
+<ul>
+<li>a single file into memory as a data frame or an Arrow Table</li>
+<li>a single file that is too large to fit in memory as an Arrow Dataset</li>
+<li>multiple and partitioned files as an Arrow Dataset</li>
+</ul>
+<p>This chapter contains recipes related to using Apache Arrow to read and
+write single file data into memory as an Arrow Table. There are a number of circumstances in
+which you may want to read in single file data as an Arrow Table:</p>
+<ul>
+<li>your data file is large and having performance issues</li>
+<li>you want faster performance from your <code>dplyr</code> queries</li>
+<li>you want to be able to take advantage of Arrow’s compute functions</li>
+</ul>
+<p>If a single data file is too large to load into memory, you can use the Arrow Dataset API.
+Recipes for using <code>open_dataset()</code> and <code>write_dataset()</code> are in the Reading and Writing Data - Multiple Files
+chapter.</p>
+</div>
+<div id="convert-data-from-a-data-frame-to-an-arrow-table" class="section level2 hasAnchor" number="2.2">
+<h2><span class="header-section-number">2.2</span> Convert data from a data frame to an Arrow Table<a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an existing <code>data.frame</code> or <code>tibble</code> object into an Arrow Table.</p>
+<div id="solution" class="section level3 hasAnchor" number="2.2.1">
+<h3><span class="header-section-number">2.2.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="reading-and-writing-data---single-files.html#cb1-1" aria-hidden="true" tabindex="-1"></a>air_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(airquality)</span>
+<span id="cb1-2"><a href="reading-and-writing-data---single-files.html#cb1-2" aria-hidden="true" tabindex="-1"></a>air_table</span></code></pre></div>
+<pre><code>## Table
+## 153 rows x 6 columns
+## $Ozone &lt;int32&gt;
+## $Solar.R &lt;int32&gt;
+## $Wind &lt;double&gt;
+## $Temp &lt;int32&gt;
+## $Month &lt;int32&gt;
+## $Day &lt;int32&gt;
+## 
+## See $metadata for additional Schema metadata</code></pre>
+</div>
+</div>
+<div id="convert-data-from-an-arrow-table-to-a-data-frame" class="section level2 hasAnchor" number="2.3">
+<h2><span class="header-section-number">2.3</span> Convert data from an Arrow Table to a data frame<a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to convert an Arrow Table to a data frame to view the data or work with it
+in your usual analytics pipeline.</p>
+<div id="solution-1" class="section level3 hasAnchor" number="2.3.1">
+<h3><span class="header-section-number">2.3.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="reading-and-writing-data---single-files.html#cb3-1" aria-hidden="true" tabindex="-1"></a>air_df <span class="ot">&lt;-</span> <span class="fu">as.data.frame</span>(air_table)</span>
+<span id="cb3-2"><a href="reading-and-writing-data---single-files.html#cb3-2" aria-hidden="true" tabindex="-1"></a>air_df</span></code></pre></div>
+<pre><code>##     Ozone Solar.R Wind Temp Month Day
+## 1      41     190  7.4   67     5   1
+## 2      36     118  8.0   72     5   2
+## 3      12     149 12.6   74     5   3
+## 4      18     313 11.5   62     5   4
+## 5      NA      NA 14.3   56     5   5
+## 6      28      NA 14.9   66     5   6
+## 7      23     299  8.6   65     5   7
+## 8      19      99 13.8   59     5   8
+## 9       8      19 20.1   61     5   9
+## 10     NA     194  8.6   69     5  10
+## 11      7      NA  6.9   74     5  11
+## 12     16     256  9.7   69     5  12
+## 13     11     290  9.2   66     5  13
+## 14     14     274 10.9   68     5  14
+## 15     18      65 13.2   58     5  15
+## 16     14     334 11.5   64     5  16
+## 17     34     307 12.0   66     5  17
+## 18      6      78 18.4   57     5  18
+## 19     30     322 11.5   68     5  19
+## 20     11      44  9.7   62     5  20
+## 21      1       8  9.7   59     5  21
+## 22     11     320 16.6   73     5  22
+## 23      4      25  9.7   61     5  23
+## 24     32      92 12.0   61     5  24
+## 25     NA      66 16.6   57     5  25
+## 26     NA     266 14.9   58     5  26
+## 27     NA      NA  8.0   57     5  27
+## 28     23      13 12.0   67     5  28
+## 29     45     252 14.9   81     5  29
+## 30    115     223  5.7   79     5  30
+## 31     37     279  7.4   76     5  31
+## 32     NA     286  8.6   78     6   1
+## 33     NA     287  9.7   74     6   2
+## 34     NA     242 16.1   67     6   3
+## 35     NA     186  9.2   84     6   4
+## 36     NA     220  8.6   85     6   5
+## 37     NA     264 14.3   79     6   6
+## 38     29     127  9.7   82     6   7
+## 39     NA     273  6.9   87     6   8
+## 40     71     291 13.8   90     6   9
+## 41     39     323 11.5   87     6  10
+## 42     NA     259 10.9   93     6  11
+## 43     NA     250  9.2   92     6  12
+## 44     23     148  8.0   82     6  13
+## 45     NA     332 13.8   80     6  14
+## 46     NA     322 11.5   79     6  15
+## 47     21     191 14.9   77     6  16
+## 48     37     284 20.7   72     6  17
+## 49     20      37  9.2   65     6  18
+## 50     12     120 11.5   73     6  19
+## 51     13     137 10.3   76     6  20
+## 52     NA     150  6.3   77     6  21
+## 53     NA      59  1.7   76     6  22
+## 54     NA      91  4.6   76     6  23
+## 55     NA     250  6.3   76     6  24
+## 56     NA     135  8.0   75     6  25
+## 57     NA     127  8.0   78     6  26
+## 58     NA      47 10.3   73     6  27
+## 59     NA      98 11.5   80     6  28
+## 60     NA      31 14.9   77     6  29
+## 61     NA     138  8.0   83     6  30
+## 62    135     269  4.1   84     7   1
+## 63     49     248  9.2   85     7   2
+## 64     32     236  9.2   81     7   3
+## 65     NA     101 10.9   84     7   4
+## 66     64     175  4.6   83     7   5
+## 67     40     314 10.9   83     7   6
+## 68     77     276  5.1   88     7   7
+## 69     97     267  6.3   92     7   8
+## 70     97     272  5.7   92     7   9
+## 71     85     175  7.4   89     7  10
+## 72     NA     139  8.6   82     7  11
+## 73     10     264 14.3   73     7  12
+## 74     27     175 14.9   81     7  13
+## 75     NA     291 14.9   91     7  14
+## 76      7      48 14.3   80     7  15
+## 77     48     260  6.9   81     7  16
+## 78     35     274 10.3   82     7  17
+## 79     61     285  6.3   84     7  18
+## 80     79     187  5.1   87     7  19
+## 81     63     220 11.5   85     7  20
+## 82     16       7  6.9   74     7  21
+## 83     NA     258  9.7   81     7  22
+## 84     NA     295 11.5   82     7  23
+## 85     80     294  8.6   86     7  24
+## 86    108     223  8.0   85     7  25
+## 87     20      81  8.6   82     7  26
+## 88     52      82 12.0   86     7  27
+## 89     82     213  7.4   88     7  28
+## 90     50     275  7.4   86     7  29
+## 91     64     253  7.4   83     7  30
+## 92     59     254  9.2   81     7  31
+## 93     39      83  6.9   81     8   1
+## 94      9      24 13.8   81     8   2
+## 95     16      77  7.4   82     8   3
+## 96     78      NA  6.9   86     8   4
+## 97     35      NA  7.4   85     8   5
+## 98     66      NA  4.6   87     8   6
+## 99    122     255  4.0   89     8   7
+## 100    89     229 10.3   90     8   8
+## 101   110     207  8.0   90     8   9
+## 102    NA     222  8.6   92     8  10
+## 103    NA     137 11.5   86     8  11
+## 104    44     192 11.5   86     8  12
+## 105    28     273 11.5   82     8  13
+## 106    65     157  9.7   80     8  14
+## 107    NA      64 11.5   79     8  15
+## 108    22      71 10.3   77     8  16
+## 109    59      51  6.3   79     8  17
+## 110    23     115  7.4   76     8  18
+## 111    31     244 10.9   78     8  19
+## 112    44     190 10.3   78     8  20
+## 113    21     259 15.5   77     8  21
+## 114     9      36 14.3   72     8  22
+## 115    NA     255 12.6   75     8  23
+## 116    45     212  9.7   79     8  24
+## 117   168     238  3.4   81     8  25
+## 118    73     215  8.0   86     8  26
+## 119    NA     153  5.7   88     8  27
+## 120    76     203  9.7   97     8  28
+## 121   118     225  2.3   94     8  29
+## 122    84     237  6.3   96     8  30
+## 123    85     188  6.3   94     8  31
+## 124    96     167  6.9   91     9   1
+## 125    78     197  5.1   92     9   2
+## 126    73     183  2.8   93     9   3
+## 127    91     189  4.6   93     9   4
+## 128    47      95  7.4   87     9   5
+## 129    32      92 15.5   84     9   6
+## 130    20     252 10.9   80     9   7
+## 131    23     220 10.3   78     9   8
+## 132    21     230 10.9   75     9   9
+## 133    24     259  9.7   73     9  10
+## 134    44     236 14.9   81     9  11
+## 135    21     259 15.5   76     9  12
+## 136    28     238  6.3   77     9  13
+## 137     9      24 10.9   71     9  14
+## 138    13     112 11.5   71     9  15
+## 139    46     237  6.9   78     9  16
+## 140    18     224 13.8   67     9  17
+## 141    13      27 10.3   76     9  18
+## 142    24     238 10.3   68     9  19
+## 143    16     201  8.0   82     9  20
+## 144    13     238 12.6   64     9  21
+## 145    23      14  9.2   71     9  22
+## 146    36     139 10.3   81     9  23
+## 147     7      49 10.3   69     9  24
+## 148    14      20 16.6   63     9  25
+## 149    30     193  6.9   70     9  26
+## 150    NA     145 13.2   77     9  27
+## 151    14     191 14.3   75     9  28
+## 152    18     131  8.0   76     9  29
+## 153    20     223 11.5   68     9  30</code></pre>
+</div>
+<div id="discussion" class="section level3 hasAnchor" number="2.3.2">
+<h3><span class="header-section-number">2.3.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>You can <code>dplyr::collect()</code> to return a tibble or <code>as.data.frame()</code> to return a <code>data.frame</code>.</p>
+</div>
+</div>
+<div id="write-a-parquet-file" class="section level2 hasAnchor" number="2.4">
+<h2><span class="header-section-number">2.4</span> Write a Parquet file<a href="reading-and-writing-data---single-files.html#write-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write a single Parquet file to disk.</p>
+<div id="solution-2" class="section level3 hasAnchor" number="2.4.1">
+<h3><span class="header-section-number">2.4.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="reading-and-writing-data---single-files.html#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb5-2"><a href="reading-and-writing-data---single-files.html#cb5-2" aria-hidden="true" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb5-3"><a href="reading-and-writing-data---single-files.html#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Write to Parquet</span></span>
+<span id="cb5-4"><a href="reading-and-writing-data---single-files.html#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">write_parquet</span>(my_table, <span class="st">&quot;my_table.parquet&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-parquet-file" class="section level2 hasAnchor" number="2.5">
+<h2><span class="header-section-number">2.5</span> Read a Parquet file<a href="reading-and-writing-data---single-files.html#read-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Parquet file into memory.</p>
+<div id="solution-3" class="section level3 hasAnchor" number="2.5.1">
+<h3><span class="header-section-number">2.5.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="reading-and-writing-data---single-files.html#cb6-1" aria-hidden="true" tabindex="-1"></a>parquet_tbl <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;my_table.parquet&quot;</span>)</span>
+<span id="cb6-2"><a href="reading-and-writing-data---single-files.html#cb6-2" aria-hidden="true" tabindex="-1"></a>parquet_tbl</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 2
+##   group score
+##   &lt;chr&gt; &lt;dbl&gt;
+## 1 A        99
+## 2 B        97
+## 3 C        99</code></pre>
+<p>As the argument <code>as_data_frame</code> was left set to its default value of <code>TRUE</code>, the file was read in as a tibble.</p>
+<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="reading-and-writing-data---single-files.html#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">class</span>(parquet_tbl)</span></code></pre></div>
+<pre><code>## [1] &quot;tbl_df&quot;     &quot;tbl&quot;        &quot;data.frame&quot;</code></pre>
+</div>
+<div id="discussion-1" class="section level3 hasAnchor" number="2.5.2">
+<h3><span class="header-section-number">2.5.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>If you set <code>as_data_frame</code> to <code>FALSE</code>, the file will be read in as an Arrow Table.</p>
+<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="reading-and-writing-data---single-files.html#cb10-1" aria-hidden="true" tabindex="-1"></a>my_table_arrow <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;my_table.parquet&quot;</span>, <span class="at">as_data_frame =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb10-2"><a href="reading-and-writing-data---single-files.html#cb10-2" aria-hidden="true" tabindex="-1"></a>my_table_arrow</span></code></pre></div>
+<pre><code>## Table
+## 3 rows x 2 columns
+## $group &lt;string&gt;
+## $score &lt;double&gt;</code></pre>
+<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="reading-and-writing-data---single-files.html#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">class</span>(my_table_arrow)</span></code></pre></div>
+<pre><code>## [1] &quot;Table&quot;        &quot;ArrowTabular&quot; &quot;ArrowObject&quot;  &quot;R6&quot;</code></pre>
+</div>
+</div>
+<div id="read-a-parquet-file-from-s3" class="section level2 hasAnchor" number="2.6">
+<h2><span class="header-section-number">2.6</span> Read a Parquet file from S3<a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Parquet file from S3 into memory.</p>
+<div id="solution-4" class="section level3 hasAnchor" number="2.6.1">
+<h3><span class="header-section-number">2.6.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-4" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="reading-and-writing-data---single-files.html#cb14-1" aria-hidden="true" tabindex="-1"></a>df <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="at">file =</span> <span class="st">&quot;s3://voltrondata-labs-datasets/nyc-taxi/year=2019/month=6/part-0.parquet&quot;</span>)</span></code></pre></div>
+</div>
+<div id="see-also" class="section level3 hasAnchor" number="2.6.2">
+<h3><span class="header-section-number">2.6.2</span> See also<a href="reading-and-writing-data---single-files.html#see-also" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For more in-depth instructions, including how to work with S3 buckets which require authentication, you can find a guide to reading and writing to/from S3 buckets here: <a href="https://arrow.apache.org/docs/r/articles/fs.html" class="uri">https://arrow.apache.org/docs/r/articles/fs.html</a>.</p>
+</div>
+</div>
+<div id="filter-columns-while-reading-a-parquet-file" class="section level2 hasAnchor" number="2.7">
+<h2><span class="header-section-number">2.7</span> Filter columns while reading a Parquet file<a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to specify which columns to include when reading in a single Parquet file into memory.</p>
+<div id="solution-5" class="section level3 hasAnchor" number="2.7.1">
+<h3><span class="header-section-number">2.7.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-5" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="reading-and-writing-data---single-files.html#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create table to read back in</span></span>
+<span id="cb15-2"><a href="reading-and-writing-data---single-files.html#cb15-2" aria-hidden="true" tabindex="-1"></a>dist_time <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">distance =</span> <span class="fu">c</span>(<span class="fl">12.2</span>, <span class="fl">15.7</span>, <span class="fl">14.2</span>), <span class="at">time =</span> <span class="fu">c</span>(<span class="dv">43</span>, <span class="dv">44</span>, <span class="dv">40</span>)))</span>
+<span id="cb15-3"><a href="reading-and-writing-data---single-files.html#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Write to Parquet</span></span>
+<span id="cb15-4"><a href="reading-and-writing-data---single-files.html#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="fu">write_parquet</span>(dist_time, <span class="st">&quot;dist_time.parquet&quot;</span>)</span>
+<span id="cb15-5"><a href="reading-and-writing-data---single-files.html#cb15-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb15-6"><a href="reading-and-writing-data---single-files.html#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="co"># Read in only the &quot;time&quot; column</span></span>
+<span id="cb15-7"><a href="reading-and-writing-data---single-files.html#cb15-7" aria-hidden="true" tabindex="-1"></a>time_only <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="st">&quot;dist_time.parquet&quot;</span>, <span class="at">col_select =</span> <span class="st">&quot;time&quot;</span>)</span>
+<span id="cb15-8"><a href="reading-and-writing-data---single-files.html#cb15-8" aria-hidden="true" tabindex="-1"></a>time_only</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 1
+##    time
+##   &lt;dbl&gt;
+## 1    43
+## 2    44
+## 3    40</code></pre>
+</div>
+</div>
+<div id="write-a-feather-v2arrow-ipc-file" class="section level2 hasAnchor" number="2.8">
+<h2><span class="header-section-number">2.8</span> Write a Feather V2/Arrow IPC file<a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write a single Feather V2 file (also called Arrow IPC file).</p>
+<div id="solution-6" class="section level3 hasAnchor" number="2.8.1">
+<h3><span class="header-section-number">2.8.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-6" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="reading-and-writing-data---single-files.html#cb17-1" aria-hidden="true" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb17-2"><a href="reading-and-writing-data---single-files.html#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="fu">write_feather</span>(my_table, <span class="st">&quot;my_table.arrow&quot;</span>)</span></code></pre></div>
+</div>
+<div id="discussion-2" class="section level3 hasAnchor" number="2.8.2">
+<h3><span class="header-section-number">2.8.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-2" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>For legacy support, you can write data in the original Feather format by setting the <code>version</code> parameter to <code>1</code>.</p>
+<div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="reading-and-writing-data---single-files.html#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb18-2"><a href="reading-and-writing-data---single-files.html#cb18-2" aria-hidden="true" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(<span class="fu">data.frame</span>(<span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>), <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)))</span>
+<span id="cb18-3"><a href="reading-and-writing-data---single-files.html#cb18-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Write to Feather format V1</span></span>
+<span id="cb18-4"><a href="reading-and-writing-data---single-files.html#cb18-4" aria-hidden="true" tabindex="-1"></a><span class="fu">write_feather</span>(mtcars, <span class="st">&quot;my_table.feather&quot;</span>, <span class="at">version =</span> <span class="dv">1</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-featherarrow-ipc-file" class="section level2 hasAnchor" number="2.9">
+<h2><span class="header-section-number">2.9</span> Read a Feather/Arrow IPC file<a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single Feather V1 or V2 file into memory (also called Arrow IPC file).</p>
+<div id="solution-7" class="section level3 hasAnchor" number="2.9.1">
+<h3><span class="header-section-number">2.9.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-7" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="reading-and-writing-data---single-files.html#cb19-1" aria-hidden="true" tabindex="-1"></a>my_feather_tbl <span class="ot">&lt;-</span> <span class="fu">read_feather</span>(<span class="st">&quot;my_table.arrow&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="write-streaming-arrow-ipc-files" class="section level2 hasAnchor" number="2.10">
+<h2><span class="header-section-number">2.10</span> Write streaming Arrow IPC files<a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write to the Arrow IPC stream format.</p>
+<div id="solution-8" class="section level3 hasAnchor" number="2.10.1">
+<h3><span class="header-section-number">2.10.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-8" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb20"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb20-1"><a href="reading-and-writing-data---single-files.html#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create table</span></span>
+<span id="cb20-2"><a href="reading-and-writing-data---single-files.html#cb20-2" aria-hidden="true" tabindex="-1"></a>my_table <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(</span>
+<span id="cb20-3"><a href="reading-and-writing-data---single-files.html#cb20-3" aria-hidden="true" tabindex="-1"></a>  <span class="fu">data.frame</span>(</span>
+<span id="cb20-4"><a href="reading-and-writing-data---single-files.html#cb20-4" aria-hidden="true" tabindex="-1"></a>    <span class="at">group =</span> <span class="fu">c</span>(<span class="st">&quot;A&quot;</span>, <span class="st">&quot;B&quot;</span>, <span class="st">&quot;C&quot;</span>),</span>
+<span id="cb20-5"><a href="reading-and-writing-data---single-files.html#cb20-5" aria-hidden="true" tabindex="-1"></a>    <span class="at">score =</span> <span class="fu">c</span>(<span class="dv">99</span>, <span class="dv">97</span>, <span class="dv">99</span>)</span>
+<span id="cb20-6"><a href="reading-and-writing-data---single-files.html#cb20-6" aria-hidden="true" tabindex="-1"></a>    )</span>
+<span id="cb20-7"><a href="reading-and-writing-data---single-files.html#cb20-7" aria-hidden="true" tabindex="-1"></a>)</span>
+<span id="cb20-8"><a href="reading-and-writing-data---single-files.html#cb20-8" aria-hidden="true" tabindex="-1"></a><span class="co"># Write to IPC stream format</span></span>
+<span id="cb20-9"><a href="reading-and-writing-data---single-files.html#cb20-9" aria-hidden="true" tabindex="-1"></a><span class="fu">write_ipc_stream</span>(my_table, <span class="st">&quot;my_table.arrows&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-streaming-arrow-ipc-files" class="section level2 hasAnchor" number="2.11">
+<h2><span class="header-section-number">2.11</span> Read streaming Arrow IPC files<a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read from the Arrow IPC stream format.</p>
+<div id="solution-9" class="section level3 hasAnchor" number="2.11.1">
+<h3><span class="header-section-number">2.11.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-9" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="reading-and-writing-data---single-files.html#cb21-1" aria-hidden="true" tabindex="-1"></a>my_ipc_stream <span class="ot">&lt;-</span> arrow<span class="sc">::</span><span class="fu">read_ipc_stream</span>(<span class="st">&quot;my_table.arrows&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="write-a-csv-file" class="section level2 hasAnchor" number="2.12">
+<h2><span class="header-section-number">2.12</span> Write a CSV file<a href="reading-and-writing-data---single-files.html#write-a-csv-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to write Arrow data to a single CSV file.</p>
+<div id="solution-10" class="section level3 hasAnchor" number="2.12.1">
+<h3><span class="header-section-number">2.12.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-10" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="reading-and-writing-data---single-files.html#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="fu">write_csv_arrow</span>(cars, <span class="st">&quot;cars.csv&quot;</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-csv-file" class="section level2 hasAnchor" number="2.13">
+<h2><span class="header-section-number">2.13</span> Read a CSV file<a href="reading-and-writing-data---single-files.html#read-a-csv-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a single CSV file into memory.</p>
+<div id="solution-11" class="section level3 hasAnchor" number="2.13.1">
+<h3><span class="header-section-number">2.13.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-11" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb23"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb23-1"><a href="reading-and-writing-data---single-files.html#cb23-1" aria-hidden="true" tabindex="-1"></a>my_csv <span class="ot">&lt;-</span> <span class="fu">read_csv_arrow</span>(<span class="st">&quot;cars.csv&quot;</span>, <span class="at">as_data_frame =</span> <span class="cn">FALSE</span>)</span></code></pre></div>
+</div>
+</div>
+<div id="read-a-json-file" class="section level2 hasAnchor" number="2.14">
+<h2><span class="header-section-number">2.14</span> Read a JSON file<a href="reading-and-writing-data---single-files.html#read-a-json-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read a JSON file into memory.</p>
+<div id="solution-12" class="section level3 hasAnchor" number="2.14.1">
+<h3><span class="header-section-number">2.14.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-12" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb24"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb24-1"><a href="reading-and-writing-data---single-files.html#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a file to read back in</span></span>
+<span id="cb24-2"><a href="reading-and-writing-data---single-files.html#cb24-2" aria-hidden="true" tabindex="-1"></a>tf <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb24-3"><a href="reading-and-writing-data---single-files.html#cb24-3" aria-hidden="true" tabindex="-1"></a><span class="fu">writeLines</span>(<span class="st">&#39;</span></span>
+<span id="cb24-4"><a href="reading-and-writing-data---single-files.html#cb24-4" aria-hidden="true" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;United Kingdom&quot;, &quot;code&quot;: &quot;GB&quot;, &quot;long&quot;: -3.44, &quot;lat&quot;: 55.38}</span></span>
+<span id="cb24-5"><a href="reading-and-writing-data---single-files.html#cb24-5" aria-hidden="true" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;France&quot;, &quot;code&quot;: &quot;FR&quot;, &quot;long&quot;: 2.21, &quot;lat&quot;: 46.23}</span></span>
+<span id="cb24-6"><a href="reading-and-writing-data---single-files.html#cb24-6" aria-hidden="true" tabindex="-1"></a><span class="st">    {&quot;country&quot;: &quot;Germany&quot;, &quot;code&quot;: &quot;DE&quot;, &quot;long&quot;: 10.45, &quot;lat&quot;: 51.17}</span></span>
+<span id="cb24-7"><a href="reading-and-writing-data---single-files.html#cb24-7" aria-hidden="true" tabindex="-1"></a><span class="st">  &#39;</span>, tf, <span class="at">useBytes =</span> <span class="cn">TRUE</span>)</span>
+<span id="cb24-8"><a href="reading-and-writing-data---single-files.html#cb24-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb24-9"><a href="reading-and-writing-data---single-files.html#cb24-9" aria-hidden="true" tabindex="-1"></a><span class="co"># Read in the data</span></span>
+<span id="cb24-10"><a href="reading-and-writing-data---single-files.html#cb24-10" aria-hidden="true" tabindex="-1"></a>countries <span class="ot">&lt;-</span> <span class="fu">read_json_arrow</span>(tf, <span class="at">col_select =</span> <span class="fu">c</span>(<span class="st">&quot;country&quot;</span>, <span class="st">&quot;long&quot;</span>, <span class="st">&quot;lat&quot;</span>))</span>
+<span id="cb24-11"><a href="reading-and-writing-data---single-files.html#cb24-11" aria-hidden="true" tabindex="-1"></a>countries</span></code></pre></div>
+<pre><code>## # A tibble: 3 × 3
+##   country         long   lat
+##   &lt;chr&gt;          &lt;dbl&gt; &lt;dbl&gt;
+## 1 United Kingdom -3.44  55.4
+## 2 France          2.21  46.2
+## 3 Germany        10.4   51.2</code></pre>
+</div>
+</div>
+<div id="write-a-compressed-single-data-file" class="section level2 hasAnchor" number="2.15">
+<h2><span class="header-section-number">2.15</span> Write a compressed single data file<a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to save a single file, compressed with a specified compression algorithm.</p>
+<div id="solution-13" class="section level3 hasAnchor" number="2.15.1">
+<h3><span class="header-section-number">2.15.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-13" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb26"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb26-1"><a href="reading-and-writing-data---single-files.html#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb26-2"><a href="reading-and-writing-data---single-files.html#cb26-2" aria-hidden="true" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb26-3"><a href="reading-and-writing-data---single-files.html#cb26-3" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb26-4"><a href="reading-and-writing-data---single-files.html#cb26-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb26-5"><a href="reading-and-writing-data---single-files.html#cb26-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Write data compressed with the gzip algorithm instead of the default</span></span>
+<span id="cb26-6"><a href="reading-and-writing-data---single-files.html#cb26-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write_parquet</span>(iris, <span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>), <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span></code></pre></div>
+</div>
+<div id="see-also-1" class="section level3 hasAnchor" number="2.15.2">
+<h3><span class="header-section-number">2.15.2</span> See also<a href="reading-and-writing-data---single-files.html#see-also-1" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Some formats write compressed data by default. For more information
+on the supported compression algorithms and default settings, see:</p>
+<ul>
+<li><code>?write_parquet()</code></li>
+<li><code>?write_feather()</code></li>
+</ul>
+</div>
+</div>
+<div id="read-compressed-data" class="section level2 hasAnchor" number="2.16">
+<h2><span class="header-section-number">2.16</span> Read compressed data<a href="reading-and-writing-data---single-files.html#read-compressed-data" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to read in a single data file which has been compressed.</p>
+<div id="solution-14" class="section level3 hasAnchor" number="2.16.1">
+<h3><span class="header-section-number">2.16.1</span> Solution<a href="reading-and-writing-data---single-files.html#solution-14" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb27"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb27-1"><a href="reading-and-writing-data---single-files.html#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb27-2"><a href="reading-and-writing-data---single-files.html#cb27-2" aria-hidden="true" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb27-3"><a href="reading-and-writing-data---single-files.html#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb27-4"><a href="reading-and-writing-data---single-files.html#cb27-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb27-5"><a href="reading-and-writing-data---single-files.html#cb27-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Write data which is to be read back in</span></span>
+<span id="cb27-6"><a href="reading-and-writing-data---single-files.html#cb27-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write_parquet</span>(iris, <span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>), <span class="at">compression =</span> <span class="st">&quot;gzip&quot;</span>)</span>
+<span id="cb27-7"><a href="reading-and-writing-data---single-files.html#cb27-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb27-8"><a href="reading-and-writing-data---single-files.html#cb27-8" aria-hidden="true" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb27-9"><a href="reading-and-writing-data---single-files.html#cb27-9" aria-hidden="true" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">read_parquet</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.parquet&quot;</span>))</span>
+<span id="cb27-10"><a href="reading-and-writing-data---single-files.html#cb27-10" aria-hidden="true" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;fct&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+</div>
+<div id="discussion-3" class="section level3 hasAnchor" number="2.16.2">
+<h3><span class="header-section-number">2.16.2</span> Discussion<a href="reading-and-writing-data---single-files.html#discussion-3" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<p>Note that Arrow automatically detects the compression and you do not have to
+supply it in the call to the <code>read_*()</code> or the <code>open_dataset()</code> functions.</p>
+<p>Although the CSV format does not support compression itself, Arrow supports
+reading in CSV data which has been compressed, if the file extension is <code>.gz</code>.</p>
+<div class="sourceCode" id="cb29"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb29-1"><a href="reading-and-writing-data---single-files.html#cb29-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Create a temporary directory</span></span>
+<span id="cb29-2"><a href="reading-and-writing-data---single-files.html#cb29-2" aria-hidden="true" tabindex="-1"></a>td <span class="ot">&lt;-</span> <span class="fu">tempfile</span>()</span>
+<span id="cb29-3"><a href="reading-and-writing-data---single-files.html#cb29-3" aria-hidden="true" tabindex="-1"></a><span class="fu">dir.create</span>(td)</span>
+<span id="cb29-4"><a href="reading-and-writing-data---single-files.html#cb29-4" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb29-5"><a href="reading-and-writing-data---single-files.html#cb29-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Write data which is to be read back in</span></span>
+<span id="cb29-6"><a href="reading-and-writing-data---single-files.html#cb29-6" aria-hidden="true" tabindex="-1"></a><span class="fu">write.csv</span>(iris, <span class="fu">gzfile</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.csv.gz&quot;</span>)), <span class="at">row.names =</span> <span class="cn">FALSE</span>, <span class="at">quote =</span> <span class="cn">FALSE</span>)</span>
+<span id="cb29-7"><a href="reading-and-writing-data---single-files.html#cb29-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb29-8"><a href="reading-and-writing-data---single-files.html#cb29-8" aria-hidden="true" tabindex="-1"></a><span class="co"># Read in data</span></span>
+<span id="cb29-9"><a href="reading-and-writing-data---single-files.html#cb29-9" aria-hidden="true" tabindex="-1"></a>ds <span class="ot">&lt;-</span> <span class="fu">read_csv_arrow</span>(<span class="fu">file.path</span>(td, <span class="st">&quot;iris.csv.gz&quot;</span>))</span>
+<span id="cb29-10"><a href="reading-and-writing-data---single-files.html#cb29-10" aria-hidden="true" tabindex="-1"></a>ds</span></code></pre></div>
+<pre><code>## # A tibble: 150 × 5
+##    Sepal.Length Sepal.Width Petal.Length Petal.Width Species
+##           &lt;dbl&gt;       &lt;dbl&gt;        &lt;dbl&gt;       &lt;dbl&gt; &lt;chr&gt;  
+##  1          5.1         3.5          1.4         0.2 setosa 
+##  2          4.9         3            1.4         0.2 setosa 
+##  3          4.7         3.2          1.3         0.2 setosa 
+##  4          4.6         3.1          1.5         0.2 setosa 
+##  5          5           3.6          1.4         0.2 setosa 
+##  6          5.4         3.9          1.7         0.4 setosa 
+##  7          4.6         3.4          1.4         0.3 setosa 
+##  8          5           3.4          1.5         0.2 setosa 
+##  9          4.4         2.9          1.4         0.2 setosa 
+## 10          4.9         3.1          1.5         0.1 setosa 
+## # ℹ 140 more rows</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="index.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="reading-and-writing-data---multiple-files.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/reading_and_writing_data.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>
diff --git a/r/reference-keys.txt b/r/reference-keys.txt
new file mode 100644
index 0000000..f8f09e3
--- /dev/null
+++ b/r/reference-keys.txt
@@ -0,0 +1,141 @@
+preface
+what-is-arrow
+alternative-resources
+reading-and-writing-data---single-files
+introduction
+convert-data-from-a-data-frame-to-an-arrow-table
+solution
+convert-data-from-an-arrow-table-to-a-data-frame
+solution-1
+discussion
+write-a-parquet-file
+solution-2
+read-a-parquet-file
+solution-3
+discussion-1
+read-a-parquet-file-from-s3
+solution-4
+see-also
+filter-columns-while-reading-a-parquet-file
+solution-5
+write-a-feather-v2arrow-ipc-file
+solution-6
+discussion-2
+read-a-featherarrow-ipc-file
+solution-7
+write-streaming-arrow-ipc-files
+solution-8
+read-streaming-arrow-ipc-files
+solution-9
+write-a-csv-file
+solution-10
+read-a-csv-file
+solution-11
+read-a-json-file
+solution-12
+write-a-compressed-single-data-file
+solution-13
+see-also-1
+read-compressed-data
+solution-14
+discussion-3
+reading-and-writing-data---multiple-files
+introduction-1
+write-data-to-disk---parquet
+solution-15
+discussion-4
+write-partitioned-data---parquet
+solution-16
+discussion-5
+read-partitioned-data
+solution-17
+discussion-6
+write-data-to-disk---featherarrow-ipc-format
+solution-18
+read-in-featherarrow-ipc-data-as-an-arrow-dataset
+solution-19
+write-data-to-disk---csv-format
+solution-20
+read-in-csv-data-as-an-arrow-dataset
+solution-21
+read-in-a-csv-dataset-no-headers
+solution-22
+discussion-7
+write-compressed-partitioned-data
+solution-23
+discussion-8
+read-compressed-data-1
+solution-24
+discussion-9
+creating-arrow-objects
+create-an-arrow-array-from-an-r-object
+solution-25
+create-a-arrow-table-from-an-r-object
+solution-26
+view-the-contents-of-an-arrow-table-or-recordbatch
+solution-27
+manually-create-a-recordbatch-from-an-r-object.
+solution-28
+defining-data-types
+introduction-2
+update-data-type-of-an-existing-arrow-array
+solution-29
+discussion-10
+update-data-type-of-a-field-in-an-existing-arrow-table
+solution-30
+no-compat-type
+specify-data-types-when-creating-an-arrow-table-from-an-r-object
+solution-31
+specify-data-types-when-reading-in-files
+solution-32
+manipulating-data---arrays
+introduction-3
+filter-by-values-matching-a-predicate-or-mask
+solution-33
+discussion-11
+compute-meanminmax-etc-value-of-an-array
+solution-34
+discussion-12
+count-occurrences-of-elements-in-an-array
+solution-35
+discussion-13
+apply-arithmetic-functions-to-arrays.
+solution-36
+discussion-14
+call-arrow-compute-functions-directly-on-arrays
+solution-37
+discussion-15
+see-also-2
+manipulating-data---tables
+introduction-4
+use-dplyr-verbs-in-arrow
+solution-38
+discussion-16
+see-also-3
+use-r-functions-in-dplyr-verbs-in-arrow
+solution-39
+discussion-17
+use-arrow-functions-in-dplyr-verbs-in-arrow
+solution-40
+discussion-18
+compute-functions-with-options
+compute-window-aggregates
+solution-41
+discusson
+using-pyarrow-from-r
+introduction-5
+create-an-arrow-object-using-pyarrow-in-r
+solution-42
+call-a-pyarrow-function-from-r
+solution-43
+flight
+introduction-6
+connect-to-a-flight-server
+solution-44
+see-also-4
+send-data-to-a-flight-server
+solution-45
+check-what-resources-exist-on-a-flight-server
+solution-46
+retrieve-data-from-a-flight-server
+solution-47
diff --git a/r/search_index.json b/r/search_index.json
new file mode 100644
index 0000000..cc9cd1b
--- /dev/null
+++ b/r/search_index.json
@@ -0,0 +1 @@
+[["index.html", "Apache Arrow R Cookbook 1 Preface 1.1 What is Arrow? 1.2 Alternative resources", " Apache Arrow R Cookbook 1 Preface This cookbook aims to provide a number of recipes showing how to perform common tasks using arrow. This version of the cookbook works with arrow &gt;= 6.0.0, but in future we will maintain different versions for the last few major R package releases. 1.1 What is Arrow? Apache Arrow is a cross-language development platform for in-memory analytics. The arrow R package provides a low-level interface to much of the functionality available in the C++ implementation, as well as a higher-level interface to the compute functionality via an implementation of the dplyr API. 1.2 Alternative resources For a complete reference guide to the functions in arrow, as well as vignettes, see the pkgdown site. If you have any requests for new recipes, please open a ticket via the cookbook’s GitHub Issues page. If you have any Arrow feature requests to make or bugs to report, please open an issue on the project JIRA "],["reading-and-writing-data---single-files.html", "2 Reading and Writing Data - Single Files 2.1 Introduction 2.2 Convert data from a data frame to an Arrow Table 2.3 Convert data from an Arrow Table to a data frame 2.4 Write a Parquet file 2.5 Read a Parquet file 2.6 Read a Parquet file from S3 2.7 Filter columns while reading a Parquet file 2.8 Write a Feather V2/Arrow IPC file 2.9 Read a Feather/Arrow IPC file 2.10 Write streaming Arrow IPC files 2.11 Read streaming Arrow IPC files 2.12 Write a CSV file 2.13 Read a CSV file 2.14 Read a JSON file 2.15 Write a compressed single data file 2.16 Read compressed data", " 2 Reading and Writing Data - Single Files 2.1 Introduction When reading files into R using Apache Arrow, you can read: a single file into memory as a data frame or an Arrow Table a single file that is too large to fit in memory as an Arrow Dataset multiple and partitioned files as an Arrow Dataset This chapter contains recipes related to using Apache Arrow to read and write single file data into memory as an Arrow Table. There are a number of circumstances in which you may want to read in single file data as an Arrow Table: your data file is large and having performance issues you want faster performance from your dplyr queries you want to be able to take advantage of Arrow’s compute functions If a single data file is too large to load into memory, you can use the Arrow Dataset API. Recipes for using open_dataset() and write_dataset() are in the Reading and Writing Data - Multiple Files chapter. 2.2 Convert data from a data frame to an Arrow Table You want to convert an existing data.frame or tibble object into an Arrow Table. 2.2.1 Solution air_table &lt;- arrow_table(airquality) air_table ## Table ## 153 rows x 6 columns ## $Ozone &lt;int32&gt; ## $Solar.R &lt;int32&gt; ## $Wind &lt;double&gt; ## $Temp &lt;int32&gt; ## $Month &lt;int32&gt; ## $Day &lt;int32&gt; ## ## See $metadata for additional Schema metadata 2.3 Convert data from an Arrow Table to a data frame You want to convert an Arrow Table to a data frame to view the data or work with it in your usual analytics pipeline. 2.3.1 Solution air_df &lt;- as.data.frame(air_table) air_df ## Ozone Solar.R Wind Temp Month Day ## 1 41 190 7.4 67 5 1 ## 2 36 118 8.0 72 5 2 ## 3 12 149 12.6 74 5 3 ## 4 18 313 11.5 62 5 4 ## 5 NA NA 14.3 56 5 5 ## 6 28 NA 14.9 66 5 6 ## 7 23 299 8.6 65 5 7 ## 8 19 99 13.8 59 5 8 ## 9 8 19 20.1 61 5 9 ## 10 NA 194 8.6 69 5 10 ## 11 7 NA 6.9 74 5 11 ## 12 16 256 9.7 69 5 12 ## 13 11 290 9.2 66 5 13 ## 14 14 274 10.9 68 5 14 ## 15 18 65 13.2 58 5 15 ## 16 14 334 11.5 64 5 16 ## 17 34 307 12.0 66 5 17 ## 18 6 78 18.4 57 5 18 ## 19 30 322 11.5 68 5 19 ## 20 11 44 9.7 62 5 20 ## 21 1 8 9.7 59 5 21 ## 22 11 320 16.6 73 5 22 ## 23 4 25 9.7 61 5 23 ## 24 32 92 12.0 61 5 24 ## 25 NA 66 16.6 57 5 25 ## 26 NA 266 14.9 58 5 26 ## 27 NA NA 8.0 57 5 27 ## 28 23 13 12.0 67 5 28 ## 29 45 252 14.9 81 5 29 ## 30 115 223 5.7 79 5 30 ## 31 37 279 7.4 76 5 31 ## 32 NA 286 8.6 78 6 1 ## 33 NA 287 9.7 74 6 2 ## 34 NA 242 16.1 67 6 3 ## 35 NA 186 9.2 84 6 4 ## 36 NA 220 8.6 85 6 5 ## 37 NA 264 14.3 79 6 6 ## 38 29 127 9.7 82 6 7 ## 39 NA 273 6.9 87 6 8 ## 40 71 291 13.8 90 6 9 ## 41 39 323 11.5 87 6 10 ## 42 NA 259 10.9 93 6 11 ## 43 NA 250 9.2 92 6 12 ## 44 23 148 8.0 82 6 13 ## 45 NA 332 13.8 80 6 14 ## 46 NA 322 11.5 79 6 15 ## 47 21 191 14.9 77 6 16 ## 48 37 284 20.7 72 6 17 ## 49 20 37 9.2 65 6 18 ## 50 12 120 11.5 73 6 19 ## 51 13 137 10.3 76 6 20 ## 52 NA 150 6.3 77 6 21 ## 53 NA 59 1.7 76 6 22 ## 54 NA 91 4.6 76 6 23 ## 55 NA 250 6.3 76 6 24 ## 56 NA 135 8.0 75 6 25 ## 57 NA 127 8.0 78 6 26 ## 58 NA 47 10.3 73 6 27 ## 59 NA 98 11.5 80 6 28 ## 60 NA 31 14.9 77 6 29 ## 61 NA 138 8.0 83 6 30 ## 62 135 269 4.1 84 7 1 ## 63 49 248 9.2 85 7 2 ## 64 32 236 9.2 81 7 3 ## 65 NA 101 10.9 84 7 4 ## 66 64 175 4.6 83 7 5 ## 67 40 314 10.9 83 7 6 ## 68 77 276 5.1 88 7 7 ## 69 97 267 6.3 92 7 8 ## 70 97 272 5.7 92 7 9 ## 71 85 175 7.4 89 7 10 ## 72 NA 139 8.6 82 7 11 ## 73 10 264 14.3 73 7 12 ## 74 27 175 14.9 81 7 13 ## 75 NA 291 14.9 91 7 14 ## 76 7 48 14.3 80 7 15 ## 77 48 260 6.9 81 7 16 ## 78 35 274 10.3 82 7 17 ## 79 61 285 6.3 84 7 18 ## 80 79 187 5.1 87 7 19 ## 81 63 220 11.5 85 7 20 ## 82 16 7 6.9 74 7 21 ## 83 NA 258 9.7 81 7 22 ## 84 NA 295 11.5 82 7 23 ## 85 80 294 8.6 86 7 24 ## 86 108 223 8.0 85 7 25 ## 87 20 81 8.6 82 7 26 ## 88 52 82 12.0 86 7 27 ## 89 82 213 7.4 88 7 28 ## 90 50 275 7.4 86 7 29 ## 91 64 253 7.4 83 7 30 ## 92 59 254 9.2 81 7 31 ## 93 39 83 6.9 81 8 1 ## 94 9 24 13.8 81 8 2 ## 95 16 77 7.4 82 8 3 ## 96 78 NA 6.9 86 8 4 ## 97 35 NA 7.4 85 8 5 ## 98 66 NA 4.6 87 8 6 ## 99 122 255 4.0 89 8 7 ## 100 89 229 10.3 90 8 8 ## 101 110 207 8.0 90 8 9 ## 102 NA 222 8.6 92 8 10 ## 103 NA 137 11.5 86 8 11 ## 104 44 192 11.5 86 8 12 ## 105 28 273 11.5 82 8 13 ## 106 65 157 9.7 80 8 14 ## 107 NA 64 11.5 79 8 15 ## 108 22 71 10.3 77 8 16 ## 109 59 51 6.3 79 8 17 ## 110 23 115 7.4 76 8 18 ## 111 31 244 10.9 78 8 19 ## 112 44 190 10.3 78 8 20 ## 113 21 259 15.5 77 8 21 ## 114 9 36 14.3 72 8 22 ## 115 NA 255 12.6 75 8 23 ## 116 45 212 9.7 79 8 24 ## 117 168 238 3.4 81 8 25 ## 118 73 215 8.0 86 8 26 ## 119 NA 153 5.7 88 8 27 ## 120 76 203 9.7 97 8 28 ## 121 118 225 2.3 94 8 29 ## 122 84 237 6.3 96 8 30 ## 123 85 188 6.3 94 8 31 ## 124 96 167 6.9 91 9 1 ## 125 78 197 5.1 92 9 2 ## 126 73 183 2.8 93 9 3 ## 127 91 189 4.6 93 9 4 ## 128 47 95 7.4 87 9 5 ## 129 32 92 15.5 84 9 6 ## 130 20 252 10.9 80 9 7 ## 131 23 220 10.3 78 9 8 ## 132 21 230 10.9 75 9 9 ## 133 24 259 9.7 73 9 10 ## 134 44 236 14.9 81 9 11 ## 135 21 259 15.5 76 9 12 ## 136 28 238 6.3 77 9 13 ## 137 9 24 10.9 71 9 14 ## 138 13 112 11.5 71 9 15 ## 139 46 237 6.9 78 9 16 ## 140 18 224 13.8 67 9 17 ## 141 13 27 10.3 76 9 18 ## 142 24 238 10.3 68 9 19 ## 143 16 201 8.0 82 9 20 ## 144 13 238 12.6 64 9 21 ## 145 23 14 9.2 71 9 22 ## 146 36 139 10.3 81 9 23 ## 147 7 49 10.3 69 9 24 ## 148 14 20 16.6 63 9 25 ## 149 30 193 6.9 70 9 26 ## 150 NA 145 13.2 77 9 27 ## 151 14 191 14.3 75 9 28 ## 152 18 131 8.0 76 9 29 ## 153 20 223 11.5 68 9 30 2.3.2 Discussion You can dplyr::collect() to return a tibble or as.data.frame() to return a data.frame. 2.4 Write a Parquet file You want to write a single Parquet file to disk. 2.4.1 Solution # Create table my_table &lt;- arrow_table(tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) # Write to Parquet write_parquet(my_table, &quot;my_table.parquet&quot;) 2.5 Read a Parquet file You want to read a single Parquet file into memory. 2.5.1 Solution parquet_tbl &lt;- read_parquet(&quot;my_table.parquet&quot;) parquet_tbl ## # A tibble: 3 × 2 ## group score ## &lt;chr&gt; &lt;dbl&gt; ## 1 A 99 ## 2 B 97 ## 3 C 99 As the argument as_data_frame was left set to its default value of TRUE, the file was read in as a tibble. class(parquet_tbl) ## [1] &quot;tbl_df&quot; &quot;tbl&quot; &quot;data.frame&quot; 2.5.2 Discussion If you set as_data_frame to FALSE, the file will be read in as an Arrow Table. my_table_arrow &lt;- read_parquet(&quot;my_table.parquet&quot;, as_data_frame = FALSE) my_table_arrow ## Table ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; class(my_table_arrow) ## [1] &quot;Table&quot; &quot;ArrowTabular&quot; &quot;ArrowObject&quot; &quot;R6&quot; 2.6 Read a Parquet file from S3 You want to read a single Parquet file from S3 into memory. 2.6.1 Solution df &lt;- read_parquet(file = &quot;s3://voltrondata-labs-datasets/nyc-taxi/year=2019/month=6/part-0.parquet&quot;) 2.6.2 See also For more in-depth instructions, including how to work with S3 buckets which require authentication, you can find a guide to reading and writing to/from S3 buckets here: https://arrow.apache.org/docs/r/articles/fs.html. 2.7 Filter columns while reading a Parquet file You want to specify which columns to include when reading in a single Parquet file into memory. 2.7.1 Solution # Create table to read back in dist_time &lt;- arrow_table(data.frame(distance = c(12.2, 15.7, 14.2), time = c(43, 44, 40))) # Write to Parquet write_parquet(dist_time, &quot;dist_time.parquet&quot;) # Read in only the &quot;time&quot; column time_only &lt;- read_parquet(&quot;dist_time.parquet&quot;, col_select = &quot;time&quot;) time_only ## # A tibble: 3 × 1 ## time ## &lt;dbl&gt; ## 1 43 ## 2 44 ## 3 40 2.8 Write a Feather V2/Arrow IPC file You want to write a single Feather V2 file (also called Arrow IPC file). 2.8.1 Solution my_table &lt;- arrow_table(data.frame(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) write_feather(my_table, &quot;my_table.arrow&quot;) 2.8.2 Discussion For legacy support, you can write data in the original Feather format by setting the version parameter to 1. # Create table my_table &lt;- arrow_table(data.frame(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99))) # Write to Feather format V1 write_feather(mtcars, &quot;my_table.feather&quot;, version = 1) 2.9 Read a Feather/Arrow IPC file You want to read a single Feather V1 or V2 file into memory (also called Arrow IPC file). 2.9.1 Solution my_feather_tbl &lt;- read_feather(&quot;my_table.arrow&quot;) 2.10 Write streaming Arrow IPC files You want to write to the Arrow IPC stream format. 2.10.1 Solution # Create table my_table &lt;- arrow_table( data.frame( group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99) ) ) # Write to IPC stream format write_ipc_stream(my_table, &quot;my_table.arrows&quot;) 2.11 Read streaming Arrow IPC files You want to read from the Arrow IPC stream format. 2.11.1 Solution my_ipc_stream &lt;- arrow::read_ipc_stream(&quot;my_table.arrows&quot;) 2.12 Write a CSV file You want to write Arrow data to a single CSV file. 2.12.1 Solution write_csv_arrow(cars, &quot;cars.csv&quot;) 2.13 Read a CSV file You want to read a single CSV file into memory. 2.13.1 Solution my_csv &lt;- read_csv_arrow(&quot;cars.csv&quot;, as_data_frame = FALSE) 2.14 Read a JSON file You want to read a JSON file into memory. 2.14.1 Solution # Create a file to read back in tf &lt;- tempfile() writeLines(&#39; {&quot;country&quot;: &quot;United Kingdom&quot;, &quot;code&quot;: &quot;GB&quot;, &quot;long&quot;: -3.44, &quot;lat&quot;: 55.38} {&quot;country&quot;: &quot;France&quot;, &quot;code&quot;: &quot;FR&quot;, &quot;long&quot;: 2.21, &quot;lat&quot;: 46.23} {&quot;country&quot;: &quot;Germany&quot;, &quot;code&quot;: &quot;DE&quot;, &quot;long&quot;: 10.45, &quot;lat&quot;: 51.17} &#39;, tf, useBytes = TRUE) # Read in the data countries &lt;- read_json_arrow(tf, col_select = c(&quot;country&quot;, &quot;long&quot;, &quot;lat&quot;)) countries ## # A tibble: 3 × 3 ## country long lat ## &lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt; ## 1 United Kingdom -3.44 55.4 ## 2 France 2.21 46.2 ## 3 Germany 10.4 51.2 2.15 Write a compressed single data file You want to save a single file, compressed with a specified compression algorithm. 2.15.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data compressed with the gzip algorithm instead of the default write_parquet(iris, file.path(td, &quot;iris.parquet&quot;), compression = &quot;gzip&quot;) 2.15.2 See also Some formats write compressed data by default. For more information on the supported compression algorithms and default settings, see: ?write_parquet() ?write_feather() 2.16 Read compressed data You want to read in a single data file which has been compressed. 2.16.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data which is to be read back in write_parquet(iris, file.path(td, &quot;iris.parquet&quot;), compression = &quot;gzip&quot;) # Read in data ds &lt;- read_parquet(file.path(td, &quot;iris.parquet&quot;)) ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;fct&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows 2.16.2 Discussion Note that Arrow automatically detects the compression and you do not have to supply it in the call to the read_*() or the open_dataset() functions. Although the CSV format does not support compression itself, Arrow supports reading in CSV data which has been compressed, if the file extension is .gz. # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write data which is to be read back in write.csv(iris, gzfile(file.path(td, &quot;iris.csv.gz&quot;)), row.names = FALSE, quote = FALSE) # Read in data ds &lt;- read_csv_arrow(file.path(td, &quot;iris.csv.gz&quot;)) ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows "],["reading-and-writing-data---multiple-files.html", "3 Reading and Writing Data - Multiple Files 3.1 Introduction 3.2 Write data to disk - Parquet 3.3 Write partitioned data - Parquet 3.4 Read partitioned data 3.5 Write data to disk - Feather/Arrow IPC format 3.6 Read in Feather/Arrow IPC data as an Arrow Dataset 3.7 Write data to disk - CSV format 3.8 Read in CSV data as an Arrow Dataset 3.9 Read in a CSV dataset (no headers) 3.10 Write compressed partitioned data 3.11 Read compressed data", " 3 Reading and Writing Data - Multiple Files 3.1 Introduction When reading files into R using Apache Arrow, you can read: a single file into memory as a data frame or an Arrow Table a single file that is too large to fit in memory as an Arrow Dataset multiple and partitioned files as an Arrow Dataset This chapter contains recipes related to using Apache Arrow to read and write files too large for memory and multiple or partitioned files as an Arrow Dataset. There are a number of circumstances in which you may want to read in the data as an Arrow Dataset: your single data file is too large to load into memory your data are partitioned among numerous files you want faster performance from your dplyr queries you want to be able to take advantage of Arrow’s compute functions It is possible to read in partitioned data in Parquet, Feather (also known as Arrow IPC), and CSV or other text-delimited formats. If you are choosing a partitioned multiple file format, we recommend Parquet or Feather (Arrow IPC ), both of which can have improved performance when compared to CSVs due to their capabilities around metadata and compression. 3.2 Write data to disk - Parquet You want to write data to disk in a single Parquet file. 3.2.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data&quot;) 3.2.2 Discussion The default format for open_dataset() and write_dataset() is Parquet. 3.3 Write partitioned data - Parquet You want to save multiple Parquet data files to disk in partitions based on columns in the data. 3.3.1 Solution write_dataset(airquality, &quot;airquality_partitioned&quot;, partitioning = c(&quot;Month&quot;)) As you can see, this has created folders based on the supplied partition variable Month. list.files(&quot;airquality_partitioned&quot;) ## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot; 3.3.2 Discussion The data is written to separate folders based on the values in the Month column. The default behaviour is to use Hive-style (i.e. “col_name=value” folder names) partitions. # Take a look at the files in this directory list.files(&quot;airquality_partitioned&quot;, recursive = TRUE) ## [1] &quot;Month=5/part-0.parquet&quot; &quot;Month=6/part-0.parquet&quot; &quot;Month=7/part-0.parquet&quot; ## [4] &quot;Month=8/part-0.parquet&quot; &quot;Month=9/part-0.parquet&quot; You can specify multiple partitioning variables to add extra levels of partitioning. write_dataset(airquality, &quot;airquality_partitioned_deeper&quot;, partitioning = c(&quot;Month&quot;, &quot;Day&quot;)) list.files(&quot;airquality_partitioned_deeper&quot;) ## [1] &quot;Month=5&quot; &quot;Month=6&quot; &quot;Month=7&quot; &quot;Month=8&quot; &quot;Month=9&quot; If you take a look in one of these folders, you will see that the data is then partitioned by the second partition variable, Day. # Take a look at the files in this directory list.files(&quot;airquality_partitioned_deeper/Month=5&quot;, recursive = TRUE) ## [1] &quot;Day=1/part-0.parquet&quot; &quot;Day=10/part-0.parquet&quot; &quot;Day=11/part-0.parquet&quot; ## [4] &quot;Day=12/part-0.parquet&quot; &quot;Day=13/part-0.parquet&quot; &quot;Day=14/part-0.parquet&quot; ## [7] &quot;Day=15/part-0.parquet&quot; &quot;Day=16/part-0.parquet&quot; &quot;Day=17/part-0.parquet&quot; ## [10] &quot;Day=18/part-0.parquet&quot; &quot;Day=19/part-0.parquet&quot; &quot;Day=2/part-0.parquet&quot; ## [13] &quot;Day=20/part-0.parquet&quot; &quot;Day=21/part-0.parquet&quot; &quot;Day=22/part-0.parquet&quot; ## [16] &quot;Day=23/part-0.parquet&quot; &quot;Day=24/part-0.parquet&quot; &quot;Day=25/part-0.parquet&quot; ## [19] &quot;Day=26/part-0.parquet&quot; &quot;Day=27/part-0.parquet&quot; &quot;Day=28/part-0.parquet&quot; ## [22] &quot;Day=29/part-0.parquet&quot; &quot;Day=3/part-0.parquet&quot; &quot;Day=30/part-0.parquet&quot; ## [25] &quot;Day=31/part-0.parquet&quot; &quot;Day=4/part-0.parquet&quot; &quot;Day=5/part-0.parquet&quot; ## [28] &quot;Day=6/part-0.parquet&quot; &quot;Day=7/part-0.parquet&quot; &quot;Day=8/part-0.parquet&quot; ## [31] &quot;Day=9/part-0.parquet&quot; There are two different ways to specify variables to use for partitioning - either via the partitioning variable as above, or by using dplyr::group_by() on your data - the group variables will form the partitions. write_dataset(dataset = group_by(airquality, Month, Day), path = &quot;airquality_groupby&quot;) # Take a look at the files in this directory list.files(&quot;airquality_groupby&quot;, recursive = TRUE) ## [1] &quot;Month=5/Day=1/part-0.parquet&quot; &quot;Month=5/Day=10/part-0.parquet&quot; ## [3] &quot;Month=5/Day=11/part-0.parquet&quot; &quot;Month=5/Day=12/part-0.parquet&quot; ## [5] &quot;Month=5/Day=13/part-0.parquet&quot; &quot;Month=5/Day=14/part-0.parquet&quot; ## [7] &quot;Month=5/Day=15/part-0.parquet&quot; &quot;Month=5/Day=16/part-0.parquet&quot; ## [9] &quot;Month=5/Day=17/part-0.parquet&quot; &quot;Month=5/Day=18/part-0.parquet&quot; ## [11] &quot;Month=5/Day=19/part-0.parquet&quot; &quot;Month=5/Day=2/part-0.parquet&quot; ## [13] &quot;Month=5/Day=20/part-0.parquet&quot; &quot;Month=5/Day=21/part-0.parquet&quot; ## [15] &quot;Month=5/Day=22/part-0.parquet&quot; &quot;Month=5/Day=23/part-0.parquet&quot; ## [17] &quot;Month=5/Day=24/part-0.parquet&quot; &quot;Month=5/Day=25/part-0.parquet&quot; ## [19] &quot;Month=5/Day=26/part-0.parquet&quot; &quot;Month=5/Day=27/part-0.parquet&quot; ## [21] &quot;Month=5/Day=28/part-0.parquet&quot; &quot;Month=5/Day=29/part-0.parquet&quot; ## [23] &quot;Month=5/Day=3/part-0.parquet&quot; &quot;Month=5/Day=30/part-0.parquet&quot; ## [25] &quot;Month=5/Day=31/part-0.parquet&quot; &quot;Month=5/Day=4/part-0.parquet&quot; ## [27] &quot;Month=5/Day=5/part-0.parquet&quot; &quot;Month=5/Day=6/part-0.parquet&quot; ## [29] &quot;Month=5/Day=7/part-0.parquet&quot; &quot;Month=5/Day=8/part-0.parquet&quot; ## [31] &quot;Month=5/Day=9/part-0.parquet&quot; &quot;Month=6/Day=1/part-0.parquet&quot; ## [33] &quot;Month=6/Day=10/part-0.parquet&quot; &quot;Month=6/Day=11/part-0.parquet&quot; ## [35] &quot;Month=6/Day=12/part-0.parquet&quot; &quot;Month=6/Day=13/part-0.parquet&quot; ## [37] &quot;Month=6/Day=14/part-0.parquet&quot; &quot;Month=6/Day=15/part-0.parquet&quot; ## [39] &quot;Month=6/Day=16/part-0.parquet&quot; &quot;Month=6/Day=17/part-0.parquet&quot; ## [41] &quot;Month=6/Day=18/part-0.parquet&quot; &quot;Month=6/Day=19/part-0.parquet&quot; ## [43] &quot;Month=6/Day=2/part-0.parquet&quot; &quot;Month=6/Day=20/part-0.parquet&quot; ## [45] &quot;Month=6/Day=21/part-0.parquet&quot; &quot;Month=6/Day=22/part-0.parquet&quot; ## [47] &quot;Month=6/Day=23/part-0.parquet&quot; &quot;Month=6/Day=24/part-0.parquet&quot; ## [49] &quot;Month=6/Day=25/part-0.parquet&quot; &quot;Month=6/Day=26/part-0.parquet&quot; ## [51] &quot;Month=6/Day=27/part-0.parquet&quot; &quot;Month=6/Day=28/part-0.parquet&quot; ## [53] &quot;Month=6/Day=29/part-0.parquet&quot; &quot;Month=6/Day=3/part-0.parquet&quot; ## [55] &quot;Month=6/Day=30/part-0.parquet&quot; &quot;Month=6/Day=4/part-0.parquet&quot; ## [57] &quot;Month=6/Day=5/part-0.parquet&quot; &quot;Month=6/Day=6/part-0.parquet&quot; ## [59] &quot;Month=6/Day=7/part-0.parquet&quot; &quot;Month=6/Day=8/part-0.parquet&quot; ## [61] &quot;Month=6/Day=9/part-0.parquet&quot; &quot;Month=7/Day=1/part-0.parquet&quot; ## [63] &quot;Month=7/Day=10/part-0.parquet&quot; &quot;Month=7/Day=11/part-0.parquet&quot; ## [65] &quot;Month=7/Day=12/part-0.parquet&quot; &quot;Month=7/Day=13/part-0.parquet&quot; ## [67] &quot;Month=7/Day=14/part-0.parquet&quot; &quot;Month=7/Day=15/part-0.parquet&quot; ## [69] &quot;Month=7/Day=16/part-0.parquet&quot; &quot;Month=7/Day=17/part-0.parquet&quot; ## [71] &quot;Month=7/Day=18/part-0.parquet&quot; &quot;Month=7/Day=19/part-0.parquet&quot; ## [73] &quot;Month=7/Day=2/part-0.parquet&quot; &quot;Month=7/Day=20/part-0.parquet&quot; ## [75] &quot;Month=7/Day=21/part-0.parquet&quot; &quot;Month=7/Day=22/part-0.parquet&quot; ## [77] &quot;Month=7/Day=23/part-0.parquet&quot; &quot;Month=7/Day=24/part-0.parquet&quot; ## [79] &quot;Month=7/Day=25/part-0.parquet&quot; &quot;Month=7/Day=26/part-0.parquet&quot; ## [81] &quot;Month=7/Day=27/part-0.parquet&quot; &quot;Month=7/Day=28/part-0.parquet&quot; ## [83] &quot;Month=7/Day=29/part-0.parquet&quot; &quot;Month=7/Day=3/part-0.parquet&quot; ## [85] &quot;Month=7/Day=30/part-0.parquet&quot; &quot;Month=7/Day=31/part-0.parquet&quot; ## [87] &quot;Month=7/Day=4/part-0.parquet&quot; &quot;Month=7/Day=5/part-0.parquet&quot; ## [89] &quot;Month=7/Day=6/part-0.parquet&quot; &quot;Month=7/Day=7/part-0.parquet&quot; ## [91] &quot;Month=7/Day=8/part-0.parquet&quot; &quot;Month=7/Day=9/part-0.parquet&quot; ## [93] &quot;Month=8/Day=1/part-0.parquet&quot; &quot;Month=8/Day=10/part-0.parquet&quot; ## [95] &quot;Month=8/Day=11/part-0.parquet&quot; &quot;Month=8/Day=12/part-0.parquet&quot; ## [97] &quot;Month=8/Day=13/part-0.parquet&quot; &quot;Month=8/Day=14/part-0.parquet&quot; ## [99] &quot;Month=8/Day=15/part-0.parquet&quot; &quot;Month=8/Day=16/part-0.parquet&quot; ## [101] &quot;Month=8/Day=17/part-0.parquet&quot; &quot;Month=8/Day=18/part-0.parquet&quot; ## [103] &quot;Month=8/Day=19/part-0.parquet&quot; &quot;Month=8/Day=2/part-0.parquet&quot; ## [105] &quot;Month=8/Day=20/part-0.parquet&quot; &quot;Month=8/Day=21/part-0.parquet&quot; ## [107] &quot;Month=8/Day=22/part-0.parquet&quot; &quot;Month=8/Day=23/part-0.parquet&quot; ## [109] &quot;Month=8/Day=24/part-0.parquet&quot; &quot;Month=8/Day=25/part-0.parquet&quot; ## [111] &quot;Month=8/Day=26/part-0.parquet&quot; &quot;Month=8/Day=27/part-0.parquet&quot; ## [113] &quot;Month=8/Day=28/part-0.parquet&quot; &quot;Month=8/Day=29/part-0.parquet&quot; ## [115] &quot;Month=8/Day=3/part-0.parquet&quot; &quot;Month=8/Day=30/part-0.parquet&quot; ## [117] &quot;Month=8/Day=31/part-0.parquet&quot; &quot;Month=8/Day=4/part-0.parquet&quot; ## [119] &quot;Month=8/Day=5/part-0.parquet&quot; &quot;Month=8/Day=6/part-0.parquet&quot; ## [121] &quot;Month=8/Day=7/part-0.parquet&quot; &quot;Month=8/Day=8/part-0.parquet&quot; ## [123] &quot;Month=8/Day=9/part-0.parquet&quot; &quot;Month=9/Day=1/part-0.parquet&quot; ## [125] &quot;Month=9/Day=10/part-0.parquet&quot; &quot;Month=9/Day=11/part-0.parquet&quot; ## [127] &quot;Month=9/Day=12/part-0.parquet&quot; &quot;Month=9/Day=13/part-0.parquet&quot; ## [129] &quot;Month=9/Day=14/part-0.parquet&quot; &quot;Month=9/Day=15/part-0.parquet&quot; ## [131] &quot;Month=9/Day=16/part-0.parquet&quot; &quot;Month=9/Day=17/part-0.parquet&quot; ## [133] &quot;Month=9/Day=18/part-0.parquet&quot; &quot;Month=9/Day=19/part-0.parquet&quot; ## [135] &quot;Month=9/Day=2/part-0.parquet&quot; &quot;Month=9/Day=20/part-0.parquet&quot; ## [137] &quot;Month=9/Day=21/part-0.parquet&quot; &quot;Month=9/Day=22/part-0.parquet&quot; ## [139] &quot;Month=9/Day=23/part-0.parquet&quot; &quot;Month=9/Day=24/part-0.parquet&quot; ## [141] &quot;Month=9/Day=25/part-0.parquet&quot; &quot;Month=9/Day=26/part-0.parquet&quot; ## [143] &quot;Month=9/Day=27/part-0.parquet&quot; &quot;Month=9/Day=28/part-0.parquet&quot; ## [145] &quot;Month=9/Day=29/part-0.parquet&quot; &quot;Month=9/Day=3/part-0.parquet&quot; ## [147] &quot;Month=9/Day=30/part-0.parquet&quot; &quot;Month=9/Day=4/part-0.parquet&quot; ## [149] &quot;Month=9/Day=5/part-0.parquet&quot; &quot;Month=9/Day=6/part-0.parquet&quot; ## [151] &quot;Month=9/Day=7/part-0.parquet&quot; &quot;Month=9/Day=8/part-0.parquet&quot; ## [153] &quot;Month=9/Day=9/part-0.parquet&quot; Each of these folders contains 1 or more Parquet files containing the relevant partition of the data. list.files(&quot;airquality_groupby/Month=5/Day=10&quot;) ## [1] &quot;part-0.parquet&quot; Note that when there was an NA value in the partition column, these values are written to the col_name=__HIVE_DEFAULT_PARTITION__ directory. 3.4 Read partitioned data You want to read partitioned data files as an Arrow Dataset. 3.4.1 Solution # Read data from directory air_data &lt;- open_dataset(&quot;airquality_partitioned_deeper&quot;) # View data air_data ## FileSystemDataset with 153 Parquet files ## Ozone: int32 ## Solar.R: int32 ## Wind: double ## Temp: int32 ## Month: int32 ## Day: int32 ## ## See $metadata for additional Schema metadata 3.4.2 Discussion Partitioning allows you to split data across multiple files and folders, avoiding problems associated with storing all your data in a single file. This can provide further advantages when using Arrow, as Arrow will only read in the necessary partitioned files needed for any given analysis. 3.5 Write data to disk - Feather/Arrow IPC format You want to write data to disk in a single Feather/Arrow IPC file. 3.5.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data_feather&quot;, format = &quot;feather&quot;) 3.6 Read in Feather/Arrow IPC data as an Arrow Dataset You want to read in Feather/Arrow IPC data as an Arrow Dataset 3.6.1 Solution # write Arrow file to use in this example write_dataset(dataset = airquality, path = &quot;airquality_data_arrow&quot;, format = &quot;arrow&quot;) # read into R open_dataset(&quot;airquality_data_arrow&quot;, format = &quot;arrow&quot;) ## FileSystemDataset with 1 Feather file ## Ozone: int32 ## Solar.R: int32 ## Wind: double ## Temp: int32 ## Month: int32 ## Day: int32 ## ## See $metadata for additional Schema metadata 3.7 Write data to disk - CSV format You want to write data to disk in a single CSV file. 3.7.1 Solution write_dataset(dataset = airquality, path = &quot;airquality_data_csv&quot;, format = &quot;csv&quot;) 3.8 Read in CSV data as an Arrow Dataset You want to read in CSV data as an Arrow Dataset 3.8.1 Solution # write CSV file to use in this example write_dataset(dataset = airquality, path = &quot;airquality_data_csv&quot;, format = &quot;csv&quot;) # read into R open_dataset(&quot;airquality_data_csv&quot;, format = &quot;csv&quot;) ## FileSystemDataset with 1 csv file ## Ozone: int64 ## Solar.R: int64 ## Wind: double ## Temp: int64 ## Month: int64 ## Day: int64 3.9 Read in a CSV dataset (no headers) You want to read in a dataset containing CSVs with no headers 3.9.1 Solution # write CSV file to use in this example dataset_1 &lt;- airquality[1:40, c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)] dataset_2 &lt;- airquality[41:80, c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)] dir.create(&quot;airquality&quot;) write.table(dataset_1, &quot;airquality/part-1.csv&quot;, sep = &quot;,&quot;, row.names = FALSE, col.names = FALSE) write.table(dataset_2, &quot;airquality/part-2.csv&quot;, sep = &quot;,&quot;, row.names = FALSE, col.names = FALSE) # read into R open_dataset(&quot;airquality&quot;, format = &quot;csv&quot;, column_names = c(&quot;Month&quot;, &quot;Day&quot;, &quot;Temp&quot;)) ## FileSystemDataset with 2 csv files ## Month: int64 ## Day: int64 ## Temp: int64 3.9.2 Discussion If your dataset is made up of headerless CSV files, you must supply the names of each column. You can do this in multiple ways - either via the column_names parameter (as shown above) or via a schema: open_dataset(&quot;airquality&quot;, format = &quot;csv&quot;, schema = schema(&quot;Month&quot; = int32(), &quot;Day&quot; = int32(), &quot;Temp&quot; = int32())) ## FileSystemDataset with 2 csv files ## Month: int32 ## Day: int32 ## Temp: int32 One additional advantage of using a schema is that you also have control of the data types of the columns. If you provide both column names and a schema, the values in column_names must match the schema field names. 3.10 Write compressed partitioned data You want to save partitioned files, compressed with a specified compression algorithm. 3.10.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write dataset to file write_dataset(iris, path = td, compression = &quot;gzip&quot;) # View files in the directory list.files(td, recursive = TRUE) ## [1] &quot;part-0.parquet&quot; 3.10.2 Discussion You can supply the compression argument to write_dataset() as long as the compression algorithm is compatible with the chosen format. See ?write_dataset() for more information on supported compression algorithms and default settings. 3.11 Read compressed data You want to read in data which has been compressed. 3.11.1 Solution # Create a temporary directory td &lt;- tempfile() dir.create(td) # Write dataset to file write_dataset(iris, path = td, compression = &quot;gzip&quot;) # Read in data ds &lt;- open_dataset(td) %&gt;% collect() ds ## # A tibble: 150 × 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;fct&gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ℹ 140 more rows 3.11.2 Discussion Note that Arrow automatically detects the compression and you do not have to supply it in the call to open_dataset() or the read_*() functions. "],["creating-arrow-objects.html", "4 Creating Arrow Objects 4.1 Create an Arrow Array from an R object 4.2 Create a Arrow Table from an R object 4.3 View the contents of an Arrow Table or RecordBatch 4.4 Manually create a RecordBatch from an R object.", " 4 Creating Arrow Objects 4.1 Create an Arrow Array from an R object You want to convert an existing vector in R to an Arrow Array object. 4.1.1 Solution # Create an example vector score = c(99, 97, 99) # Convert to Arrow Array score_array &lt;- Array$create(score) # View Array score_array ## Array ## &lt;double&gt; ## [ ## 99, ## 97, ## 99 ## ] 4.2 Create a Arrow Table from an R object You want to convert an existing data frame in R to an Arrow Table object. 4.2.1 Solution # Create an example data frame my_tibble &lt;- tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99)) # Convert to Arrow Table my_table &lt;- arrow_table(my_tibble) # View table my_table ## Table ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; 4.3 View the contents of an Arrow Table or RecordBatch You want to view the contents of an Arrow Table or RecordBatch. 4.3.1 Solution # View Table dplyr::collect(my_table) ## # A tibble: 3 × 2 ## group score ## &lt;chr&gt; &lt;dbl&gt; ## 1 A 99 ## 2 B 97 ## 3 C 99 4.4 Manually create a RecordBatch from an R object. You want to convert an existing data frame in R to an Arrow RecordBatch object. 4.4.1 Solution # Create an example data frame my_tibble &lt;- tibble::tibble(group = c(&quot;A&quot;, &quot;B&quot;, &quot;C&quot;), score = c(99, 97, 99)) # Convert to Arrow RecordBatch my_record_batch &lt;- record_batch(my_tibble) # View RecordBatch my_record_batch ## RecordBatch ## 3 rows x 2 columns ## $group &lt;string&gt; ## $score &lt;double&gt; "],["defining-data-types.html", "5 Defining Data Types 5.1 Introduction 5.2 Update data type of an existing Arrow Array 5.3 Update data type of a field in an existing Arrow Table 5.4 Specify data types when creating an Arrow table from an R object 5.5 Specify data types when reading in files", " 5 Defining Data Types 5.1 Introduction As discussed in previous chapters, Arrow automatically infers the most appropriate data type when reading in data or converting R objects to Arrow objects. However, you might want to manually tell Arrow which data types to use, for example, to ensure interoperability with databases and data warehouse systems. This chapter includes recipes for: changing the data types of existing Arrow objects defining data types during the process of creating Arrow objects A table showing the default mappings between R and Arrow data types can be found in R data type to Arrow data type mappings. A table containing Arrow data types, and their R equivalents can be found in Arrow data type to R data type mapping. 5.2 Update data type of an existing Arrow Array You want to change the data type of an existing Arrow Array. 5.2.1 Solution # Create an Array to cast integer_arr &lt;- Array$create(1:5) # Cast to an unsigned int8 type uint_arr &lt;- integer_arr$cast(target_type = uint8()) uint_arr ## Array ## &lt;uint8&gt; ## [ ## 1, ## 2, ## 3, ## 4, ## 5 ## ] 5.2.2 Discussion There are some data types which are not compatible with each other. Errors will occur if you try to cast between incompatible data types. int_arr &lt;- Array$create(1:5) int_arr$cast(target_type = binary()) ## Error: NotImplemented: Unsupported cast from int32 to binary using function cast_binary 5.3 Update data type of a field in an existing Arrow Table You want to change the type of one or more fields in an existing Arrow Table. 5.3.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Convert tibble to an Arrow table oscars_arrow &lt;- arrow_table(oscars) # The default mapping from numeric column &quot;num_awards&quot; is to a double oscars_arrow ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;double&gt; # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # Cast to an int16 oscars_arrow_int &lt;- oscars_arrow$cast(target_schema = oscars_schema) oscars_arrow_int ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;int16&gt; 5.3.2 Discussion There are some Arrow data types which do not have any R equivalent. Attempting to cast to these data types or using a schema which contains them will result in an error. # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Convert tibble to an Arrow table oscars_arrow &lt;- arrow_table(oscars) # Set up schema with &quot;num_awards&quot; as float16 which doesn&#39;t have an R equivalent oscars_schema_invalid &lt;- schema(actor = string(), num_awards = float16()) # The default mapping from numeric column &quot;num_awards&quot; is to a double oscars_arrow$cast(target_schema = oscars_schema_invalid) ## Error: NotImplemented: Unsupported cast from double to halffloat using function cast_half_float 5.4 Specify data types when creating an Arrow table from an R object You want to manually specify Arrow data types when converting an object from a data frame to an Arrow object. 5.4.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # create arrow Table containing data and schema oscars_data_arrow &lt;- arrow_table(oscars, schema = oscars_schema) oscars_data_arrow ## Table ## 3 rows x 2 columns ## $actor &lt;string&gt; ## $num_awards &lt;int16&gt; 5.5 Specify data types when reading in files You want to manually specify Arrow data types when reading in files. 5.5.1 Solution # Set up a tibble to use in this example oscars &lt;- tibble::tibble( actor = c(&quot;Katharine Hepburn&quot;, &quot;Meryl Streep&quot;, &quot;Jack Nicholson&quot;), num_awards = c(4, 3, 3) ) # write dataset to disk write_dataset(oscars, path = &quot;oscars_data&quot;) # Set up schema with &quot;num_awards&quot; as integer oscars_schema &lt;- schema(actor = string(), num_awards = int16()) # read the dataset in, using the schema instead of inferring the type automatically oscars_dataset_arrow &lt;- open_dataset(&quot;oscars_data&quot;, schema = oscars_schema) oscars_dataset_arrow ## FileSystemDataset with 1 Parquet file ## actor: string ## num_awards: int16 "],["manipulating-data---arrays.html", "6 Manipulating Data - Arrays 6.1 Introduction 6.2 Filter by values matching a predicate or mask 6.3 Compute Mean/Min/Max, etc value of an Array 6.4 Count occurrences of elements in an Array 6.5 Apply arithmetic functions to Arrays. 6.6 Call Arrow compute functions directly on Arrays", " 6 Manipulating Data - Arrays 6.1 Introduction An Arrow Array is roughly equivalent to an R vector - it can be used to represent a single column of data, with all values having the same data type. A number of base R functions which have S3 generic methods have been implemented to work on Arrow Arrays; for example mean, min, and max. 6.2 Filter by values matching a predicate or mask You want to search for values in an Array that match a predicate condition. 6.2.1 Solution my_values &lt;- Array$create(c(1:5, NA)) my_values[my_values &gt; 3] ## Array ## &lt;int32&gt; ## [ ## 4, ## 5, ## null ## ] 6.2.2 Discussion You can refer to items in an Array using the square brackets [] like you can an R vector. 6.3 Compute Mean/Min/Max, etc value of an Array You want to calculate the mean, minimum, or maximum of values in an array. 6.3.1 Solution my_values &lt;- Array$create(c(1:5, NA)) mean(my_values, na.rm = TRUE) ## Scalar ## 3 6.3.2 Discussion Many base R generic functions such as mean(), min(), and max() have been mapped to their Arrow equivalents, and so can be called on Arrow Array objects in the same way. They will return Arrow objects themselves. If you want to use an R function which does not have an Arrow mapping, you can use as.vector() to convert Arrow objects to base R vectors. arrow_array &lt;- Array$create(1:100) # get Tukey&#39;s five-number summary fivenum(as.vector(arrow_array)) ## [1] 1.0 25.5 50.5 75.5 100.0 You can tell if a function is a standard S3 generic function by looking at the body of the function - S3 generic functions call UseMethod() to determine the appropriate version of that function to use for the object. mean ## function (x, ...) ## UseMethod(&quot;mean&quot;) ## &lt;bytecode: 0x564a10424388&gt; ## &lt;environment: namespace:base&gt; You can also use isS3stdGeneric() to determine if a function is an S3 generic. isS3stdGeneric(&quot;mean&quot;) ## mean ## TRUE If you find an S3 generic function which isn’t implemented for Arrow objects but you would like to be able to use, please open an issue on the project JIRA. 6.4 Count occurrences of elements in an Array You want to count repeated values in an Array. 6.4.1 Solution repeated_vals &lt;- Array$create(c(1, 1, 2, 3, 3, 3, 3, 3)) value_counts(repeated_vals) ## StructArray ## &lt;struct&lt;values: double, counts: int64&gt;&gt; ## -- is_valid: all not null ## -- child 0 type: double ## [ ## 1, ## 2, ## 3 ## ] ## -- child 1 type: int64 ## [ ## 2, ## 1, ## 5 ## ] 6.4.2 Discussion Some functions in the Arrow R package do not have base R equivalents. In other cases, the base R equivalents are not generic functions so they cannot be called directly on Arrow Array objects. For example, the value_counts() function in the Arrow R package is loosely equivalent to the base R function table(), which is not a generic function. 6.5 Apply arithmetic functions to Arrays. You want to use the various arithmetic operators on Array objects. 6.5.1 Solution num_array &lt;- Array$create(1:10) num_array + 10 ## Array ## &lt;double&gt; ## [ ## 11, ## 12, ## 13, ## 14, ## 15, ## 16, ## 17, ## 18, ## 19, ## 20 ## ] 6.5.2 Discussion You will get the same result if you pass in the value you’re adding as an Arrow object. num_array + Scalar$create(10) ## Array ## &lt;double&gt; ## [ ## 11, ## 12, ## 13, ## 14, ## 15, ## 16, ## 17, ## 18, ## 19, ## 20 ## ] 6.6 Call Arrow compute functions directly on Arrays You want to call an Arrow compute function directly on an Array. 6.6.1 Solution first_100_numbers &lt;- Array$create(1:100) # Calculate the variance of 1 to 100, setting the delta degrees of freedom to 0. call_function(&quot;variance&quot;, first_100_numbers, options = list(ddof = 0)) ## Scalar ## 833.25 6.6.2 Discussion You can use call_function() to call Arrow compute functions directly on Scalar, Array, and ChunkedArray objects. The returned object will be an Arrow object. 6.6.3 See also For a more in-depth discussion of Arrow compute functions, see the section on using arrow functions in dplyr verbs in arrow "],["manipulating-data---tables.html", "7 Manipulating Data - Tables 7.1 Introduction 7.2 Use dplyr verbs in Arrow 7.3 Use R functions in dplyr verbs in Arrow 7.4 Use Arrow functions in dplyr verbs in Arrow 7.5 Compute Window Aggregates", " 7 Manipulating Data - Tables 7.1 Introduction One of the aims of the Arrow project is to reduce duplication between different data frame implementations. The underlying implementation of a data frame is a conceptually different thing to the code- or the application programming interface (API)-that you write to work with it. You may have seen this before in packages like dbplyr which allow you to use the dplyr API to interact with SQL databases. The Arrow R package has been written so that the underlying Arrow Table-like objects can be manipulated using the dplyr API, which allows you to use dplyr verbs. For example, here’s a short pipeline of data manipulation which uses dplyr exclusively: library(dplyr) starwars %&gt;% filter(species == &quot;Human&quot;) %&gt;% mutate(height_ft = height/30.48) %&gt;% select(name, height_ft) ## # A tibble: 35 × 2 ## name height_ft ## &lt;chr&gt; &lt;dbl&gt; ## 1 Luke Skywalker 5.64 ## 2 Darth Vader 6.63 ## 3 Leia Organa 4.92 ## 4 Owen Lars 5.84 ## 5 Beru Whitesun lars 5.41 ## 6 Biggs Darklighter 6.00 ## 7 Obi-Wan Kenobi 5.97 ## 8 Anakin Skywalker 6.17 ## 9 Wilhuff Tarkin 5.91 ## 10 Han Solo 5.91 ## # ℹ 25 more rows And the same results as using Arrow with dplyr syntax: arrow_table(starwars) %&gt;% filter(species == &quot;Human&quot;) %&gt;% mutate(height_ft = height/30.48) %&gt;% select(name, height_ft) %&gt;% collect() ## # A tibble: 35 × 2 ## name height_ft ## &lt;chr&gt; &lt;dbl&gt; ## 1 Luke Skywalker 5.64 ## 2 Darth Vader 6.63 ## 3 Leia Organa 4.92 ## 4 Owen Lars 5.84 ## 5 Beru Whitesun lars 5.41 ## 6 Biggs Darklighter 6.00 ## 7 Obi-Wan Kenobi 5.97 ## 8 Anakin Skywalker 6.17 ## 9 Wilhuff Tarkin 5.91 ## 10 Han Solo 5.91 ## # ℹ 25 more rows You’ll notice we’ve used collect() in the Arrow pipeline above. That’s because one of the ways in which Arrow is efficient is that it works out the instructions for the calculations it needs to perform (expressions) and only runs them using Arrow once you actually pull the data into your R session. This means instead of doing lots of separate operations, it does them all at once in a more optimised way. This is called lazy evaluation. It also means that you are able to manipulate data that is larger than you can fit into memory on the machine you’re running your code on, if you only pull data into R when you have selected the desired subset, or when using functions which can operate on chunks of data. You can also have data which is split across multiple files. For example, you might have files which are stored in multiple Parquet or Feather files, partitioned across different directories. You can open partitioned or multi-file datasets using open_dataset() as discussed in a previous chapter, and then manipulate this data using Arrow before even reading any of the data into R. 7.2 Use dplyr verbs in Arrow You want to use a dplyr verb in Arrow. 7.2.1 Solution library(dplyr) arrow_table(starwars) %&gt;% filter(species == &quot;Human&quot;, homeworld == &quot;Tatooine&quot;) %&gt;% collect() ## # A tibble: 8 × 14 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Luke Sky… 172 77 blond fair blue 19 male mascu… ## 2 Darth Va… 202 136 none white yellow 41.9 male mascu… ## 3 Owen Lars 178 120 brown, gr… light blue 52 male mascu… ## 4 Beru Whi… 165 75 brown light blue 47 fema… femin… ## 5 Biggs Da… 183 84 black light brown 24 male mascu… ## 6 Anakin S… 188 84 blond fair blue 41.9 male mascu… ## 7 Shmi Sky… 163 NA black fair brown 72 fema… femin… ## 8 Cliegg L… 183 NA brown fair blue 82 male mascu… ## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt; 7.2.2 Discussion You can use most of the dplyr verbs directly from Arrow. 7.2.3 See also You can find examples of the various dplyr verbs in “Introduction to dplyr” - run vignette(\"dplyr\", package = \"dplyr\") or view on the pkgdown site. You can see more information about using arrow_table() to create Arrow Tables and collect() to view them as R data frames in Creating Arrow Objects. 7.3 Use R functions in dplyr verbs in Arrow You want to use an R function inside a dplyr verb in Arrow. 7.3.1 Solution arrow_table(starwars) %&gt;% filter(str_detect(name, &quot;Darth&quot;)) %&gt;% collect() ## # A tibble: 2 × 14 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Darth Va… 202 136 none white yellow 41.9 male mascu… ## 2 Darth Ma… 175 80 none red yellow 54 male mascu… ## # ℹ 5 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt; 7.3.2 Discussion The Arrow R package allows you to use dplyr verbs containing expressions which include base R and many tidyverse functions, but call Arrow functions under the hood. If you find any base R or tidyverse functions which you would like to see a mapping of in Arrow, please open an issue on the project JIRA. The following packages (amongst some from others) have had many function bindings/mappings written in arrow: lubridate stringr dplyr If you try to call a function which does not have arrow mapping, the data will be pulled back into R, and you will see a warning message. library(stringr) arrow_table(starwars) %&gt;% mutate(name_split = str_split_fixed(name, &quot; &quot;, 2)) %&gt;% collect() ## Warning: Expression str_split_fixed(name, &quot; &quot;, 2) not supported in Arrow; ## pulling data into R ## # A tibble: 87 × 15 ## name height mass hair_color skin_color eye_color birth_year sex gender ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;chr&gt; &lt;chr&gt; ## 1 Luke Sk… 172 77 blond fair blue 19 male mascu… ## 2 C-3PO 167 75 &lt;NA&gt; gold yellow 112 none mascu… ## 3 R2-D2 96 32 &lt;NA&gt; white, bl… red 33 none mascu… ## 4 Darth V… 202 136 none white yellow 41.9 male mascu… ## 5 Leia Or… 150 49 brown light brown 19 fema… femin… ## 6 Owen La… 178 120 brown, gr… light blue 52 male mascu… ## 7 Beru Wh… 165 75 brown light blue 47 fema… femin… ## 8 R5-D4 97 32 &lt;NA&gt; white, red red NA none mascu… ## 9 Biggs D… 183 84 black light brown 24 male mascu… ## 10 Obi-Wan… 182 77 auburn, w… fair blue-gray 57 male mascu… ## # ℹ 77 more rows ## # ℹ 6 more variables: homeworld &lt;chr&gt;, species &lt;chr&gt;, films &lt;list&lt;character&gt;&gt;, ## # vehicles &lt;list&lt;character&gt;&gt;, starships &lt;list&lt;character&gt;&gt;, ## # name_split &lt;chr[,2]&gt; 7.4 Use Arrow functions in dplyr verbs in Arrow You want to use a function which is implemented in Arrow’s C++ library but either: it doesn’t have a mapping to a base R or tidyverse equivalent, or it has a mapping but nevertheless you want to call the C++ function directly 7.4.1 Solution arrow_table(starwars) %&gt;% select(name) %&gt;% mutate(padded_name = arrow_ascii_lpad(name, options = list(width = 10, padding = &quot;*&quot;))) %&gt;% collect() ## # A tibble: 87 × 2 ## name padded_name ## &lt;chr&gt; &lt;chr&gt; ## 1 Luke Skywalker Luke Skywalker ## 2 C-3PO *****C-3PO ## 3 R2-D2 *****R2-D2 ## 4 Darth Vader Darth Vader ## 5 Leia Organa Leia Organa ## 6 Owen Lars *Owen Lars ## 7 Beru Whitesun lars Beru Whitesun lars ## 8 R5-D4 *****R5-D4 ## 9 Biggs Darklighter Biggs Darklighter ## 10 Obi-Wan Kenobi Obi-Wan Kenobi ## # ℹ 77 more rows 7.4.2 Discussion The vast majority of Arrow C++ compute functions have been mapped to their base R or tidyverse equivalents, and we strongly recommend that you use these mappings where possible, as the original functions are well documented and the mapped versions have been tested to ensure the results returned are as expected. However, there may be circumstances in which you might want to use a compute function from the Arrow C++ library which does not have a base R or tidyverse equivalent. You can find documentation of Arrow C++ compute functions in the C++ documention. This documentation lists all available compute functions, any associated options classes they need, and the valid data types that they can be used with. You can list all available Arrow compute functions from R by calling list_compute_functions(). list_compute_functions() ## [1] &quot;abs&quot; &quot;abs_checked&quot; ## [3] &quot;acos&quot; &quot;acos_checked&quot; ## [5] &quot;add&quot; &quot;add_checked&quot; ## [7] &quot;all&quot; &quot;and&quot; ## [9] &quot;and_kleene&quot; &quot;and_not&quot; ## [11] &quot;and_not_kleene&quot; &quot;any&quot; ## [13] &quot;approximate_median&quot; &quot;array_filter&quot; ## [15] &quot;array_sort_indices&quot; &quot;array_take&quot; ## [17] &quot;ascii_capitalize&quot; &quot;ascii_center&quot; ## [19] &quot;ascii_is_alnum&quot; &quot;ascii_is_alpha&quot; ## [21] &quot;ascii_is_decimal&quot; &quot;ascii_is_lower&quot; ## [23] &quot;ascii_is_printable&quot; &quot;ascii_is_space&quot; ## [25] &quot;ascii_is_title&quot; &quot;ascii_is_upper&quot; ## [27] &quot;ascii_lower&quot; &quot;ascii_lpad&quot; ## [29] &quot;ascii_ltrim&quot; &quot;ascii_ltrim_whitespace&quot; ## [31] &quot;ascii_reverse&quot; &quot;ascii_rpad&quot; ## [33] &quot;ascii_rtrim&quot; &quot;ascii_rtrim_whitespace&quot; ## [35] &quot;ascii_split_whitespace&quot; &quot;ascii_swapcase&quot; ## [37] &quot;ascii_title&quot; &quot;ascii_trim&quot; ## [39] &quot;ascii_trim_whitespace&quot; &quot;ascii_upper&quot; ## [41] &quot;asin&quot; &quot;asin_checked&quot; ## [43] &quot;assume_timezone&quot; &quot;atan&quot; ## [45] &quot;atan2&quot; &quot;binary_join&quot; ## [47] &quot;binary_join_element_wise&quot; &quot;binary_length&quot; ## [49] &quot;binary_repeat&quot; &quot;binary_replace_slice&quot; ## [51] &quot;binary_reverse&quot; &quot;binary_slice&quot; ## [53] &quot;bit_wise_and&quot; &quot;bit_wise_not&quot; ## [55] &quot;bit_wise_or&quot; &quot;bit_wise_xor&quot; ## [57] &quot;case_when&quot; &quot;cast&quot; ## [59] &quot;ceil&quot; &quot;ceil_temporal&quot; ## [61] &quot;choose&quot; &quot;coalesce&quot; ## [63] &quot;cos&quot; &quot;cos_checked&quot; ## [65] &quot;count&quot; &quot;count_all&quot; ## [67] &quot;count_distinct&quot; &quot;count_substring&quot; ## [69] &quot;count_substring_regex&quot; &quot;cumulative_max&quot; ## [71] &quot;cumulative_min&quot; &quot;cumulative_prod&quot; ## [73] &quot;cumulative_prod_checked&quot; &quot;cumulative_sum&quot; ## [75] &quot;cumulative_sum_checked&quot; &quot;day&quot; ## [77] &quot;day_of_week&quot; &quot;day_of_year&quot; ## [79] &quot;day_time_interval_between&quot; &quot;days_between&quot; ## [81] &quot;dictionary_encode&quot; &quot;divide&quot; ## [83] &quot;divide_checked&quot; &quot;drop_null&quot; ## [85] &quot;ends_with&quot; &quot;equal&quot; ## [87] &quot;exp&quot; &quot;extract_regex&quot; ## [89] &quot;fill_null_backward&quot; &quot;fill_null_forward&quot; ## [91] &quot;filter&quot; &quot;find_substring&quot; ## [93] &quot;find_substring_regex&quot; &quot;first&quot; ## [95] &quot;first_last&quot; &quot;floor&quot; ## [97] &quot;floor_temporal&quot; &quot;greater&quot; ## [99] &quot;greater_equal&quot; &quot;hour&quot; ## [101] &quot;hours_between&quot; &quot;if_else&quot; ## [103] &quot;index&quot; &quot;index_in&quot; ## [105] &quot;index_in_meta_binary&quot; &quot;indices_nonzero&quot; ## [107] &quot;invert&quot; &quot;is_dst&quot; ## [109] &quot;is_finite&quot; &quot;is_in&quot; ## [111] &quot;is_in_meta_binary&quot; &quot;is_inf&quot; ## [113] &quot;is_leap_year&quot; &quot;is_nan&quot; ## [115] &quot;is_null&quot; &quot;is_valid&quot; ## [117] &quot;iso_calendar&quot; &quot;iso_week&quot; ## [119] &quot;iso_year&quot; &quot;last&quot; ## [121] &quot;less&quot; &quot;less_equal&quot; ## [123] &quot;list_element&quot; &quot;list_flatten&quot; ## [125] &quot;list_parent_indices&quot; &quot;list_slice&quot; ## [127] &quot;list_value_length&quot; &quot;ln&quot; ## [129] &quot;ln_checked&quot; &quot;local_timestamp&quot; ## [131] &quot;log10&quot; &quot;log10_checked&quot; ## [133] &quot;log1p&quot; &quot;log1p_checked&quot; ## [135] &quot;log2&quot; &quot;log2_checked&quot; ## [137] &quot;logb&quot; &quot;logb_checked&quot; ## [139] &quot;make_struct&quot; &quot;map_lookup&quot; ## [141] &quot;match_like&quot; &quot;match_substring&quot; ## [143] &quot;match_substring_regex&quot; &quot;max&quot; ## [145] &quot;max_element_wise&quot; &quot;mean&quot; ## [147] &quot;microsecond&quot; &quot;microseconds_between&quot; ## [149] &quot;millisecond&quot; &quot;milliseconds_between&quot; ## [151] &quot;min&quot; &quot;min_element_wise&quot; ## [153] &quot;min_max&quot; &quot;minute&quot; ## [155] &quot;minutes_between&quot; &quot;mode&quot; ## [157] &quot;month&quot; &quot;month_day_nano_interval_between&quot; ## [159] &quot;month_interval_between&quot; &quot;multiply&quot; ## [161] &quot;multiply_checked&quot; &quot;nanosecond&quot; ## [163] &quot;nanoseconds_between&quot; &quot;negate&quot; ## [165] &quot;negate_checked&quot; &quot;not_equal&quot; ## [167] &quot;or&quot; &quot;or_kleene&quot; ## [169] &quot;pairwise_diff&quot; &quot;pairwise_diff_checked&quot; ## [171] &quot;partition_nth_indices&quot; &quot;power&quot; ## [173] &quot;power_checked&quot; &quot;product&quot; ## [175] &quot;quantile&quot; &quot;quarter&quot; ## [177] &quot;quarters_between&quot; &quot;random&quot; ## [179] &quot;rank&quot; &quot;replace_substring&quot; ## [181] &quot;replace_substring_regex&quot; &quot;replace_with_mask&quot; ## [183] &quot;round&quot; &quot;round_binary&quot; ## [185] &quot;round_temporal&quot; &quot;round_to_multiple&quot; ## [187] &quot;run_end_decode&quot; &quot;run_end_encode&quot; ## [189] &quot;second&quot; &quot;seconds_between&quot; ## [191] &quot;select_k_unstable&quot; &quot;shift_left&quot; ## [193] &quot;shift_left_checked&quot; &quot;shift_right&quot; ## [195] &quot;shift_right_checked&quot; &quot;sign&quot; ## [197] &quot;sin&quot; &quot;sin_checked&quot; ## [199] &quot;sort_indices&quot; &quot;split_pattern&quot; ## [201] &quot;split_pattern_regex&quot; &quot;sqrt&quot; ## [203] &quot;sqrt_checked&quot; &quot;starts_with&quot; ## [205] &quot;stddev&quot; &quot;strftime&quot; ## [207] &quot;string_is_ascii&quot; &quot;strptime&quot; ## [209] &quot;struct_field&quot; &quot;subsecond&quot; ## [211] &quot;subtract&quot; &quot;subtract_checked&quot; ## [213] &quot;sum&quot; &quot;take&quot; ## [215] &quot;tan&quot; &quot;tan_checked&quot; ## [217] &quot;tdigest&quot; &quot;true_unless_null&quot; ## [219] &quot;trunc&quot; &quot;unique&quot; ## [221] &quot;us_week&quot; &quot;us_year&quot; ## [223] &quot;utf8_capitalize&quot; &quot;utf8_center&quot; ## [225] &quot;utf8_is_alnum&quot; &quot;utf8_is_alpha&quot; ## [227] &quot;utf8_is_decimal&quot; &quot;utf8_is_digit&quot; ## [229] &quot;utf8_is_lower&quot; &quot;utf8_is_numeric&quot; ## [231] &quot;utf8_is_printable&quot; &quot;utf8_is_space&quot; ## [233] &quot;utf8_is_title&quot; &quot;utf8_is_upper&quot; ## [235] &quot;utf8_length&quot; &quot;utf8_lower&quot; ## [237] &quot;utf8_lpad&quot; &quot;utf8_ltrim&quot; ## [239] &quot;utf8_ltrim_whitespace&quot; &quot;utf8_normalize&quot; ## [241] &quot;utf8_replace_slice&quot; &quot;utf8_reverse&quot; ## [243] &quot;utf8_rpad&quot; &quot;utf8_rtrim&quot; ## [245] &quot;utf8_rtrim_whitespace&quot; &quot;utf8_slice_codeunits&quot; ## [247] &quot;utf8_split_whitespace&quot; &quot;utf8_swapcase&quot; ## [249] &quot;utf8_title&quot; &quot;utf8_trim&quot; ## [251] &quot;utf8_trim_whitespace&quot; &quot;utf8_upper&quot; ## [253] &quot;value_counts&quot; &quot;variance&quot; ## [255] &quot;week&quot; &quot;weeks_between&quot; ## [257] &quot;xor&quot; &quot;year&quot; ## [259] &quot;year_month_day&quot; &quot;years_between&quot; The majority of functions here have been mapped to their base R or tidyverse equivalent and can be called within a dplyr query as usual. For functions which don’t have a base R or tidyverse equivalent, or you want to supply custom options, you can call them by prefixing their name with “arrow_”. For example, base R’s is.na() function is the equivalent of the Arrow C++ compute function is_null() with the option nan_is_null set to TRUE. A mapping between these functions (with nan_is_null set to TRUE) has been created in arrow. demo_df &lt;- data.frame(x = c(1, 2, 3, NA, NaN)) arrow_table(demo_df) %&gt;% mutate(y = is.na(x)) %&gt;% collect() ## # A tibble: 5 × 2 ## x y ## &lt;dbl&gt; &lt;lgl&gt; ## 1 1 FALSE ## 2 2 FALSE ## 3 3 FALSE ## 4 NA TRUE ## 5 NaN TRUE If you want to call Arrow’s is_null() function but with nan_is_null set to FALSE (so it returns TRUE when a value being examined is NA but FALSE when the value being examined is NaN), you must call is_null() directly and specify the option nan_is_null = FALSE. arrow_table(demo_df) %&gt;% mutate(y = arrow_is_null(x, options = list(nan_is_null = FALSE))) %&gt;% collect() ## # A tibble: 5 × 2 ## x y ## &lt;dbl&gt; &lt;lgl&gt; ## 1 1 FALSE ## 2 2 FALSE ## 3 3 FALSE ## 4 NA TRUE ## 5 NaN FALSE 7.4.2.1 Compute functions with options Although not all Arrow C++ compute functions require options to be specified, most do. For these functions to work in R, they must be linked up with the appropriate libarrow options C++ class via the R package’s C++ code. At the time of writing, all compute functions available in the development version of the Arrow R package had been associated with their options classes. However, as the Arrow C++ library’s functionality extends, compute functions may be added which do not yet have an R binding. If you find a C++ compute function which you wish to use from the R package, please open an issue on the Github project. 7.5 Compute Window Aggregates You want to apply an aggregation (e.g. mean()) on a grouped table or within a rowwise operation like filter(): 7.5.1 Solution arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% left_join( arrow_table(starwars) %&gt;% group_by(hair_color) %&gt;% summarize(mean_height = mean(height, na.rm = TRUE)) ) %&gt;% filter(height &lt; mean_height) %&gt;% select(!mean_height) %&gt;% collect() ## # A tibble: 29 × 4 ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Luke Skywalker 172 77 blond ## 2 Leia Organa 150 49 brown ## 3 Beru Whitesun lars 165 75 brown ## 4 Wedge Antilles 170 77 brown ## 5 Yoda 66 17 white ## 6 Lobot 175 79 none ## 7 Ackbar 180 83 none ## 8 Wicket Systri Warrick 88 20 brown ## 9 Nien Nunb 160 68 none ## 10 Finis Valorum 170 NA blond ## # ℹ 19 more rows Or using to_duckdb() arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% to_duckdb() %&gt;% group_by(hair_color) %&gt;% filter(height &lt; mean(height, na.rm = TRUE)) %&gt;% to_arrow() %&gt;% collect() ## # A tibble: 29 × 4 ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Luke Skywalker 172 77 blond ## 2 Finis Valorum 170 NA blond ## 3 Yoda 66 17 white ## 4 Leia Organa 150 49 brown ## 5 Beru Whitesun lars 165 75 brown ## 6 Wedge Antilles 170 77 brown ## 7 Wicket Systri Warrick 88 20 brown ## 8 Cordé 157 NA brown ## 9 Dormé 165 NA brown ## 10 Padmé Amidala 165 45 brown ## # ℹ 19 more rows 7.5.2 Discusson Arrow does not support window functions, and pulls the data into R. For large tables, this sacrifices performance. arrow_table(starwars) %&gt;% select(1:4) %&gt;% filter(!is.na(hair_color)) %&gt;% group_by(hair_color) %&gt;% filter(height &lt; mean(height, na.rm = TRUE)) ## Warning: Expression height &lt; mean(height, na.rm = TRUE) not supported in Arrow; ## pulling data into R ## # A tibble: 29 × 4 ## # Groups: hair_color [5] ## name height mass hair_color ## &lt;chr&gt; &lt;int&gt; &lt;dbl&gt; &lt;chr&gt; ## 1 Luke Skywalker 172 77 blond ## 2 Leia Organa 150 49 brown ## 3 Beru Whitesun lars 165 75 brown ## 4 Wedge Antilles 170 77 brown ## 5 Yoda 66 17 white ## 6 Lobot 175 79 none ## 7 Ackbar 180 83 none ## 8 Wicket Systri Warrick 88 20 brown ## 9 Nien Nunb 160 68 none ## 10 Finis Valorum 170 NA blond ## # ℹ 19 more rows You can perform these window aggregate operations on Arrow tables by: Computing the aggregation separately, and joining the result Passing the data to DuckDB, and use the DuckDB query engine to perform the operations Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the Arrow blog post. "],["using-pyarrow-from-r.html", "8 Using PyArrow from R 8.1 Introduction 8.2 Create an Arrow object using PyArrow in R 8.3 Call a PyArrow function from R", " 8 Using PyArrow from R 8.1 Introduction For more information on using setting up and installing PyArrow to use in R, see the “Apache Arrow in Python and R with reticulate” vignette. 8.2 Create an Arrow object using PyArrow in R You want to use PyArrow to create an Arrow object in an R session. 8.2.1 Solution library(reticulate) pa &lt;- import(&quot;pyarrow&quot;) pyarrow_scalar &lt;- pa$scalar(42) pyarrow_scalar ## &lt;pyarrow.DoubleScalar: 42.0&gt; 8.3 Call a PyArrow function from R You want to call a PyArrow function from your R session. 8.3.1 Solution table_1 &lt;- arrow_table(mtcars[1:5,]) table_2 &lt;- arrow_table(mtcars[11:15,]) pa$concat_tables(tables = list(table_1, table_2)) %&gt;% collect() ## # A tibble: 10 × 11 ## mpg cyl disp hp drat wt qsec vs am gear carb ## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; ## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4 ## 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4 ## 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 ## 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1 ## 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2 ## 6 17.8 6 168. 123 3.92 3.44 18.9 1 0 4 4 ## 7 16.4 8 276. 180 3.07 4.07 17.4 0 0 3 3 ## 8 17.3 8 276. 180 3.07 3.73 17.6 0 0 3 3 ## 9 15.2 8 276. 180 3.07 3.78 18 0 0 3 3 ## 10 10.4 8 472 205 2.93 5.25 18.0 0 0 3 4 "],["flight.html", "9 Flight 9.1 Introduction 9.2 Connect to a Flight server 9.3 Send data to a Flight server 9.4 Check what resources exist on a Flight server 9.5 Retrieve data from a Flight server", " 9 Flight 9.1 Introduction Flight is a general-purpose client-server framework for high performance transport of large datasets over network interfaces, built as part of the Apache Arrow project. Flight allows for highly efficient data transfer as it: removes the need for serialization during data transfer allows for parallel data streaming is highly optimized to take advantage of Arrow’s columnar format. The arrow package provides methods for connecting to Flight RPC servers to send and receive data. It should be noted that the Flight implementation in the R package depends on PyArrow which is called via reticulate. This is quite different from the other capabilities in the R package, nearly all of which are all implemented directly. 9.2 Connect to a Flight server You want to connect to a Flight server running on a specified host and port. 9.2.1 Solution local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) 9.2.2 See also For an example of how to set up a Flight server from R, see the Flight vignette. 9.3 Send data to a Flight server You want to send data that you have in memory to a Flight server 9.3.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Send the data flight_put( local_client, data = airquality, path = &quot;pollution_data&quot; ) 9.4 Check what resources exist on a Flight server You want to see what paths are available on a Flight server. 9.4.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Retrieve path listing list_flights(local_client) # [1] &quot;pollution_data&quot; 9.5 Retrieve data from a Flight server You want to retrieve data on a Flight server from a specified path. 9.5.1 Solution # Connect to the Flight server local_client &lt;- flight_connect(host = &quot;127.0.0.1&quot;, port = 8089) # Retrieve data flight_get( local_client, &quot;pollution_data&quot; ) # Table # 153 rows x 6 columns # $Ozone &lt;int32&gt; # $Solar.R &lt;int32&gt; # $Wind &lt;double&gt; # $Temp &lt;int32&gt; # $Month &lt;int32&gt; # $Day &lt;int32&gt; # # See $metadata for additional Schema metadata "],["404.html", "Page not found", " Page not found The page you requested cannot be found (perhaps it was moved or renamed). You may want to try searching to find the page's new location, or use the table of contents to find the page you are looking for. "]]
diff --git a/r/using-pyarrow-from-r.html b/r/using-pyarrow-from-r.html
new file mode 100644
index 0000000..6581a13
--- /dev/null
+++ b/r/using-pyarrow-from-r.html
@@ -0,0 +1,534 @@
+<!DOCTYPE html>
+<html lang="" xml:lang="">
+<head>
+
+  <meta charset="utf-8" />
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>8 Using PyArrow from R | Apache Arrow R Cookbook</title>
+  <meta name="description" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  <meta name="generator" content="bookdown 0.36 and GitBook 2.6.7" />
+
+  <meta property="og:title" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  <meta property="og:type" content="book" />
+  
+  
+  
+
+  <meta name="twitter:card" content="summary" />
+  <meta name="twitter:title" content="8 Using PyArrow from R | Apache Arrow R Cookbook" />
+  
+  
+  
+
+
+
+
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+  
+  
+<link rel="prev" href="manipulating-data---tables.html"/>
+<link rel="next" href="flight.html"/>
+<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
+<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
+<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
+<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
+
+
+
+
+
+
+
+
+<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
+<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
+<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
+
+
+<style type="text/css">
+pre > code.sourceCode { white-space: pre; position: relative; }
+pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
+pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
+code.sourceCode > span { color: inherit; text-decoration: inherit; }
+pre.sourceCode { margin: 0; }
+@media screen {
+div.sourceCode { overflow: auto; }
+}
+@media print {
+pre > code.sourceCode { white-space: pre-wrap; }
+pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
+}
+pre.numberSource code
+  { counter-reset: source-line 0; }
+pre.numberSource code > span
+  { position: relative; left: -4em; counter-increment: source-line; }
+pre.numberSource code > span > a:first-child::before
+  { content: counter(source-line);
+    position: relative; left: -1em; text-align: right; vertical-align: baseline;
+    border: none; display: inline-block;
+    -webkit-touch-callout: none; -webkit-user-select: none;
+    -khtml-user-select: none; -moz-user-select: none;
+    -ms-user-select: none; user-select: none;
+    padding: 0 4px; width: 4em;
+    color: #aaaaaa;
+  }
+pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa;  padding-left: 4px; }
+div.sourceCode
+  {   }
+@media screen {
+pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
+}
+code span.al { color: #ff0000; font-weight: bold; } /* Alert */
+code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
+code span.at { color: #7d9029; } /* Attribute */
+code span.bn { color: #40a070; } /* BaseN */
+code span.bu { color: #008000; } /* BuiltIn */
+code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
+code span.ch { color: #4070a0; } /* Char */
+code span.cn { color: #880000; } /* Constant */
+code span.co { color: #60a0b0; font-style: italic; } /* Comment */
+code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
+code span.do { color: #ba2121; font-style: italic; } /* Documentation */
+code span.dt { color: #902000; } /* DataType */
+code span.dv { color: #40a070; } /* DecVal */
+code span.er { color: #ff0000; font-weight: bold; } /* Error */
+code span.ex { } /* Extension */
+code span.fl { color: #40a070; } /* Float */
+code span.fu { color: #06287e; } /* Function */
+code span.im { color: #008000; font-weight: bold; } /* Import */
+code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
+code span.kw { color: #007020; font-weight: bold; } /* Keyword */
+code span.op { color: #666666; } /* Operator */
+code span.ot { color: #007020; } /* Other */
+code span.pp { color: #bc7a00; } /* Preprocessor */
+code span.sc { color: #4070a0; } /* SpecialChar */
+code span.ss { color: #bb6688; } /* SpecialString */
+code span.st { color: #4070a0; } /* String */
+code span.va { color: #19177c; } /* Variable */
+code span.vs { color: #4070a0; } /* VerbatimString */
+code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
+</style>
+
+<style type="text/css">
+  
+  div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
+</style>
+
+</head>
+
+<body>
+
+
+
+  <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
+
+    <div class="book-summary">
+      <nav role="navigation">
+
+<ul class="summary">
+<li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Preface</a>
+<ul>
+<li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#what-is-arrow"><i class="fa fa-check"></i><b>1.1</b> What is Arrow?</a></li>
+<li class="chapter" data-level="1.2" data-path="index.html"><a href="index.html#alternative-resources"><i class="fa fa-check"></i><b>1.2</b> Alternative resources</a></li>
+</ul></li>
+<li class="chapter" data-level="2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html"><i class="fa fa-check"></i><b>2</b> Reading and Writing Data - Single Files</a>
+<ul>
+<li class="chapter" data-level="2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#introduction"><i class="fa fa-check"></i><b>2.1</b> Introduction</a></li>
+<li class="chapter" data-level="2.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-a-data-frame-to-an-arrow-table"><i class="fa fa-check"></i><b>2.2</b> Convert data from a data frame to an Arrow Table</a>
+<ul>
+<li class="chapter" data-level="2.2.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution"><i class="fa fa-check"></i><b>2.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.3" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#convert-data-from-an-arrow-table-to-a-data-frame"><i class="fa fa-check"></i><b>2.3</b> Convert data from an Arrow Table to a data frame</a>
+<ul>
+<li class="chapter" data-level="2.3.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-1"><i class="fa fa-check"></i><b>2.3.1</b> Solution</a></li>
+<li class="chapter" data-level="2.3.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion"><i class="fa fa-check"></i><b>2.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.4" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-parquet-file"><i class="fa fa-check"></i><b>2.4</b> Write a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.4.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-2"><i class="fa fa-check"></i><b>2.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.5" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file"><i class="fa fa-check"></i><b>2.5</b> Read a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.5.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-3"><i class="fa fa-check"></i><b>2.5.1</b> Solution</a></li>
+<li class="chapter" data-level="2.5.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-1"><i class="fa fa-check"></i><b>2.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.6" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-parquet-file-from-s3"><i class="fa fa-check"></i><b>2.6</b> Read a Parquet file from S3</a>
+<ul>
+<li class="chapter" data-level="2.6.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-4"><i class="fa fa-check"></i><b>2.6.1</b> Solution</a></li>
+<li class="chapter" data-level="2.6.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also"><i class="fa fa-check"></i><b>2.6.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.7" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#filter-columns-while-reading-a-parquet-file"><i class="fa fa-check"></i><b>2.7</b> Filter columns while reading a Parquet file</a>
+<ul>
+<li class="chapter" data-level="2.7.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-5"><i class="fa fa-check"></i><b>2.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.8" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-feather-v2arrow-ipc-file"><i class="fa fa-check"></i><b>2.8</b> Write a Feather V2/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.8.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-6"><i class="fa fa-check"></i><b>2.8.1</b> Solution</a></li>
+<li class="chapter" data-level="2.8.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-2"><i class="fa fa-check"></i><b>2.8.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="2.9" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-featherarrow-ipc-file"><i class="fa fa-check"></i><b>2.9</b> Read a Feather/Arrow IPC file</a>
+<ul>
+<li class="chapter" data-level="2.9.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-7"><i class="fa fa-check"></i><b>2.9.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.10" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.10</b> Write streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.10.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-8"><i class="fa fa-check"></i><b>2.10.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.11" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-streaming-arrow-ipc-files"><i class="fa fa-check"></i><b>2.11</b> Read streaming Arrow IPC files</a>
+<ul>
+<li class="chapter" data-level="2.11.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-9"><i class="fa fa-check"></i><b>2.11.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.12" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-csv-file"><i class="fa fa-check"></i><b>2.12</b> Write a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.12.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-10"><i class="fa fa-check"></i><b>2.12.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.13" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-csv-file"><i class="fa fa-check"></i><b>2.13</b> Read a CSV file</a>
+<ul>
+<li class="chapter" data-level="2.13.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-11"><i class="fa fa-check"></i><b>2.13.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.14" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-a-json-file"><i class="fa fa-check"></i><b>2.14</b> Read a JSON file</a>
+<ul>
+<li class="chapter" data-level="2.14.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-12"><i class="fa fa-check"></i><b>2.14.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="2.15" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#write-a-compressed-single-data-file"><i class="fa fa-check"></i><b>2.15</b> Write a compressed single data file</a>
+<ul>
+<li class="chapter" data-level="2.15.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-13"><i class="fa fa-check"></i><b>2.15.1</b> Solution</a></li>
+<li class="chapter" data-level="2.15.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#see-also-1"><i class="fa fa-check"></i><b>2.15.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="2.16" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#read-compressed-data"><i class="fa fa-check"></i><b>2.16</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="2.16.1" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#solution-14"><i class="fa fa-check"></i><b>2.16.1</b> Solution</a></li>
+<li class="chapter" data-level="2.16.2" data-path="reading-and-writing-data---single-files.html"><a href="reading-and-writing-data---single-files.html#discussion-3"><i class="fa fa-check"></i><b>2.16.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html"><i class="fa fa-check"></i><b>3</b> Reading and Writing Data - Multiple Files</a>
+<ul>
+<li class="chapter" data-level="3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#introduction-1"><i class="fa fa-check"></i><b>3.1</b> Introduction</a></li>
+<li class="chapter" data-level="3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---parquet"><i class="fa fa-check"></i><b>3.2</b> Write data to disk - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.2.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-15"><i class="fa fa-check"></i><b>3.2.1</b> Solution</a></li>
+<li class="chapter" data-level="3.2.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-4"><i class="fa fa-check"></i><b>3.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.3" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-partitioned-data---parquet"><i class="fa fa-check"></i><b>3.3</b> Write partitioned data - Parquet</a>
+<ul>
+<li class="chapter" data-level="3.3.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-16"><i class="fa fa-check"></i><b>3.3.1</b> Solution</a></li>
+<li class="chapter" data-level="3.3.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-5"><i class="fa fa-check"></i><b>3.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.4" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-partitioned-data"><i class="fa fa-check"></i><b>3.4</b> Read partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.4.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-17"><i class="fa fa-check"></i><b>3.4.1</b> Solution</a></li>
+<li class="chapter" data-level="3.4.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-6"><i class="fa fa-check"></i><b>3.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.5" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---featherarrow-ipc-format"><i class="fa fa-check"></i><b>3.5</b> Write data to disk - Feather/Arrow IPC format</a>
+<ul>
+<li class="chapter" data-level="3.5.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-18"><i class="fa fa-check"></i><b>3.5.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.6" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-featherarrow-ipc-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.6</b> Read in Feather/Arrow IPC data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.6.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-19"><i class="fa fa-check"></i><b>3.6.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.7" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-data-to-disk---csv-format"><i class="fa fa-check"></i><b>3.7</b> Write data to disk - CSV format</a>
+<ul>
+<li class="chapter" data-level="3.7.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-20"><i class="fa fa-check"></i><b>3.7.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.8" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-csv-data-as-an-arrow-dataset"><i class="fa fa-check"></i><b>3.8</b> Read in CSV data as an Arrow Dataset</a>
+<ul>
+<li class="chapter" data-level="3.8.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-21"><i class="fa fa-check"></i><b>3.8.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="3.9" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-in-a-csv-dataset-no-headers"><i class="fa fa-check"></i><b>3.9</b> Read in a CSV dataset (no headers)</a>
+<ul>
+<li class="chapter" data-level="3.9.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-22"><i class="fa fa-check"></i><b>3.9.1</b> Solution</a></li>
+<li class="chapter" data-level="3.9.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-7"><i class="fa fa-check"></i><b>3.9.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.10" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#write-compressed-partitioned-data"><i class="fa fa-check"></i><b>3.10</b> Write compressed partitioned data</a>
+<ul>
+<li class="chapter" data-level="3.10.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-23"><i class="fa fa-check"></i><b>3.10.1</b> Solution</a></li>
+<li class="chapter" data-level="3.10.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-8"><i class="fa fa-check"></i><b>3.10.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="3.11" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#read-compressed-data-1"><i class="fa fa-check"></i><b>3.11</b> Read compressed data</a>
+<ul>
+<li class="chapter" data-level="3.11.1" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#solution-24"><i class="fa fa-check"></i><b>3.11.1</b> Solution</a></li>
+<li class="chapter" data-level="3.11.2" data-path="reading-and-writing-data---multiple-files.html"><a href="reading-and-writing-data---multiple-files.html#discussion-9"><i class="fa fa-check"></i><b>3.11.2</b> Discussion</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html"><i class="fa fa-check"></i><b>4</b> Creating Arrow Objects</a>
+<ul>
+<li class="chapter" data-level="4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-an-arrow-array-from-an-r-object"><i class="fa fa-check"></i><b>4.1</b> Create an Arrow Array from an R object</a>
+<ul>
+<li class="chapter" data-level="4.1.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-25"><i class="fa fa-check"></i><b>4.1.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.2" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#create-a-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>4.2</b> Create a Arrow Table from an R object</a>
+<ul>
+<li class="chapter" data-level="4.2.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-26"><i class="fa fa-check"></i><b>4.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.3" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#view-the-contents-of-an-arrow-table-or-recordbatch"><i class="fa fa-check"></i><b>4.3</b> View the contents of an Arrow Table or RecordBatch</a>
+<ul>
+<li class="chapter" data-level="4.3.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-27"><i class="fa fa-check"></i><b>4.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="4.4" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#manually-create-a-recordbatch-from-an-r-object."><i class="fa fa-check"></i><b>4.4</b> Manually create a RecordBatch from an R object.</a>
+<ul>
+<li class="chapter" data-level="4.4.1" data-path="creating-arrow-objects.html"><a href="creating-arrow-objects.html#solution-28"><i class="fa fa-check"></i><b>4.4.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="5" data-path="defining-data-types.html"><a href="defining-data-types.html"><i class="fa fa-check"></i><b>5</b> Defining Data Types</a>
+<ul>
+<li class="chapter" data-level="5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#introduction-2"><i class="fa fa-check"></i><b>5.1</b> Introduction</a></li>
+<li class="chapter" data-level="5.2" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-an-existing-arrow-array"><i class="fa fa-check"></i><b>5.2</b> Update data type of an existing Arrow Array</a>
+<ul>
+<li class="chapter" data-level="5.2.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-29"><i class="fa fa-check"></i><b>5.2.1</b> Solution</a></li>
+<li class="chapter" data-level="5.2.2" data-path="defining-data-types.html"><a href="defining-data-types.html#discussion-10"><i class="fa fa-check"></i><b>5.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.3" data-path="defining-data-types.html"><a href="defining-data-types.html#update-data-type-of-a-field-in-an-existing-arrow-table"><i class="fa fa-check"></i><b>5.3</b> Update data type of a field in an existing Arrow Table</a>
+<ul>
+<li class="chapter" data-level="5.3.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-30"><i class="fa fa-check"></i><b>5.3.1</b> Solution</a></li>
+<li class="chapter" data-level="5.3.2" data-path="defining-data-types.html"><a href="defining-data-types.html#no-compat-type"><i class="fa fa-check"></i><b>5.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="5.4" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-creating-an-arrow-table-from-an-r-object"><i class="fa fa-check"></i><b>5.4</b> Specify data types when creating an Arrow table from an R object</a>
+<ul>
+<li class="chapter" data-level="5.4.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-31"><i class="fa fa-check"></i><b>5.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="5.5" data-path="defining-data-types.html"><a href="defining-data-types.html#specify-data-types-when-reading-in-files"><i class="fa fa-check"></i><b>5.5</b> Specify data types when reading in files</a>
+<ul>
+<li class="chapter" data-level="5.5.1" data-path="defining-data-types.html"><a href="defining-data-types.html#solution-32"><i class="fa fa-check"></i><b>5.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html"><i class="fa fa-check"></i><b>6</b> Manipulating Data - Arrays</a>
+<ul>
+<li class="chapter" data-level="6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#introduction-3"><i class="fa fa-check"></i><b>6.1</b> Introduction</a></li>
+<li class="chapter" data-level="6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#filter-by-values-matching-a-predicate-or-mask"><i class="fa fa-check"></i><b>6.2</b> Filter by values matching a predicate or mask</a>
+<ul>
+<li class="chapter" data-level="6.2.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-33"><i class="fa fa-check"></i><b>6.2.1</b> Solution</a></li>
+<li class="chapter" data-level="6.2.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-11"><i class="fa fa-check"></i><b>6.2.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#compute-meanminmax-etc-value-of-an-array"><i class="fa fa-check"></i><b>6.3</b> Compute Mean/Min/Max, etc value of an Array</a>
+<ul>
+<li class="chapter" data-level="6.3.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-34"><i class="fa fa-check"></i><b>6.3.1</b> Solution</a></li>
+<li class="chapter" data-level="6.3.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-12"><i class="fa fa-check"></i><b>6.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.4" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#count-occurrences-of-elements-in-an-array"><i class="fa fa-check"></i><b>6.4</b> Count occurrences of elements in an Array</a>
+<ul>
+<li class="chapter" data-level="6.4.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-35"><i class="fa fa-check"></i><b>6.4.1</b> Solution</a></li>
+<li class="chapter" data-level="6.4.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-13"><i class="fa fa-check"></i><b>6.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.5" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#apply-arithmetic-functions-to-arrays."><i class="fa fa-check"></i><b>6.5</b> Apply arithmetic functions to Arrays.</a>
+<ul>
+<li class="chapter" data-level="6.5.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-36"><i class="fa fa-check"></i><b>6.5.1</b> Solution</a></li>
+<li class="chapter" data-level="6.5.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-14"><i class="fa fa-check"></i><b>6.5.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="6.6" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#call-arrow-compute-functions-directly-on-arrays"><i class="fa fa-check"></i><b>6.6</b> Call Arrow compute functions directly on Arrays</a>
+<ul>
+<li class="chapter" data-level="6.6.1" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#solution-37"><i class="fa fa-check"></i><b>6.6.1</b> Solution</a></li>
+<li class="chapter" data-level="6.6.2" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#discussion-15"><i class="fa fa-check"></i><b>6.6.2</b> Discussion</a></li>
+<li class="chapter" data-level="6.6.3" data-path="manipulating-data---arrays.html"><a href="manipulating-data---arrays.html#see-also-2"><i class="fa fa-check"></i><b>6.6.3</b> See also</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="7" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html"><i class="fa fa-check"></i><b>7</b> Manipulating Data - Tables</a>
+<ul>
+<li class="chapter" data-level="7.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#introduction-4"><i class="fa fa-check"></i><b>7.1</b> Introduction</a></li>
+<li class="chapter" data-level="7.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.2</b> Use dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.2.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-38"><i class="fa fa-check"></i><b>7.2.1</b> Solution</a></li>
+<li class="chapter" data-level="7.2.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-16"><i class="fa fa-check"></i><b>7.2.2</b> Discussion</a></li>
+<li class="chapter" data-level="7.2.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#see-also-3"><i class="fa fa-check"></i><b>7.2.3</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="7.3" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-r-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.3</b> Use R functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.3.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-39"><i class="fa fa-check"></i><b>7.3.1</b> Solution</a></li>
+<li class="chapter" data-level="7.3.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-17"><i class="fa fa-check"></i><b>7.3.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.4" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#use-arrow-functions-in-dplyr-verbs-in-arrow"><i class="fa fa-check"></i><b>7.4</b> Use Arrow functions in dplyr verbs in Arrow</a>
+<ul>
+<li class="chapter" data-level="7.4.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-40"><i class="fa fa-check"></i><b>7.4.1</b> Solution</a></li>
+<li class="chapter" data-level="7.4.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discussion-18"><i class="fa fa-check"></i><b>7.4.2</b> Discussion</a></li>
+</ul></li>
+<li class="chapter" data-level="7.5" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#compute-window-aggregates"><i class="fa fa-check"></i><b>7.5</b> Compute Window Aggregates</a>
+<ul>
+<li class="chapter" data-level="7.5.1" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#solution-41"><i class="fa fa-check"></i><b>7.5.1</b> Solution</a></li>
+<li class="chapter" data-level="7.5.2" data-path="manipulating-data---tables.html"><a href="manipulating-data---tables.html#discusson"><i class="fa fa-check"></i><b>7.5.2</b> Discusson</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="8" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html"><i class="fa fa-check"></i><b>8</b> Using PyArrow from R</a>
+<ul>
+<li class="chapter" data-level="8.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#introduction-5"><i class="fa fa-check"></i><b>8.1</b> Introduction</a></li>
+<li class="chapter" data-level="8.2" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r"><i class="fa fa-check"></i><b>8.2</b> Create an Arrow object using PyArrow in R</a>
+<ul>
+<li class="chapter" data-level="8.2.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-42"><i class="fa fa-check"></i><b>8.2.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="8.3" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r"><i class="fa fa-check"></i><b>8.3</b> Call a PyArrow function from R</a>
+<ul>
+<li class="chapter" data-level="8.3.1" data-path="using-pyarrow-from-r.html"><a href="using-pyarrow-from-r.html#solution-43"><i class="fa fa-check"></i><b>8.3.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+<li class="chapter" data-level="9" data-path="flight.html"><a href="flight.html"><i class="fa fa-check"></i><b>9</b> Flight</a>
+<ul>
+<li class="chapter" data-level="9.1" data-path="flight.html"><a href="flight.html#introduction-6"><i class="fa fa-check"></i><b>9.1</b> Introduction</a></li>
+<li class="chapter" data-level="9.2" data-path="flight.html"><a href="flight.html#connect-to-a-flight-server"><i class="fa fa-check"></i><b>9.2</b> Connect to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.2.1" data-path="flight.html"><a href="flight.html#solution-44"><i class="fa fa-check"></i><b>9.2.1</b> Solution</a></li>
+<li class="chapter" data-level="9.2.2" data-path="flight.html"><a href="flight.html#see-also-4"><i class="fa fa-check"></i><b>9.2.2</b> See also</a></li>
+</ul></li>
+<li class="chapter" data-level="9.3" data-path="flight.html"><a href="flight.html#send-data-to-a-flight-server"><i class="fa fa-check"></i><b>9.3</b> Send data to a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.3.1" data-path="flight.html"><a href="flight.html#solution-45"><i class="fa fa-check"></i><b>9.3.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.4" data-path="flight.html"><a href="flight.html#check-what-resources-exist-on-a-flight-server"><i class="fa fa-check"></i><b>9.4</b> Check what resources exist on a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.4.1" data-path="flight.html"><a href="flight.html#solution-46"><i class="fa fa-check"></i><b>9.4.1</b> Solution</a></li>
+</ul></li>
+<li class="chapter" data-level="9.5" data-path="flight.html"><a href="flight.html#retrieve-data-from-a-flight-server"><i class="fa fa-check"></i><b>9.5</b> Retrieve data from a Flight server</a>
+<ul>
+<li class="chapter" data-level="9.5.1" data-path="flight.html"><a href="flight.html#solution-47"><i class="fa fa-check"></i><b>9.5.1</b> Solution</a></li>
+</ul></li>
+</ul></li>
+</ul>
+
+      </nav>
+    </div>
+
+    <div class="book-body">
+      <div class="body-inner">
+        <div class="book-header" role="navigation">
+          <h1>
+            <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Apache Arrow R Cookbook</a>
+          </h1>
+        </div>
+
+        <div class="page-wrapper" tabindex="-1" role="main">
+          <div class="page-inner">
+
+            <section class="normal" id="section-">
+<div id="using-pyarrow-from-r" class="section level1 hasAnchor" number="8">
+<h1><span class="header-section-number">8</span> Using PyArrow from R<a href="using-pyarrow-from-r.html#using-pyarrow-from-r" class="anchor-section" aria-label="Anchor link to header"></a></h1>
+<div id="introduction-5" class="section level2 hasAnchor" number="8.1">
+<h2><span class="header-section-number">8.1</span> Introduction<a href="using-pyarrow-from-r.html#introduction-5" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>For more information on using setting up and installing PyArrow to use in R, see
+<a href="https://arrow.apache.org/docs/r/articles/python.html">the “Apache Arrow in Python and R with reticulate” vignette</a>.</p>
+</div>
+<div id="create-an-arrow-object-using-pyarrow-in-r" class="section level2 hasAnchor" number="8.2">
+<h2><span class="header-section-number">8.2</span> Create an Arrow object using PyArrow in R<a href="using-pyarrow-from-r.html#create-an-arrow-object-using-pyarrow-in-r" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to use PyArrow to create an Arrow object in an R session.</p>
+<div id="solution-42" class="section level3 hasAnchor" number="8.2.1">
+<h3><span class="header-section-number">8.2.1</span> Solution<a href="using-pyarrow-from-r.html#solution-42" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb129"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb129-1"><a href="using-pyarrow-from-r.html#cb129-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(reticulate)</span>
+<span id="cb129-2"><a href="using-pyarrow-from-r.html#cb129-2" aria-hidden="true" tabindex="-1"></a>pa <span class="ot">&lt;-</span> <span class="fu">import</span>(<span class="st">&quot;pyarrow&quot;</span>)</span>
+<span id="cb129-3"><a href="using-pyarrow-from-r.html#cb129-3" aria-hidden="true" tabindex="-1"></a>pyarrow_scalar <span class="ot">&lt;-</span> pa<span class="sc">$</span><span class="fu">scalar</span>(<span class="dv">42</span>)</span>
+<span id="cb129-4"><a href="using-pyarrow-from-r.html#cb129-4" aria-hidden="true" tabindex="-1"></a>pyarrow_scalar</span></code></pre></div>
+<pre><code>## &lt;pyarrow.DoubleScalar: 42.0&gt;</code></pre>
+</div>
+</div>
+<div id="call-a-pyarrow-function-from-r" class="section level2 hasAnchor" number="8.3">
+<h2><span class="header-section-number">8.3</span> Call a PyArrow function from R<a href="using-pyarrow-from-r.html#call-a-pyarrow-function-from-r" class="anchor-section" aria-label="Anchor link to header"></a></h2>
+<p>You want to call a PyArrow function from your R session.</p>
+<div id="solution-43" class="section level3 hasAnchor" number="8.3.1">
+<h3><span class="header-section-number">8.3.1</span> Solution<a href="using-pyarrow-from-r.html#solution-43" class="anchor-section" aria-label="Anchor link to header"></a></h3>
+<div class="sourceCode" id="cb131"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb131-1"><a href="using-pyarrow-from-r.html#cb131-1" aria-hidden="true" tabindex="-1"></a>table_1 <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(mtcars[<span class="dv">1</span><span class="sc">:</span><span class="dv">5</span>,])</span>
+<span id="cb131-2"><a href="using-pyarrow-from-r.html#cb131-2" aria-hidden="true" tabindex="-1"></a>table_2 <span class="ot">&lt;-</span> <span class="fu">arrow_table</span>(mtcars[<span class="dv">11</span><span class="sc">:</span><span class="dv">15</span>,])</span>
+<span id="cb131-3"><a href="using-pyarrow-from-r.html#cb131-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb131-4"><a href="using-pyarrow-from-r.html#cb131-4" aria-hidden="true" tabindex="-1"></a>pa<span class="sc">$</span><span class="fu">concat_tables</span>(<span class="at">tables =</span> <span class="fu">list</span>(table_1, table_2)) <span class="sc">%&gt;%</span></span>
+<span id="cb131-5"><a href="using-pyarrow-from-r.html#cb131-5" aria-hidden="true" tabindex="-1"></a>  <span class="fu">collect</span>()</span></code></pre></div>
+<pre><code>## # A tibble: 10 × 11
+##      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
+##    &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt;
+##  1  21       6  160    110  3.9   2.62  16.5     0     1     4     4
+##  2  21       6  160    110  3.9   2.88  17.0     0     1     4     4
+##  3  22.8     4  108     93  3.85  2.32  18.6     1     1     4     1
+##  4  21.4     6  258    110  3.08  3.22  19.4     1     0     3     1
+##  5  18.7     8  360    175  3.15  3.44  17.0     0     0     3     2
+##  6  17.8     6  168.   123  3.92  3.44  18.9     1     0     4     4
+##  7  16.4     8  276.   180  3.07  4.07  17.4     0     0     3     3
+##  8  17.3     8  276.   180  3.07  3.73  17.6     0     0     3     3
+##  9  15.2     8  276.   180  3.07  3.78  18       0     0     3     3
+## 10  10.4     8  472    205  2.93  5.25  18.0     0     0     3     4</code></pre>
+
+<!---
+  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.
+-->
+</div>
+</div>
+</div>
+            </section>
+
+          </div>
+        </div>
+      </div>
+<a href="manipulating-data---tables.html" class="navigation navigation-prev " aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
+<a href="flight.html" class="navigation navigation-next " aria-label="Next page"><i class="fa fa-angle-right"></i></a>
+    </div>
+  </div>
+<script src="libs/gitbook-2.6.7/js/app.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
+<script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
+<script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
+<script>
+gitbook.require(["gitbook"], function(gitbook) {
+gitbook.start({
+"sharing": {
+"github": false,
+"facebook": true,
+"twitter": true,
+"linkedin": false,
+"weibo": false,
+"instapaper": false,
+"vk": false,
+"whatsapp": false,
+"all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
+},
+"fontsettings": {
+"theme": "white",
+"family": "sans",
+"size": 2
+},
+"edit": {
+"link": "https://github.com/apache/arrow-cookbook/edit/main/r/content/python.Rmd",
+"text": "Edit"
+},
+"history": {
+"link": null,
+"text": null
+},
+"view": {
+"link": null,
+"text": null
+},
+"download": null,
+"search": {
+"engine": "fuse",
+"options": null
+},
+"toc": {
+"collapse": "subsection"
+}
+});
+});
+</script>
+
+</body>
+
+</html>