-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Cosmetic CLI output fixes #1908
Conversation
In the first example, there are no more tags? And how does it look if there is more than 1 value? Can you show that? |
with tags: > select * from temp group by *
name tags time value
---- ---- ---- -----
temp host=server01,region=useast 2015-02-27T22:01:11.703Z 101.1
name tags time value
---- ---- ---- -----
temp region=uswest,host=server01 2015-02-26T22:01:11.703Z 98.6
name tags time value
---- ---- ---- -----
temp host=server02,region=useast 2015-02-28T22:01:11.703Z 105.4 with multiple values: > select * from network
name time tx rx
---- ---- -- --
network 2015-02-26T22:01:11.703Z 9804 2342
network 2015-02-27T22:01:11.703Z 7930 4324
network 2015-02-28T22:01:11.703Z 8234 2342 |
} | ||
// Output a line seperator if we have more than one set or results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: 'separator' is misspelled. And should it be "...of results"?
I like the output changes, though I have some minor feedback on the code. Once that is addressed, +1 from me. |
Ok, so based on feedback, I have made quite a few changes to the Here are the new examples: > show databases
name
foo
> show series
cpu
---
id
1
mem
---
id host
2 server01
3 server02
network
-------
id host region
7 server01 uswest
8 server01 useast
9 server02 useast
temp
----
id host region
4 server01 uswest
5 server01 useast
6 server02 useast
> show measurements
measurements
------------
name
cpu
mem
network
temp
> select * from cpu
cpu
---
time value
2015-02-26T22:01:11.703Z 8.9
2015-02-27T22:01:11.703Z 1.3
2015-02-28T22:01:11.703Z 50.4
> select * from temp group by *
temp
----------------------------------
tags: host=server01, region=useast
----------------------------------
time value
---- -----
2015-02-27T22:01:11.703Z 101.1
temp
----------------------------------
tags: host=server01, region=uswest
----------------------------------
time value
---- -----
2015-02-26T22:01:11.703Z 98.6
temp
----------------------------------
tags: host=server02, region=useast
----------------------------------
time value
---- -----
2015-02-28T22:01:11.703Z 105.4
|
Is this still open to feedback? Because I think the output from
|
Or:
This form has the advantage of helping our users understand the term 'measurement', as used within our system. |
OK, if |
What if we did: > select * from temp group by *
name: temp
tags: host=server01, region=useast
time value
---- -----
2015-02-27T22:01:11.703Z 101.1
name: temp
tags: host=server01, region=uswest
time value
---- -----
2015-02-26T22:01:11.703Z 98.6
name: temp
tags: host=server02, region=useast
time value
---- -----
2015-02-28T22:01:11.703Z 105.4 And if we clean up some inconsistencies in responses for things that don't need names, like |
Can you show a couple more examples? How does stuff like |
@otoolep latest outputs: > show databases
name
foo
> show series
name: cpu
---------
id
1
name: mem
---------
id host
2 server01
3 server02
name: network
-------------
id host region
7 server01 uswest
8 server01 useast
9 server02 useast
name: temp
----------
id host region
4 server01 uswest
5 server01 useast
6 server02 useast
> show measurements
name: measurements
------------------
name
cpu
mem
network
temp
> select * from temp group by *
name: temp
tags: host=server01, region=useast
time value
---- -----
2015-02-27T22:01:11.703Z 101.1
name: temp
tags: host=server01, region=uswest
time value
---- -----
2015-02-26T22:01:11.703Z 98.6
name: temp
tags: host=server02, region=useast
time value
---- -----
2015-02-28T22:01:11.703Z 105.4
> select count(value) from cpu
name: cpu
---------
time count
1970-01-01T00:00:00Z 3
|
I think we are as far as we are going to get on this for now. It fixes several output format bugs, and has improved greatly from what it was. We can come back later to tweak further at a future date. |
@corylanou rad, can you rebase and push? i'll merge it in. |
b33ea14
to
a97c4a3
Compare
@corylanou nevermind. ;) |
…erator -> separator
a97c4a3
to
b0be24b
Compare
@corylanou latest looks rad, 🚢 while it's hot! |
This fixes the following types of queries:
FROM:
TO:
FROM:
TO:
FROM:
TO: