Skip to content

Fix datepart argument parsing in date functions - #198

Closed
Aasim Khan (aasimkhan30) wants to merge 3 commits into
mainfrom
aasim/fix/98
Closed

Fix datepart argument parsing in date functions#198
Aasim Khan (aasimkhan30) wants to merge 3 commits into
mainfrom
aasim/fix/98

Conversation

@aasimkhan30

@aasimkhan30 Aasim Khan (aasimkhan30) commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes: #98
Fixes parser behavior for date functions so the first datepart argument (for example, mm in DATEDIFF(mm, ColA, ColB)) is parsed as IdentifierLiteral instead of ColumnReferenceExpression. Includes regression tests for TSql160, TSql170, and TSqlFabricDW.

Code Changes

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.

TSql160Parser misidentifies interval parameter in DATEDIFF function as ColumnReferenceExpression

1 participant