Skip to content

Commit 6d726a2

Browse files
authored
feat: override new patterns for func repeat and nulls (zen-xu#200)
* fix: reexport decimal64 array and decimal128 array * feat: override new patterns for func `repeat` and `nulls`
1 parent b71796a commit 6d726a2

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

pyarrow-stubs/__init__.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ from pyarrow.lib import (
168168
Time64Array,
169169
DurationArray,
170170
MonthDayNanoIntervalArray,
171+
Decimal32Array,
172+
Decimal64Array,
171173
Decimal128Array,
172174
Decimal256Array,
173175
StructArray,
@@ -504,6 +506,8 @@ __all__ = [
504506
"Time64Array",
505507
"DurationArray",
506508
"MonthDayNanoIntervalArray",
509+
"Decimal32Array",
510+
"Decimal64Array",
507511
"Decimal128Array",
508512
"Decimal256Array",
509513
"StructArray",
@@ -531,6 +535,8 @@ __all__ = [
531535
"HalfFloatScalar",
532536
"FloatScalar",
533537
"DoubleScalar",
538+
"Decimal32Scalar",
539+
"Decimal64Scalar",
534540
"Decimal128Scalar",
535541
"Decimal256Scalar",
536542
"ListScalar",

pyarrow-stubs/__lib_pxi/array.pyi

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,30 @@ def nulls(
833833
memory_pool: MemoryPool | None = None,
834834
) -> FixedShapeTensorArray: ...
835835
@overload
836+
def nulls(
837+
size: int,
838+
types: types.Bool8Type,
839+
memory_pool: MemoryPool | None = None,
840+
) -> Bool8Array: ...
841+
@overload
842+
def nulls(
843+
size: int,
844+
types: types.UuidType,
845+
memory_pool: MemoryPool | None = None,
846+
) -> UuidArray: ...
847+
@overload
848+
def nulls(
849+
size: int,
850+
types: types.JsonType,
851+
memory_pool: MemoryPool | None = None,
852+
) -> JsonArray: ...
853+
@overload
854+
def nulls(
855+
size: int,
856+
types: types.OpaqueType,
857+
memory_pool: MemoryPool | None = None,
858+
) -> OpaqueArray: ...
859+
@overload
836860
def nulls(
837861
size: int,
838862
types: types.ExtensionType,
@@ -891,6 +915,14 @@ def repeat(
891915
value: float | scalar.DoubleScalar, size: int, memory_pool: MemoryPool | None = None
892916
) -> DoubleArray: ...
893917
@overload
918+
def repeat(
919+
value: Decimal | scalar.Decimal32Scalar, size: int, memory_pool: MemoryPool | None = None
920+
) -> Decimal32Array: ...
921+
@overload
922+
def repeat(
923+
value: Decimal | scalar.Decimal64Scalar, size: int, memory_pool: MemoryPool | None = None
924+
) -> Decimal64Array: ...
925+
@overload
894926
def repeat(
895927
value: Decimal | scalar.Decimal128Scalar, size: int, memory_pool: MemoryPool | None = None
896928
) -> Decimal128Array: ...
@@ -1037,6 +1069,30 @@ def repeat(
10371069
memory_pool: MemoryPool | None = None,
10381070
) -> FixedShapeTensorArray: ...
10391071
@overload
1072+
def repeat(
1073+
value: scalar.Bool8Scalar,
1074+
size: int,
1075+
memory_pool: MemoryPool | None = None,
1076+
) -> Bool8Array: ...
1077+
@overload
1078+
def repeat(
1079+
value: scalar.UuidScalar,
1080+
size: int,
1081+
memory_pool: MemoryPool | None = None,
1082+
) -> UuidArray: ...
1083+
@overload
1084+
def repeat(
1085+
value: scalar.JsonScalar,
1086+
size: int,
1087+
memory_pool: MemoryPool | None = None,
1088+
) -> JsonArray: ...
1089+
@overload
1090+
def repeat(
1091+
value: scalar.OpaqueScalar,
1092+
size: int,
1093+
memory_pool: MemoryPool | None = None,
1094+
) -> OpaqueArray: ...
1095+
@overload
10401096
def repeat(
10411097
value: scalar.ExtensionScalar,
10421098
size: int,
@@ -1660,6 +1716,8 @@ __all__ = [
16601716
"FloatArray",
16611717
"DoubleArray",
16621718
"FixedSizeBinaryArray",
1719+
"Decimal32Array",
1720+
"Decimal64Array",
16631721
"Decimal128Array",
16641722
"Decimal256Array",
16651723
"BaseListArray",

0 commit comments

Comments
 (0)