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

Update query builder metaqueries #13678

Merged
merged 1 commit into from
Apr 26, 2019
Merged

Update query builder metaqueries #13678

merged 1 commit into from
Apr 26, 2019

Conversation

chnn
Copy link
Contributor

@chnn chnn commented Apr 26, 2019

Currently, slight changes in the form of a Flux metaquery can have drastic performance implications. To solve this issue, the Flux language provides helper metaquery functions such as v1.tagKeys and v1.tagValues which are guaranteed to be as fast as possible.

In #12791, we switched away from using the v1.tagKeys and v1.tagValues functions in the query builder to their underlying Flux implementations in order to implement a UI feature. While the new metaqueries used in the query builder were still optimized at the time, the Flux language has since changed and this is no longer the case.

In addition, the metaqueries in the UI no longer hit the same code-path in Flux which has exposed a logic bug in the queries. So when executed, the metaqueries return the following error:

schema collision detected: column ""_value"" is both of type float and int

This PR updates the metaqueries used in the query builder to their currently optimized form. The long term solution is to address this issue and then switch back to using the safer v1.tagKeys and v1.tagValues functions directly.

Closes #13660

Currently, slight changes in the form of a Flux metaquery can have
drastic performance implications. To solve this issue, the Flux language
provides helper metaquery functions such as `v1.tagKeys` and
`v1.tagValues` which are guaranteed to be as fast as possible.

In #12791, we switched away from using the `v1.tagKeys` and
`v1.tagValues` functions in the query builder to their underlying Flux
implementations in order to implement a UI feature. While the new
metaqueries used in the query builder were still optimized at the time,
the Flux language has since changed and this is no longer the case.

In addition, the metaqueries in the UI no longer hit the same code-path
in Flux which has exposed a logic bug in the queries. So when executed,
the metaqueries return the following error:

    schema collision detected: column ""_value"" is both of type float and int

This PR updates the metaqueries used in the query builder to their
[currently optimized form][0]. The long term solution is to address
[this][1] issue and then switch back to using the safer `v1.tagKeys` and
`v1.tagValues` functions directly.

[0]: https://github.com/influxdata/flux/blob/master/stdlib/influxdata/influxdb/v1/v1.flux
[1]: influxdata/flux#1071

Closes #13660
@chnn chnn requested a review from jpacik April 26, 2019 21:14
@chnn chnn merged commit 4378456 into master Apr 26, 2019
@mark-rushakoff mark-rushakoff deleted the ui-fix-builder-metaqueries branch May 29, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

schema collision detected: column ""_value"" is both of type float and int
3 participants