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

Tsv totals extremes 2

Open radmirnovii opened this issue 3 years ago • 6 comments

Fix for ClickHouseTabSeparatedProcessor with extremes and/or totals.

radmirnovii avatar May 05 '22 15:05 radmirnovii

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 05 '22 15:05 CLAassistant

Thanks for your contribution @radmirnovii. That was indeed a missing feature. Will you also consider RowBinary processor?

By the way, the build break is irrelevant. It's caused by ClickHouse server, which was reported in #906. I'll enhance corresponding integration test as a workaround.

zhicwu avatar May 05 '22 23:05 zhicwu

Will you also consider RowBinary processor?

Is it possible without parsing query?

radmirnovii avatar May 12 '22 13:05 radmirnovii

Is it possible without parsing query?

Maybe not ;) Would be nice if we can support both formats.

Anyway, do you have time for additional changes? If not, I'll follow up to add test along with a few more changes to get it merged.

zhicwu avatar May 12 '22 22:05 zhicwu

Anyway, do you have time for additional changes?

There is no empty spaces or any special values. Cannot find solution without query parsing. But i can add support for grpc version.

radmirnovii avatar May 16 '22 08:05 radmirnovii

Sorry I think it's better to revisit this in 0.3.3 release, mainly for 3 reasons:

  1. it's a bit tricky for user to call the new methods to get totals and extremes - they have to know how many rows returned from the server first, and then call them in sequence right after reading the last row
  2. we'd better leverage progress stats for a more generic implementation for all protocols and formats
  3. unit tests and integration tests to prove the function works well

zhicwu avatar Jun 26 '22 14:06 zhicwu