Commit dc0bc20
authored
Add initial support for fetching data from remote databases (postgres, motherduck, duckdb) (#2)
* chore: add adbc dependencies
* feat(datafetch): add DataFetchError enum
* feat(datafetch): add TableMetadata and ColumnMetadata types
* feat(datafetch): add DataFetcher trait
* feat(datafetch): add DriverManager for ADBC driver loading
* feat(datafetch): add AdbcFetcher with discovery skeleton
* feat(datafetch): implement get_objects result parsing
* feat(datafetch): implement fetch_table with parquet writing
* feat(catalog): add arrow_schema_json to TableInfo
* feat: integrate DataFetcher with SchemaProvider
* feat(engine): implement connect() with ADBC discovery
* test: add datafetch integration tests
* chore: add driver vendoring directory structure
* fix: implement build.rs for driver vendoring
* fix: use proper Arrow schema serialization
* feat: implement LazyTableProvider for on-demand fetch
* fix: quote SQL identifiers to prevent injection
* fix: allow syncing empty tables
* fix: improve sql_type_to_arrow with NULL handling and warnings
* docs: add documentation to datafetch public APIs
* chore: replace ADBC deps with sqlx
* refactor(datafetch): remove ADBC, add NativeFetcher skeleton
* feat(datafetch): add StreamingParquetWriter
* refactor(catalog): migrate postgres_manager to sqlx
* feat(datafetch): add DuckDB discovery
* feat(datafetch): add DuckDB fetch_table
* feat(datafetch): add PostgreSQL discovery
* feat(datafetch): add PostgreSQL fetch with Arrow conversion
* refactor(catalog): merge add_table and update_table_schema
* test: update tests for native datafetch
* refactor(datafetch): centralize streaming Parquet writer
* test: add comprehensive tests for streaming parquet writer
* log errors
* build connection string from input
* automatically handle ssl for postgres
* simplify to use Source instead of raw json
* fix projection push down
* add support for filters/limits at table scan
* add access to catalog
* use correct size for ordinal position
* duckdb (motherduck) should only return tables for the configured catalog
* first pass at golden path integration test
* refactor to use test harness/fixture abstraction for better re-use
* remove existing integration tests in favor of new "golden path" tests
* remove un-used function
* refactor to match enum, not string
* cargo fmt
* inline postgres arrow logic
* refactor to stream postgres results
* fix log message
* refactor duckdb to write results in a streaming fashion
* use parameterized query for duckdb discovery1 parent 08e793d commit dc0bc20
File tree
31 files changed
+3273
-623
lines changed- src
- bin
- catalog
- datafetch
- native
- datafusion
- http
- storage
- tests
31 files changed
+3273
-623
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | | - | |
| 409 | + | |
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
| |||
462 | 463 | | |
463 | 464 | | |
464 | 465 | | |
465 | | - | |
| 466 | + | |
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
| |||
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
537 | 541 | | |
538 | | - | |
| 542 | + | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| |||
135 | 144 | | |
136 | 145 | | |
137 | 146 | | |
| 147 | + | |
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| |||
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
224 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
225 | 241 | | |
226 | 242 | | |
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
230 | 246 | | |
231 | 247 | | |
232 | | - | |
| 248 | + | |
233 | 249 | | |
234 | | - | |
235 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
236 | 253 | | |
237 | 254 | | |
238 | 255 | | |
| |||
253 | 270 | | |
254 | 271 | | |
255 | 272 | | |
256 | | - | |
| 273 | + | |
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
| |||
264 | 281 | | |
265 | 282 | | |
266 | 283 | | |
267 | | - | |
| 284 | + | |
268 | 285 | | |
269 | 286 | | |
270 | 287 | | |
| |||
288 | 305 | | |
289 | 306 | | |
290 | 307 | | |
291 | | - | |
| 308 | + | |
292 | 309 | | |
293 | 310 | | |
294 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
0 commit comments