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

Including libraries with conflicting parameter types should trigger a warning #785

Open
EvanMachusak opened this issue Aug 4, 2022 · 1 comment
Labels
cql The issue relates to or requires a change or clarification on the CQL specification enhancement
Milestone

Comments

@EvanMachusak
Copy link

Consider:

  • CQL library A defines a parameter "P" whose type is Interval
  • CQL Library B defines a parameter "P" whose type is Boolean
  • A includes B

In many execution environments which only allow the user to supply a single value for each named parameter, trying to execute library A will be impossible, because parameter "P" cannot be simultaneously an Interval and a Boolean.

The translator should warn, and optionally by flag, cause an error when this is detected. This will help execution environments that assign parameter values globally protect themselves against parameter type conflicts.

@brynrhodes brynrhodes added enhancement cql The issue relates to or requires a change or clarification on the CQL specification labels Aug 4, 2022
@brynrhodes brynrhodes added this to the Maintenance milestone Aug 4, 2022
@frankadrian314159
Copy link

Wouldn't the two P's be different? In library A, P (or A.P) would refer to A's P while one would have to explicitly reference B.P to see B's P. Since the two parameters have different access paths, there should be no collision. In reality, it is forcing these two different parameters to have a single value that causes the error and this is where the error should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cql The issue relates to or requires a change or clarification on the CQL specification enhancement
Projects
None yet
Development

No branches or pull requests

4 participants