-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Adjust encoding of parametric types #3938
Comments
How would row types be encoded in this format? Current we use |
Row types are different, and we should probably special-case them (they are "record" types from a type theory point of view, not parametric types), and the encoding should mimic SQL's way of doing it:
|
Round brackets in literal calculation were not supported properly in type signature parsing. Round bracket count was added in parsing method that fixes the issue.
We are happy to work on that. Initial work would be to make it possible to use angle brackets and parentheses interchangeably for type parameters. And when this is in rebase decimal patch on top of that.
with single list of some variant type ( |
@losipiuk, yeah, that's more or less how I was thinking about it. BTW, I'd constrain the uses of angle brackets to support only TYPE parameter types. I.e., this should not be allowed:
|
I have started working on this issue |
Do we want to maintain backward compatibility in |
During rebasing with @dain's patch, we have realized some problems with ambiguity of
and without context we can not determine which. Luckily during parsing signature of functions types/arguments, we have such context - template type parameters are explicitly stated, like this:
By introducing some
We could use this context information about
CC @losipiuk |
This is done |
The introduction of integer-kinded type parameters to support types such as
VARCHAR(n)
orDECIMAL(p, s)
, requires using parenthesis for encoding type parameters, which conflict with the current notation based on angle brackets.Thus, the encoding for some common types would be:
For some hypothetical type that takes both type-kinded and integer-kinded parameters, it would look like this:
The implementation should be fairly straightforward, but we need to come up with a plan to deprecate the legacy syntax.
The text was updated successfully, but these errors were encountered: