# Path: formulaic/materializers/arrow.py
# class ArrowMaterializer(PandasMaterializer):
# 
#     REGISTER_NAME = "arrow"
#     REGISTER_INPUTS = ("pyarrow.lib.Table",)
# 
#     @override
#     def _init(self):
#         self.__data_context = LazyArrowTableProxy(self.data)
# 
#     @override
#     @property
#     def data_context(self):
#         return self.__data_context


import numpy
import pandas
import pytest
import scipy.sparse as spsparse
        import pyarrow
        import pyarrow
        import pyarrow
from formulaic.materializers import ArrowMaterializer
ARROW_TESTS = {
    "a": (["Intercept", "a"], ["Intercept", "a"]),
    "A": (
        ["Intercept", "A[T.b]", "A[T.c]"],
        ["Intercept", "A[T.a]", "A[T.b]", "A[T.c]"],
    ),
    "C(A)": (
        ["Intercept", "C(A)[T.b]", "C(A)[T.c]"],
        ["Intercept", "C(A)[T.a]", "C(A)[T.b]", "C(A)[T.c]"],
    ),
    "a:A": (
        ["Intercept", "A[T.a]:a", "A[T.b]:a", "A[T.c]:a"],
        ["Intercept", "A[T.a]:a", "A[T.b]:a", "A[T.c]:a"],
    ),
}


@pytest.mark.skipif(
    check_for_pyarrow(), reason="PyArrow is required to run the arrow tests."
)
class TestArrowMaterializer:
    @pytest.fixture
    def data(self):

        return pyarrow.Table.from_pandas(
            pandas.DataFrame({"a": [1, 2, 3], "A": ["a", "b", "c"]})
        )

    @pytest.fixture
    def materializer(self, data):

# Path: formulaic/materializers/arrow.py
# class ArrowMaterializer(PandasMaterializer):
# 
#     REGISTER_NAME = "arrow"
#     REGISTER_INPUTS = ("pyarrow.lib.Table",)
# 
#     @override
#     def _init(self):
#         self.__data_context = LazyArrowTableProxy(self.data)
# 
#     @override
#     @property
#     def data_context(self):
#         return self.__data_context


# Path: tests/materializers/test_arrow.py
import numpy
import pandas
import pytest
import scipy.sparse as spsparse
        import pyarrow
        import pyarrow
        import pyarrow
from formulaic.materializers import ArrowMaterializer

ARROW_TESTS = {
    "a": (["Intercept", "a"], ["Intercept", "a"]),
    "A": (
        ["Intercept", "A[T.b]", "A[T.c]"],
        ["Intercept", "A[T.a]", "A[T.b]", "A[T.c]"],
    ),
    "C(A)": (
        ["Intercept", "C(A)[T.b]", "C(A)[T.c]"],
        ["Intercept", "C(A)[T.a]", "C(A)[T.b]", "C(A)[T.c]"],
    ),
    "a:A": (
        ["Intercept", "A[T.a]:a", "A[T.b]:a", "A[T.c]:a"],
        ["Intercept", "A[T.a]:a", "A[T.b]:a", "A[T.c]:a"],
    ),
}


@pytest.mark.skipif(
    check_for_pyarrow(), reason="PyArrow is required to run the arrow tests."
)
class TestArrowMaterializer:
    @pytest.fixture
    def data(self):

        return pyarrow.Table.from_pandas(
            pandas.DataFrame({"a": [1, 2, 3], "A": ["a", "b", "c"]})
        )

    @pytest.fixture
    def materializer(self, data):

        return ArrowMaterializer(data)