[1/3] git commit: Deprecate but keep strings-as-blob support for now for compatibility sake

2013-02-04 Thread slebresne
Deprecate but keep strings-as-blob support for now for compatibility sake


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b251e7ae
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b251e7ae
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b251e7ae

Branch: refs/heads/trunk
Commit: b251e7aec03273ac14eeae79bee13422068d508b
Parents: 60acf0d
Author: Sylvain Lebresne 
Authored: Mon Feb 4 10:44:30 2013 +0100
Committer: Sylvain Lebresne 
Committed: Mon Feb 4 10:44:30 2013 +0100

--
 NEWS.txt |5 +++-
 doc/cql3/CQL.textile |3 +-
 src/java/org/apache/cassandra/cql3/Term.java |   22 +
 3 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 5a6e4f5..7e04b2e 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -16,7 +16,10 @@ Upgrading
 - CQL3 type validation for constants has been fixed, which may require
   fixing queries that were relying on the previous loose validation. Please
   refer to the CQL3 documentation 
(http://cassandra.apache.org/doc/cql3/CQL.html)
-  and in particular the changelog section for more details.
+  and in particular the changelog section for more details. Please note in
+  particular that inputing blobs as strings constants is now deprecated (in
+  favor of blob constants) and its support will be removed in a future
+  version.
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 35b75bf..9611608 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1007,7 +1007,8 @@ The following describes the addition/changes brought for 
each version of CQL.
 
 h3. 3.0.2
 
-- Type validation for the "constants":#constants has been fixed. For instance, 
the implementation used to allow @'2'@ as a valid value for an @int@ column 
(interpreting it has the equivalent of @2@), or @42@ as a valid @blob@ value 
(in which case @42@ was interpreted as an hexadecimal representation of the 
blob). This is no longer the case, type validation of constants is now more 
strict. See the "data types":#dataTypes section for details on which constant 
is allowed for which type, but note that this let to the introduction of "blobs 
constants":#constants.
+- Type validation for the "constants":#constants has been fixed. For instance, 
the implementation used to allow @'2'@ as a valid value for an @int@ column 
(interpreting it has the equivalent of @2@), or @42@ as a valid @blob@ value 
(in which case @42@ was interpreted as an hexadecimal representation of the 
blob). This is no longer the case, type validation of constants is now more 
strict. See the "data types":#dataTypes section for details on which constant 
is allowed for which type.
+- The type validation fixed of the previous point has lead to the introduction 
of "blobs constants":#constants to allow inputing blobs. Do note that while 
inputing blobs as strings constant is still supported by this version (to allow 
smoother transition to blob constant), it is now deprecated (in particular the 
"data types":#dataTypes section does not list strings constants as valid blobs) 
and will be removed by a future version. If you were using strings as blobs, 
you should thus update your client code asap to switch blob constants.
 
 h3. 3.0.1
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/src/java/org/apache/cassandra/cql3/Term.java
--
diff --git a/src/java/org/apache/cassandra/cql3/Term.java 
b/src/java/org/apache/cassandra/cql3/Term.java
index b3c312e..fb797d5 100644
--- a/src/java/org/apache/cassandra/cql3/Term.java
+++ b/src/java/org/apache/cassandra/cql3/Term.java
@@ -22,6 +22,9 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.db.marshal.MarshalException;
@@ -30,6 +33,8 @@ import 
org.apache.cassandra.exceptions.InvalidRequestException;
 /** A term parsed from a CQL statement. */
 public class Term
 {
+private static final Logger logger = LoggerFactory.getLogger(Term.class);
+
 public enum Type
 {
 STRING, INTEGER, UUID, FLOAT, BOOLEAN, HEX, QMARK;
@@ -60,6 +65,9 @@ public class Term
 public final int bindIndex;
 public final boolea

git commit: Deprecate but keep strings-as-blob support for now for compatibility sake

2013-02-04 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 60acf0d79 -> b251e7aec


Deprecate but keep strings-as-blob support for now for compatibility sake


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b251e7ae
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b251e7ae
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b251e7ae

Branch: refs/heads/cassandra-1.2
Commit: b251e7aec03273ac14eeae79bee13422068d508b
Parents: 60acf0d
Author: Sylvain Lebresne 
Authored: Mon Feb 4 10:44:30 2013 +0100
Committer: Sylvain Lebresne 
Committed: Mon Feb 4 10:44:30 2013 +0100

--
 NEWS.txt |5 +++-
 doc/cql3/CQL.textile |3 +-
 src/java/org/apache/cassandra/cql3/Term.java |   22 +
 3 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/NEWS.txt
--
diff --git a/NEWS.txt b/NEWS.txt
index 5a6e4f5..7e04b2e 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -16,7 +16,10 @@ Upgrading
 - CQL3 type validation for constants has been fixed, which may require
   fixing queries that were relying on the previous loose validation. Please
   refer to the CQL3 documentation 
(http://cassandra.apache.org/doc/cql3/CQL.html)
-  and in particular the changelog section for more details.
+  and in particular the changelog section for more details. Please note in
+  particular that inputing blobs as strings constants is now deprecated (in
+  favor of blob constants) and its support will be removed in a future
+  version.
 
 
 1.2.1

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 35b75bf..9611608 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1007,7 +1007,8 @@ The following describes the addition/changes brought for 
each version of CQL.
 
 h3. 3.0.2
 
-- Type validation for the "constants":#constants has been fixed. For instance, 
the implementation used to allow @'2'@ as a valid value for an @int@ column 
(interpreting it has the equivalent of @2@), or @42@ as a valid @blob@ value 
(in which case @42@ was interpreted as an hexadecimal representation of the 
blob). This is no longer the case, type validation of constants is now more 
strict. See the "data types":#dataTypes section for details on which constant 
is allowed for which type, but note that this let to the introduction of "blobs 
constants":#constants.
+- Type validation for the "constants":#constants has been fixed. For instance, 
the implementation used to allow @'2'@ as a valid value for an @int@ column 
(interpreting it has the equivalent of @2@), or @42@ as a valid @blob@ value 
(in which case @42@ was interpreted as an hexadecimal representation of the 
blob). This is no longer the case, type validation of constants is now more 
strict. See the "data types":#dataTypes section for details on which constant 
is allowed for which type.
+- The type validation fixed of the previous point has lead to the introduction 
of "blobs constants":#constants to allow inputing blobs. Do note that while 
inputing blobs as strings constant is still supported by this version (to allow 
smoother transition to blob constant), it is now deprecated (in particular the 
"data types":#dataTypes section does not list strings constants as valid blobs) 
and will be removed by a future version. If you were using strings as blobs, 
you should thus update your client code asap to switch blob constants.
 
 h3. 3.0.1
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b251e7ae/src/java/org/apache/cassandra/cql3/Term.java
--
diff --git a/src/java/org/apache/cassandra/cql3/Term.java 
b/src/java/org/apache/cassandra/cql3/Term.java
index b3c312e..fb797d5 100644
--- a/src/java/org/apache/cassandra/cql3/Term.java
+++ b/src/java/org/apache/cassandra/cql3/Term.java
@@ -22,6 +22,9 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.db.marshal.MarshalException;
@@ -30,6 +33,8 @@ import 
org.apache.cassandra.exceptions.InvalidRequestException;
 /** A term parsed from a CQL statement. */
 public class Term
 {
+private static final Logger logger = LoggerFactory.getLogger(Term.class);
+
 public enum Type
 {
 STRING, INTEGER, UUID, FLOAT, BOOLEAN, HEX, QMARK;
@@ -60,6 +65,9