graviti.paging.wrapper
#
PyArrow array wrapper related class.
Module Contents#
Classes#
The class decorator to connect pyarrow type and the pyarrow array wrapper. |
|
The wrapper of pyarrow scalar. |
|
The wrapper of pyarrow array. |
|
The wrapper of pyarrow StructScalar to make it case insensitive. |
|
The wrapper of pyarrow StructArray to make it case insensitive. |
|
The wrapper of pyarrow ListScalar to make it case insensitive. |
|
The wrapper of pyarrow ListArray to make it case insensitive. |
- class graviti.paging.wrapper.WrapperRegister(pyarrow_type_id)[source]#
The class decorator to connect pyarrow type and the pyarrow array wrapper.
- Parameters
pyarrow_type_id (int) – The PyArrow type id.
- classmethod get(cls, pyarrow_type_id)[source]#
Get the corresponding registered pyarrow array wrapper.
- Parameters
pyarrow_type_id (int) – The PyArrow type id.
- Returns
The corresponding registered pyarrow array wrapper.
- Return type
Type[ArrayWrapper]
- class graviti.paging.wrapper.ScalarWrapper(scalar)[source]#
The wrapper of pyarrow scalar.
- Parameters
scalar (pyarrow.scalar) – The PyArrow scalar needs to be wrapped.
- class graviti.paging.wrapper.ArrayWrapper(array)[source]#
The wrapper of pyarrow array.
- Parameters
array (pyarrow.Array) – The PyArrow array needs to be wrapped.
- class graviti.paging.wrapper.StructScalarWrapper(scalar)[source]#
Bases:
ScalarWrapper
The wrapper of pyarrow StructScalar to make it case insensitive.
- Parameters
scalar (pyarrow.StructScalar) – The PyArrow StructScalar needs to be wrapped.
- classmethod from_wrapper(cls, scalar, wrappers)[source]#
Create StructScalarWrapper instance by inputing scalar and wrappers.
- Parameters
scalar (pyarrow.ListScalar) – The PyArrow StructScalar needs to be wrapped.
wrappers (Dict[str, Type[ArrayWrapper]]) – The wrappers of the input scalar.
cls (Type[_S]) –
- Returns
The StructScalarWrapper instance created by the input scalar and wrapper.
- Return type
_S
- class graviti.paging.wrapper.StructArrayWrapper(array)[source]#
Bases:
ArrayWrapper
The wrapper of pyarrow StructArray to make it case insensitive.
- Parameters
array (pyarrow.StringArray) – The PyArrow StructArray instance needs to be wrapped.
- class graviti.paging.wrapper.ListScalarWrapper(scalar)[source]#
Bases:
ScalarWrapper
The wrapper of pyarrow ListScalar to make it case insensitive.
- Parameters
scalar (pyarrow.ListScalar) – The PyArrow ListScalar instance needs to be wrapped.
- classmethod from_wrapper(cls, scalar, wrapper)[source]#
Create ListScalarWrapper instance by inputing scalar and wrapper.
- Parameters
scalar (pyarrow.ListScalar) – The PyArrow ListScalar instance needs to be wrapped.
wrapper (Type[ArrayWrapper]) – The wrapper of the input scalar.
cls (Type[_LS]) –
- Returns
The ListScalarWrapper instance created by the input scalar and wrapper.
- Return type
_LS
- class graviti.paging.wrapper.ListArrayWrapper(array)[source]#
Bases:
ArrayWrapper
The wrapper of pyarrow ListArray to make it case insensitive.
- Parameters
array (pyarrow.ListArray) – The PyArrow ListScalar instance needs to be wrapped.
- classmethod from_wrapper(cls, array, wrapper)[source]#
Create ListScalarWrapper instance by inputing scalar and wrapper.
- Parameters
array (pyarrow.ListArray) – The PyArrow ListArray instance needs to be wrapped.
wrapper (Type[ArrayWrapper]) – The wrapper of the input array.
cls (Type[_LA]) –
- Returns
The ListScalarWrapper instance created by the input scalar and wrapper.
- Return type
_LA