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

Naming of operation outputs (bool_var) #333

Open
NicoLaval opened this issue May 20, 2024 · 4 comments
Open

Naming of operation outputs (bool_var) #333

NicoLaval opened this issue May 20, 2024 · 4 comments

Comments

@NicoLaval
Copy link
Collaborator

@noahboerger you reported:

In trevas the result of a logical operation is called bool_var instead of having the same name as the input column

Any example inconsistent with the specification?

@NicoLaval NicoLaval added question Further information is requested Needs more information and removed question Further information is requested labels May 20, 2024
@noahboerger
Copy link
Collaborator

This behaviour is not inconsistent with the specification. Nevertheless the specification is out of my point of view a bit less strict in these cases (reference manual p. 47 f.):

The following table shows the default Variable names and the relevant default Value Domain. These are only the names used in this manual for explanatory purposes and can be personalised in the implementations. If VTL rules are exchanged, the personalised names need to be shared with the partners of the exchange.

Would it not be better to enforce these defaults, to ensure compatibility between different engines and remove the explicit allowment for personalized default names, which may have lead to the failures of some of our test cases?

@hadrienk
Copy link
Collaborator

hadrienk commented May 24, 2024

Using a variable name derived from the input sound good in theory, but in practice any expression with more than one variable cannot use this mechanism: foo(a + b - c) * d -> ?.

We "could" analyse the expression and see if there's only on variable in the tree, but in the end if a variable passes a couple of functions and operators, is keeping the same name really something that is desired?

AFAIR the spec switches from one convention to another. Some operators have their own names and other rely on the global convention. This should be clarified in the spec & function definitions. And the TCK should tests these cases.

@NicoLaval
Copy link
Collaborator Author

bool_var is used for validation results in Trevas. It's maybe strange, but it matches the specification I think.

@noahboerger
Copy link
Collaborator

@NicoLaval as mentioned in my previous comment, the reference manual seems to only recommend the output name for such cases. You are using these recommendations, which is totally matching the specification. Nevertheless, i think it would be useful, to ensure these names also in the VTL specification, to ensure the compatibility between different engines.

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

No branches or pull requests

3 participants