You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/15 14:14:52 UTC

[GitHub] [spark] s1ck commented on issue #24107: [SPARK-27174][SQL] Add support for casting integer types to binary

s1ck commented on issue #24107: [SPARK-27174][SQL] Add support for casting integer types to binary
URL: https://github.com/apache/spark/pull/24107#issuecomment-473302052
 
 
   We stumbled across the missing functionality while doing prototyping work for https://issues.apache.org/jira/browse/SPARK-25994
   Initially, we experimented with a more generalized built-in function (`serialize`/`to_binary`) that can convert several other types to binary arrays. 
   
   During the experiment, we realized that such a general function is not needed, as we are not encoding the representation (i.e. using techniques such as var-length encoding) but merely interpret an integer as an array of bytes. That seemed like a perfect match for `Cast`.
   
   In addition, a dedicated function would "promise" conversions over all kinds of values, while this PR just adds those that have an unambiguous binary representation.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org