Skip to content

Casting allowed for unpivot operator? #394

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

Open
antonio-olleros opened this issue Feb 28, 2024 · 2 comments
Open

Casting allowed for unpivot operator? #394

antonio-olleros opened this issue Feb 28, 2024 · 2 comments
Labels

Comments

@antonio-olleros
Copy link
Contributor

Issue Description

According to VTL Manual row 7183, for unpitvo operator: All the measures of op must be defined on the same Value Domain.
The question is: What happens if we have two measures with different types, but for which implicit casting is allowed (E.g., number and integer)?

Proposed Solution

Whatever solution should be documented in the manual

@vpinna80
Copy link
Collaborator

vpinna80 commented Mar 4, 2024

I tend to favor raising an error in this case to avoid surprising results, like numbers converted to strings or vice versa

@antonio-olleros
Copy link
Contributor Author

I tend to agree, but only because of the implicit conversion to string... Actually, I was thinking that maybe what we should do is to forbid the implicit conversion to string, because it can only cause silent errors... If you want to do a cast, you just need to do it explictly, except when it is a case from a subtype to the supertype. What do you think about this option? I can open an issue

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

2 participants