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

Removing aggregate results in wrong UI value and wrong SQL code #112

Open
1 task done
jbsgh opened this issue Oct 25, 2024 · 0 comments
Open
1 task done

Removing aggregate results in wrong UI value and wrong SQL code #112

jbsgh opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jbsgh
Copy link

jbsgh commented Oct 25, 2024

To reproduce

  1. Open Query Builder
  2. Select Table as Time series
  3. Add 3 Aggregates:
    FIRST item1 as i1
    MIN item2 as i2
    LAST item3 as i3
    This results in the correct SQL:
    SELECT time as time, first(item1) i1, min(item2) i2, last(item3) i3 ...
  4. Remove the 2. aggregate by clicking on the icon
  5. The remaining 2 aggregates are shown as
    FIRST item1 as i1
    LAST item3 as i2
    The alias for the last item has changed from i3 to i2. That's wrong.
  6. The resulting SQL is wrong:
    SELECT time as time, first(item1) i3, last(item3) i3 ...
    The alias of the first item has changed from i1 to i3. The SQL does not reflect the visual aggregate configuration anymore. When running the query, the DB reports "duplicate column [name=i3]"

QuestDB version:

8.1.2

Grafana version:

11.2.2

Plugin version:

ZIP from Maciej from 5th July 24

OS, in case of Docker specify Docker and the Host OS:

Debian 12

Full Name:

Jan Bartels

Affiliation:

Siempelkamp

Have you followed Linux, MacOs kernel configuration steps to increase Maximum open files and Maximum virtual memory areas limit?

  • Yes, I have

Additional context

No response

@jbsgh jbsgh added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant