Commit 2922cfb
committed
fix: prevent Null type for datetime columns when all values are null
When all jobs are RUNNING (no end_time), Polars infers the column type
as Null
instead of Datetime with null values, causing SchemaError during
concatenation.
Solution:
- Define PROCESSED_JOB_SCHEMA constant with explicit types
- Use schema parameter in pl.DataFrame() to enforce types
- Ensures datetime columns are always Datetime("us", "UTC") even when
all null
This fixes the "type Datetime is incompatible with expected type Null"
error
that occurs when collecting data with only RUNNING jobs.1 parent c13251e commit 2922cfb
1 file changed
+36
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
672 | 673 | | |
673 | 674 | | |
674 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
675 | 703 | | |
676 | 704 | | |
677 | 705 | | |
| |||
1334 | 1362 | | |
1335 | 1363 | | |
1336 | 1364 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1341 | 1373 | | |
1342 | 1374 | | |
1343 | 1375 | | |
| |||
0 commit comments