"ClickHouse response without column types" when using CSV format
See original GitHub issueCarlos N reported below issue on Telegram:
Carlos N, [28.01.21 05:44]
Hello, I am seeing the following exception when I use the CSV format for the response of my queries:
Caused by: java.lang.IllegalArgumentException: ClickHouse response without column types
at ru.yandex.clickhouse.response.ClickHouseResultSet.<init>(ClickHouseResultSet.java:111)
at ru.yandex.clickhouse.ClickHouseStatementImpl.createResultSet(ClickHouseStatementImpl.java:899)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:122)
Carlos N, [28.01.21 05:44]
Has anybody found the issue before? It only happens with some of the most complex queries. I run.
Carlos N, [28.01.21 05:45]
I am using the default jdbc driver
Carlos N, [28.01.21 05:44]
Hello, I am seeing the following exception when I use the CSV format for the response of my queries:
Caused by: java.lang.IllegalArgumentException: ClickHouse response without column types
at ru.yandex.clickhouse.response.ClickHouseResultSet.<init>(ClickHouseResultSet.java:111)
at ru.yandex.clickhouse.ClickHouseStatementImpl.createResultSet(ClickHouseStatementImpl.java:899)
at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:122)
Carlos N, [28.01.21 05:44]
Has anybody found the issue before? It only happens with some of the most complex queries. I run.
Carlos N, [28.01.21 05:45]
I am using the default jdbc driver
Carlos N, [28.01.21 08:58]
[In reply to Zhichun Wu]
Yes, we are using FORMAT because we wanted CSVWithNames, the issue doesn't occur without the FORMAT parameter. Is there a way for it to work with that parameter? This is the full query.
select
...
from (
...
) as act
join ...
order by ...
limit ? offset ?
FORMAT CSVWithNames
Denny Crane [Junior support specialist at Altinity (NB,Canada)], [28.01.21 08:59]
The fact that following is working in JDBC
select 1 a, 'aaa' b
from numbers(2)
FORMAT CSVWithNames
Is a bug and must be fixed. To avoid confusion.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Formats for Input and Output Data | ClickHouse Docs
ClickHouse can accept and return data in various formats. A format supported for input can be used to parse the data provided to...
Read more >Settings | ClickHouse Docs
If column type is not nullable and this setting is disabled, then inserting ... If the number of rows to be read from...
Read more >ClickHouse Tutorial | ClickHouse Docs
It is in CSV files in S3, and you can load the data from there. The following command inserts ~2,000,000 rows into your...
Read more >S3 Table Functions | ClickHouse Docs
The s3 table function allows us to read and write files from and to S3 ... We can query s3 data as a...
Read more >HTTP Interface | ClickHouse Docs
For successful requests that do not return a data table, an empty response body is returned. Compression. You can use compression to reduce ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it’s doable using extended API. I’ll give it a shot tonight.
Update: it’s not as I only saw writer API 😕 I’ll commit a tailored version of the grpc client over the weekend. It should work as you can get InputStream from response and do whatever you want like writing results into a CSV file. For example:
Thanks for your patience and sorry for no update for months. Fortunately, progress being made, stability and performance are improved, along with a few enhancements to the API, so now this can be simplified as following:
Note: compression is currently not supported very well, see ClickHouse/ClickHouse#28671 for details.
Now I’m still adding features and testing the client. If your work is somehow blocked by this, I can upload a version this weekend for you to play with. However, please be aware that the client is experimental, and you may have to upgrade ClickHouse server to a version containing changes from ClickHouse/ClickHouse#27064.