Skip to content

Conversation

@bgranvea
Copy link
Contributor

@bgranvea bgranvea commented Oct 5, 2020

Clickhouse can return interesting statistics in a X-ClickHouse-Summary header if send_progress_in_http_headers parameter is set (see ClickHouse/ClickHouse#5116).

In my use case, I need this to know how many rows are inserted when executing a INSERT ... SELECT ...

@pavelnemirovsky
Copy link

@bgranvea thanks for PR, any plan to fix ci checks?

@bgranvea
Copy link
Contributor Author

bgranvea commented Nov 2, 2020

@bgranvea thanks for PR, any plan to fix ci checks?

there was an issue not related to this PR, I think it is fixed by 4188aaf

I've also added the possibility to add query param before executing it, with the use of ConfigurableApi as it is done in Writer, because I need this in my use case.

PR is updated but I don't see the CI results anymore? is there something to do to rerun the tests?

@den-crane
Copy link
Collaborator

Tests are OK https://travis-ci.org/github/ClickHouse/clickhouse-jdbc/pull_requests
But it does not reflected in the PR for some reason.

@zhicwu zhicwu linked an issue Jan 31, 2021 that may be closed by this pull request
@zhicwu
Copy link
Contributor

zhicwu commented Jan 31, 2021

Great work @bgranvea! Do you have time to update the PR and re-target to develop branch? I'm wondering if we can make it part of 0.2.6 release aiming Feb 13th.

@bgranvea
Copy link
Contributor Author

bgranvea commented Feb 1, 2021

Great work @bgranvea! Do you have time to update the PR and re-target to develop branch? I'm wondering if we can make it part of 0.2.6 release aiming Feb 13th.

I've updated with your remarks and rebased on the develop branch.

@zhicwu
Copy link
Contributor

zhicwu commented Feb 1, 2021

I've updated with your remarks and rebased on the develop branch.

Thank you @bgranvea. Could you change merge target from master to develop?

@bgranvea bgranvea changed the base branch from master to develop February 1, 2021 15:32
@zhicwu zhicwu merged commit df180d9 into ClickHouse:develop Feb 2, 2021
@den-crane
Copy link
Collaborator

BTW, Number of affected rows will be inaccurate.
CH takes into account rows inserted into Materialized Views so the number will be bigger.
And the latest CH version does merge during insert so the the number can be fewer.

@bgranvea
Copy link
Contributor Author

bgranvea commented Feb 2, 2021

BTW, Number of affected rows will be inaccurate.
CH takes into account rows inserted into Materialized Views so the number will be bigger.
And the latest CH version does merge during insert so the the number can be fewer.

I also noticed that with distributed tables the number of inserted rows is doubled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PreparedStatement executeBatch returns number of rows regardless on how many failed executeUpdate only return 1 for mulitiple row insert.

4 participants