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
Uploading a .csv crashes with recent versions of the driver.
Steps to reproduce
download the EE metabase.jar
I used 0.52.8
download latest clickhouse driver
I used 1.52.0
setup metabase EE, add a clickhouse cloud database.
I used a free trial cloud instance
Goto admin settings -> uploads, enable uploads for the clickhouse database (schema probably doesnt matter, any will do)
Exit admin, in your personal collection upload a .csv. I used a simple foo\n42 .csv with one column and row.
Expected behaviour
The .csv is uploaded
Error log
Upload error details
There were some errors while uploading csv3.csv:
An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
and in the logs:
{:message"An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0"}
My understanding is this is due to a difference in parameter styles between clickhouse-java JDBC1 and JDBC2. e.g There are no parameter placeholders in the drivers/insert-into! sql on L237. Somehow this worked with the previous JDBC driver.
This causes the above crash as the allocated object array is of size zero.
It can be fixed by giving the sql statement a number of parameters like so:
Describe the bug
Uploading a .csv crashes with recent versions of the driver.
Steps to reproduce
download the EE metabase.jar
download latest clickhouse driver
setup metabase EE, add a clickhouse cloud database.
Goto
admin settings -> uploads
, enable uploads for the clickhouse database (schema probably doesnt matter, any will do)Exit admin, in your personal collection upload a .csv. I used a simple
foo\n42
.csv with one column and row.Expected behaviour
The .csv is uploaded
Error log
and in the logs:
Configuration
Environment
ClickHouse server
The text was updated successfully, but these errors were encountered: