Skip to content

Commit a7fb74d

Browse files
kesmit13claude
andcommitted
Add decimal, datetime, date, and time type support across all UDF paths
Implement full serialization/deserialization for DECIMAL, DATETIME, DATE, and TIME types in the C accelerator (accel.c), pure-Python rowdat_1 codec, ASGI handler, and collocated registry. Previously these types raised "unsupported" errors or were stubbed with TODO comments. Key changes: - accel.c: Implement load/dump for DECIMAL (length-prefixed UTF-8 string), DATE (packed YYYYMMDD int64), TIME (signed HHMMSSuuuuuu int64), and DATETIME/TIMESTAMP (bit-packed int64) in all three code paths (load_rowdat_1_numpy, load_rowdat_1, call_function_accel). Add interned PyStr attribute strings for datetime component access. - rowdat_1.py: Add pack/unpack helpers and wire them into _load, _load_vectors, _dump, and _dump_vectors for the four new type families. - asgi.py, collocated/registry.py: Add datetime/date/time/decimal entries to rowdat_1_type_map so the ASGI and collocated paths can negotiate these types. - registry.py: Add _dtype_to_python mappings, emit datetime/decimal imports in generated code, convert silent skip-on-bad-dtype to TypeError for visibility. - signature.py: Add 'decimal' to sql_type_map, DECIMAL/NUMERIC to sql_to_type_map, and normalize_dtype() mappings for decimal.Decimal and datetime.time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8aa88c0 commit a7fb74d

File tree

5 files changed

+794
-119
lines changed

5 files changed

+794
-119
lines changed

0 commit comments

Comments
 (0)