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

Open
rkuchan opened this Issue Nov 3, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@rkuchan
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

This comment has been minimized.

Contributor

rbetts commented Feb 1, 2018

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

@jsternberg

This comment has been minimized.

Contributor

jsternberg commented Feb 1, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment