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

continuous queries are padding with 0 and nulls by default v0.11.1, order by DESC broken as well #6206

Closed
ianlutzeigen opened this issue Apr 4, 2016 · 6 comments
Assignees

Comments

@ianlutzeigen
Copy link

Hi

I am running a bunch of CQs on "testdb" that downsample into a separate db called "testdb_downsampled"

What i am observing is that there are both "nulls" and "0s" for the sections of data where there is no data to be downsampled. Some CQs have zero some have none. I have not specified a fill type so it should be "null". These zeros are wrong....

note DESC is broken as well: what is with those time stamps ?

(note i have tested all this agains v.10.3 and that behaves as I would expect)
screen shot 2016-04-05 at 09 16 00

screen shot 2016-04-05 at 09 11 38

screen shot 2016-04-05 at 09 09 02

@ericremoreynolds
Copy link

Hello, I have noticed a similar issue, I think it might be related.

Steps to reproduce:

  1. CREATE DATABASE "x"
  2. Write following data to db
y a=1 1212105600000000000
y b=2 1212019200000000000
  1. SELECT * FROM y

image

b gets padded with 0, a gets padded with null

Seems inconsistent, in particular padding with default value 0 is annoying because 0 means that a value is present and equal to zero, whereas null means value is not present.

@ericremoreynolds
Copy link

Note I am running 0.11.1, only just noticed new version is now available. Will upgrade and check if bug is still present.

@jsternberg
Copy link
Contributor

I'm able to reproduce the bug. Thanks @ericremoreynolds.

@jsternberg jsternberg self-assigned this Apr 5, 2016
@ericremoreynolds
Copy link

Confirm that it didn't happen with 0.10.3

@jsternberg
Copy link
Contributor

@ianlutzeigen can you give me a way to reproduce the ORDER BY desc bug? I'm able to reproduce the zeroes bug and have a fix ready for it, but I want to try and get both of those fixes in case we decide to do a patch release.

@jsternberg
Copy link
Contributor

I think I managed to reproduce the ORDER BY desc bug using the same input @ericremoreynolds gave me. I've made a PR for fixing ORDER BY desc and the default value bug as part of #6222.

jsternberg added a commit that referenced this issue Apr 5, 2016
Send nil values from the tsm1 cursor at the end of the cursor. After the
cursor reached tsm1, the `nextAt()` call would always return the default
value rather than a nil value.

Descending also didn't work correctly because the seeking functionality
for tsm1 iterators would always act like they were ascending instead of
descending when choosing which value to select. This resulted in very
strange output from the emitter since it couldn't figure out if it was
ascending or descending.

Fixes #6206.
jsternberg added a commit that referenced this issue Apr 6, 2016
Send nil values from the tsm1 cursor at the end of the cursor. After the
cursor reached tsm1, the `nextAt()` call would always return the default
value rather than a nil value.

Descending also didn't work correctly because the seeking functionality
for tsm1 iterators would always act like they were ascending instead of
descending when choosing which value to select. This resulted in very
strange output from the emitter since it couldn't figure out if it was
ascending or descending.

Fixes #6206.
jsternberg added a commit that referenced this issue Apr 6, 2016
jsternberg added a commit that referenced this issue Apr 6, 2016
Send nil values from the tsm1 cursor at the end of the cursor. After the
cursor reached tsm1, the `nextAt()` call would always return the default
value rather than a nil value.

Descending also didn't work correctly because the seeking functionality
for tsm1 iterators would always act like they were ascending instead of
descending when choosing which value to select. This resulted in very
strange output from the emitter since it couldn't figure out if it was
ascending or descending.

Fixes #6206.
jsternberg added a commit that referenced this issue Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants