dillitz commented on code in PR #54016:
URL: https://github.com/apache/spark/pull/54016#discussion_r2740687608
##########
sql/connect/common/src/main/scala/org/apache/spark/sql/connect/client/SparkConnectClient.scala:
##########
@@ -1103,7 +1106,13 @@ object SparkConnectClient {
responseListener: ClientCall.Listener[RespT],
headers: Metadata): Unit = {
metadata.foreach { case (key, value) =>
- headers.put(Metadata.Key.of(key,
Metadata.ASCII_STRING_MARSHALLER), value)
+ if (key.endsWith(Metadata.BINARY_HEADER_SUFFIX)) {
+ // Expects a base64-encoded value string.
+ val valueByteArray =
Base64.getDecoder.decode(value.getBytes(UTF_8))
Review Comment:
It would be nice, but I haven't seen too much demand for this yet, really,
and it would require us to rethink how users can pass headers to
`SparkConnectClient.Builder` and `SparkConnectClient.Configuration`, and how we
apply them in `MetadataHeaderClientInterceptor`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]