Vinod KC created SPARK-54552:
--------------------------------

             Summary: SparkConnectResultSet.getString() fails to decode BINARY 
data as UTF-8
                 Key: SPARK-54552
                 URL: https://issues.apache.org/jira/browse/SPARK-54552
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 4.1.0
            Reporter: Vinod KC


The `getString()` method in `SparkConnectResultSet` does not properly handle 
`BINARY` data types. When calling getString() on a column with `BINARY` type, 
the method uses String.valueOf() on the raw byte array, which produces an 
incorrect string representation (e.g., "[B@<hashcode>") instead of converting 
the bytes to a proper UTF-8 string.

eg:
 `SELECT binary('\\xDeAdBeEf')` 

spark-sql: `\xDeAdBeEf`
beeline with STS: `\xDeAdBeEf`
beeline with Connect Server: `[B@4d518c66`




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to