j1wonpark commented on PR #56447: URL: https://github.com/apache/spark/pull/56447#issuecomment-4705954077
@pan3793 update on this — the `getString` framing above turned out to be the wrong layer for BI tools. I traced the calls with a diagnostic build. DataGrip (2026.1.2) calls **both** `getObject` and `getString` for a complex-typed cell, but the value rendered in the grid is `getObject().toString()`: even with `getString` already returning JSON, the cell showed `[1,hello]` / `ArraySeq(1, 2, 3)` / `Map(k -> v)`. DBeaver (open source) confirms the same direction — it dispatches on the `java.sql.Types` code from `getColumnType`, calls `getObject`, and expands `java.sql.Array` / `java.sql.Struct` via `getArray()` / `Struct.getAttributes()`, falling back to `toString()` otherwise (`JDBCArrayValueHandler` / `JDBCStructValueHandler`). So the fix belongs in `getObject`, not `getString`. Folded into this PR (no separate JIRA): `getObject` returns `java.sql.Array` / `java.sql.Struct` (MAP → `java.util.Map`), `getArray()` is implemented, and each value renders JSON from `toString` (because some tools display `getObject().toString()` directly). `getString` still renders JSON as a fallback. Description updated. -- 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]
