Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes number cast exception for ClickHouseArrayValue with Boolean[] #985

Merged
merged 3 commits into from
Jul 10, 2022

Conversation

subkanthi
Copy link
Contributor

Fixes number cast exception for ClickHouseArrayValue with Boolean[]

@github-actions
Copy link

github-actions bot commented Jul 6, 2022

Benchmark                                (client)  (connection)  (statement)  (type)   Mode  Cnt     Score    Error  Units
Basic.insertOneRandomNumber  clickhouse-http-jdbc         reuse       normal  object  thrpt   20   227.073 ± 27.981  ops/s
Basic.insertOneRandomNumber  clickhouse-http-jdbc         reuse     prepared  object  thrpt   20   226.929 ± 20.537  ops/s
Basic.insertOneRandomNumber  clickhouse-http-jdbc           new       normal  object  thrpt   20   244.848 ± 18.734  ops/s
Basic.insertOneRandomNumber  clickhouse-http-jdbc           new     prepared  object  thrpt   20   223.304 ± 19.973  ops/s
Basic.insertOneRandomNumber  clickhouse-grpc-jdbc         reuse       normal  object  thrpt   20   255.262 ± 29.879  ops/s
Basic.insertOneRandomNumber  clickhouse-grpc-jdbc         reuse     prepared  object  thrpt   20   238.757 ± 25.574  ops/s
Basic.insertOneRandomNumber  clickhouse-grpc-jdbc           new       normal  object  thrpt   20   271.064 ± 32.182  ops/s
Basic.insertOneRandomNumber  clickhouse-grpc-jdbc           new     prepared  object  thrpt   20   232.737 ± 32.637  ops/s
Basic.selectOneRandomNumber  clickhouse-http-jdbc         reuse       normal  object  thrpt   20  1156.591 ± 85.070  ops/s
Basic.selectOneRandomNumber  clickhouse-http-jdbc         reuse     prepared  object  thrpt   20  1175.286 ± 92.138  ops/s
Basic.selectOneRandomNumber  clickhouse-http-jdbc           new       normal  object  thrpt   20  1171.508 ± 90.480  ops/s
Basic.selectOneRandomNumber  clickhouse-http-jdbc           new     prepared  object  thrpt   20  1219.405 ± 85.266  ops/s
Basic.selectOneRandomNumber  clickhouse-grpc-jdbc         reuse       normal  object  thrpt   20   965.410 ± 65.162  ops/s
Basic.selectOneRandomNumber  clickhouse-grpc-jdbc         reuse     prepared  object  thrpt   20   981.839 ± 53.917  ops/s
Basic.selectOneRandomNumber  clickhouse-grpc-jdbc           new       normal  object  thrpt   20   963.605 ± 68.676  ops/s
Basic.selectOneRandomNumber  clickhouse-grpc-jdbc           new     prepared  object  thrpt   20   955.551 ± 51.746  ops/s

@zhicwu zhicwu changed the base branch from master to develop July 6, 2022 21:05
@zhicwu
Copy link
Contributor

zhicwu commented Jul 8, 2022

Hi @subkanthi, thanks for your contribution and sorry for getting back late on this. I made a few more changes:

  • change target branch to develop
  • update update(Object[]) method by moving the type check outside of the loop for performance reason, and it also means we no longer support corner case like object array with mixed types
  • update asArray(Class) to convert byte[] to Boolean[]
  • some more tests

Let me know if you're good with above changes and/or have more to add. I'll create a separate PR to enhance asObject(Class) method to support converting byte[] to boolean[] etc.

P.S. the build failure is irrelevant to this change.

@zhicwu zhicwu merged commit 4be83e5 into ClickHouse:develop Jul 10, 2022
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.

2 participants