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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
