quickhouse 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {quickhouse-0.2.3 → quickhouse-0.2.4}/Cargo.lock +71 -60
  2. {quickhouse-0.2.3 → quickhouse-0.2.4}/Cargo.toml +1 -1
  3. quickhouse-0.2.4/PKG-INFO +289 -0
  4. quickhouse-0.2.4/README.md +258 -0
  5. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/config.rs +56 -0
  6. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/decode.rs +67 -23
  7. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/decode_bigquery.rs +53 -22
  8. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/decode_mysql.rs +129 -28
  9. quickhouse-0.2.4/crates/quickhouse-core/src/error.rs +90 -0
  10. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/source/mysql.rs +6 -1
  11. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/sync.rs +97 -5
  12. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/types.rs +69 -10
  13. {quickhouse-0.2.3 → quickhouse-0.2.4}/pyproject.toml +1 -1
  14. {quickhouse-0.2.3 → quickhouse-0.2.4}/python/quickhouse/_quickhouse.pyi +3 -1
  15. quickhouse-0.2.3/PKG-INFO +0 -319
  16. quickhouse-0.2.3/README.md +0 -288
  17. quickhouse-0.2.3/crates/quickhouse-core/src/error.rs +0 -53
  18. {quickhouse-0.2.3 → quickhouse-0.2.4}/LICENSE +0 -0
  19. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/Cargo.toml +0 -0
  20. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/ddl.rs +0 -0
  21. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/lib.rs +0 -0
  22. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/memory.rs +0 -0
  23. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/sink/clickhouse.rs +0 -0
  24. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/sink/mod.rs +0 -0
  25. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/source/bigquery.rs +0 -0
  26. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/source/mod.rs +0 -0
  27. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/source/postgres.rs +0 -0
  28. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-core/src/transform.rs +0 -0
  29. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-py/Cargo.toml +0 -0
  30. {quickhouse-0.2.3 → quickhouse-0.2.4}/crates/quickhouse-py/src/lib.rs +0 -0
  31. {quickhouse-0.2.3 → quickhouse-0.2.4}/python/quickhouse/__init__.py +0 -0
  32. {quickhouse-0.2.3 → quickhouse-0.2.4}/python/quickhouse/progress.py +0 -0
  33. {quickhouse-0.2.3 → quickhouse-0.2.4}/python/quickhouse/py.typed +0 -0
@@ -65,9 +65,9 @@ dependencies = [
65
65
 
66
66
  [[package]]
67
67
  name = "anyhow"
68
- version = "1.0.103"
68
+ version = "1.0.104"
69
69
  source = "registry+https://github.com/rust-lang/crates.io-index"
70
- checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"
70
+ checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
71
71
 
72
72
  [[package]]
73
73
  name = "arrayvec"
@@ -325,13 +325,13 @@ dependencies = [
325
325
 
326
326
  [[package]]
327
327
  name = "async-trait"
328
- version = "0.1.89"
328
+ version = "0.1.91"
329
329
  source = "registry+https://github.com/rust-lang/crates.io-index"
330
- checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
330
+ checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec"
331
331
  dependencies = [
332
332
  "proc-macro2",
333
333
  "quote",
334
- "syn 2.0.119",
334
+ "syn 3.0.1",
335
335
  ]
336
336
 
337
337
  [[package]]
@@ -357,9 +357,9 @@ checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
357
357
 
358
358
  [[package]]
359
359
  name = "aws-lc-rs"
360
- version = "1.17.1"
360
+ version = "1.17.3"
361
361
  source = "registry+https://github.com/rust-lang/crates.io-index"
362
- checksum = "4342d8937fc7e5dd9b1c60292261c0670c882a2cd1719cfc11b1af41731e32ad"
362
+ checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1"
363
363
  dependencies = [
364
364
  "aws-lc-sys",
365
365
  "zeroize",
@@ -367,9 +367,9 @@ dependencies = [
367
367
 
368
368
  [[package]]
369
369
  name = "aws-lc-sys"
370
- version = "0.42.0"
370
+ version = "0.43.0"
371
371
  source = "registry+https://github.com/rust-lang/crates.io-index"
372
- checksum = "6d9ceb1da931507a12f4fccea479dccd00da1943e1b4ae72d8e502d707361444"
372
+ checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c"
373
373
  dependencies = [
374
374
  "cc",
375
375
  "cmake",
@@ -555,9 +555,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
555
555
 
556
556
  [[package]]
557
557
  name = "cc"
558
- version = "1.2.67"
558
+ version = "1.3.0"
559
559
  source = "registry+https://github.com/rust-lang/crates.io-index"
560
- checksum = "e17dd265a7d0f31ef544e1b20e03add05d3b45b491b633b10d67145d2acc1a38"
560
+ checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"
561
561
  dependencies = [
562
562
  "find-msvc-tools",
563
563
  "jobserver",
@@ -965,9 +965,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
965
965
 
966
966
  [[package]]
967
967
  name = "fastrand"
968
- version = "2.4.1"
968
+ version = "2.5.0"
969
969
  source = "registry+https://github.com/rust-lang/crates.io-index"
970
- checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
970
+ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
971
971
 
972
972
  [[package]]
973
973
  name = "find-msvc-tools"
@@ -1098,9 +1098,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
1098
1098
 
1099
1099
  [[package]]
1100
1100
  name = "futures"
1101
- version = "0.3.32"
1101
+ version = "0.3.33"
1102
1102
  source = "registry+https://github.com/rust-lang/crates.io-index"
1103
- checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
1103
+ checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218"
1104
1104
  dependencies = [
1105
1105
  "futures-channel",
1106
1106
  "futures-core",
@@ -1113,9 +1113,9 @@ dependencies = [
1113
1113
 
1114
1114
  [[package]]
1115
1115
  name = "futures-channel"
1116
- version = "0.3.32"
1116
+ version = "0.3.33"
1117
1117
  source = "registry+https://github.com/rust-lang/crates.io-index"
1118
- checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
1118
+ checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
1119
1119
  dependencies = [
1120
1120
  "futures-core",
1121
1121
  "futures-sink",
@@ -1123,15 +1123,15 @@ dependencies = [
1123
1123
 
1124
1124
  [[package]]
1125
1125
  name = "futures-core"
1126
- version = "0.3.32"
1126
+ version = "0.3.33"
1127
1127
  source = "registry+https://github.com/rust-lang/crates.io-index"
1128
- checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
1128
+ checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
1129
1129
 
1130
1130
  [[package]]
1131
1131
  name = "futures-executor"
1132
- version = "0.3.32"
1132
+ version = "0.3.33"
1133
1133
  source = "registry+https://github.com/rust-lang/crates.io-index"
1134
- checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
1134
+ checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
1135
1135
  dependencies = [
1136
1136
  "futures-core",
1137
1137
  "futures-task",
@@ -1140,15 +1140,15 @@ dependencies = [
1140
1140
 
1141
1141
  [[package]]
1142
1142
  name = "futures-io"
1143
- version = "0.3.32"
1143
+ version = "0.3.33"
1144
1144
  source = "registry+https://github.com/rust-lang/crates.io-index"
1145
- checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
1145
+ checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
1146
1146
 
1147
1147
  [[package]]
1148
1148
  name = "futures-macro"
1149
- version = "0.3.32"
1149
+ version = "0.3.33"
1150
1150
  source = "registry+https://github.com/rust-lang/crates.io-index"
1151
- checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
1151
+ checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
1152
1152
  dependencies = [
1153
1153
  "proc-macro2",
1154
1154
  "quote",
@@ -1157,21 +1157,21 @@ dependencies = [
1157
1157
 
1158
1158
  [[package]]
1159
1159
  name = "futures-sink"
1160
- version = "0.3.32"
1160
+ version = "0.3.33"
1161
1161
  source = "registry+https://github.com/rust-lang/crates.io-index"
1162
- checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
1162
+ checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
1163
1163
 
1164
1164
  [[package]]
1165
1165
  name = "futures-task"
1166
- version = "0.3.32"
1166
+ version = "0.3.33"
1167
1167
  source = "registry+https://github.com/rust-lang/crates.io-index"
1168
- checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
1168
+ checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
1169
1169
 
1170
1170
  [[package]]
1171
1171
  name = "futures-util"
1172
- version = "0.3.32"
1172
+ version = "0.3.33"
1173
1173
  source = "registry+https://github.com/rust-lang/crates.io-index"
1174
- checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
1174
+ checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
1175
1175
  dependencies = [
1176
1176
  "futures-channel",
1177
1177
  "futures-core",
@@ -1500,7 +1500,7 @@ dependencies = [
1500
1500
  "tokio",
1501
1501
  "tokio-rustls",
1502
1502
  "tower-service",
1503
- "webpki-roots 1.0.8",
1503
+ "webpki-roots 1.0.9",
1504
1504
  ]
1505
1505
 
1506
1506
  [[package]]
@@ -2288,9 +2288,9 @@ checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
2288
2288
 
2289
2289
  [[package]]
2290
2290
  name = "portable-atomic"
2291
- version = "1.13.1"
2291
+ version = "1.14.0"
2292
2292
  source = "registry+https://github.com/rust-lang/crates.io-index"
2293
- checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
2293
+ checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
2294
2294
 
2295
2295
  [[package]]
2296
2296
  name = "postgres-protocol"
@@ -2382,9 +2382,9 @@ dependencies = [
2382
2382
 
2383
2383
  [[package]]
2384
2384
  name = "proc-macro2"
2385
- version = "1.0.106"
2385
+ version = "1.0.107"
2386
2386
  source = "registry+https://github.com/rust-lang/crates.io-index"
2387
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
2387
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
2388
2388
  dependencies = [
2389
2389
  "unicode-ident",
2390
2390
  ]
@@ -2506,7 +2506,7 @@ dependencies = [
2506
2506
 
2507
2507
  [[package]]
2508
2508
  name = "quickhouse-core"
2509
- version = "0.2.3"
2509
+ version = "0.2.4"
2510
2510
  dependencies = [
2511
2511
  "anyhow",
2512
2512
  "arrow",
@@ -2536,7 +2536,7 @@ dependencies = [
2536
2536
 
2537
2537
  [[package]]
2538
2538
  name = "quickhouse-py"
2539
- version = "0.2.3"
2539
+ version = "0.2.4"
2540
2540
  dependencies = [
2541
2541
  "pyo3",
2542
2542
  "quickhouse-core",
@@ -2557,7 +2557,7 @@ dependencies = [
2557
2557
  "rustc-hash",
2558
2558
  "rustls",
2559
2559
  "socket2 0.6.5",
2560
- "thiserror 2.0.18",
2560
+ "thiserror 2.0.19",
2561
2561
  "tokio",
2562
2562
  "tracing",
2563
2563
  "web-time",
@@ -2579,7 +2579,7 @@ dependencies = [
2579
2579
  "rustls",
2580
2580
  "rustls-pki-types",
2581
2581
  "slab",
2582
- "thiserror 2.0.18",
2582
+ "thiserror 2.0.19",
2583
2583
  "tinyvec",
2584
2584
  "tracing",
2585
2585
  "web-time",
@@ -2601,9 +2601,9 @@ dependencies = [
2601
2601
 
2602
2602
  [[package]]
2603
2603
  name = "quote"
2604
- version = "1.0.46"
2604
+ version = "1.0.47"
2605
2605
  source = "registry+https://github.com/rust-lang/crates.io-index"
2606
- checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
2606
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
2607
2607
  dependencies = [
2608
2608
  "proc-macro2",
2609
2609
  ]
@@ -2770,7 +2770,7 @@ dependencies = [
2770
2770
  "wasm-bindgen-futures",
2771
2771
  "wasm-streams",
2772
2772
  "web-sys",
2773
- "webpki-roots 1.0.8",
2773
+ "webpki-roots 1.0.9",
2774
2774
  ]
2775
2775
 
2776
2776
  [[package]]
@@ -2948,9 +2948,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
2948
2948
 
2949
2949
  [[package]]
2950
2950
  name = "serde"
2951
- version = "1.0.228"
2951
+ version = "1.0.229"
2952
2952
  source = "registry+https://github.com/rust-lang/crates.io-index"
2953
- checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
2953
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
2954
2954
  dependencies = [
2955
2955
  "serde_core",
2956
2956
  "serde_derive",
@@ -2958,22 +2958,22 @@ dependencies = [
2958
2958
 
2959
2959
  [[package]]
2960
2960
  name = "serde_core"
2961
- version = "1.0.228"
2961
+ version = "1.0.229"
2962
2962
  source = "registry+https://github.com/rust-lang/crates.io-index"
2963
- checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
2963
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
2964
2964
  dependencies = [
2965
2965
  "serde_derive",
2966
2966
  ]
2967
2967
 
2968
2968
  [[package]]
2969
2969
  name = "serde_derive"
2970
- version = "1.0.228"
2970
+ version = "1.0.229"
2971
2971
  source = "registry+https://github.com/rust-lang/crates.io-index"
2972
- checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
2972
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
2973
2973
  dependencies = [
2974
2974
  "proc-macro2",
2975
2975
  "quote",
2976
- "syn 2.0.119",
2976
+ "syn 3.0.1",
2977
2977
  ]
2978
2978
 
2979
2979
  [[package]]
@@ -3075,7 +3075,7 @@ checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d"
3075
3075
  dependencies = [
3076
3076
  "num-bigint",
3077
3077
  "num-traits",
3078
- "thiserror 2.0.18",
3078
+ "thiserror 2.0.19",
3079
3079
  "time",
3080
3080
  ]
3081
3081
 
@@ -3194,6 +3194,17 @@ dependencies = [
3194
3194
  "unicode-ident",
3195
3195
  ]
3196
3196
 
3197
+ [[package]]
3198
+ name = "syn"
3199
+ version = "3.0.1"
3200
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3201
+ checksum = "5edbec4ed188954a10c12c038215f8ce7606b2d5c973cd8dc43e8795065c5f2f"
3202
+ dependencies = [
3203
+ "proc-macro2",
3204
+ "quote",
3205
+ "unicode-ident",
3206
+ ]
3207
+
3197
3208
  [[package]]
3198
3209
  name = "sync_wrapper"
3199
3210
  version = "1.0.2"
@@ -3246,11 +3257,11 @@ dependencies = [
3246
3257
 
3247
3258
  [[package]]
3248
3259
  name = "thiserror"
3249
- version = "2.0.18"
3260
+ version = "2.0.19"
3250
3261
  source = "registry+https://github.com/rust-lang/crates.io-index"
3251
- checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
3262
+ checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
3252
3263
  dependencies = [
3253
- "thiserror-impl 2.0.18",
3264
+ "thiserror-impl 2.0.19",
3254
3265
  ]
3255
3266
 
3256
3267
  [[package]]
@@ -3266,13 +3277,13 @@ dependencies = [
3266
3277
 
3267
3278
  [[package]]
3268
3279
  name = "thiserror-impl"
3269
- version = "2.0.18"
3280
+ version = "2.0.19"
3270
3281
  source = "registry+https://github.com/rust-lang/crates.io-index"
3271
- checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
3282
+ checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
3272
3283
  dependencies = [
3273
3284
  "proc-macro2",
3274
3285
  "quote",
3275
- "syn 2.0.119",
3286
+ "syn 3.0.1",
3276
3287
  ]
3277
3288
 
3278
3289
  [[package]]
@@ -3934,14 +3945,14 @@ version = "0.26.11"
3934
3945
  source = "registry+https://github.com/rust-lang/crates.io-index"
3935
3946
  checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
3936
3947
  dependencies = [
3937
- "webpki-roots 1.0.8",
3948
+ "webpki-roots 1.0.9",
3938
3949
  ]
3939
3950
 
3940
3951
  [[package]]
3941
3952
  name = "webpki-roots"
3942
- version = "1.0.8"
3953
+ version = "1.0.9"
3943
3954
  source = "registry+https://github.com/rust-lang/crates.io-index"
3944
- checksum = "bf85cb06032201fa7c6f829d7db5a7e5aa45bcc0655327713065f6f0576731bf"
3955
+ checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a"
3945
3956
  dependencies = [
3946
3957
  "rustls-pki-types",
3947
3958
  ]
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/quickhouse-core", "crates/quickhouse-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.2.3"
6
+ version = "0.2.4"
7
7
  edition = "2021"
8
8
  license = "MIT"
9
9
  authors = ["quickhouse contributors"]
@@ -0,0 +1,289 @@
1
+ Metadata-Version: 2.4
2
+ Name: quickhouse
3
+ Version: 0.2.4
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Operating System :: OS Independent
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Database
11
+ Classifier: Topic :: Software Development :: Libraries
12
+ Requires-Dist: tqdm>=4.60 ; extra == 'progress'
13
+ Requires-Dist: pytest>=7 ; extra == 'test'
14
+ Requires-Dist: psycopg[binary]>=3.1 ; extra == 'test'
15
+ Requires-Dist: pymysql>=1.1 ; extra == 'test'
16
+ Requires-Dist: clickhouse-connect>=0.7 ; extra == 'test'
17
+ Requires-Dist: tqdm>=4.60 ; extra == 'test'
18
+ Provides-Extra: progress
19
+ Provides-Extra: test
20
+ License-File: LICENSE
21
+ Summary: Fast PostgreSQL/MySQL/BigQuery -> ClickHouse ETL with a Rust engine (parallel, bounded-memory, Arrow-based).
22
+ Keywords: etl,postgresql,mysql,bigquery,clickhouse,arrow,rust,data-engineering
23
+ Author-email: M Mirza Fahmi <mr.sm1l3yz@gmail.com>
24
+ License: MIT
25
+ Requires-Python: >=3.9
26
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
27
+ Project-URL: Homepage, https://github.com/mmirzafahmi/quickhouse
28
+ Project-URL: Issues, https://github.com/mmirzafahmi/quickhouse/issues
29
+ Project-URL: Repository, https://github.com/mmirzafahmi/quickhouse
30
+
31
+ # quickhouse
32
+
33
+ Fast **PostgreSQL / MySQL / BigQuery → ClickHouse** ETL: a native **Rust engine**
34
+ driven from a small, typed **Python** API.
35
+
36
+ The hot path never materializes Python objects — each source's native wire
37
+ protocol flows straight into Apache Arrow and out to ClickHouse's
38
+ `FORMAT ArrowStream`, with parallel range-partitioned reads, bounded-memory
39
+ streaming, automatic table creation, and both full-refresh and incremental
40
+ (watermark) sync modes.
41
+
42
+ ```python
43
+ import quickhouse
44
+
45
+ src = quickhouse.Postgres("postgresql://user:pw@localhost:5432/odoo")
46
+ dst = quickhouse.ClickHouse("http://localhost:8123", database="analytics")
47
+
48
+ result = quickhouse.sync(src, dst, dest_table="account_move_line",
49
+ source_table="account_move_line", key=["id"])
50
+ print(result) # rows_read, rows_written, bytes_written, duration_secs, new_watermark
51
+ ```
52
+
53
+ ## Key features
54
+
55
+ - **Three sources, one API.** PostgreSQL, MySQL, and Google BigQuery — swap the
56
+ source object, and everything else about `sync()` is identical.
57
+ - **Fast by construction.** Source rows are decoded straight into Arrow in Rust
58
+ (no per-row Python), tables are split into key ranges read in parallel, and
59
+ decoding overlaps uploading — each finished batch's insert is spawned as a
60
+ background task while the next batch is still being decoded.
61
+ - **Bounded memory.** A single hard ceiling, `max_memory_bytes`, caps *total*
62
+ in-flight batch memory across every partition and every upload, measured
63
+ against each batch's real Arrow allocation. When it's reached, decoding blocks
64
+ (backpressure) — so peak RSS stays flat regardless of `parallelism`, row
65
+ width, or partition skew.
66
+ - **Streaming compressed inserts.** Arrow IPC ingested by ClickHouse's native
67
+ `ArrowStream`, compressed on the fly with zstd (default), gzip, or none — the
68
+ body is produced incrementally, never buffered in full.
69
+ - **Atomic full refresh.** Loads into a staging table, then `EXCHANGE TABLES` to
70
+ swap it into place; a crash mid-run never leaves the destination partial.
71
+ - **Idempotent incremental.** Tracks a watermark in an internal ClickHouse state
72
+ table, copies only new rows, and dedupes via `ReplacingMergeTree`. Re-running
73
+ with no new data is a no-op.
74
+ - **Resilient.** Transient insert failures (dropped connections, timeouts, HTTP
75
+ 5xx/429) retry with exponential backoff (up to 4 attempts); deterministic 4xx
76
+ errors (bad SQL, auth) fail fast. Messy legacy data — zero-dates, out-of-range
77
+ dates — is coerced rather than crashing the run.
78
+ - **Automatic DDL.** Generates the ClickHouse `CREATE TABLE` from the source
79
+ schema, with per-column type overrides, renames, and include/exclude lists.
80
+ - **GIL-free.** The whole transfer runs inside `Python::allow_threads`; the GIL
81
+ is only re-acquired to fire your `on_progress` callback.
82
+
83
+ ## Installation
84
+
85
+ Prebuilt wheels — no Rust toolchain required:
86
+
87
+ ```bash
88
+ pip install quickhouse
89
+ pip install "quickhouse[progress]" # + a ready-made tqdm progress bar
90
+ ```
91
+
92
+ Python 3.9+ on Linux, macOS (Intel + Apple Silicon), and Windows (x86_64).
93
+
94
+ Building from source (for development, or to run an unreleased version) needs the
95
+ Rust toolchain and maturin — see [CONTRIBUTING.md](CONTRIBUTING.md).
96
+
97
+ ## How to use
98
+
99
+ ```python
100
+ import quickhouse as qh
101
+
102
+ src = qh.Postgres("postgresql://user:pw@localhost:5432/odoo")
103
+ # or: src = qh.MySQL("mysql://user:pw@localhost:3306/odoo")
104
+ # or: src = qh.BigQuery("my-gcp-project") # source_table="dataset.table"
105
+ dst = qh.ClickHouse("http://localhost:8123", database="analytics")
106
+
107
+ result = qh.sync(
108
+ src, dst,
109
+ dest_table="account_move_line",
110
+ source_table="account_move_line",
111
+ mode="incremental", # or "full"
112
+ watermark="write_date", # required for incremental
113
+ key=["id"], # ORDER BY / dedup key
114
+ create_if_missing=True, # auto-generate the ClickHouse table
115
+ parallelism=8,
116
+ batch_rows=100_000,
117
+ exclude=["display_name"],
118
+ rename={"amount": "amt"},
119
+ type_overrides={"amt": "Decimal(18, 2)"},
120
+ on_progress=lambda p: print(f"{p.rows_written:,} rows @ {p.rows_per_sec:,.0f}/s"),
121
+ )
122
+ print(result) # rows_read, rows_written, bytes_written, duration_secs, new_watermark
123
+ ```
124
+
125
+ ### Choosing a source
126
+
127
+ `sync()`'s first argument accepts any of:
128
+
129
+ ```python
130
+ qh.Postgres("postgresql://user:pw@host:5432/db", statement_timeout_secs=0, ca_cert_file=None)
131
+ qh.MySQL("mysql://user:pw@host:3306/db", require_tls=False, ca_cert_file=None)
132
+ qh.BigQuery("my-gcp-project", credentials_file=None) # None → Application Default Credentials
133
+ ```
134
+
135
+ Read a whole table with `source_table=...`, or a custom `SELECT` with
136
+ `source_query=...` (exactly one is required).
137
+
138
+ ### Sync modes
139
+
140
+ - **`full`** — loads into a staging table, then `EXCHANGE TABLES` to swap it into
141
+ place atomically. A crash mid-run never leaves the destination empty/partial.
142
+ - **`incremental`** — reads the last watermark from an internal
143
+ `_quickhouse_state` table in ClickHouse, copies only rows past it (snapshotting
144
+ the current max up front for consistency), and dedupes via
145
+ `ReplacingMergeTree(<watermark>)`. Re-running with no new data is a no-op.
146
+
147
+ ### Progress reporting
148
+
149
+ `on_progress` is a plain callback, so you can wire up anything — a `print`, a
150
+ logger, a custom UI. For a ready-made bar, `qh.progress_bar()` wraps
151
+ [tqdm](https://github.com/tqdm/tqdm) (`pip install "quickhouse[progress]"`):
152
+
153
+ ```python
154
+ with qh.progress_bar() as on_progress:
155
+ qh.sync(src, dst, dest_table="t", source_table="t", on_progress=on_progress)
156
+ ```
157
+
158
+ Pass `total=<row count>` (e.g. from a prior `COUNT(*)`) for a percentage/ETA bar
159
+ instead of a running count; other keyword arguments pass straight through to
160
+ `tqdm.tqdm`. The bar closes automatically on exit, including when `sync()` raises.
161
+
162
+ ### Logging
163
+
164
+ Every `sync()` call prints step-by-step progress to **stderr** via `tracing`:
165
+ connecting, resolving columns/partitions, watermark resolution, DDL/staging
166
+ creation, per-partition read start/completion, the full-refresh swap, watermark
167
+ persistence, and a final summary (rows, duration, rows/sec). This complements
168
+ `on_progress` (which only fires during the row-ingestion loop, never during
169
+ connect/DDL/swap).
170
+
171
+ Default level is `INFO` for `quickhouse_core` (dependency internals stay quiet).
172
+ Override with the standard `RUST_LOG` environment variable:
173
+
174
+ ```bash
175
+ RUST_LOG=quickhouse_core=debug python my_script.py # + actual SQL/DDL text
176
+ RUST_LOG=debug python my_script.py # everything, incl. deps
177
+ ```
178
+
179
+ ### `sync()` parameters
180
+
181
+ | Parameter | Meaning |
182
+ | --- | --- |
183
+ | `source_table` / `source_query` | Read a whole table, or a custom `SELECT` (one is required) |
184
+ | `dest_table` | Destination table in the ClickHouse database |
185
+ | `mode` | `"full"` or `"incremental"` |
186
+ | `watermark` | Monotonic column (e.g. `write_date`, `id`) — required for incremental; ignored (cleared to `None`) in full mode |
187
+ | `key` | Business key → ClickHouse `ORDER BY` and dedup key |
188
+ | `create_if_missing` | Auto-run generated `CREATE TABLE` when the destination is absent |
189
+ | `engine`, `order_by`, `partition_by`, `primary_key` | DDL knobs (sensible defaults per mode) |
190
+ | `parallelism` | Number of concurrent partition streams |
191
+ | `batch_rows` | Max rows per Arrow batch / insert — a per-batch granularity knob, **not** the memory ceiling |
192
+ | `batch_bytes` | Also cap each batch at this many estimated source bytes (default 4 MiB); `0` disables |
193
+ | `max_memory_bytes` | **The memory ceiling.** Hard cap on total in-flight Arrow memory across all partitions and uploads; decoding blocks when reached. Default 512 MiB; `0` = unbounded |
194
+ | `partition_column` | Integer column to range-split on (defaults to first `key`) |
195
+ | `type_overrides` | Per-column ClickHouse type (e.g. `{"qty": "Decimal(18, 3)"}`) |
196
+ | `rename` | Source → destination column renames |
197
+ | `include` / `exclude` | Column allow/deny lists |
198
+ | `on_progress` | Callback receiving a `Progress` (`rows_written`, `rows_per_sec`, …) |
199
+
200
+ ## Type mapping
201
+
202
+ Nullable source columns become `Nullable(T)`. Arbitrary-precision numeric types
203
+ (`numeric`/`DECIMAL`/`NUMERIC`/`BIGNUMERIC`, marked \*) map to `Float64` by
204
+ default — precision isn't recoverable from the type alone; override to a
205
+ `Decimal(P, S)` via `type_overrides` and ClickHouse converts on insert. `TIME`
206
+ values are transferred as canonical `[-]HH:MM:SS[.ffffff]` **text** into a
207
+ `String` column (ClickHouse has no time-of-day type; text preserves MySQL's
208
+ negative / >24h durations losslessly). Dates outside ClickHouse's
209
+ `[1900-01-01, 2299-12-31]` window — and MySQL zero-dates like `0000-00-00` — are
210
+ coerced to `NULL` (with a per-partition warning) rather than aborting the run.
211
+
212
+ ### PostgreSQL
213
+
214
+ | PostgreSQL | Arrow | ClickHouse |
215
+ | --- | --- | --- |
216
+ | `int2/4/8` | `Int16/32/64` | `Int16/32/64` |
217
+ | `float4/8`, `numeric`\* | `Float32/64` | `Float32/64` |
218
+ | `bool` | `Boolean` | `Bool` |
219
+ | `text/varchar/json/jsonb` | `Utf8` | `String` |
220
+ | `uuid` | `Utf8` | `UUID` |
221
+ | `date` | `Date32` | `Date32` |
222
+ | `time` | `Utf8` | `String` |
223
+ | `timestamp[tz]` | `Timestamp(µs)` | `DateTime64(6[, tz])` |
224
+
225
+ ### MySQL
226
+
227
+ | MySQL | Arrow | ClickHouse |
228
+ | --- | --- | --- |
229
+ | `TINYINT(1)` | `Boolean` | `Bool` |
230
+ | `TINYINT` / `SMALLINT` / `INT` / `BIGINT` (± `UNSIGNED`) | `Int8..64` / `UInt8..64` | matching `Int*`/`UInt*` |
231
+ | `FLOAT` | `Float32` | `Float32` |
232
+ | `DOUBLE`, `DECIMAL`/`NUMERIC`\* | `Float64` | `Float64` |
233
+ | `VARCHAR/TEXT/ENUM/SET/JSON` | `Utf8` | `String` |
234
+ | `BLOB` family, `BIT` | `Binary` | `String` |
235
+ | `DATE` | `Date32` | `Date32` |
236
+ | `TIME` | `Utf8` | `String` |
237
+ | `DATETIME`/`TIMESTAMP` | `Timestamp(µs)` | `DateTime64(6)` |
238
+
239
+ `TINYINT(1)` follows MySQL's de facto boolean convention (matching most client
240
+ libraries); other `TINYINT` widths map to `Int8`/`UInt8`. Column nullability
241
+ comes directly from MySQL's wire-protocol metadata (`NOT_NULL_FLAG`), so it works
242
+ even for `source_query`.
243
+
244
+ ### BigQuery
245
+
246
+ | BigQuery | Arrow | ClickHouse |
247
+ | --- | --- | --- |
248
+ | `BOOLEAN`/`BOOL` | `Boolean` | `Bool` |
249
+ | `INTEGER`/`INT64` | `Int64` | `Int64` |
250
+ | `FLOAT`/`FLOAT64` | `Float64` | `Float64` |
251
+ | `NUMERIC`/`BIGNUMERIC`/`DECIMAL`\* | `Float64` | `Float64` |
252
+ | `STRING`, `JSON` | `Utf8` | `String` |
253
+ | `BYTES` | `Binary` | `String` |
254
+ | `DATE` | `Date32` | `Date32` |
255
+ | `TIME` | `Utf8` | `String` |
256
+ | `TIMESTAMP` | `Timestamp(µs, UTC)` | `DateTime64(6, 'UTC')` |
257
+ | `DATETIME` | `Timestamp(µs)` | `DateTime64(6)` |
258
+
259
+ `RECORD`/`STRUCT` and repeated (`ARRAY`) fields aren't supported in v1 — same
260
+ scalar-only scope as the Postgres/MySQL sources.
261
+
262
+ ## Limitations / roadmap (v1)
263
+
264
+ - TLS uses rustls, trusting the public CA roots plus, optionally, an extra CA
265
+ file via `ca_cert_file=...` on `Postgres`/`MySQL` (needed for providers like
266
+ AWS RDS with a private regional CA). PostgreSQL follows the libpq `sslmode` DSN
267
+ parameter (`disable` | `prefer` (default) | `require`); MySQL has no such
268
+ convention, so use `MySQL(..., require_tls=True)`. Client-certificate (mTLS)
269
+ auth isn't supported yet.
270
+ - Array and composite (`RECORD`/`STRUCT`) types aren't supported; extend
271
+ `types.rs` + the relevant `decode*.rs`.
272
+ - **BigQuery parallelism**: `parallelism` is passed as a stream-count hint
273
+ (server-side parallel preparation), but rows are consumed on a single
274
+ connection rather than fanned out across concurrent local tasks. Only single
275
+ `SELECT` statements are supported for `source_query` (not multi-statement
276
+ scripts).
277
+ - No CLI yet — a config-driven CLI over the same engine is planned.
278
+ - Logical-replication CDC and arbitrary transform callbacks are future work.
279
+
280
+ ## Contributing
281
+
282
+ Bug reports, source/type-mapping additions, and PRs are welcome. Build steps,
283
+ the test workflow, project layout, and the release process live in
284
+ [CONTRIBUTING.md](CONTRIBUTING.md).
285
+
286
+ ## License
287
+
288
+ MIT
289
+