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/04/21 22:19:05 UTC

[jira] [Created] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Additional AbstractType data type definitions to enrich CQL
-----------------------------------------------------------

                 Key: CASSANDRA-2530
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 0.8.0
            Reporter: Rick Shaw
            Priority: Trivial


Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051145#comment-13051145 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

(I meant Date.)

I did some more reading and it looks like what you propose is mainstream behavior for JDBC drivers.  (http://stackoverflow.com/questions/4078426/to-which-java-data-types-can-i-map-timestamp-with-time-zone-or-timestamp-with-loc, http://postgresql.1045698.n5.nabble.com/Timestamp-confusion-td2174087.html, http://download.oracle.com/docs/cd/E13222_01/wls/docs81/jdbc_drivers/oracle.html).

I'll get this committed.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033119#comment-13033119 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------

Oops... meant {{ByteType}}.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042343#comment-13042343 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------

{quote}
 Isn't date throwing away information when it encodes to long (the time zone)?
{quote}
I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. 


{quote}
Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic.
{quote}
Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. 

{quote}
Using compareUnsigned in the boolean compare method seems like overkill.
{quote}
Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}.



> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051587#comment-13051587 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

Still getting patch failures on the 0.8 branch:
{noformat}
form:svn-0.8 jonathan$ patch -p0 < patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt 
patching file src/java/org/apache/cassandra/cql/Cql.g
Hunk #1 succeeded at 296 with fuzz 2 (offset 5 lines).
Hunk #2 FAILED at 397.
1 out of 2 hunks FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/Cql.g.rej
patching file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java.rej
patching file src/java/org/apache/cassandra/cql/Term.java
patching file src/java/org/apache/cassandra/db/marshal/BooleanType.java
patching file src/java/org/apache/cassandra/db/marshal/DateType.java
patching file src/java/org/apache/cassandra/db/marshal/DoubleType.java
patching file src/java/org/apache/cassandra/db/marshal/FloatType.java
{noformat}

Is this against something else?

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt, rebase-cql-and-ccfs-term-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022913#comment-13022913 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

Thanks for the patch!

I'm slightly against having both Float and Double -- I'd like to discourage premature optimization and using 4 bytes for floating point instead of 8 is almost always the wrong space:accuracy tradeoff today.

Similarly not sure there is a raison d'être for ByteType.

This looks wrong:

{noformat}
+        if (bytes.remaining() != 4)
+        {
+            throw new MarshalException("A double is exactly 8 bytes) : "+bytes.remaining());
+        }
{noformat}

Please check use of whitespace w/ http://wiki.apache.org/cassandra/CodeStyle.

Would like to see new Types covered by RoundTripTest.

Would like to see new Types integrated into CQL; this does involve digging into the Antlr code though (to allow it to recognize new literal types). So if you want we can open a separate ticket for that.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add-4-new-AbstractTypes-v5.txt

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add-4-new-AbstractTypes-v5.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042271#comment-13042271 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

Isn't date throwing away information when it encodes to long (the time zone)?

Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic.

Using compareUnsigned in the boolean compare method seems like overkill.

Otherwise looks fine to me.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add -5 -new-AbstractTypes-v2.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-2530:
----------------------------------------

    Fix Version/s:     (was: 0.8.2)
                   0.8.1

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Assignee: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>             Fix For: 0.8.1
>
>         Attachments: rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt

- rebased to RC1
- Dropped {{BytesType}}
- Added CQL modifications for new data types

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033121#comment-13033121 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------

The CQL mods now support declaring the following datatypes in CQL:

| date     | DateType |
| boolean  | BooleanType |
| float    | FloatType |
| double   | DoubleType |

So you can say: 

{code}
CREATE COLUMNFAMILY TestCF
 (KEY text PRIMARY KEY,
   stamp date,
   description text,
   hasAnAccount boolean,
   floating float,
   anumber varint) 
 WITH comparator = ascii 
  AND comment = 'Test CF' 
  AND default_validation = bigint
  AND memtable_flush_after_mins = 2
 ;


UPDATE TestCF USING CONSISTENCY ONE 
  SET
      description = 'Some Random Text',
      anumber = 3,
      stamp = '2011-01-13 04:30:01',
      hasAnAccount = true,
      floating = 150.234
  WHERE KEY = 2000;

{code} 

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044304#comment-13044304 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------

I see your point. What is being lost is the fact that the writer intends the date to be interpreted in EST for all subsequent readers. But that is not recorded by any binary data type: j.u.Date,j.s.Date,j.s.Time, j.s.Timestamp,  or even j.u.UUID. Really it is only String/text that can convey that intent of the original writer.

The SQL Timestamp does not really help in that area. It offers the addition of more (nanos) accuracy but not "timestamp with timezone" features unless I read it terribly wrong?? 



> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051588#comment-13051588 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

Still getting patch failures against 0.8:

{noformat}
form:svn-0.8 jonathan$ patch -p0 < patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt 
patching file src/java/org/apache/cassandra/cql/Cql.g
Hunk #1 succeeded at 296 with fuzz 2 (offset 5 lines).
Hunk #2 FAILED at 397.
1 out of 2 hunks FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/Cql.g.rej
patching file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java.rej
patching file src/java/org/apache/cassandra/cql/Term.java
patching file src/java/org/apache/cassandra/db/marshal/BooleanType.java
patching file src/java/org/apache/cassandra/db/marshal/DateType.java
patching file src/java/org/apache/cassandra/db/marshal/DoubleType.java
patching file src/java/org/apache/cassandra/db/marshal/FloatType.java
{noformat}


> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt, rebase-cql-and-ccfs-term-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042343#comment-13042343 ] 

Rick Shaw edited comment on CASSANDRA-2530 at 6/1/11 6:44 PM:
--------------------------------------------------------------

{quote}
 Isn't date throwing away information when it encodes to long (the time zone)?
{quote}
I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. 


{quote}
Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic.
{quote}
Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. 

{quote}
Using compareUnsigned in the boolean compare method seems like overkill.
{quote}
Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}.



      was (Author: ardot):
    {quote}
 Isn't date throwing away information when it encodes to long (the time zone)?
{quote}
I don't think any info is lost. The encoding adjusts the date to UTC based on the (default) locale. The formatting back out again will treat it as stored in UTC and adjust it back to the (default) locale. Arguably fragile. But using it in values (as opposed to names) is the JDBC assumption anyway. 


{quote}
Also not a fan of copy/pasting the iso patterns, go ahead and reference the copy in TUUIDT, or move those somewhere more generic.
{quote}
Agreed. Patch shares the value in TUUIDT as a {{import static}}. Moving the declaration to say: AbstractType may be better in the long run but the newbie did not want to tamper any more than necessary. Saving 8 bytes as the volumes of rows and columns it is used in, goes into the stratosphere are very compelling. 

{quote}
Using compareUnsigned in the boolean compare method seems like overkill.
{quote}
Agreed. A bit too much "sharing"... Patch uses {{o1.compareTo(o2)}}.


  
> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add -5 -new-AbstractTypes.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add -5 -new-AbstractTypes-v3.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051139#comment-13051139 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

Timestamp is not less broken than it was then, but we could commit the others.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052175#comment-13052175 ] 

Hudson commented on CASSANDRA-2530:
-----------------------------------

Integrated in Cassandra-0.8 #178 (See [https://builds.apache.org/job/Cassandra-0.8/178/])
    

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Assignee: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>             Fix For: 0.8.2
>
>         Attachments: rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add -5 -new-AbstractTypes.txt

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add -5 -new-AbstractTypes-v3.txt

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022926#comment-13022926 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------


{quote}
I'm slightly against having both Float and Double – I'd like to discourage premature optimization and using 4 bytes for floating point instead of 8 is almost always the wrong space:accuracy tradeoff today.
{quote}

I guess I added Float and Double together because they were so similar it seemed silly not to. It is also a JDBC type and seemed easy enough to provide and make implementing the next stages of JDBC easier.

Selfishly, my implementations use a lot of small float numbers like: "1.2" or "66.667" so a row might have 50 columns of such data and 5-50 million rows. So a selfish trend on my part is to provide the smallest representation on bytes stored/in-memory. 

{quote}
Similarly not sure there is a raison d'être for ByteType.
{quote}

My reasoning was more about a guaranteed length that was short. We plan to put ENUMs into them in prepared statements. Again, selfishly, if we have a lot of Float usage we *really* have a lot of numbers between 1-10 to store! So all these volumes above are just more exaggerated in our need to store lots of short numbers in an optimal width. But I do understand the variable integer {{IntegerType}} could be used. 


{quote}
This looks wrong:
{quote}

Yep... Cut-n-paste in a hurry... will get you every time! I'll fix with v3 patch. (starting to see a trend)

Yes. I'll look into the error of my "whitespace" ways.

I will try to conjure some tests that dovetail into the existing testing framework.

A separate ticket would probably be good for ANTLR work. I'll give it a shot but am about 30 years rusty on parsing grammars. But I'll gladly give it a try.




> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051446#comment-13051446 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

can you rebase the Cql.g and CCFS.java conflicts?

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: patch-to-add -5 -new-AbstractTypes-v2.txt

Sorry... Things changed out from under me!

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jeremy Hanna (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022908#comment-13022908 ] 

Jeremy Hanna commented on CASSANDRA-2530:
-----------------------------------------

If you're working against the current 0.8 branch, you'll see that you need decompose on the AbstractType as well - just going the other direction.  Thanks for putting a patch together!

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042274#comment-13042274 ] 

Pavel Yaskevich commented on CASSANDRA-2530:
--------------------------------------------

+1 on changes in grammar.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: rebase-cql-and-ccfs-term-v1.txt

Will do. Sorry I am a bit new to the patching  business.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt, rebase-cql-and-ccfs-term-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044286#comment-13044286 ] 

Jonathan Ellis commented on CASSANDRA-2530:
-------------------------------------------

bq. I don't think any info is lost.

If I store a date in EST I want to get it back in EST, not the default. Hence the SQL "timestamp with time zone" type.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: rebase-cql-and-ccfs-term-v1.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment:     (was: patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2530:
--------------------------------------

    Comment: was deleted

(was: Still getting patch failures on the 0.8 branch:
{noformat}
form:svn-0.8 jonathan$ patch -p0 < patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt 
patching file src/java/org/apache/cassandra/cql/Cql.g
Hunk #1 succeeded at 296 with fuzz 2 (offset 5 lines).
Hunk #2 FAILED at 397.
1 out of 2 hunks FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/Cql.g.rej
patching file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
Hunk #1 FAILED at 71.
1 out of 1 hunk FAILED -- saving rejects to file src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java.rej
patching file src/java/org/apache/cassandra/cql/Term.java
patching file src/java/org/apache/cassandra/db/marshal/BooleanType.java
patching file src/java/org/apache/cassandra/db/marshal/DateType.java
patching file src/java/org/apache/cassandra/db/marshal/DoubleType.java
patching file src/java/org/apache/cassandra/db/marshal/FloatType.java
{noformat}

Is this against something else?)

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt, rebase-cql-and-ccfs-term-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Shaw updated CASSANDRA-2530:
---------------------------------

    Attachment: rebase-for-new-abstracttypes-and cql-stuff-v1.txt

My fault. I misunderstood the request. I removed extraneous patches. I added new patch that is rebased to the current trunk.


> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt, rebase-cql-and-ccfs-term-v1.txt, rebase-for-new-abstracttypes-and cql-stuff-v1.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023142#comment-13023142 ] 

Sylvain Lebresne commented on CASSANDRA-2530:
---------------------------------------------

bq. My reasoning was more about a guaranteed length that was short. We plan to put ENUMs into them in prepared statements. Again, selfishly, if we have a lot of Float usage we really have a lot of numbers between 1-10 to store! So all these volumes above are just more exaggerated in our need to store lots of short numbers in an optimal width. But I do understand the variable integer IntegerType could be used.

It think what you want to use is a BytesType with only one byte each time. The only thing that you'll miss is that validate won't ensure you only have 1 byte long inputs. However, for that kind of thing, I would be in favor of using CASSANDRA-2355 and enriching BytesType so that you can write stuff like BytesType(max_length=1). That's more flexible and avoid adding tons of new classes.

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add -5 -new-AbstractTypes-v2.txt, patch-to-add -5 -new-AbstractTypes-v3.txt, patch-to-add -5 -new-AbstractTypes.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2530) Additional AbstractType data type definitions to enrich CQL

Posted by "Rick Shaw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051128#comment-13051128 ] 

Rick Shaw commented on CASSANDRA-2530:
--------------------------------------

This appeared to get the ok on 2011-06-01? I there more work required to get this in trunk for 0.8.2?

> Additional AbstractType data type definitions to enrich CQL
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-2530
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2530
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Rick Shaw
>            Priority: Trivial
>              Labels: cql
>         Attachments: patch-to-add-4-new-AbstractTypes-and-CQL-support-v4.txt, patch-to-add-4-new-AbstractTypes-and-CQL-support-v5.txt
>
>
> Provide 5 additional Datatypes: ByteType, DateType, BooleanType, FloatType, DoubleType.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira