Search Hadoop and all its sub project:

Switch to Threaded View
Subject: Re: Schema Coersion
On Fri, Jun 27, 2014 at 9:40 AM, Pritchard, Charles X. -ND

Not easily today.  Binary string values are a subset of bytes (those
that are valid UTF-8 sequences), so string to bytes would be a
lossless conversion.  Bytes to string however isn't guaranteed to
produce valid data.

Perhaps we should permit one or both of these as a standard type promotion in:

(Int-to-float and long-to-float are both lossy promotions that we
already permit.)

In the meantime, the standard Java APIs won't permit this conversion.
I posted a patch that adds support for promotion from string to bytes.
Would this be useful?  If so, please add comments to the issue.


NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB