cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Pig: support for Int32Type. Patch by brandonwilliams, reviewed by xedin for CASSANDRA-4459
Date Wed, 25 Jul 2012 17:07:32 GMT
Updated Branches:
  refs/heads/cassandra-1.1 9a6339476 -> 6f384c54d


Pig: support for Int32Type.
Patch by brandonwilliams, reviewed by xedin for CASSANDRA-4459


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

Branch: refs/heads/cassandra-1.1
Commit: 6f384c54de567d8d901592f0c32769b6582e50e4
Parents: 9a63394
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Jul 25 12:06:49 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Jul 25 12:06:49 2012 -0500

----------------------------------------------------------------------
 examples/pig/test/populate-cli.txt                 |    4 ++--
 .../cassandra/hadoop/pig/CassandraStorage.java     |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f384c54/examples/pig/test/populate-cli.txt
----------------------------------------------------------------------
diff --git a/examples/pig/test/populate-cli.txt b/examples/pig/test/populate-cli.txt
index 1f59642..b2dda58 100644
--- a/examples/pig/test/populate-cli.txt
+++ b/examples/pig/test/populate-cli.txt
@@ -8,7 +8,7 @@ column_metadata =
 [
     {column_name: name, validation_class: UTF8Type, index_type: KEYS},
     {column_name: vote_type, validation_class: UTF8Type},
-    {column_name: rating, validation_class: IntegerType},
+    {column_name: rating, validation_class: Int32Type},
     {column_name: score, validation_class: LongType},
     {column_name: percent, validation_class: FloatType},
     {column_name: atomic_weight, validation_class: DoubleType},
@@ -23,7 +23,7 @@ column_metadata =
 [
     {column_name: name, validation_class: UTF8Type, index_type: KEYS},
     {column_name: vote_type, validation_class: UTF8Type},
-    {column_name: rating, validation_class: IntegerType},
+    {column_name: rating, validation_class: Int32Type},
     {column_name: score, validation_class: LongType},
     {column_name: percent, validation_class: FloatType},
     {column_name: atomic_weight, validation_class: DoubleType},

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f384c54/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 454330c..f2fad67 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -670,7 +670,7 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface,
Lo
     {
         if (type instanceof LongType || type instanceof DateType) // DateType is bad and
it should feel bad
             return DataType.LONG;
-        else if (type instanceof IntegerType)
+        else if (type instanceof IntegerType || type instanceof Int32Type) // IntegerType
will overflow at 2**31, but is kept for compatibility until pig has a BigInteger
             return DataType.INTEGER;
         else if (type instanceof AsciiType)
             return DataType.CHARARRAY;


Mime
View raw message