Skip to content

fix(tsql)!: handle all datepart alternatives#6324

Merged
georgesittas merged 10 commits intotobymao:mainfrom
lBilali:datepart_new
Nov 18, 2025
Merged

fix(tsql)!: handle all datepart alternatives#6324
georgesittas merged 10 commits intotobymao:mainfrom
lBilali:datepart_new

Conversation

@lBilali
Copy link
Contributor

@lBilali lBilali commented Nov 13, 2025

this PR changes DATEPART such that all its part and abbreviations are supported
https://learn.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-ver17

lBilali and others added 3 commits November 13, 2025 14:38
Co-authored-by: Lulzim Bilali <lulzim.bilali@akersolutions.com>
DATEPART works for all of tsql datepart options and abbreviations
# Conflicts:
#	tests/dialects/test_tsql.py
@lBilali
Copy link
Contributor Author

lBilali commented Nov 13, 2025

did not add tests yet,
mainly fixed the existing ones such that it is more transparent what has actually changed on the result
but can add tests for all other options with a new commit of a different PR

@lBilali lBilali changed the title feat(tsql): propely handle datepart feat(tsql): handle all datepart alternatives Nov 15, 2025
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

FYI, PRs like this are breaking, because the AST changes.

@georgesittas georgesittas changed the title feat(tsql): handle all datepart alternatives feat(tsql)!: handle all datepart alternatives Nov 17, 2025
@georgesittas
Copy link
Collaborator

Thank you for the contribution, btw! Great catches.

@georgesittas georgesittas changed the title feat(tsql)!: handle all datepart alternatives fix(tsql)!: handle all datepart alternatives Nov 18, 2025
Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Thank you :)

@georgesittas georgesittas merged commit e1b6558 into tobymao:main Nov 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants