Skip to content

Conversation

@lukekim
Copy link
Collaborator

@lukekim lukekim commented Nov 26, 2025

This pull request introduces minor dependency and test coverage improvements. The most notable changes are the addition of a new dependency for MongoDB-related features and expanded roundtrip test cases for timestamp data types in SQLite and DuckDB.

Dependency update:

  • Added the rust_decimal dependency to the MongoDB feature set in core/Cargo.toml, which may be required for handling decimal types in MongoDB integrations.

Test coverage improvements:

  • Added new roundtrip test cases for the timestamp data type for both SQLite and DuckDB providers in core/tests/roundtrip/mod.rs, increasing coverage for these database types.

@lukekim lukekim self-assigned this Nov 26, 2025
@lukekim lukekim added the bug Something isn't working label Nov 26, 2025
@lukekim lukekim enabled auto-merge (squash) November 26, 2025 01:03
sea-query 0.32.x panics with 'assertion failed: precision <= 16' when
generating SQLite DDL for decimal types with precision > 16. Since SQLite
stores decimals as REAL (float64) anyway, map Decimal128 and Decimal256
types to ColumnType::Double before generating the DDL.

This fixes crashes when accelerating PostgreSQL tables with numeric columns
(default precision 38) to SQLite.

Includes test for high-precision decimal handling.
The prepared statement insert path was storing timestamps as integer
seconds, but SQLite's datetime functions expect TEXT in ISO 8601 format.
This caused round-trip failures where timestamps were read back as NULL.

Now timestamps are formatted as RFC3339 strings (or ISO 8601 without
timezone suffix for naive timestamps), matching how the legacy
InsertBuilder path formats them.

Also adds a helper function to parse timezone offset strings like
'+10:00' to seconds for proper timezone handling.

Fixes spiceai/spiceai#7629
@lukekim lukekim merged commit f03cf45 into spiceai Nov 26, 2025
11 checks passed
@lukekim lukekim deleted the lukim/sqlite-roundtrip branch November 26, 2025 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants