Commit 789c4f5
fix: code quality review fixes (#8)
* fix: always include schema in managed config even when tables list is empty
build_managed_config was returning {} when tables=[], silently dropping
the schema name. A call like create_database("db", schema="analytics")
would send config: {} to the API and the schema declaration was lost.
Remove the early return so the schema block is always emitted. Add a
regression test for the empty-tables path.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: remove duplicate obj/schema validation from create_table
The check was already present in _local_table_to_parquet with the same
condition and message. Having it in create_table too was dead code.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test: add missing client.close() in test_result_arrow_poll_handles_accepted_result
Every other HotdataClient created in this file is closed at the end of
the test. This one was missed, leaving a dangling connection pool.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: explain _managed_table_synced behavior for pending-sync tables
The method returns False for tables whose synced flag is False, which
lets create_table proceed without overwrite=True while a load is still
in progress. This was intentional but undocumented, making the behavior
look like a bug.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* nit: document why except Exception is intentionally broad in dtype_from_hotdata_sql_type
ibis and sqlglot raise several different exception types depending on
which part of type parsing fails (ValueError, AttributeError, parse
errors internal to sqlglot). Narrowing to a specific type risks missing
one and breaking type discovery for a valid-but-unusual column type.
Add a comment so the broad catch is clearly deliberate.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent fcc3270 commit 789c4f5
5 files changed
Lines changed: 41 additions & 6 deletions
File tree
- src/ibis_hotdata
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| |||
613 | 620 | | |
614 | 621 | | |
615 | 622 | | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | 623 | | |
620 | 624 | | |
621 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
502 | 534 | | |
503 | 535 | | |
504 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
0 commit comments