[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-08 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789114#comment-13789114
 ] 

Brandon Williams commented on CASSANDRA-6128:
-

Actually, we just let BigInteger overflow:

{noformat}
else if (type instanceof IntegerType || type instanceof Int32Type) // 
IntegerType will overflow at 2**31, but is kept for compatibility until pig has 
a BigInteger
{noformat}

but no one has ever noticed that, which doesn't surprise me.  On the other hand 
I think losing precision in DecimalType is likely to be a bigger, more subtle 
problem, when encountered. 

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Fix For: 1.2.11, 2.0.2
>
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-07 Thread Jeremy Hanna (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788928#comment-13788928
 ] 

Jeremy Hanna commented on CASSANDRA-6128:
-

true, though we've been doing that all along anyway - we've always mapped 
Cassandra's BigInteger type to Pig's int and just accepted the precision loss.  
That Pig ticket is nice to have for the future though.

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Fix For: 1.2.11, 2.0.2
>
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-07 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788450#comment-13788450
 ] 

Brandon Williams commented on CASSANDRA-6128:
-

Well, crap: PIG-2764

I guess we'll have to use a string for now, otherwise we box people into the 
corner of precision loss with no way out.  At least with strings they can do 
something in a UDF, so +1 and committed.

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-07 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788402#comment-13788402
 ] 

Alex Liu commented on CASSANDRA-6128:
-

Decimal has different precision than float/double, we will lose precision if we 
convert a decimal to a float/double. It is explained in this link 
http://stackoverflow.com/questions/5749615/losing-precision-converting-from-java-bigdecimal-to-double

If we don't need preserve the precision, we can use a double instead of a 
string. 

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-07 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788217#comment-13788217
 ] 

Brandon Williams commented on CASSANDRA-6128:
-

Shouldn't DecimalType map to a float or double instead of a string?

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6128) Add more data mappings for Pig

2013-10-01 Thread Alex Liu (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13783417#comment-13783417
 ] 

Alex Liu commented on CASSANDRA-6128:
-

Map

{code}
 DecimalType
 InetAddressType
 LexicalUUIDType
 TimeUUIDType
 UUIDType
{code}

to CHARARRAY

> Add more data mappings for Pig
> --
>
> Key: CASSANDRA-6128
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6128
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alex Liu
>Assignee: Alex Liu
> Attachments: 6128-1.2-branch.txt
>
>
> We need add more data mappings for
> {code}
>  DecimalType
>  InetAddressType
>  LexicalUUIDType
>  TimeUUIDType
>  UUIDType
> {code}
> Existing implementation throws exception for those data type



--
This message was sent by Atlassian JIRA
(v6.1#6144)