clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

Caused by: java.sql.SQLException: Fetch size cannot be negative number

Open kiwimg opened this issue 4 years ago • 5 comments

v0.3.2-patch10 #fetchSize="-2147483648",Integer.MIN_VALUE=-2147483648

企业微信截图_1657973636964

image

kiwimg avatar Jul 16 '22 12:07 kiwimg

Thanks for the report but why setting a negative fetch size?

https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#setFetchSize-int-

zhicwu avatar Jul 17 '22 03:07 zhicwu

I think in MySql you set the negative value with combination of @Transactional ( readyOnly=true)

omeryounus avatar Nov 28 '22 06:11 omeryounus

@zhicwu set MIN_VALUE can trigger streaming processing in some rmdbs (https://www.cnblogs.com/fnlingnzb-learner/p/10245971.html), may we support or just not raise error for negative value setting.

SimpleExpress avatar Dec 02 '22 09:12 SimpleExpress

Thanks @SimpleExpress. Perhaps it's better to show a warning and treat negative value as default.

zhicwu avatar Dec 02 '22 11:12 zhicwu

This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

github-actions[bot] avatar Jan 08 '25 00:01 github-actions[bot]