ClickHouse / ClickHouse/ClickHouse
gRPC Interface not returning `rows_before_limit_at_least` using format JSON
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
gRPC Interface is not returning the same field structure as native or http interface. Tested v22.3.
```sql
$clickhouse-client --host localhost --port 9000 -mn
ClickHouse client version 22.3.7.28 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 22.3.7 revision 54455.
laptop :) select * from system.one limit 1 format JSON;
SELECT *
FROM system.one
LIMIT 1
FORMAT JSON
Query id: bc846be7-948a-4668-95ef-d47c8d5e24dc
{
"meta":
[
{
"name": "dummy",
"type": "UInt8"
}
],
"data":
[
{
"dummy": 0
}
],
"rows": 1,
"rows_before_limit_at_least": 1,
"statistics":
{
"elapsed": 0.000291421,
"rows_read": 1,
"bytes_read": 1
}
}
1 rows in set. Elapsed: 0.001 sec.
```
```sql
./clickhouse-grpc-client.py
Connecting to localhost:9100 as user default.
Connected to ClickHouse server version 22.3.7.28 via gRPC protocol in 0.004273414611816406.
grpc :) select * from system.one limit 1 format JSON;
{
"meta":
[
{
"name": "dummy",
"type": "UInt8"
}
],
"data":
[
{
"dummy": 0
}
],
"rows": 1,
"statistics":
{
"elapsed": 0.000573447,
"rows_read": 0,
"bytes_read": 0
}
}
Elapsed: 0.0037772655487060547 sec.
```
A probable cause is that there is no `rows_before_limit_at_least` defined property in proto file message `Result ` structure:
https://github.com/ClickHouse/ClickHouse/blob/59236d60c9d46bfa130d670e21e2eff7d1560e89/src/Server/grpc_protos/clickhouse_grpc.proto#L192
Contributor guide
Assessment
This issue has not been assessed yet.