You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api-diagnosticsArea: public API shape, error reporting, logging, metrics, tracingdocumentationImprovements or additions to documentationenhancementjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)
Thank you for the response!
Do you need Blob for some framework?
However method com.clickhouse.jdbc.ResultSetImpl#getBytes(int) or com.clickhouse.jdbc.ResultSetImpl#getBinaryStream(int) is more straightforward option because has less wrapping classes. I assume there is a column of String type that you want to retrieve.
ResultSetImpl#getBytes throws "Column is not of array type"
ResultSetImpl#getBinaryStream returns "BinaryStream is not yet supported" (v0.9.1)
This will be fixed in 0.9.3 (should be ready by end of this month). Here is the issue for that #2263
I tried to use jooq, but in the end fall back to native java
Jooq as I know is built on top of JDBC and it just adds extra layer of abstractions.
We always recommend using clickhouse-java until JDBC is the requirement.
Recommendation: Keep open — maintainer decision getBinaryStream(String) is on main since v0.10.0 (#2911); getBlob still throws. Decide whether to add getBlob, or to close the issue because getBinaryStream covers the use case (see Workaround).
Category: Feature
Classification: impact: none · area: API & diagnostics (ResultSet.getBlob)
Status on main: Not supported on main — at 8480ca001, ClickHouse 26.11.4.11, getBlob("data") on a String column throws SQLFeatureNotSupportedException: getBlob is not supported.; getBinaryStream("data") and getBytes("data") return the stored non-UTF-8 bytes unchanged only with binary_string_support=true.
Breaking change: No — can be done without a break.
Duplicates / related: No others.
Workaround: Read the column with getBinaryStream or getBytes, and set the connection property binary_string_support=true.
Analysis:getBlob(String) calls unsupportedFeatureThrow (ResultSetImpl.java:1027). Without binary_string_support=true, the driver decodes a String column as UTF-8, so getBytes and getBinaryStream return changed bytes for binary content (docs/clickhouse-docs/client.mdx:600). The JDBC docs do not say this: docs/clickhouse-docs/jdbc.mdx:1045 says that getBytes is for binary strings, and the property table does not list binary_string_support.
Automated triage by Polyglot AI. A maintainer makes the final decision.
api-diagnosticsArea: public API shape, error reporting, logging, metrics, tracingdocumentationImprovements or additions to documentationenhancementjdbcModule: the JDBC driver (jdbc-v2; with legacy: the v1 driver)
Activity
chernser commentedon Sep 2, 2025
Good day, @AndrewRazumovskiy !
Thank you for your suggestion!
Would you please describe your use-case?
Thanks!
AndrewRazumovskiy commentedon Sep 3, 2025
I store raw binary files in CH (png, pdf, txt, excel), and I want to download them as is, in binary mode
chernser commentedon Sep 3, 2025
@AndrewRazumovskiy
Thank you for the response!
Do you need
Blobfor some framework?However method
com.clickhouse.jdbc.ResultSetImpl#getBytes(int)orcom.clickhouse.jdbc.ResultSetImpl#getBinaryStream(int)is more straightforward option because has less wrapping classes. I assume there is a column ofStringtype that you want to retrieve.AndrewRazumovskiy commentedon Sep 3, 2025
ResultSetImpl#getBytes throws "Column is not of array type"
ResultSetImpl#getBinaryStream returns "BinaryStream is not yet supported" (v0.9.1)
AndrewRazumovskiy commentedon Sep 3, 2025
I tried to use jooq, but in the end fall back to native java
chernser commentedon Sep 3, 2025
3 remaining items
polyglotAI-bot commentedon Nov 28, 2026
Recommendation: Keep open — maintainer decision
getBinaryStream(String)is onmainsince v0.10.0 (#2911);getBlobstill throws. Decide whether to addgetBlob, or to close the issue becausegetBinaryStreamcovers the use case (see Workaround).main: Not supported on main — at8480ca001, ClickHouse 26.11.4.11,getBlob("data")on aStringcolumn throwsSQLFeatureNotSupportedException: getBlob is not supported.;getBinaryStream("data")andgetBytes("data")return the stored non-UTF-8 bytes unchanged only withbinary_string_support=true.getBinaryStreamorgetBytes, and set the connection propertybinary_string_support=true.Analysis:
getBlob(String)callsunsupportedFeatureThrow(ResultSetImpl.java:1027). Withoutbinary_string_support=true, the driver decodes aStringcolumn as UTF-8, sogetBytesandgetBinaryStreamreturn changed bytes for binary content (docs/clickhouse-docs/client.mdx:600). The JDBC docs do not say this:docs/clickhouse-docs/jdbc.mdx:1045says thatgetBytesis for binary strings, and the property table does not listbinary_string_support.Automated triage by Polyglot AI. A maintainer makes the final decision.