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

SOFFSET without SLIMIT returns odd results #7578

Closed
rkuchan opened this issue Nov 3, 2016 · 4 comments
Closed

SOFFSET without SLIMIT returns odd results #7578

rkuchan opened this issue Nov 3, 2016 · 4 comments
Assignees
Labels
1.x area/influxql Issues related to InfluxQL query language kind/bug pm/review wontfix

Comments

@rkuchan
Copy link
Contributor

rkuchan commented Nov 3, 2016

Bug report

Ubuntu, 1.1 nightly

Steps to reproduce:

1. Write some data

> create database mydb
> use mydb
Using database mydb
> insert mymeas,color=yellow value=2
> insert mymeas,color=yellow value=3
> insert mymeas,color=yellow value=4
> insert mymeas,color=yellow value=5
> insert mymeas,color=blue value=800
> insert mymeas,color=blue value=900
> SELECT * FROM mymeas
name: mymeas
time				color	value
----				-----	-----
2016-11-02T23:27:55.659009728Z	yellow	2
2016-11-02T23:27:57.532365177Z	yellow	3
2016-11-02T23:27:59.352763724Z	yellow	4
2016-11-02T23:28:01.064617644Z	yellow	5
2016-11-02T23:29:08.953855972Z	blue	800
2016-11-02T23:29:11.427777943Z	blue	900

2. Run an SOFFSET query without SLIMIT

> SELECT * FROM mymeas SOFFSET 1
>

3. Run an SOFFSET query with SLIMIT

> SELECT * FROM mymeas SLIMIT 1 SOFFSET 1
>

4. Run an SOFFSET query with SLIMIT and GROUP BY *

> SELECT * FROM mymeas GROUP BY * SLIMIT 1 SOFFSET 1
name: mymeas
tags: color=yellow
time				value
----				-----
2016-11-02T23:27:55.659009728Z	2
2016-11-02T23:27:57.532365177Z	3
2016-11-02T23:27:59.352763724Z	4
2016-11-02T23:28:01.064617644Z	5

Expected behavior:

I'm not sure what I'd expect the query in step 2 to return; in a bare SELECT * FROM measurement query InfluxDB returns all series so how would it paginate through series if it returns all of them by default? I might expect to see an error about requiring an SLIMIT clause.

I'd expect the query in step 3 to return what I get in step 4.

Actual behavior: [What actually happened]

The query in step 2 returns nothing. The query in step 3 also returns nothing - I'm guessing this has something to do with #7571.

@rbetts
Copy link
Contributor

rbetts commented Feb 1, 2018

Let's try to reproduce this against 1.5.x.

@jsternberg
Copy link
Contributor

It looks like this still happens. For SLIMIT and SOFFSET you need some form of grouping, but SOFFSET without SLIMIT seems to return nothing for whatever reason.

@dgnorton dgnorton added the 1.x label Jan 7, 2019
@stale
Copy link

stale bot commented Jul 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 24, 2019
@stale
Copy link

stale bot commented Jul 31, 2019

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

@stale stale bot closed this as completed Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x area/influxql Issues related to InfluxQL query language kind/bug pm/review wontfix
Projects
None yet
Development

No branches or pull requests

5 participants