|
24 | 24 |
|
25 | 25 | from typing import TYPE_CHECKING, Any, ClassVar, Optional |
26 | 26 |
|
| 27 | +import functions as F |
27 | 28 | import pyarrow as pa |
28 | 29 |
|
29 | 30 | try: |
@@ -661,6 +662,294 @@ def over(self, window: Window) -> Expr: |
661 | 662 | ) |
662 | 663 | ) |
663 | 664 |
|
| 665 | + def asin(self) -> Expr: |
| 666 | + """Returns the arc sine or inverse sine of a number.""" |
| 667 | + return F.asin(self) |
| 668 | + |
| 669 | + def array_pop_back(self) -> Expr: |
| 670 | + """Returns the array without the last element.""" |
| 671 | + return F.array_pop_back(self) |
| 672 | + |
| 673 | + def reverse(self) -> Expr: |
| 674 | + """Reverse the string argument.""" |
| 675 | + return F.reverse(self) |
| 676 | + |
| 677 | + def bit_length(self) -> Expr: |
| 678 | + """Returns the number of bits in the string argument.""" |
| 679 | + return F.bit_length(self) |
| 680 | + |
| 681 | + def array_length(self) -> Expr: |
| 682 | + """Returns the length of the array.""" |
| 683 | + return F.array_length(self) |
| 684 | + |
| 685 | + def array_ndims(self) -> Expr: |
| 686 | + """Returns the number of dimensions of the array.""" |
| 687 | + return F.array_ndims(self) |
| 688 | + |
| 689 | + def to_hex(self) -> Expr: |
| 690 | + """Converts an integer to a hexadecimal string.""" |
| 691 | + return F.to_hex(self) |
| 692 | + |
| 693 | + def array_dims(self) -> Expr: |
| 694 | + """Returns an array of the array's dimensions.""" |
| 695 | + return F.array_dims(self) |
| 696 | + |
| 697 | + def from_unixtime(self) -> Expr: |
| 698 | + """Converts an integer to RFC3339 timestamp format string.""" |
| 699 | + return F.from_unixtime(self) |
| 700 | + |
| 701 | + def array_empty(self) -> Expr: |
| 702 | + """Returns a boolean indicating whether the array is empty.""" |
| 703 | + return F.array_empty(self) |
| 704 | + |
| 705 | + def sin(self) -> Expr: |
| 706 | + """Returns the sine of the argument.""" |
| 707 | + return F.sin(self) |
| 708 | + |
| 709 | + def log10(self) -> Expr: |
| 710 | + """Base 10 logarithm of the argument.""" |
| 711 | + return F.log10(self) |
| 712 | + |
| 713 | + def initcap(self) -> Expr: |
| 714 | + """Set the initial letter of each word to capital. |
| 715 | +
|
| 716 | + Converts the first letter of each word in ``string`` to uppercase and the remaining |
| 717 | + characters to lowercase. |
| 718 | + """ |
| 719 | + return F.initcap(self) |
| 720 | + |
| 721 | + def list_distinct(self) -> Expr: |
| 722 | + """Returns distinct values from the array after removing duplicates. |
| 723 | +
|
| 724 | + This is an alias for :py:func:`array_distinct`. |
| 725 | + """ |
| 726 | + return F.list_distinct(self) |
| 727 | + |
| 728 | + def iszero(self) -> Expr: |
| 729 | + """Returns true if a given number is +0.0 or -0.0 otherwise returns false.""" |
| 730 | + return F.iszero(self) |
| 731 | + |
| 732 | + def array_distinct(self) -> Expr: |
| 733 | + """Returns distinct values from the array after removing duplicates.""" |
| 734 | + return F.array_distinct(self) |
| 735 | + |
| 736 | + def arrow_typeof(self) -> Expr: |
| 737 | + """Returns the Arrow type of the expression.""" |
| 738 | + return F.arrow_typeof(self) |
| 739 | + |
| 740 | + def length(self) -> Expr: |
| 741 | + """The number of characters in the ``string``.""" |
| 742 | + return F.length(self) |
| 743 | + |
| 744 | + def lower(self) -> Expr: |
| 745 | + """Converts a string to lowercase.""" |
| 746 | + return F.lower(self) |
| 747 | + |
| 748 | + def acos(self) -> Expr: |
| 749 | + """Returns the arc cosine or inverse cosine of a number. |
| 750 | +
|
| 751 | + Returns: |
| 752 | + -------- |
| 753 | + Expr |
| 754 | + A new expression representing the arc cosine of the input expression. |
| 755 | + """ |
| 756 | + return F.acos(self) |
| 757 | + |
| 758 | + def ascii(self) -> Expr: |
| 759 | + """Returns the numeric code of the first character of the argument.""" |
| 760 | + return F.ascii(self) |
| 761 | + |
| 762 | + def sha384(self) -> Expr: |
| 763 | + """Computes the SHA-384 hash of a binary string.""" |
| 764 | + return F.sha384(self) |
| 765 | + |
| 766 | + def isnan(self) -> Expr: |
| 767 | + """Returns true if a given number is +NaN or -NaN otherwise returns false.""" |
| 768 | + return F.isnan(self) |
| 769 | + |
| 770 | + def degrees(self) -> Expr: |
| 771 | + """Converts the argument from radians to degrees.""" |
| 772 | + return F.degrees(self) |
| 773 | + |
| 774 | + def cardinality(self) -> Expr: |
| 775 | + """Returns the total number of elements in the array.""" |
| 776 | + return F.cardinality(self) |
| 777 | + |
| 778 | + def sha224(self) -> Expr: |
| 779 | + """Computes the SHA-224 hash of a binary string.""" |
| 780 | + return F.sha224(self) |
| 781 | + |
| 782 | + def asinh(self) -> Expr: |
| 783 | + """Returns inverse hyperbolic sine.""" |
| 784 | + return F.asinh(self) |
| 785 | + |
| 786 | + def flatten(self) -> Expr: |
| 787 | + """Flattens an array of arrays into a single array.""" |
| 788 | + return F.flatten(self) |
| 789 | + |
| 790 | + def exp(self) -> Expr: |
| 791 | + """Returns the exponential of the argument.""" |
| 792 | + return F.exp(self) |
| 793 | + |
| 794 | + def abs(self) -> Expr: |
| 795 | + """Return the absolute value of a given number. |
| 796 | +
|
| 797 | + Returns: |
| 798 | + -------- |
| 799 | + Expr |
| 800 | + A new expression representing the absolute value of the input expression. |
| 801 | + """ |
| 802 | + return F.abs(self) |
| 803 | + |
| 804 | + def btrim(self) -> Expr: |
| 805 | + """Removes all characters, spaces by default, from both sides of a string.""" |
| 806 | + return F.btrim(self) |
| 807 | + |
| 808 | + def md5(self) -> Expr: |
| 809 | + """Computes an MD5 128-bit checksum for a string expression.""" |
| 810 | + return F.md5(self) |
| 811 | + |
| 812 | + def octet_length(self) -> Expr: |
| 813 | + """Returns the number of bytes of a string.""" |
| 814 | + return F.octet_length(self) |
| 815 | + |
| 816 | + def cosh(self) -> Expr: |
| 817 | + """Returns the hyperbolic cosine of the argument.""" |
| 818 | + return F.cosh(self) |
| 819 | + |
| 820 | + def radians(self) -> Expr: |
| 821 | + """Converts the argument from degrees to radians.""" |
| 822 | + return F.radians(self) |
| 823 | + |
| 824 | + def sqrt(self) -> Expr: |
| 825 | + """Returns the square root of the argument.""" |
| 826 | + return F.sqrt(self) |
| 827 | + |
| 828 | + def character_length(self) -> Expr: |
| 829 | + """Returns the number of characters in the argument.""" |
| 830 | + return F.character_length(self) |
| 831 | + |
| 832 | + def tanh(self) -> Expr: |
| 833 | + """Returns the hyperbolic tangent of the argument.""" |
| 834 | + return F.tanh(self) |
| 835 | + |
| 836 | + def atan(self) -> Expr: |
| 837 | + """Returns inverse tangent of a number.""" |
| 838 | + return F.atan(self) |
| 839 | + |
| 840 | + def rtrim(self) -> Expr: |
| 841 | + """Removes all characters, spaces by default, from the end of a string.""" |
| 842 | + return F.rtrim(self) |
| 843 | + |
| 844 | + def atanh(self) -> Expr: |
| 845 | + """Returns inverse hyperbolic tangent.""" |
| 846 | + return F.atanh(self) |
| 847 | + |
| 848 | + def list_dims(self) -> Expr: |
| 849 | + """Returns an array of the array's dimensions. |
| 850 | +
|
| 851 | + This is an alias for :py:func:`array_dims`. |
| 852 | + """ |
| 853 | + return F.list_dims(self) |
| 854 | + |
| 855 | + def sha256(self) -> Expr: |
| 856 | + """Computes the SHA-256 hash of a binary string.""" |
| 857 | + return F.sha256(self) |
| 858 | + |
| 859 | + def factorial(self) -> Expr: |
| 860 | + """Returns the factorial of the argument.""" |
| 861 | + return F.factorial(self) |
| 862 | + |
| 863 | + def acosh(self) -> Expr: |
| 864 | + """Returns inverse hyperbolic cosine.""" |
| 865 | + return F.acosh(self) |
| 866 | + |
| 867 | + def floor(self) -> Expr: |
| 868 | + """Returns the nearest integer less than or equal to the argument.""" |
| 869 | + return F.floor(self) |
| 870 | + |
| 871 | + def ceil(self) -> Expr: |
| 872 | + """Returns the nearest integer greater than or equal to argument.""" |
| 873 | + return F.ceil(self) |
| 874 | + |
| 875 | + def list_length(self) -> Expr: |
| 876 | + """Returns the length of the array. |
| 877 | +
|
| 878 | + This is an alias for :py:func:`array_length`. |
| 879 | + """ |
| 880 | + return F.list_length(self) |
| 881 | + |
| 882 | + def upper(self) -> Expr: |
| 883 | + """Converts a string to uppercase.""" |
| 884 | + return F.upper(self) |
| 885 | + |
| 886 | + def chr(self) -> Expr: |
| 887 | + """Converts the Unicode code point to a UTF8 character.""" |
| 888 | + return F.chr(self) |
| 889 | + |
| 890 | + def ln(self) -> Expr: |
| 891 | + """Returns the natural logarithm (base e) of the argument.""" |
| 892 | + return F.ln(self) |
| 893 | + |
| 894 | + def tan(self) -> Expr: |
| 895 | + """Returns the tangent of the argument.""" |
| 896 | + return F.tan(self) |
| 897 | + |
| 898 | + def array_pop_front(self) -> Expr: |
| 899 | + """Returns the array without the first element.""" |
| 900 | + return F.array_pop_front(self) |
| 901 | + |
| 902 | + def cbrt(self) -> Expr: |
| 903 | + """Returns the cube root of a number.""" |
| 904 | + return F.cbrt(self) |
| 905 | + |
| 906 | + def sha512(self) -> Expr: |
| 907 | + """Computes the SHA-512 hash of a binary string.""" |
| 908 | + return F.sha512(self) |
| 909 | + |
| 910 | + def char_length(self) -> Expr: |
| 911 | + """The number of characters in the ``string``.""" |
| 912 | + return F.char_length(self) |
| 913 | + |
| 914 | + def list_ndims(self) -> Expr: |
| 915 | + """Returns the number of dimensions of the array. |
| 916 | +
|
| 917 | + This is an alias for :py:func:`array_ndims`. |
| 918 | + """ |
| 919 | + return F.list_ndims(self) |
| 920 | + |
| 921 | + def trim(self) -> Expr: |
| 922 | + """Removes all characters, spaces by default, from both sides of a string.""" |
| 923 | + return F.trim(self) |
| 924 | + |
| 925 | + def cos(self) -> Expr: |
| 926 | + """Returns the cosine of the argument.""" |
| 927 | + return F.cos(self) |
| 928 | + |
| 929 | + def sinh(self) -> Expr: |
| 930 | + """Returns the hyperbolic sine of the argument.""" |
| 931 | + return F.sinh(self) |
| 932 | + |
| 933 | + def empty(self) -> Expr: |
| 934 | + """This is an alias for :py:func:`array_empty`.""" |
| 935 | + return F.empty(self) |
| 936 | + |
| 937 | + def ltrim(self) -> Expr: |
| 938 | + """Removes all characters, spaces by default, from the beginning of a string.""" |
| 939 | + return F.ltrim(self) |
| 940 | + |
| 941 | + def signum(self) -> Expr: |
| 942 | + """Returns the sign of the argument (-1, 0, +1).""" |
| 943 | + return F.signum(self) |
| 944 | + |
| 945 | + def log2(self) -> Expr: |
| 946 | + """Base 2 logarithm of the argument.""" |
| 947 | + return F.log2(self) |
| 948 | + |
| 949 | + def cot(self) -> Expr: |
| 950 | + """Returns the cotangent of the argument.""" |
| 951 | + return F.cot(self) |
| 952 | + |
664 | 953 |
|
665 | 954 | class ExprFuncBuilder: |
666 | 955 | def __init__(self, builder: expr_internal.ExprFuncBuilder) -> None: |
|
0 commit comments