mirror of https://github.com/apache/cassandra
Pig: support for Int32Type.
Patch by brandonwilliams, reviewed by xedin for CASSANDRA-4459
This commit is contained in:
parent
9a63394765
commit
6f384c54de
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue