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

Remove deprecated code and refactor data processor #1124

Merged
merged 1 commit into from
Nov 11, 2022
Merged

Remove deprecated code and refactor data processor #1124

merged 1 commit into from
Nov 11, 2022

Conversation

zhicwu
Copy link
Contributor

@zhicwu zhicwu commented Nov 10, 2022

Changes

💥 standards for breaking changes.

  • 💥 Removed deprecated code in v0.3.2-patch11

  • Configuration and data mapping changes

    • added option widen_unsigned_types (defaults to false)

      ClickHouse Data Type 💥 Java Type (widen_unsigned_types=false) Java Type (widen_unsigned_types=true)
      UInt8 byte short
      Nullable(UInt8) UnsignedByte Short
      Array(UInt8) byte[] short[]
      UInt16 short int
      Nullable(UInt16) UnsignedShort Integer
      Array(UInt16) short[] int[]
      UInt32 int long
      Nullable(UInt32) UnsignedInteger Long
      Array(UInt32) int[] long[]
      UInt64 long long
      Nullable(UInt64) UnsignedLong 💥 UnsignedLong
      Array(UInt64) long[] long[]
    • added option use_binary_string (defaults to false)

      ClickHouse Data Type 💥 Java Type (use_binary_string=false) Java Type (use_binary_string=true)
      String String byte[]
      Array(String) String[] byte[][]
  • Data type and alias changes

    • added Unsigned* classes to better support unsigned data types and type conversion
    • 💥 UInt64 is now mapped to UnsignedLong instead of Long
    • added data types(IntervalMicrosecond, IntervalMillisecond, IntervalNanosecond) and aliases(BIT, SET, TIME, YEAR)
    • 💥 Enum is no longer a valid data type but case-insensitive alias of Enum8
  • Refactored serialization and deserialization process

    • 💥 removed generic type, ClickHouseColumn and ClickHouseConfig from ClickHouseDeserializer & ClickHouseSerializer interfaces
    • 💥 removed MappedFunctions and EnumMap from data processors
    • composite serializer and deserializer support

Benchmarks

Benchmark                                (client)  (connection)  (statement)   (type)   Mode  Cnt    Score   Error  Units
Query.selectInt8                  v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20  109.234 ± 5.363  ops/s
Query.selectString                v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20   36.596 ± 1.616  ops/s
Query.selectUInt64                v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20   55.210 ± 2.559  ops/s
Query.selectUInt64                v0.3.3-SNAPSHOT         reuse     prepared  default  thrpt   20   62.680 ± 3.178  ops/s
Query.selectArrayOfUInt16         v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20    3.116 ± 0.219  ops/s
Query.selectMapOfInt32            v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20    1.500 ± 0.136  ops/s
Query.selectTupleOfInt16          v0.3.3-SNAPSHOT         reuse     prepared   object  thrpt   20    3.085 ± 0.346  ops/s
Query.selectInt8                   v0.3.2-patch11         reuse     prepared   object  thrpt   20   91.337 ± 4.032  ops/s
Query.selectString                 v0.3.2-patch11         reuse     prepared   object  thrpt   20   28.117 ± 1.882  ops/s
Query.selectUInt64                 v0.3.2-patch11         reuse     prepared   object  thrpt   20   57.714 ± 3.309  ops/s
Query.selectUInt64                 v0.3.2-patch11         reuse     prepared  default  thrpt   20   62.041 ± 3.210  ops/s
Query.selectArrayOfUInt16          v0.3.2-patch11         reuse     prepared   object  thrpt   20    1.433 ± 0.104  ops/s
Query.selectMapOfInt32             v0.3.2-patch11         reuse     prepared   object  thrpt   20    1.355 ± 0.132  ops/s
Query.selectTupleOfInt16           v0.3.2-patch11         reuse     prepared   object  thrpt   20    2.985 ± 0.245  ops/s
Query.selectInt8           clickhouse-native-jdbc         reuse     prepared   object  thrpt   20   81.238 ± 3.263  ops/s
Query.selectString         clickhouse-native-jdbc         reuse     prepared   object  thrpt   20   31.552 ± 1.223  ops/s
Query.selectUInt64         clickhouse-native-jdbc         reuse     prepared   object  thrpt   20   38.934 ± 2.553  ops/s
Query.selectUInt64         clickhouse-native-jdbc         reuse     prepared  default  thrpt   20   38.442 ± 3.054  ops/s
Query.selectArrayOfUInt16  clickhouse-native-jdbc         reuse     prepared   object  thrpt   20    0.695 ± 0.111  ops/s
Query.selectMapOfInt32     clickhouse-native-jdbc         reuse     prepared   object  thrpt   20    0.744 ± 0.076  ops/s
Query.selectTupleOfInt16   clickhouse-native-jdbc         reuse     prepared   object  thrpt   20    0.663 ± 0.104  ops/s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant