### Is your feature request related to a problem or challenge? Planning `DATETIME` fails unless a `TypePlanner` handles it: > select CAST('2026-09-21 08:55:40' AS DATETIME); This feature is not implemented: Unsupported SQL type DATETIME Since #26885, `MySqlDialect` unparses timestamp casts as `DATETIME` / `DATETIME(p)`, so DataFusion cannot plan the SQL it produces. ### Describe the solution you'd like Treat `DATETIME` as an alias of `TIMESTAMP` without a time zone, the same way `TIMESTAMP` is planned today: | SQL | Arrow | |---|---| | `DATETIME` | `Timestamp(Nanosecond, None)` | | `DATETIME(0)` | `Timestamp(Second, None)` | | `DATETIME(3)` | `Timestamp(Millisecond, None)` | | `DATETIME(6)` | `Timestamp(Microsecond, None)` | | `DATETIME(9)` | `Timestamp(Nanosecond, None)` | | other precisions | error | ### Describe alternatives you've considered _No response_ ### Additional context _No response_ ### Willingness to contribute I would like to contribute to this feature, but request guidance from the DataFusion community
Activity
nuno-faria commentedon Oct 30, 2026
I think this should be supported by default. I been searching and found that the Datetime type is used as an example to extend DataFusion (https://datafusion.apache.org/library-user-guide/extending-sql.html#example-custom-datetime-type), so that would maybe need to be changed (cc: @geoffreyclaude and @alamb from #19265).
One thing to note is that by default DuckDB assumes
DATETIMEas having microsecond precision:And it appears that an invalid precision is rounded to the next one:
geoffreyclaude commentedon Oct 30, 2026
@nuno-faria No hard opinion on my part. I just picked Datetime as an example since it isn't supported.
alamb commentedon Oct 30, 2026
I agree -- this makes sense to me (to treat it as an alias timestamp)
The microsecond vs nanosecond thing I think is long standing (I suspect duckdb treats timestamps as having microsecond precision too)
hozan23 commentedon Oct 31, 2026
Thanks everyone for the input! I've opened #26975, which plans
DATETIMEas an alias ofTIMESTAMPwithout a time zone, as discussed.feat: support DATETIME as an alias of TIMESTAMP (apache#26975)