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

Prevent column name collisions in node queries #330

Open
jgoizueta opened this issue Sep 20, 2017 · 2 comments
Open

Prevent column name collisions in node queries #330

jgoizueta opened this issue Sep 20, 2017 · 2 comments
Assignees
Labels

Comments

@jgoizueta
Copy link
Contributor

jgoizueta commented Sep 20, 2017

Some analysis may fail because the produced result tables contain duplicated column names, like in #235

So we should have a simple way of adapting the name of result columns when needed.

We should preserve the current added column names except when collisions occur, because if
we change a column name in an already cached analysis node, the maps using that analysis will be broken; the list of column names is obtained from the new query (with LIMIT 0) but it is not present in the cached table).

To make things clear for the users we can use the node id (node.params.id) when possible as as column name suffix to distinguish from other column of the same name (so we can have names like count_vals, count_vals_a2) [See here]

If we cannot resolve the ambiguity with this method we'll add a numeric suffix, making the number as large as needed (count_vals, count_vals_2, count_vals_3).

@jgoizueta
Copy link
Contributor Author

TODO: we should check all analyses that inherit columns from other nodes and use the ColumnNamer for any columns they add.

@rafatower
Copy link
Contributor

@dgaubert I kicked out a duplicated ticket in RT because I thought it can take longer than 3 days, nevertheless I think it's not that hard to fix but important to keep this one in some backlog.

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