Commit c9363be
authored
Fix SQLite Decimal and Date32/64 insertion/retrieval (#517)
* Revert "Properly handle decoding decimals from SQLite using the decimal extension (#504)"
This reverts commit df8eeb1.
* Remove decimal test - its invalid
* Revert "Add roundtrip test and fix Decimal support"
This reverts commit b9e3c14.
* Use spiceai fork of sea-query
* fix(sqlite): store Date32/Date64 as ISO-8601 strings in insert_batch_prepared
The insert_batch_prepared function was storing Date32/Date64 values as Unix
timestamps (e.g., 751248000), while the non-batch insert_batch function
(via InsertBuilder) correctly stores them as ISO-8601 date strings
(e.g., '1993-10-22').
When reading data back, the SQLite table provider expects date columns to
contain ISO-8601 formatted strings for proper parsing/casting back to
Arrow Date32 types. The Unix timestamp values failed to parse, resulting
in NULL/empty date values.
This change updates insert_batch_prepared to convert Date32/Date64 values
to ISO-8601 strings using time::OffsetDateTime, matching the behavior of
InsertBuilder::construct_insert_stmt.
* Remove unneeded test1 parent 4a9f784 commit c9363be
8 files changed
Lines changed: 42 additions & 597 deletions
File tree
- core
- src
- sql/arrow_sql_gen
- tests
- arrow_record_batch_gen
- sqlite
Some 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 | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments