diff --git a/csrc/velox/_torcharrow.pyi b/csrc/velox/_torcharrow.pyi index 6e72b7fc1..a66b0d490 100644 --- a/csrc/velox/_torcharrow.pyi +++ b/csrc/velox/_torcharrow.pyi @@ -22,7 +22,7 @@ __all__ = [ "ConstantColumnBIGINT", "ConstantColumnBOOLEAN", "ConstantColumnDOUBLE", -"ConstantColumnREAL", +"ConstantColumnINTEGER", "ConstantColumnSMALLINT", "ConstantColumnTINYINT", "ConstantColumnVARCHAR", @@ -34,6 +34,7 @@ __all__ = [ "FlatColumnSMALLINT", "FlatColumnTINYINT", "FlatColumnVARCHAR", +"GPT2BPEEncoder", "MapColumn", "NotAppendableException", "RowColumn", @@ -41,14 +42,15 @@ __all__ = [ "SimpleColumnBOOLEAN", "SimpleColumnDOUBLE", "SimpleColumnINTEGER", -"ConstantColumnINTEGER", "SimpleColumnREAL", +"ConstantColumnREAL", "SimpleColumnSMALLINT", "SimpleColumnTINYINT", "SimpleColumnVARCHAR", "TypeKind", "VeloxType", "VeloxArrayType", +"VeloxFixedArrayType", "VeloxMapType", "VeloxRowType", "VeloxType_BIGINT", @@ -59,6 +61,7 @@ __all__ = [ "VeloxType_SMALLINT", "VeloxType_TINYINT", "VeloxType_VARCHAR", +"Vocab", "fb_SentencePiece", "Column", "ConstantColumn", @@ -66,6 +69,7 @@ __all__ = [ "_populate_dense_features_nopresence", "factory_udf_dispatch", "generic_udf_dispatch", +"is_built_with_torch", "ARRAY", "BIGINT", "BOOLEAN", @@ -131,9 +135,9 @@ class ConstantColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: handle) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -147,25 +151,25 @@ class ConstantColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... - @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gt(self, arg0: handle) -> BaseColumn: ... @overload - def gte(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def gte(self, arg0: handle) -> BaseColumn: ... + @overload + def gte(self, arg0: BaseColumn) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload + def lt(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @@ -179,13 +183,13 @@ class ConstantColumnBIGINT(SimpleColumnBIGINT, BaseColumn): def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: handle) -> BaseColumn: ... - @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... + def neq(self, arg0: handle) -> BaseColumn: ... @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -199,9 +203,9 @@ class ConstantColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -222,20 +226,20 @@ class ConstantColumnBOOLEAN(SimpleColumnBOOLEAN, BaseColumn): def append(self, value: bool) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_xor(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @@ -253,17 +257,17 @@ class ConstantColumnBOOLEAN(SimpleColumnBOOLEAN, BaseColumn): def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... + @overload + def neq(self, arg0: BaseColumn) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnBOOLEAN: ... def type(self) -> facebook::velox::Type: ... @property @@ -281,17 +285,17 @@ class ConstantColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: handle) -> BaseColumn: ... - @overload def add(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def add(self, arg0: handle) -> BaseColumn: ... def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... def ceil(self) -> BaseColumn: ... @overload - def eq(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def eq(self, arg0: handle) -> BaseColumn: ... + @overload + def eq(self, arg0: BaseColumn) -> BaseColumn: ... def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... @@ -308,30 +312,30 @@ class ConstantColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): def gte(self, arg0: BaseColumn) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... - @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: handle) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mod(self, arg0: handle) -> BaseColumn: ... + def lte(self, arg0: handle) -> BaseColumn: ... @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: handle) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -346,9 +350,9 @@ class ConstantColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -359,24 +363,37 @@ class ConstantColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): """ :type: int""" pass -class ConstantColumnREAL(SimpleColumnREAL, BaseColumn): +class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def __getitem__(self, arg0: int) -> object: ... def __len__(self) -> int: ... def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def add(self, arg0: handle) -> BaseColumn: ... - def append(self, arg0: float) -> None: ... + @overload + def add(self, arg0: BaseColumn) -> BaseColumn: ... + def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... + @overload + def bitwise_and(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + def bitwise_rand(self, arg0: handle) -> BaseColumn: ... + def bitwise_ror(self, arg0: handle) -> BaseColumn: ... + def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_xor(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... - def ceil(self) -> BaseColumn: ... @overload def eq(self, arg0: handle) -> BaseColumn: ... @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... - def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... @overload @@ -390,49 +407,49 @@ class ConstantColumnREAL(SimpleColumnREAL, BaseColumn): def gte(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... + def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... - @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... - def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def mul(self, arg0: handle) -> BaseColumn: ... + def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... + def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... def rmul(self, arg0: handle) -> BaseColumn: ... - def round(self) -> BaseColumn: ... def rpow(self, arg0: handle) -> BaseColumn: ... def rsub(self, arg0: handle) -> BaseColumn: ... def rtruediv(self, arg0: handle) -> BaseColumn: ... - def slice(self, arg0: int, arg1: int) -> SimpleColumnREAL: ... + def slice(self, arg0: int, arg1: int) -> SimpleColumnINTEGER: ... @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def truediv(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def truediv(self, arg0: handle) -> BaseColumn: ... + @overload + def truediv(self, arg0: BaseColumn) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -455,10 +472,10 @@ class ConstantColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def bitwise_and(self, arg0: handle) -> BaseColumn: ... + @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... @@ -471,22 +488,22 @@ class ConstantColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): def bitwise_xor(self, arg0: handle) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload - def eq(self, arg0: handle) -> BaseColumn: ... - @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... + def eq(self, arg0: handle) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... - def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... + def floordiv(self, arg0: handle) -> BaseColumn: ... + def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def gte(self, arg0: handle) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload @@ -498,22 +515,22 @@ class ConstantColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... - def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def mul(self, arg0: handle) -> BaseColumn: ... + def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... + def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -527,9 +544,9 @@ class ConstantColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): @overload def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -556,9 +573,9 @@ class ConstantColumnTINYINT(SimpleColumnTINYINT, BaseColumn): @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -577,10 +594,10 @@ class ConstantColumnTINYINT(SimpleColumnTINYINT, BaseColumn): def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... - @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def gt(self, arg0: handle) -> BaseColumn: ... + @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gte(self, arg0: handle) -> BaseColumn: ... @@ -599,18 +616,18 @@ class ConstantColumnTINYINT(SimpleColumnTINYINT, BaseColumn): @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mul(self, arg0: handle) -> BaseColumn: ... + @overload + def mul(self, arg0: BaseColumn) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... - @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -620,13 +637,13 @@ class ConstantColumnTINYINT(SimpleColumnTINYINT, BaseColumn): def rtruediv(self, arg0: handle) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnTINYINT: ... @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... + def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -671,9 +688,9 @@ class FlatColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: handle) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -687,25 +704,25 @@ class FlatColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... - @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gt(self, arg0: handle) -> BaseColumn: ... @overload - def gte(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def gte(self, arg0: handle) -> BaseColumn: ... + @overload + def gte(self, arg0: BaseColumn) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload + def lt(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @@ -719,13 +736,13 @@ class FlatColumnBIGINT(SimpleColumnBIGINT, BaseColumn): def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: handle) -> BaseColumn: ... - @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... + def neq(self, arg0: handle) -> BaseColumn: ... @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -739,9 +756,9 @@ class FlatColumnBIGINT(SimpleColumnBIGINT, BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -762,20 +779,20 @@ class FlatColumnBOOLEAN(SimpleColumnBOOLEAN, BaseColumn): def append(self, value: bool) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_xor(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @@ -793,17 +810,17 @@ class FlatColumnBOOLEAN(SimpleColumnBOOLEAN, BaseColumn): def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... + @overload + def neq(self, arg0: BaseColumn) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnBOOLEAN: ... def type(self) -> facebook::velox::Type: ... @property @@ -821,17 +838,17 @@ class FlatColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: handle) -> BaseColumn: ... - @overload def add(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def add(self, arg0: handle) -> BaseColumn: ... def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... def ceil(self) -> BaseColumn: ... @overload - def eq(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def eq(self, arg0: handle) -> BaseColumn: ... + @overload + def eq(self, arg0: BaseColumn) -> BaseColumn: ... def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... @@ -848,30 +865,30 @@ class FlatColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): def gte(self, arg0: BaseColumn) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... - @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: handle) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mod(self, arg0: handle) -> BaseColumn: ... + def lte(self, arg0: handle) -> BaseColumn: ... @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: handle) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -886,9 +903,9 @@ class FlatColumnDOUBLE(SimpleColumnDOUBLE, BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -911,10 +928,10 @@ class FlatColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... @@ -927,14 +944,14 @@ class FlatColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload - def eq(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def eq(self, arg0: handle) -> BaseColumn: ... @overload - def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... - def get_null_count(self) -> int: ... + @overload + def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + def get_null_count(self) -> int: ... @overload def gt(self, arg0: handle) -> BaseColumn: ... @overload @@ -967,9 +984,9 @@ class FlatColumnINTEGER(SimpleColumnINTEGER, BaseColumn): @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... - @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -979,13 +996,13 @@ class FlatColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def rtruediv(self, arg0: handle) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnINTEGER: ... @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: handle) -> BaseColumn: ... + @overload + def truediv(self, arg0: BaseColumn) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1002,17 +1019,17 @@ class FlatColumnREAL(SimpleColumnREAL, BaseColumn): def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def add(self, arg0: handle) -> BaseColumn: ... + @overload + def add(self, arg0: BaseColumn) -> BaseColumn: ... def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... def ceil(self) -> BaseColumn: ... @overload - def eq(self, arg0: handle) -> BaseColumn: ... - @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def eq(self, arg0: handle) -> BaseColumn: ... def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... @@ -1020,27 +1037,27 @@ class FlatColumnREAL(SimpleColumnREAL, BaseColumn): def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... - @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... - def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... + def gte(self, arg0: handle) -> BaseColumn: ... + def is_null_at(self, arg0: int) -> bool: ... @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload + def mod(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def mul(self, arg0: handle) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1092,10 +1109,10 @@ class FlatColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def bitwise_and(self, arg0: handle) -> BaseColumn: ... + @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1108,22 +1125,22 @@ class FlatColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): def bitwise_xor(self, arg0: handle) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload - def eq(self, arg0: handle) -> BaseColumn: ... - @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... + def eq(self, arg0: handle) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... - def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... + def floordiv(self, arg0: handle) -> BaseColumn: ... + def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def gte(self, arg0: handle) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload @@ -1135,22 +1152,22 @@ class FlatColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... - def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def mul(self, arg0: handle) -> BaseColumn: ... + def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... + def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1164,9 +1181,9 @@ class FlatColumnSMALLINT(SimpleColumnSMALLINT, BaseColumn): @overload def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1193,9 +1210,9 @@ class FlatColumnTINYINT(SimpleColumnTINYINT, BaseColumn): @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -1214,10 +1231,10 @@ class FlatColumnTINYINT(SimpleColumnTINYINT, BaseColumn): def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... - @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def gt(self, arg0: handle) -> BaseColumn: ... + @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gte(self, arg0: handle) -> BaseColumn: ... @@ -1236,18 +1253,18 @@ class FlatColumnTINYINT(SimpleColumnTINYINT, BaseColumn): @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mul(self, arg0: handle) -> BaseColumn: ... + @overload + def mul(self, arg0: BaseColumn) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... - @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1257,13 +1274,13 @@ class FlatColumnTINYINT(SimpleColumnTINYINT, BaseColumn): def rtruediv(self, arg0: handle) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnTINYINT: ... @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... + def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1292,6 +1309,28 @@ class FlatColumnVARCHAR(SimpleColumnVARCHAR, BaseColumn): """ :type: int""" pass +class GPT2BPEEncoder: + def __getstate__(self) -> Tuple[Dict[str, int], Dict[str, int], str, Dict[int, str], bool]: ... + def __init__(self, arg0: Dict[str, int], arg1: Dict[str, int], arg2: str, arg3: Dict[int, str], arg4: bool) -> None: ... + def __setstate__(self, arg0: Tuple[Dict[str, int], Dict[str, int], str, Dict[int, str], bool]) -> None: ... + def encode(self, arg0: str) -> List[str]: ... + @property + def bpe_encoder_(self) -> Dict[str, int]: + """ +:type: Dict[str, int]""" + @property + def bpe_merge_ranks_(self) -> Dict[str, int]: + """ +:type: Dict[str, int]""" + @property + def byte_encoder_(self) -> Dict[int, str]: + """ +:type: Dict[int, str]""" + @property + def seperator_(self) -> str: + """ +:type: str""" + pass class MapColumn(BaseColumn): def __getitem__(self, arg0: int) -> BaseColumn: ... def __len__(self) -> int: ... @@ -1361,9 +1400,9 @@ class SimpleColumnBIGINT(BaseColumn): @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: handle) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -1377,25 +1416,25 @@ class SimpleColumnBIGINT(BaseColumn): @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... - @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gt(self, arg0: handle) -> BaseColumn: ... @overload - def gte(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def gte(self, arg0: handle) -> BaseColumn: ... + @overload + def gte(self, arg0: BaseColumn) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload + def lt(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1409,13 +1448,13 @@ class SimpleColumnBIGINT(BaseColumn): def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: handle) -> BaseColumn: ... - @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... + def neq(self, arg0: handle) -> BaseColumn: ... @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1429,9 +1468,9 @@ class SimpleColumnBIGINT(BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1452,20 +1491,20 @@ class SimpleColumnBOOLEAN(BaseColumn): def append(self, value: bool) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @overload - def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_xor(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1483,17 +1522,17 @@ class SimpleColumnBOOLEAN(BaseColumn): def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def lt(self, arg0: handle) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... + @overload + def neq(self, arg0: BaseColumn) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnBOOLEAN: ... def type(self) -> facebook::velox::Type: ... @property @@ -1511,17 +1550,17 @@ class SimpleColumnDOUBLE(BaseColumn): def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: handle) -> BaseColumn: ... - @overload def add(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def add(self, arg0: handle) -> BaseColumn: ... def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... def ceil(self) -> BaseColumn: ... @overload - def eq(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def eq(self, arg0: handle) -> BaseColumn: ... + @overload + def eq(self, arg0: BaseColumn) -> BaseColumn: ... def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1538,30 +1577,30 @@ class SimpleColumnDOUBLE(BaseColumn): def gte(self, arg0: BaseColumn) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... - @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: handle) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mod(self, arg0: handle) -> BaseColumn: ... + def lte(self, arg0: handle) -> BaseColumn: ... @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: handle) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def mul(self, arg0: handle) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def pow(self, arg0: handle) -> BaseColumn: ... + @overload + def pow(self, arg0: BaseColumn) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1576,9 +1615,9 @@ class SimpleColumnDOUBLE(BaseColumn): @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1601,10 +1640,10 @@ class SimpleColumnINTEGER(BaseColumn): def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: handle) -> BaseColumn: ... @overload + def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1617,13 +1656,13 @@ class SimpleColumnINTEGER(BaseColumn): def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload - def eq(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def eq(self, arg0: handle) -> BaseColumn: ... @overload - def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... + @overload + def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload def gt(self, arg0: handle) -> BaseColumn: ... @@ -1657,9 +1696,9 @@ class SimpleColumnINTEGER(BaseColumn): @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... - @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1669,13 +1708,13 @@ class SimpleColumnINTEGER(BaseColumn): def rtruediv(self, arg0: handle) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnINTEGER: ... @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: handle) -> BaseColumn: ... + @overload + def truediv(self, arg0: BaseColumn) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1686,7 +1725,7 @@ class SimpleColumnINTEGER(BaseColumn): """ :type: int""" pass -class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): +class SimpleColumnREAL(BaseColumn): def __getitem__(self, arg0: int) -> object: ... def __len__(self) -> int: ... def _export_to_arrow(self, arg0: int) -> None: ... @@ -1695,42 +1734,28 @@ class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def add(self, arg0: handle) -> BaseColumn: ... @overload def add(self, arg0: BaseColumn) -> BaseColumn: ... - def append(self, arg0: int) -> None: ... + def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... - @overload - def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... - @overload - def bitwise_and(self, arg0: handle) -> BaseColumn: ... - @overload - def bitwise_or(self, arg0: handle) -> BaseColumn: ... - @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... - def bitwise_rand(self, arg0: handle) -> BaseColumn: ... - def bitwise_ror(self, arg0: handle) -> BaseColumn: ... - def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... - @overload - def bitwise_xor(self, arg0: handle) -> BaseColumn: ... - @overload - def bitwise_xor(self, arg0: BaseColumn) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... + def ceil(self) -> BaseColumn: ... @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def eq(self, arg0: handle) -> BaseColumn: ... - @overload - def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... - def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... + def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... + def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... - def invert(self) -> BaseColumn: ... + @overload + def gte(self, arg0: handle) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1745,15 +1770,15 @@ class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mul(self, arg0: handle) -> BaseColumn: ... - def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: handle) -> BaseColumn: ... + def mul(self, arg0: BaseColumn) -> BaseColumn: ... + def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def neq(self, arg0: handle) -> BaseColumn: ... + @overload def pow(self, arg0: handle) -> BaseColumn: ... @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1761,15 +1786,16 @@ class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... def rmul(self, arg0: handle) -> BaseColumn: ... + def round(self) -> BaseColumn: ... def rpow(self, arg0: handle) -> BaseColumn: ... def rsub(self, arg0: handle) -> BaseColumn: ... def rtruediv(self, arg0: handle) -> BaseColumn: ... - def slice(self, arg0: int, arg1: int) -> SimpleColumnINTEGER: ... - @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... + def slice(self, arg0: int, arg1: int) -> SimpleColumnREAL: ... @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload + def sub(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: handle) -> BaseColumn: ... @@ -1783,23 +1809,23 @@ class ConstantColumnINTEGER(SimpleColumnINTEGER, BaseColumn): """ :type: int""" pass -class SimpleColumnREAL(BaseColumn): +class ConstantColumnREAL(SimpleColumnREAL, BaseColumn): def __getitem__(self, arg0: int) -> object: ... def __len__(self) -> int: ... def _export_to_arrow(self, arg0: int) -> None: ... def abs(self) -> BaseColumn: ... @overload - def add(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def add(self, arg0: handle) -> BaseColumn: ... + @overload + def add(self, arg0: BaseColumn) -> BaseColumn: ... def append(self, arg0: float) -> None: ... def append_null(self) -> None: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... def ceil(self) -> BaseColumn: ... @overload - def eq(self, arg0: handle) -> BaseColumn: ... - @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def eq(self, arg0: handle) -> BaseColumn: ... def floor(self) -> BaseColumn: ... @overload def floordiv(self, arg0: handle) -> BaseColumn: ... @@ -1807,27 +1833,27 @@ class SimpleColumnREAL(BaseColumn): def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... - @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... - def is_null_at(self, arg0: int) -> bool: ... @overload - def lt(self, arg0: handle) -> BaseColumn: ... + def gte(self, arg0: handle) -> BaseColumn: ... + def is_null_at(self, arg0: int) -> bool: ... @overload def lt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def lte(self, arg0: BaseColumn) -> BaseColumn: ... + def lt(self, arg0: handle) -> BaseColumn: ... @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... + def lte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload + def mod(self, arg0: BaseColumn) -> BaseColumn: ... + @overload def mul(self, arg0: handle) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1879,10 +1905,10 @@ class SimpleColumnSMALLINT(BaseColumn): def append(self, arg0: int) -> None: ... def append_null(self) -> None: ... @overload - def bitwise_and(self, arg0: handle) -> BaseColumn: ... - @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def bitwise_and(self, arg0: handle) -> BaseColumn: ... + @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... @overload def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... @@ -1895,22 +1921,22 @@ class SimpleColumnSMALLINT(BaseColumn): def bitwise_xor(self, arg0: handle) -> BaseColumn: ... def cast(self, arg0: TypeKind) -> BaseColumn: ... @overload - def eq(self, arg0: handle) -> BaseColumn: ... - @overload def eq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def floordiv(self, arg0: handle) -> BaseColumn: ... + def eq(self, arg0: handle) -> BaseColumn: ... @overload def floordiv(self, arg0: BaseColumn) -> BaseColumn: ... - def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... + def floordiv(self, arg0: handle) -> BaseColumn: ... + def get_null_count(self) -> int: ... @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def gte(self, arg0: handle) -> BaseColumn: ... + def gt(self, arg0: handle) -> BaseColumn: ... @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def gte(self, arg0: handle) -> BaseColumn: ... def invert(self) -> BaseColumn: ... def is_null_at(self, arg0: int) -> bool: ... @overload @@ -1922,22 +1948,22 @@ class SimpleColumnSMALLINT(BaseColumn): @overload def lte(self, arg0: handle) -> BaseColumn: ... @overload - def mod(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mod(self, arg0: handle) -> BaseColumn: ... @overload - def mul(self, arg0: handle) -> BaseColumn: ... + def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload def mul(self, arg0: BaseColumn) -> BaseColumn: ... - def neg(self) -> BaseColumn: ... @overload - def neq(self, arg0: BaseColumn) -> BaseColumn: ... + def mul(self, arg0: handle) -> BaseColumn: ... + def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... + def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -1951,9 +1977,9 @@ class SimpleColumnSMALLINT(BaseColumn): @overload def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... - @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -1980,9 +2006,9 @@ class SimpleColumnTINYINT(BaseColumn): @overload def bitwise_and(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def bitwise_or(self, arg0: handle) -> BaseColumn: ... + @overload + def bitwise_or(self, arg0: BaseColumn) -> BaseColumn: ... def bitwise_rand(self, arg0: handle) -> BaseColumn: ... def bitwise_ror(self, arg0: handle) -> BaseColumn: ... def bitwise_rxor(self, arg0: handle) -> BaseColumn: ... @@ -2001,10 +2027,10 @@ class SimpleColumnTINYINT(BaseColumn): def floordiv(self, arg0: handle) -> BaseColumn: ... def get_null_count(self) -> int: ... @overload - def gt(self, arg0: handle) -> BaseColumn: ... - @overload def gt(self, arg0: BaseColumn) -> BaseColumn: ... @overload + def gt(self, arg0: handle) -> BaseColumn: ... + @overload def gte(self, arg0: BaseColumn) -> BaseColumn: ... @overload def gte(self, arg0: handle) -> BaseColumn: ... @@ -2023,18 +2049,18 @@ class SimpleColumnTINYINT(BaseColumn): @overload def mod(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def mul(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def mul(self, arg0: handle) -> BaseColumn: ... + @overload + def mul(self, arg0: BaseColumn) -> BaseColumn: ... def neg(self) -> BaseColumn: ... @overload def neq(self, arg0: handle) -> BaseColumn: ... @overload def neq(self, arg0: BaseColumn) -> BaseColumn: ... @overload - def pow(self, arg0: handle) -> BaseColumn: ... - @overload def pow(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def pow(self, arg0: handle) -> BaseColumn: ... def radd(self, arg0: handle) -> BaseColumn: ... def rfloordiv(self, arg0: handle) -> BaseColumn: ... def rmod(self, arg0: handle) -> BaseColumn: ... @@ -2044,13 +2070,13 @@ class SimpleColumnTINYINT(BaseColumn): def rtruediv(self, arg0: handle) -> BaseColumn: ... def slice(self, arg0: int, arg1: int) -> SimpleColumnTINYINT: ... @overload - def sub(self, arg0: BaseColumn) -> BaseColumn: ... - @overload def sub(self, arg0: handle) -> BaseColumn: ... @overload - def truediv(self, arg0: handle) -> BaseColumn: ... + def sub(self, arg0: BaseColumn) -> BaseColumn: ... @overload def truediv(self, arg0: BaseColumn) -> BaseColumn: ... + @overload + def truediv(self, arg0: handle) -> BaseColumn: ... def type(self) -> facebook::velox::Type: ... @property def length(self) -> int: @@ -2125,14 +2151,22 @@ class TypeKind: class VeloxType: def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxArrayType(VeloxType): def __init__(self, arg0: VeloxType) -> None: ... def element_type(self) -> VeloxType: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + pass +class VeloxFixedArrayType(VeloxType): + def __init__(self, arg0: int, arg1: VeloxType) -> None: ... + def element_type(self) -> VeloxType: ... + def fixed_width(self) -> int: ... + def kind(self) -> TypeKind: ... + def kind_name(self) -> str: ... + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxMapType(VeloxType): def __init__(self, arg0: VeloxType, arg1: VeloxType) -> None: ... @@ -2140,7 +2174,7 @@ class VeloxMapType(VeloxType): def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... def value_type(self) -> VeloxType: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxRowType(VeloxType): def __init__(self, arg0: List[str], arg1: List[VeloxType]) -> None: ... @@ -2151,164 +2185,186 @@ class VeloxRowType(VeloxType): def kind_name(self) -> str: ... def name_of(self, arg0: int) -> str: ... def size(self) -> int: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_BIGINT(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_BOOLEAN(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_DOUBLE(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_INTEGER(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_REAL(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_SMALLINT(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_TINYINT(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = pass class VeloxType_VARCHAR(VeloxType): def __init__(self) -> None: ... def kind(self) -> TypeKind: ... def kind_name(self) -> str: ... - __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + __pybind11_module_local_v4_clang_libstdcpp_cxxabi1002__ = ... # type: PyCapsule # value = + pass +class Vocab: + def __contains__(self, arg0: str) -> bool: ... + def __getitem__(self, arg0: str) -> int: ... + def __getstate__(self) -> Tuple[str, List[int], List[str], List[at::Tensor]]: ... + def __init__(self, arg0: List[str], arg1: Optional[int]) -> None: ... + def __len__(self) -> int: ... + def __setstate__(self, arg0: Tuple[str, List[int], List[str], List[at::Tensor]]) -> None: ... + def append_token(self, arg0: str) -> None: ... + def get_default_index(self) -> Optional[int]: ... + def get_itos(self) -> List[str]: ... + def get_stoi(self) -> Dict[str, int]: ... + def insert_token(self, arg0: str, arg1: int) -> None: ... + def lookup_indices(self, arg0: list) -> List[int]: ... + def lookup_token(self, arg0: int) -> str: ... + def lookup_tokens(self, arg0: List[int]) -> List[str]: ... + def set_default_index(self, arg0: Optional[int]) -> None: ... + @property + def default_index_(self) -> Optional[int]: + """ +:type: Optional[int]""" + @property + def itos_(self) -> List[str]: + """ +:type: List[str]""" pass class fb_SentencePiece: def __init__(self, arg0: str) -> None: ... def process(self, arg0: str) -> List[str]: ... pass @overload -def Column(arg0: VeloxType_SMALLINT, arg1: list) -> SimpleColumnSMALLINT: - pass -@overload -def Column(arg0: VeloxType_REAL, arg1: list) -> SimpleColumnREAL: +def Column(arg0: VeloxType_DOUBLE) -> SimpleColumnDOUBLE: pass @overload -def Column(arg0: VeloxType_BIGINT, arg1: list) -> SimpleColumnBIGINT: +def Column(arg0: VeloxType_INTEGER) -> SimpleColumnINTEGER: pass @overload def Column(arg0: VeloxType_INTEGER, arg1: list) -> SimpleColumnINTEGER: pass @overload -def Column(arg0: VeloxType_VARCHAR, arg1: list) -> SimpleColumnVARCHAR: +def Column(arg0: VeloxType_SMALLINT, arg1: tuple) -> SimpleColumnSMALLINT: pass @overload def Column(arg0: VeloxType_SMALLINT) -> SimpleColumnSMALLINT: pass @overload -def Column(arg0: VeloxRowType) -> RowColumn: - pass -@overload -def Column(arg0: VeloxType_DOUBLE, arg1: list) -> SimpleColumnDOUBLE: +def Column(arg0: VeloxType_REAL, arg1: tuple) -> SimpleColumnREAL: pass @overload -def Column(arg0: VeloxType_BIGINT, arg1: tuple) -> SimpleColumnBIGINT: +def Column(arg0: VeloxRowType) -> RowColumn: pass @overload -def Column(arg0: VeloxType_VARCHAR, arg1: tuple) -> SimpleColumnVARCHAR: +def Column(arg0: VeloxType_SMALLINT, arg1: list) -> SimpleColumnSMALLINT: pass @overload -def Column(arg0: VeloxArrayType, arg1: list) -> ArrayColumn: +def Column(arg0: VeloxType_TINYINT, arg1: tuple) -> SimpleColumnTINYINT: pass @overload -def Column(arg0: VeloxType_TINYINT) -> SimpleColumnTINYINT: +def Column(arg0: VeloxFixedArrayType, arg1: list) -> ArrayColumn: pass @overload -def Column(arg0: VeloxType_INTEGER) -> SimpleColumnINTEGER: +def Column(arg0: VeloxType_BIGINT, arg1: tuple) -> SimpleColumnBIGINT: pass @overload -def Column(arg0: VeloxType_TINYINT, arg1: list) -> SimpleColumnTINYINT: +def Column(arg0: VeloxArrayType) -> ArrayColumn: pass @overload -def Column(arg0: VeloxType_REAL) -> SimpleColumnREAL: +def Column(arg0: VeloxType_DOUBLE, arg1: tuple) -> SimpleColumnDOUBLE: pass @overload -def Column(arg0: VeloxType_REAL, arg1: tuple) -> SimpleColumnREAL: +def Column(arg0: VeloxArrayType, arg1: list) -> ArrayColumn: pass @overload -def Column(arg0: VeloxType_DOUBLE) -> SimpleColumnDOUBLE: +def Column(arg0: VeloxType_BOOLEAN) -> SimpleColumnBOOLEAN: pass @overload -def Column(arg0: VeloxType_BOOLEAN, arg1: list) -> SimpleColumnBOOLEAN: +def Column(arg0: VeloxType_VARCHAR, arg1: tuple) -> SimpleColumnVARCHAR: pass @overload def Column(arg0: VeloxMapType) -> MapColumn: pass @overload -def Column(arg0: VeloxType_SMALLINT, arg1: tuple) -> SimpleColumnSMALLINT: +def Column(arg0: VeloxType_TINYINT) -> SimpleColumnTINYINT: pass @overload -def Column(arg0: VeloxType_VARCHAR) -> SimpleColumnVARCHAR: +def Column(arg0: VeloxFixedArrayType) -> ArrayColumn: pass @overload -def Column(arg0: VeloxType_BOOLEAN, arg1: tuple) -> SimpleColumnBOOLEAN: +def Column(arg0: VeloxType_INTEGER, arg1: tuple) -> SimpleColumnINTEGER: pass @overload -def Column(arg0: VeloxType_BOOLEAN) -> SimpleColumnBOOLEAN: +def Column(arg0: VeloxType_REAL) -> SimpleColumnREAL: pass @overload def Column(arg0: VeloxType_BIGINT) -> SimpleColumnBIGINT: pass @overload -def Column(arg0: VeloxArrayType) -> ArrayColumn: +def Column(arg0: VeloxType_TINYINT, arg1: list) -> SimpleColumnTINYINT: pass @overload -def Column(arg0: VeloxType_DOUBLE, arg1: tuple) -> SimpleColumnDOUBLE: +def Column(arg0: VeloxType_DOUBLE, arg1: list) -> SimpleColumnDOUBLE: pass @overload -def Column(arg0: VeloxType_INTEGER, arg1: tuple) -> SimpleColumnINTEGER: +def Column(arg0: VeloxType_BIGINT, arg1: list) -> SimpleColumnBIGINT: pass @overload -def Column(arg0: VeloxType_TINYINT, arg1: tuple) -> SimpleColumnTINYINT: +def Column(arg0: VeloxType_REAL, arg1: list) -> SimpleColumnREAL: pass @overload -def ConstantColumn(arg0: handle, arg1: int) -> BaseColumn: +def Column(arg0: VeloxType_BOOLEAN, arg1: tuple) -> SimpleColumnBOOLEAN: pass @overload -def ConstantColumn(arg0: handle, arg1: int, arg2: VeloxType) -> BaseColumn: +def Column(arg0: VeloxType_VARCHAR) -> SimpleColumnVARCHAR: pass @overload -def _import_from_arrow(arg0: VeloxType_REAL, arg1: int, arg2: int) -> SimpleColumnREAL: +def Column(arg0: VeloxType_VARCHAR, arg1: list) -> SimpleColumnVARCHAR: pass @overload -def _import_from_arrow(arg0: VeloxType_INTEGER, arg1: int, arg2: int) -> SimpleColumnINTEGER: +def Column(arg0: VeloxType_BOOLEAN, arg1: list) -> SimpleColumnBOOLEAN: pass @overload -def _import_from_arrow(arg0: VeloxType_DOUBLE, arg1: int, arg2: int) -> SimpleColumnDOUBLE: +def ConstantColumn(arg0: handle, arg1: int, arg2: VeloxType) -> BaseColumn: + pass +@overload +def ConstantColumn(arg0: handle, arg1: int) -> BaseColumn: pass @overload def _import_from_arrow(arg0: VeloxType_SMALLINT, arg1: int, arg2: int) -> SimpleColumnSMALLINT: pass @overload -def _import_from_arrow(arg0: VeloxType_BIGINT, arg1: int, arg2: int) -> SimpleColumnBIGINT: +def _import_from_arrow(arg0: VeloxType_DOUBLE, arg1: int, arg2: int) -> SimpleColumnDOUBLE: pass @overload def _import_from_arrow(arg0: VeloxType_TINYINT, arg1: int, arg2: int) -> SimpleColumnTINYINT: @@ -2317,20 +2373,24 @@ def _import_from_arrow(arg0: VeloxType_TINYINT, arg1: int, arg2: int) -> SimpleC def _import_from_arrow(arg0: VeloxType_BOOLEAN, arg1: int, arg2: int) -> SimpleColumnBOOLEAN: pass @overload +def _import_from_arrow(arg0: VeloxType_INTEGER, arg1: int, arg2: int) -> SimpleColumnINTEGER: + pass +@overload def _import_from_arrow(arg0: VeloxRowType, arg1: int, arg2: int) -> RowColumn: pass +@overload +def _import_from_arrow(arg0: VeloxType_BIGINT, arg1: int, arg2: int) -> SimpleColumnBIGINT: + pass +@overload +def _import_from_arrow(arg0: VeloxType_REAL, arg1: int, arg2: int) -> SimpleColumnREAL: + pass def _populate_dense_features_nopresence(arg0: RowColumn, arg1: int) -> None: pass def factory_udf_dispatch(arg0: str, arg1: int) -> BaseColumn: pass -@overload -def generic_udf_dispatch(arg0: str, arg1: BaseColumn, arg2: BaseColumn) -> BaseColumn: - pass -@overload -def generic_udf_dispatch(arg0: str, arg1: BaseColumn, arg2: BaseColumn, arg3: BaseColumn) -> BaseColumn: +def generic_udf_dispatch(arg0: str, arg1: List[BaseColumn]) -> BaseColumn: pass -@overload -def generic_udf_dispatch(arg0: str, arg1: BaseColumn) -> BaseColumn: +def is_built_with_torch() -> bool: pass ARRAY = ... # type: torcharrow._torcharrow.TypeKind # value = BIGINT = ... # type: torcharrow._torcharrow.TypeKind # value = diff --git a/csrc/velox/column.cpp b/csrc/velox/column.cpp index c143fc6d0..1e26f23a2 100644 --- a/csrc/velox/column.cpp +++ b/csrc/velox/column.cpp @@ -288,89 +288,30 @@ std::shared_ptr BaseColumn::genBinaryExprSet( std::move(callTypedExprs), &TorchArrowGlobalStatic::execContext()); } -std::unique_ptr BaseColumn::genericUnaryUDF( +std::unique_ptr BaseColumn::genericUDF( const std::string& udfName, - const BaseColumn& col1) { - auto rowType = velox::ROW({"c0"}, {col1.getUnderlyingVeloxVector()->type()}); - GenericUDFDispatchKey key(udfName, rowType->toString()); - - static std:: - unordered_map> - dispatchTable; - - auto iter = dispatchTable.find(key); - if (iter == dispatchTable.end()) { - iter = - dispatchTable.insert({key, OperatorHandle::fromUDF(rowType, udfName)}) - .first; - } - return iter->second->call({col1.getUnderlyingVeloxVector()}); -} - -std::unique_ptr BaseColumn::genericBinaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2) { - auto rowType = velox::ROW( - {"c0", "c1"}, - {col1.getUnderlyingVeloxVector()->type(), - col2.getUnderlyingVeloxVector()->type()}); - GenericUDFDispatchKey key(udfName, rowType->toString()); - - static std:: - unordered_map> - dispatchTable; - - auto iter = dispatchTable.find(key); - if (iter == dispatchTable.end()) { - iter = - dispatchTable.insert({key, OperatorHandle::fromUDF(rowType, udfName)}) - .first; - } - return iter->second->call( - {col1.getUnderlyingVeloxVector(), col2.getUnderlyingVeloxVector()}); -} - -std::unique_ptr BaseColumn::genericTrinaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2, - const BaseColumn& col3) { - auto rowType = velox::ROW( - {"c0", "c1", "c2"}, - {col1.getUnderlyingVeloxVector()->type(), - col2.getUnderlyingVeloxVector()->type(), - col3.getUnderlyingVeloxVector()->type()}); - GenericUDFDispatchKey key(udfName, rowType->toString()); - - static std:: - unordered_map> - dispatchTable; - - auto iter = dispatchTable.find(key); - if (iter == dispatchTable.end()) { - iter = - dispatchTable.insert({key, OperatorHandle::fromUDF(rowType, udfName)}) - .first; + const std::vector& cols) { + std::shared_ptr rowType(nullptr); + std::vector colVeloxVector; + + if (cols.size() == 1) { + // specialize for arity 1 + rowType = velox::ROW({"c0"}, {cols[0].getUnderlyingVeloxVector()->type()}); + colVeloxVector = {cols[0].getUnderlyingVeloxVector()}; + } else { + // general path + std::vector names; + std::vector> types; + + int i = 0; + for (auto& col : cols) { + colVeloxVector.push_back(col.getUnderlyingVeloxVector()); + names.push_back("c" + std::to_string(i++)); + types.push_back(col.getUnderlyingVeloxVector()->type()); + } + rowType = velox::ROW(std::move(names), std::move(types)); } - return iter->second->call( - {col1.getUnderlyingVeloxVector(), - col2.getUnderlyingVeloxVector(), - col3.getUnderlyingVeloxVector()}); -} -std::unique_ptr BaseColumn::genericQuaternaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2, - const BaseColumn& col3, - const BaseColumn& col4) { - auto rowType = velox::ROW( - {"c0", "c1", "c2", "c3"}, - {col1.getUnderlyingVeloxVector()->type(), - col2.getUnderlyingVeloxVector()->type(), - col3.getUnderlyingVeloxVector()->type(), - col4.getUnderlyingVeloxVector()->type()}); GenericUDFDispatchKey key(udfName, rowType->toString()); static std:: @@ -383,11 +324,7 @@ std::unique_ptr BaseColumn::genericQuaternaryUDF( dispatchTable.insert({key, OperatorHandle::fromUDF(rowType, udfName)}) .first; } - return iter->second->call( - {col1.getUnderlyingVeloxVector(), - col2.getUnderlyingVeloxVector(), - col3.getUnderlyingVeloxVector(), - col4.getUnderlyingVeloxVector()}); + return iter->second->call(colVeloxVector); } std::unique_ptr BaseColumn::factoryNullaryUDF( diff --git a/csrc/velox/column.h b/csrc/velox/column.h index d217d8b21..153d50dd6 100644 --- a/csrc/velox/column.h +++ b/csrc/velox/column.h @@ -368,27 +368,9 @@ class BaseColumn { public: // generic UDF - static std::unique_ptr genericUnaryUDF( + static std::unique_ptr genericUDF( const std::string& udfName, - const BaseColumn& col1); - - static std::unique_ptr genericBinaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2); - - static std::unique_ptr genericTrinaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2, - const BaseColumn& col3); - - static std::unique_ptr genericQuaternaryUDF( - const std::string& udfName, - const BaseColumn& col1, - const BaseColumn& col2, - const BaseColumn& col3, - const BaseColumn& col4); + const std::vector& cols); // factory UDF (e.g rand) static std::unique_ptr factoryNullaryUDF( diff --git a/csrc/velox/lib.cpp b/csrc/velox/lib.cpp index b50af341b..10952daec 100644 --- a/csrc/velox/lib.cpp +++ b/csrc/velox/lib.cpp @@ -923,11 +923,7 @@ PYBIND11_MODULE(_torcharrow, m) { declareUserDefinedBindings(m); // generic UDF dispatch - // TODO: Support vararg instead of hard coding with UDF arity - m.def("generic_udf_dispatch", &BaseColumn::genericUnaryUDF); - m.def("generic_udf_dispatch", &BaseColumn::genericBinaryUDF); - m.def("generic_udf_dispatch", &BaseColumn::genericTrinaryUDF); - m.def("generic_udf_dispatch", &BaseColumn::genericQuaternaryUDF); + m.def("generic_udf_dispatch", &BaseColumn::genericUDF); // factory UDF dispatch (e.g. UDF without any parameters, length is required // for such UDF call) diff --git a/tools/codegen/velox_binding_stubgen.py b/tools/codegen/velox_binding_stubgen.py index 1d194014d..4333f9a07 100644 --- a/tools/codegen/velox_binding_stubgen.py +++ b/tools/codegen/velox_binding_stubgen.py @@ -9,6 +9,8 @@ import logging import os +import torch # noqa + from libfb.py.log import set_simple_logging from pybind11_stubgen.stubgen import ChdirGuard, ModuleStubsGenerator diff --git a/torcharrow/test/lib_test/test_udf.py b/torcharrow/test/lib_test/test_udf.py index bfe7d5b31..ab465df3e 100644 --- a/torcharrow/test/lib_test/test_udf.py +++ b/torcharrow/test/lib_test/test_udf.py @@ -43,41 +43,41 @@ def test_basic(self) -> None: data = ["abc", "ABC", "XYZ123", None, "xYZ", "123", "äöå"] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - lcol = ta.generic_udf_dispatch("lower", col) + lcol = ta.generic_udf_dispatch("lower", [col]) self.assert_SimpleColumn( lcol, ["abc", "abc", "xyz123", None, "xyz", "123", "äöå"] ) - ucol = ta.generic_udf_dispatch("upper", col) + ucol = ta.generic_udf_dispatch("upper", [col]) self.assert_SimpleColumn( ucol, ["ABC", "ABC", "XYZ123", None, "XYZ", "123", "ÄÖÅ"] ) - lcol2 = ta.generic_udf_dispatch("lower", ucol) + lcol2 = ta.generic_udf_dispatch("lower", [ucol]) self.assert_SimpleColumn( lcol2, ["abc", "abc", "xyz123", None, "xyz", "123", "äöå"] ) - ucol2 = ta.generic_udf_dispatch("upper", lcol) + ucol2 = ta.generic_udf_dispatch("upper", [lcol]) self.assert_SimpleColumn( ucol2, ["ABC", "ABC", "XYZ123", None, "XYZ", "123", "ÄÖÅ"] ) - alpha = ta.generic_udf_dispatch("torcharrow_isalpha", col) + alpha = ta.generic_udf_dispatch("torcharrow_isalpha", [col]) self.assert_SimpleColumn(alpha, [True, True, False, None, True, False, True]) - alnum = ta.generic_udf_dispatch("torcharrow_isalnum", col) + alnum = ta.generic_udf_dispatch("torcharrow_isalnum", [col]) self.assert_SimpleColumn(alnum, [True, True, True, None, True, True, True]) - digit = ta.generic_udf_dispatch("torcharrow_isdecimal", col) + digit = ta.generic_udf_dispatch("torcharrow_isdecimal", [col]) self.assert_SimpleColumn(digit, [False, False, False, None, False, True, False]) - islower = ta.generic_udf_dispatch("torcharrow_islower", col) + islower = ta.generic_udf_dispatch("torcharrow_islower", [col]) self.assert_SimpleColumn( islower, [True, False, False, None, False, False, True] ) - isupper = ta.generic_udf_dispatch("torcharrow_isupper", col) + isupper = ta.generic_udf_dispatch("torcharrow_isupper", [col]) self.assert_SimpleColumn( isupper, [False, True, True, None, False, False, False] ) @@ -85,20 +85,19 @@ def test_basic(self) -> None: data2 = [1, 2, 3, None, 5, None, -7] col2 = self.construct_simple_column(ta.VeloxType_BIGINT(), data2) - neg = ta.generic_udf_dispatch("negate", col2) + neg = ta.generic_udf_dispatch("negate", [col2]) self.assert_SimpleColumn(neg, [-1, -2, -3, None, -5, None, 7]) data3 = ["\n", "a", "\t", "76", " ", None] col3 = self.construct_simple_column(ta.VeloxType_VARCHAR(), data3) - isspace = ta.generic_udf_dispatch("torcharrow_isspace", col3) + isspace = ta.generic_udf_dispatch("torcharrow_isspace", [col3]) self.assert_SimpleColumn(isspace, [True, False, True, False, True, None]) data4 = ["a b c", "d,e,f"] col4 = self.construct_simple_column(ta.VeloxType_VARCHAR(), data4) splits = ta.generic_udf_dispatch( "split", - col4, - ta.ConstantColumn(" ", len(data4)), + [col4, ta.ConstantColumn(" ", len(data4))], ) expected = [["a", "b", "c"], ["d,e,f"]] self.assertEqual(len(splits), len(expected)) @@ -109,8 +108,7 @@ def test_coalesce(self) -> None: col1 = self.construct_simple_column(ta.VeloxType_BIGINT(), [1, 2, None, 3]) result = ta.generic_udf_dispatch( "coalesce", - col1, - ta.ConstantColumn(42, len(col1)), + [col1, ta.ConstantColumn(42, len(col1))], ) self.assert_SimpleColumn(result, [1, 2, 42, 3]) self.assertTrue(isinstance(result.type(), ta.VeloxType_BIGINT)) @@ -118,8 +116,7 @@ def test_coalesce(self) -> None: col2 = self.construct_simple_column(ta.VeloxType_INTEGER(), [1, 2, None, 3]) result = ta.generic_udf_dispatch( "coalesce", - col2, - ta.ConstantColumn(42, len(col2), ta.VeloxType_INTEGER()), + [col2, ta.ConstantColumn(42, len(col2), ta.VeloxType_INTEGER())], ) self.assert_SimpleColumn(result, [1, 2, 42, 3]) self.assertTrue(isinstance(result.type(), ta.VeloxType_INTEGER)) @@ -131,15 +128,13 @@ def test_regex(self) -> None: match = ta.generic_udf_dispatch( "match_re", - col, - ta.ConstantColumn("[a-z]\\d", 6), + [col, ta.ConstantColumn("[a-z]\\d", 6)], ) self.assert_SimpleColumn(match, [False, True, True, True, False, None]) search = ta.generic_udf_dispatch( "regexp_like", - col, - ta.ConstantColumn("[a-z]\\d", 6), + [col, ta.ConstantColumn("[a-z]\\d", 6)], ) self.assert_SimpleColumn(search, [False, True, True, True, True, None]) @@ -147,8 +142,7 @@ def test_regex(self) -> None: col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) extract = ta.generic_udf_dispatch( "regexp_extract_all", - col, - ta.ConstantColumn("([a-z])\\d", 5), + [col, ta.ConstantColumn("([a-z])\\d", 5)], ) expected = [["d4", "e5"], ["a1"], ["b2"], ["c3"], ["d4", "f6"]] self.assertEqual(len(extract), len(expected)) @@ -158,7 +152,7 @@ def test_regex(self) -> None: def test_lower(self) -> None: data = ["abc", "ABC", "XYZ123", None, "xYZ", "123", "äöå"] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - lcol = ta.generic_udf_dispatch("lower", col) + lcol = ta.generic_udf_dispatch("lower", [col]) self.assert_SimpleColumn( lcol, ["abc", "abc", "xyz123", None, "xyz", "123", "äöå"] ) @@ -177,7 +171,7 @@ def test_istitle(self) -> None: None, ] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - istitle = ta.generic_udf_dispatch("torcharrow_istitle", col) + istitle = ta.generic_udf_dispatch("torcharrow_istitle", [col]) self.assert_SimpleColumn( istitle, [ @@ -204,14 +198,14 @@ def test_istitle(self) -> None: "A1B2", ] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - istitle = ta.generic_udf_dispatch("torcharrow_istitle", col) + istitle = ta.generic_udf_dispatch("torcharrow_istitle", [col]) self.assert_SimpleColumn(istitle, [True, True, True, True, True, True, True]) def test_isnumeric(self) -> None: # All False data = ["-1", "1.5", "+2", "abc", "AA", "VIII", "1/3", None] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - lcol = ta.generic_udf_dispatch("torcharrow_isnumeric", col) + lcol = ta.generic_udf_dispatch("torcharrow_isnumeric", [col]) self.assert_SimpleColumn( lcol, [False, False, False, False, False, False, False, None] ) @@ -219,7 +213,7 @@ def test_isnumeric(self) -> None: # All True data = ["9876543210123456789", "ⅧⅪ", "ⅷ〩𐍁ᛯ", "᧖७𝟡௫6", "¼⑲⑹⓲➎㉏𐧯"] col = self.construct_simple_column(ta.VeloxType_VARCHAR(), data) - lcol = ta.generic_udf_dispatch("torcharrow_isnumeric", col) + lcol = ta.generic_udf_dispatch("torcharrow_isnumeric", [col]) self.assert_SimpleColumn(lcol, [True, True, True, True, True]) def test_trinary(self) -> None: @@ -229,9 +223,7 @@ def test_trinary(self) -> None: # substr, 3 parameters substr = ta.generic_udf_dispatch( "substr", - col, - ta.ConstantColumn(2, 7), # start - ta.ConstantColumn(2, 7), # length + [col, ta.ConstantColumn(2, 7), ta.ConstantColumn(2, 7)], # start # length ) self.assert_SimpleColumn(substr, ["bc", "BC", "YZ", None, "YZ", "23", "öå"]) @@ -243,7 +235,7 @@ def test_quaternary(self) -> None: bucketCount = self.construct_simple_column(ta.VeloxType_BIGINT(), [3, 3, 4]) widthBucket = ta.generic_udf_dispatch( - "width_bucket", x, bound1, bound2, bucketCount + "width_bucket", [x, bound1, bound2, bucketCount] ) self.assert_SimpleColumn(widthBucket, [3, 2, 0]) diff --git a/torcharrow/velox_rt/functional.py b/torcharrow/velox_rt/functional.py index 07e625a07..d83c83f78 100644 --- a/torcharrow/velox_rt/functional.py +++ b/torcharrow/velox_rt/functional.py @@ -36,7 +36,7 @@ def dispatch(*args): # constant value wrapped_args.append(ta.ConstantColumn(arg, length)) - result_col = ta.generic_udf_dispatch(op_name, *wrapped_args) + result_col = ta.generic_udf_dispatch(op_name, wrapped_args) # Generic dispatch always assumes nullable result_dtype = result_col.dtype().with_null(True)