You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Krzysztof Cieslinski Cognitum (JIRA)" <ji...@apache.org> on 2012/11/07 11:15:12 UTC
[jira] [Created] (CASSANDRA-4927) E notation is not implemented for
floating point numbers.
Krzysztof Cieslinski Cognitum created CASSANDRA-4927:
--------------------------------------------------------
Summary: E notation is not implemented for floating point numbers.
Key: CASSANDRA-4927
URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
Project: Cassandra
Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
'E' notation is not implemented for floating point numbers.
Inserting some float value like -2.6034345E+38 results in:
??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500348#comment-13500348 ]
Sylvain Lebresne commented on CASSANDRA-4927:
---------------------------------------------
It's probably doable to make antlr happy with that, so I'm good doing it. Not considering it a priority though.
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4927) E notation is not implemented for
floating point numbers.
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-4927:
----------------------------------------
Issue Type: Improvement (was: Bug)
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4927) E notation is not implemented for
floating point numbers.
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-4927:
----------------------------------------
Fix Version/s: 1.2.1
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Krzysztof Cieslinski Cognitum (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500135#comment-13500135 ]
Krzysztof Cieslinski Cognitum commented on CASSANDRA-4927:
----------------------------------------------------------
Try to insert this value without apostrophes. I have tested it on cql3 and I did not tried it with cassandra-cli.
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500175#comment-13500175 ]
Michał Michalski commented on CASSANDRA-4927:
---------------------------------------------
OK, inserting it without apostrophes fails as you stated - I got it now; using apostrophes was quite "natural" for me, so I missed your point at first. Thanks.
(BTW: in cqlsh it works with apostrophes like in cli, so it seems to be a workaround now ;-) )
{noformat}cqlsh:tf> DESCRIBE COLUMNFAMILY test;
CREATE TABLE test (
"KEY" text PRIMARY KEY,
value_double double,
value_float float
) WITH (...)
cqlsh:tf> INSERT INTO test (key, value_float, value_double) VALUES ('D', '-2.6034345E+38', '-2.6034345E+38');
cqlsh:tf> SELECT * FROM tf.test ;
key | value_double | value_float
-----+--------------+-------------
D | -2.6e+38 | -2.6e+38
(...)
{noformat}
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500364#comment-13500364 ]
Michał Michalski commented on CASSANDRA-4927:
---------------------------------------------
I (kind of) fixed it:
{noformat}cqlsh:test> INSERT INTO "Values" (key, value_double, value_float) VALUES ( 'E', -2.6034E+38, -2.6034E+38);
cqlsh:test> SELECT * from "Values";
key | value_double | value_float
-----+--------------+-------------
E | -2.6034e+38 | -2.6034e+38
{noformat}
But now my question is - can I test it somehow? Writing valid expression is one thing, but I wonder if it's not going to break other statements - as Jonathan stated, '+' and '-' signs are being used elsewhere so I can't be sure that there's no conflict with the rest of the grammar? Or maybe I'm wrong and Antlr is able to discover (?) and report such problems somehow?
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: cassandra-4927.txt
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500283#comment-13500283 ]
Jonathan Ellis commented on CASSANDRA-4927:
-------------------------------------------
I'm not sure we can do this with the antlr parser, since - and + are used in other productions. Fine with wontfixing this, quoting is a reasonable workaround.
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4927) E notation is not implemented
for floating point numbers.
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499379#comment-13499379 ]
Michał Michalski commented on CASSANDRA-4927:
---------------------------------------------
Could you provide some more information on how to reproduce this bug? I've tried to do it on tag cassandra-1.2.0-beta2 using cassandra-cli and I failed. I created column family with columns having validation_class FloatType and DoubleType and I tried to insert the value you provided:
{noformat}[default@test] set Values['B']['value_float'] = '-2.6034345E+38';
Value inserted.
Elapsed time: 3.26 msec(s).
[default@test] set Values['B']['value_double'] = '-2.6034345E+38';
Value inserted.
Elapsed time: 3.21 msec(s).
[default@test] list Values ;
Using default limit of 100
Using default column limit of 100
-------------------
RowKey: B
=> (column=value_double, value=-2.6034345E38, timestamp=1353144439969000)
=> (column=value_float, value=-2.6034345E38, timestamp=1353144432452000)
1 Row Returned.
Elapsed time: 13 msec(s).{noformat}
?
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4927) E notation is not implemented for
floating point numbers.
Posted by "Michał Michalski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michał Michalski updated CASSANDRA-4927:
----------------------------------------
Attachment: cassandra-4927.txt
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
> Attachments: cassandra-4927.txt
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-4927) E notation is not implemented for
floating point numbers.
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-4927:
----------------------------------------
Priority: Minor (was: Major)
> E notation is not implemented for floating point numbers.
> ---------------------------------------------------------
>
> Key: CASSANDRA-4927
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.2.0 beta 1
> Reporter: Krzysztof Cieslinski Cognitum
> Priority: Minor
> Fix For: 1.2.1
>
>
> 'E' notation is not implemented for floating point numbers.
> Inserting some float value like -2.6034345E+38 results in:
> ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira