Skip to content
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

Null inference #505

Open
NicoLaval opened this issue Jun 26, 2024 · 2 comments
Open

Null inference #505

NicoLaval opened this issue Jun 26, 2024 · 2 comments
Labels

Comments

@NicoLaval
Copy link
Collaborator

As null as no type in the current version, I didn't find in specification that we are allowed to infer null type.

I think a := 1 + null; is not null but raised en error and we have to define a := 1 + cast(null, integer);

How can we improve?

  • defining a null type?
  • enable null type inference (would it be possible in each cases?)?
@linardian
Copy link
Collaborator

Please refer to the paragraph "Scalar types" page 52 the "default" assumptions ("All the scalar types are assumed by default to contain the conventional value “NULL”, which means “no value”, or “absence of known value” or “missing value” (in other words, the scalar types by default are “nullable”). Note that the “NULL” value, therefore, is the only value of multiple different types (i.e., all the nullable scalar types).definition of "Null" value and the behaviour of the different operators.") and the paragraph "Behaviour for Missing data", page 91 of the VTL User Manual - Version 2.1 for the behaviour of the different operators dealing with null values. We have already discussed about he "reshuffled" asset of the future versions of documentation since some chapters/paragraph of the User Manual could be inserted in the Reference Manual and viceversa.

@vpinna80
Copy link
Collaborator

I'd like to point out that "null" is not a valid VTL literal, for good reasons IMHO.
Allowing "null" literals with the new implicit castings would open the way to any sort of shenanigans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants