Hello,
I get an java.lang.NegativeArraySizeException when I use the csv file below. I think it is because the _CSV_Separator isn't used. Am I doing something wrong?
I have this in file test.csv:
"column1";"column2"
"waarde1";"waarde2"
"waarde21";"waarde22"
I use this as a schema in the file test.csv.schema:
create table test.csv ("column1" longvarchar, "column2" longvarchar)
And I use this as the url:
jdbc:text:/./test.csv?schemaFile=test.csv.schema&_CSV_Separator=\\x3b
When I iterate over the results of the table with this construction, I get an exception when I call rs.getNext().
ResultSet rs = stmt.executeQuery("select * from test.csv");
while(rs.next()) {
The stacktrace:
Exception in thread "main" java.lang.NegativeArraySizeException
at com.hxtt.global.as.for(Unknown Source)
at com.hxtt.concurrent.k.do(Unknown Source)
at com.hxtt.sql.text.l.else(Unknown Source)
at com.hxtt.sql.text.l.a(Unknown Source)
at com.hxtt.sql.text.l.a(Unknown Source)
at com.hxtt.sql.ct.a(Unknown Source)
at com.hxtt.sql.ep.a(Unknown Source)
at com.hxtt.sql.dp.a(Unknown Source)
at com.hxtt.d.k.a(Unknown Source)
at com.hxtt.sql.di.a(Unknown Source)
at com.hxtt.sql.c0.new(Unknown Source)
at com.hxtt.sql.c0.next(Unknown Source)
at Main.main(Main.java:57)
With kind regards,
Remco Schoen
|
Failed to recur you issue. Please download the latest package to see whether your issue can recur. BTW, your csv is simple, and you can omit schema file, and use the following jdbc url:
jdbc:text:/./test.csv?_CSV_Header=true&_CSV_Separator=\\x3b
|
I downloaded the latest version and it now works as expected.
This was just a simple test-case to test it with the schema-file, because we want to be able to overrule when the type-quessing guesses the wrong-type.
|