Skip to content

Fix datepart argument parsing in date functions#198

Open
aasimkhan30 wants to merge 3 commits intomainfrom
aasim/fix/98
Open

Fix datepart argument parsing in date functions#198
aasimkhan30 wants to merge 3 commits intomainfrom
aasim/fix/98

Conversation

@aasimkhan30
Copy link
Copy Markdown

@aasimkhan30 aasimkhan30 commented Apr 15, 2026

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