-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix of float printing in the shell. #57
Conversation
Before: ``` SELECT 555, 1.1, 1e1, 1.123e-2 from GeoCheckin WHERE time > 1452252523182 AND time < 1452252543182 AND region = 'South Atlantic' AND state = 'South Carolina'; ``` Returned ``` +---+--------------------------+--------------------------+--------------------------+ |555| 1.1 | 10.0 | 0.01123 | +---+--------------------------+--------------------------+--------------------------+ |555|1.10000000000000008882e+00|1.00000000000000000000e+01|1.12300000000000003986e-02| +---+--------------------------+--------------------------+--------------------------+ ``` Now it returns: ``` +---+---+----+-------+ |555|1.1|10.0|0.01123| +---+---+----+-------+ |555|1.1|10.0|0.01123| +---+---+----+-------+ ```
Thanks @gordonguthrie! |
.thumbs.yml config:
|
+1 |
I imagine this should also include a |
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.
Please add the mochiweb
rebar dependency
@@ -82,7 +82,7 @@ split_lists_by_length(Strings, PerString, MaxLen) -> | |||
to_list(A) when is_atom(A) -> atom_to_list(A); | |||
to_list(B) when is_binary(B) -> binary_to_list(B); | |||
to_list(I) when is_integer(I) -> integer_to_list(I); | |||
to_list(F) when is_float(F) -> float_to_list(F); | |||
to_list(F) when is_float(F) -> mochinum:digits(F); |
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.
@macintux Makes a good point. Looks like it's in mochiweb
https://github.com/basho/mochiweb/blob/master/src/mochinum.erl#L45-L59
Here's the current dependency:
{mochiweb, "2.9.0.*", {git, "git://github.com/basho/mochiweb.git", {tag, "v2.9.0p2"}}}
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.
Yeah, not really sure about the rebar.config
stuff with riak-shell
because clique is a dependency which is also not in rebar.config
- did mean to ask about that...
👍 |
Before:
Returned
Now it returns: