Skip to content

feat: support DATETIME as an alias of TIMESTAMP - #26975

Open
hozan23 wants to merge 1 commit into
apache:mainfrom
hozan23:sql-datetime-timestamp-alias
Open

hozan23 wants to merge 1 commit into
apache:mainfrom
hozan23:sql-datetime-timestamp-alias

Conversation

@hozan23

@hozan23 hozan23 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Planning DATETIME failed with "Unsupported SQL type" unless a TypePlanner handled it.

What changes are included in this PR?

DATETIME and DATETIME(p) are planned as TIMESTAMP without a time zone, with the same precisions and nanosecond default.

What is the testing strategy for this PR?

New sqllogictest cases in datetime/timestamps.slt. test_custom_type_plan now expects DATETIME to plan by default.

Are there any user-facing changes?

Yes, DATETIME is now supported without a TypePlanner. No API changes.

Planning DATETIME failed with "Unsupported SQL type" unless a
TypePlanner handled it.

Plan DATETIME and DATETIME(p) as TIMESTAMP without a time zone, with
the same precisions and nanosecond default.
@github-actions github-actions Bot added documentation Improvements or additions to documentation sql SQL Planner sqllogictest SQL Logic Tests (.slt) labels Oct 31, 2026

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks -- makes sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation sql SQL Planner sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support DATETIME SQL type in the planner

2 participants