No, bytearray constants are not supported.

The reason for not supporting casts to bytearray is we would need a mechanism 
to describe how to do the casts (are strings stored as UTF-8 or something else, 
how are numeric values handled?) that we don't have.

The reason for not allowing a bytearray constant is we never found a use case.  
It seemed like strings always suffice.  If you have a convincing use case where 
this isn't so, we could reconsider this.  The one issue is that since Pig 
delegates casting of binary data to loaders, it would be impossible to cast 
this constant to anything else, since it wouldn't be associated with a loader.

Alan.

On Dec 21, 2011, at 4:51 PM, Dmitriy Lyubimov wrote:

> Hello,
> 
> is there _any_ way to specify an empty byte array (but not NULL)?
> 
> There also seems to be no way to specify byte array constatnts or
> convert other constants to bytearray. Is there any reason why the
> constants and conversions to bytearray disallowed?
> 
> thanks in advance.
> -Dmitriy

Reply via email to