microsoft / vscode-asa

Azure Stream Analytics In VSCode
Creative Commons Attribution 4.0 International
10 stars 15 forks source link

Floating point numbers improperly parsed #104

Open JessevanderCeelen-Codit opened 1 year ago

JessevanderCeelen-Codit commented 1 year ago

Steps to Reproduce:

  1. Use the code example from the microsoft page for Percentile_Disc as a query
  2. Run with local inputs and outputs with any appropriate input that makes sense for the query (doesn't need to be appropriate input to reproduce - it throws an error while parsing the query)
  3. The following error occurs: "[Error] Failed to compile the query script: Parameter '0' of function 'percentile_disc' is out of range between '0' and '1' : '95'.."

This occurs with any attempt to use the percentile_disc function, with whatever floating point number is used having everything before the decimal point ignored, which almost always produces an error (0.1, 0.01, 0.001, etc being the sole exceptions since they get parsed as 1). This also occurs with percentile_cont, and possibly other functions that take floating point parameters.

This issue appears to be exclusive to the extension, as the same and other similar queries run with no problem in the Azure Portal.