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

[0.9.5] arithmetic on one field when selecting multiple fields returns nothing #4958

Closed
beckettsean opened this issue Dec 2, 2015 · 4 comments

Comments

@beckettsean
Copy link
Contributor

Note that this is slightly different behavior from #4046.

Single point in the measurement:

> select * from fieldmath
name: fieldmath
---------------
time                foo value
2015-12-02T21:10:05.868748621Z  bar 12

Division works fine when selecting only that field

> select value/12 from fieldmath
name: fieldmath
---------------
time                
2015-12-02T21:10:05.868748621Z  1

> select value/12 as value from fieldmath
name: fieldmath
---------------
time                value
2015-12-02T21:10:05.868748621Z  1

However, all returns are null for that field + arithmetic if another field is also selected in the query.


> select value/12, foo from fieldmath
name: fieldmath
---------------
time                    foo
2015-12-02T21:10:05.868748621Z      bar

> select value/12 as value, foo from fieldmath
name: fieldmath
---------------
time                value   foo
2015-12-02T21:10:05.868748621Z      bar

> select foo, value/12 as value from fieldmath
name: fieldmath
---------------
time                foo value
2015-12-02T21:10:05.868748621Z  bar 

> select foo, value/12 from fieldmath
name: fieldmath
---------------
time                foo 
2015-12-02T21:10:05.868748621Z  bar 

The behavior is the same even if the additional field is just a repeat of the math field:

> select * from graph
name: graph
-----------
time                value
2015-11-04T21:29:44.423498682Z  12

> select value/12, value from graph
name: graph
-----------
time                    value
2015-11-04T21:29:44.423498682Z      12

> select value/12 as foo, value from graph
name: graph
-----------
time                foo value
2015-11-04T21:29:44.423498682Z      12

> select value, value/12 as foo from graph
name: graph
-----------
time                value   foo
2015-11-04T21:29:44.423498682Z  12  

> select value, value/12 from graph
name: graph
-----------
time                value   
2015-11-04T21:29:44.423498682Z  12  
@beckettsean
Copy link
Contributor Author

@benbjohnson another one...

@mail2fish
Copy link

the same question +1

@desa
Copy link
Contributor

desa commented Dec 4, 2015

fixed by #4984

@desa desa closed this as completed Dec 4, 2015
@beckettsean
Copy link
Contributor Author

Will be in the 0.9.6-nightlies starting tonight.

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