from __future__ import annotations

from typing import Any

from pydantable.expressions import ColumnRef, Expr, Literal, WhenChain

def abs(column: Expr) -> Expr: ...
def array_distinct(column: Expr, *, stable: bool = False) -> Expr: ...
def avg(column: Expr) -> Expr: ...
def between(column: Expr, lower: Any, upper: Any) -> Expr: ...
def binary_len(column: Expr) -> Expr: ...
def cast(column: Expr, dtype: Any) -> Expr: ...
def ceil(column: Expr) -> Expr: ...
def coalesce(*cols: Expr) -> Expr: ...
def col(name: str, *, dtype: Any | None = None) -> ColumnRef: ...
def column(name: str, *, dtype: Any | None = None) -> ColumnRef: ...
def concat(*cols: Expr) -> Expr: ...
def contains(column: Expr, substring: str) -> Expr: ...
def count(column: Expr | None = None) -> Expr: ...
def day(column: Expr) -> Expr: ...
def dayofmonth(column: Expr) -> Expr: ...
def dayofweek(column: Expr) -> Expr: ...
def dense_rank() -> Any: ...
def element_at(column: Expr, key: str) -> Expr: ...
def ends_with(column: Expr, suffix: str) -> Expr: ...
def floor(column: Expr) -> Expr: ...
def hour(column: Expr) -> Expr: ...
def isin(column: Expr, *values: Any) -> Expr: ...
def isnotnull(column: Expr) -> Expr: ...
def isnull(column: Expr) -> Expr: ...
def json_path_match(column: Expr, path: str) -> Expr: ...
def lag(column: Expr, n: int = 1) -> Any: ...
def lead(column: Expr, n: int = 1) -> Any: ...
def length(column: Expr) -> Expr: ...
def list_contains(column: Expr, value: Any) -> Expr: ...
def list_get(column: Expr, index: Any) -> Expr: ...
def list_join(column: Expr, delimiter: str, *, ignore_nulls: bool = False) -> Expr: ...
def list_len(column: Expr) -> Expr: ...
def list_max(column: Expr) -> Expr: ...
def list_mean(column: Expr) -> Expr: ...
def list_min(column: Expr) -> Expr: ...
def list_sort(
    column: Expr,
    *,
    descending: bool = False,
    nulls_last: bool = False,
    maintain_order: bool = False,
) -> Expr: ...
def list_sum(column: Expr) -> Expr: ...
def lit(value: Any) -> Literal: ...
def lower(column: Expr) -> Expr: ...
def lpad(column: Expr, length: int, pad: str = " ") -> Expr: ...
def lpad_zero(column: Expr, length: int) -> Expr: ...
def map_contains_key(column: Expr, key: str) -> Expr: ...
def map_entries(column: Expr) -> Expr: ...
def map_from_entries(column: Expr) -> Expr: ...
def map_get(column: Expr, key: str) -> Expr: ...
def map_keys(column: Expr) -> Expr: ...
def map_len(column: Expr) -> Expr: ...
def map_values(column: Expr) -> Expr: ...
def max(column: Expr) -> Expr: ...
def mean(column: Expr) -> Expr: ...
def min(column: Expr) -> Expr: ...
def minute(column: Expr) -> Expr: ...
def month(column: Expr) -> Expr: ...
def nanosecond(column: Expr) -> Expr: ...
def quarter(column: Expr) -> Expr: ...
def rank() -> Any: ...
def regexp_extract(column: Expr, pattern: str, group_index: int = 1) -> Expr: ...
def regexp_replace(column: Expr, pattern: str, replacement: str) -> Expr: ...
def reverse(column: Expr) -> Expr: ...
def round(column: Expr, scale: int = 0) -> Expr: ...
def row_number() -> Any: ...
def rpad(column: Expr, length: int, pad: str = " ") -> Expr: ...
def second(column: Expr) -> Expr: ...
def split(column: Expr, delimiter: str) -> Expr: ...
def starts_with(column: Expr, prefix: str) -> Expr: ...
def str_contains_pat(column: Expr, pattern: str, *, literal: bool = False) -> Expr: ...
def str_replace(
    column: Expr, pattern: str, replacement: str, *, literal: bool = True
) -> Expr: ...
def strip_chars(column: Expr, chars: str) -> Expr: ...
def strip_prefix(column: Expr, prefix: str) -> Expr: ...
def strip_suffix(column: Expr, suffix: str) -> Expr: ...
def strptime(column: Expr, format: str, *, to_datetime: bool = True) -> Expr: ...
def substring(column: Expr, pos: Any, length: Any | None = None) -> Expr: ...
def sum(column: Expr) -> Expr: ...
def to_date(column: Expr, format: str | None = None) -> Expr: ...
def trim(column: Expr) -> Expr: ...
def unix_timestamp(column: Expr, unit: str = "seconds") -> Expr: ...
def upper(column: Expr) -> Expr: ...
def weekofyear(column: Expr) -> Expr: ...
def when(condition: Expr, value: Expr) -> WhenChain: ...
def window_avg(column: Expr) -> Any: ...
def window_max(column: Expr) -> Any: ...
def window_min(column: Expr) -> Any: ...
def window_sum(column: Expr) -> Any: ...
def year(column: Expr) -> Expr: ...

__all__ = [
    "abs",
    "array_distinct",
    "avg",
    "between",
    "binary_len",
    "cast",
    "ceil",
    "coalesce",
    "col",
    "column",
    "concat",
    "contains",
    "count",
    "day",
    "dayofmonth",
    "dayofweek",
    "dense_rank",
    "element_at",
    "ends_with",
    "floor",
    "hour",
    "isin",
    "isnotnull",
    "isnull",
    "json_path_match",
    "lag",
    "lead",
    "length",
    "list_contains",
    "list_get",
    "list_join",
    "list_len",
    "list_max",
    "list_mean",
    "list_min",
    "list_sort",
    "list_sum",
    "lit",
    "lower",
    "lpad",
    "lpad_zero",
    "map_contains_key",
    "map_entries",
    "map_from_entries",
    "map_get",
    "map_keys",
    "map_len",
    "map_values",
    "max",
    "mean",
    "min",
    "minute",
    "month",
    "nanosecond",
    "quarter",
    "rank",
    "regexp_extract",
    "regexp_replace",
    "reverse",
    "round",
    "row_number",
    "rpad",
    "second",
    "split",
    "starts_with",
    "str_contains_pat",
    "str_replace",
    "strip_chars",
    "strip_prefix",
    "strip_suffix",
    "strptime",
    "substring",
    "sum",
    "to_date",
    "trim",
    "unix_timestamp",
    "upper",
    "weekofyear",
    "when",
    "window_avg",
    "window_max",
    "window_min",
    "window_sum",
    "year",
]
