You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Rick Shaw (JIRA)" <ji...@apache.org> on 2011/07/12 04:29:00 UTC
[jira] [Created] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "NumericType" AbstractType
Add Support for BigDecimal Java data type as the "NumericType" AbstractType
---------------------------------------------------------------------------
Key: CASSANDRA-2883
URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
Project: Cassandra
Issue Type: New Feature
Components: Core
Affects Versions: 0.8.1
Reporter: Rick Shaw
Priority: Trivial
Fix For: 0.8.2
The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
CQL would need to add a datatype (numeric?). Decimal literal support is already provided in CQL.
This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "NumericType" AbstractType
Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Shaw updated CASSANDRA-2883:
---------------------------------
Attachment: add-decimaltype-v1.txt
> Add Support for BigDecimal Java data type as the "NumericType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.6
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (numeric?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098400#comment-13098400 ]
Jonathan Ellis commented on CASSANDRA-2883:
-------------------------------------------
Don't we need to add antlr support for specifying the type as decimal(precision, scale)?
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.6
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-2883:
--------------------------------------
Labels: CQL JDBC lhf (was: CQL JDBC, lhf)
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC, lhf
> Fix For: 1.0.0
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098460#comment-13098460 ]
Hudson commented on CASSANDRA-2883:
-----------------------------------
Integrated in Cassandra #1080 (See [https://builds.apache.org/job/Cassandra/1080/])
add DecimalType
patch by Rick Shaw; reviewed by jbellis for CASSANDRA-2883
jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1165906
Files :
* /cassandra/trunk/src/java/org/apache/cassandra/cql/Cql.g
* /cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
* /cassandra/trunk/src/java/org/apache/cassandra/cql/jdbc/JdbcDecimal.java
* /cassandra/trunk/src/java/org/apache/cassandra/db/marshal/DecimalType.java
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 1.0
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098403#comment-13098403 ]
Jonathan Ellis commented on CASSANDRA-2883:
-------------------------------------------
On second thought, just allowing any decimal is fine to start with.
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.6
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098398#comment-13098398 ]
Rick Shaw commented on CASSANDRA-2883:
--------------------------------------
I store a full 32 bit integer encoding for the scale part of the data into C*, which is what the Java class {{BigDecimal}} supports. but for a scale factor that is crazy huge. I could easily be talked into using just a byte to support 128 or 256 scale. that is still 256 digits after the decimal... The unscaled value is stored like {{IntegerType}}.
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.6
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "DecimalType" AbstractType
Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Shaw updated CASSANDRA-2883:
---------------------------------
Description:
The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
This is low hanging fruit.
was:
The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
CQL would need to add a datatype (numeric?). Decimal literal support is already provided in CQL.
This is low hanging fruit.
Summary: Add Support for BigDecimal Java data type as the "DecimalType" AbstractType (was: Add Support for BigDecimal Java data type as the "NumericType" AbstractType)
> Add Support for BigDecimal Java data type as the "DecimalType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.6
>
> Attachments: add-decimaltype-v1.txt
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (decimal?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "NumericType" AbstractType
Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Shaw updated CASSANDRA-2883:
---------------------------------
Issue Type: Sub-task (was: New Feature)
Parent: CASSANDRA-2876
> Add Support for BigDecimal Java data type as the "NumericType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.2
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (numeric?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CASSANDRA-2883) Add Support for BigDecimal Java
data type as the "NumericType" AbstractType
Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-2883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Shaw reassigned CASSANDRA-2883:
------------------------------------
Assignee: Rick Shaw
> Add Support for BigDecimal Java data type as the "NumericType" AbstractType
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2883
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Affects Versions: 0.8.1
> Reporter: Rick Shaw
> Assignee: Rick Shaw
> Priority: Trivial
> Labels: CQL, JDBC,, lhf
> Fix For: 0.8.5
>
>
> The JDBC Driver suite needs support for {{BigDecimal}} to complete it's data type support for {{ResultSet}} and {{PreparedStatement}}. This datatype could also be used to represent numeric (non-integer) counter values. This is a very simple addition to the collection of data types supported by Cassandra. It is quite versatile like {{BigInteger}}. It can represent decimal numbers of virtually any precision and scale. It is represented in Java as an arbitrary precision integer unscaled value ( think {{IntegerType}} )and a 32-bit integer scale factor, which could be represented as a {{IntegerType}} as well. This could share much of the logic from the {{BigInteger}} ({{IntegerType}}) implementation.
> CQL would need to add a datatype (numeric?). Decimal literal support is already provided in CQL.
> This is low hanging fruit.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira