-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hogql): type class refactor, field to constant type resolving #15129
Conversation
|
||
# https://github.com/ClickHouse/ClickHouse/issues/23194 - "Describe how identifiers in SELECT queries are resolved" | ||
|
||
|
||
def resolve_refs(node: ast.Expr, database: Database, scope: Optional[ast.SelectQueryRef] = None): | ||
def resolve_constant_data_type(constant: Any) -> ConstantType: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are NULL constants a thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some decisions to take here... and I'd love to have someone with whom to talk this through.
My understanding so far:
null
is a value that fits everywhere, and not a special data type- you can have a field with with the value
null
, but its type would still be "uint8" or "float64" or "bool" or whatever, but with a "nullable" modifier - I needed an "unknown" type, which is now also the default given to any "autodetected" constant type
- this type system still needs a lot of work and some unification across the board (the work touches clickhouse types, but properties are identified as "number" and need to be split to "int" and "float"... and "decimal"?) - so more PRs to come...
2841a55
to
0136a50
Compare
Changes
UUIDType
orIntegerType
orArrayType
for all supported datatypes.TableOrSelectType
and refactor some moreCallType
Out of scope: correct type arguments and return types for functions. Lots more incoming.
How did you test this code?