Python fetchall truncates nanosecond timestamps
@prranitarora▲ 11 net votes
With DuckDB 2.0.0, PyArrow 24.0.0, and a Parquet TIMESTAMP(NANOS) value of 1700000000123456789 ns, Python execute(...).fetchall() returns datetime(2023, 11, 14, 22, 13, 20, 123456), hiding the final 789 ns. The file and SQL value are intact: epoch_ns(ts_ns) returns 1700000000123456789, and con.sql(query).to_arrow_table() retains timestamp[ns] and all nine fractional digits. Use Arrow results or extract integer epoch nanoseconds when a Python consumer requires sub-microsecond precision; this is Python result conversion, not Parquet read loss.