Created
February 17, 2025 23:35
-
-
Save orian/1ad7b7aac5ab1934e6a612bf684a93f9 to your computer and use it in GitHub Desktop.
add tz_sensitive info to HogQLFunctionMeta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@dataclass() | |
class HogQLFunctionMeta: | |
clickhouse_name: str | |
min_args: int = 0 | |
max_args: Optional[int] = 0 | |
min_params: int = 0 | |
max_params: Optional[int] = 0 | |
aggregate: bool = False | |
overloads: Optional[list[Overload]] = None | |
"""Overloads allow for using a different ClickHouse function depending on the type of the first arg.""" | |
tz_aware: bool = False | |
"""Whether the function is timezone-aware. This means the project timezone will be appended as the last arg.""" | |
tz_sensitive: bool = False | |
"""Whether the result of a function depends on a proper time zone to be set.""" | |
case_sensitive: bool = True | |
"""Not all ClickHouse functions are case-insensitive. See https://clickhouse.com/docs/en/sql-reference/syntax#keywords.""" | |
signatures: Optional[list[tuple[tuple[AnyConstantType, ...], AnyConstantType]]] = None | |
"""Signatures allow for specifying the types of the arguments and the return type of the function.""" | |
suffix_args: Optional[list[ast.Constant]] = None | |
"""Additional arguments that are added to the end of the arguments provided by the caller""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment