Closed DeepakRautela02 closed 1 year ago
The parser does not attempt to translate the contents of literals, especially literals like datetime, since the implementation would be based on runtime libraries that are not consistent between dotnet and javascript, and the knowing the actual value is not necessary for implementing client intellisense. The server, of course, needs the actual value to function so it fails.
I have been trying to use the GetDiagnostics() method to find the syntactic and semantic errors in my queries, but when I came across the following query, the Diagnostics object didn't report any error.
Tablename | where ColumnName == datetime('DummyString')
But, When I ran the same query in the portal, I got a syntax error as below:
Syntax error: Failed to parse datetime literal: 'datetime('DummyString')'
The Diagnostics object should have reported this error in my opinion, but it didn't.