calling scalar functions in datatable array


This works as expected:

datatable (TimeGenerated:datetime, Success:bool) [ datetime("2018-05-11T17:50:01.665"), true ]

But this fails because the array does not allow scalar functions to be called?

datatable (TimeGenerated:datetime, Success:bool) [ now(), true ]

According to this documentation, datetime() and now() are both "datetime literals"


Could we add support for this?

2 Replies

This seems like a bug. I've report it to the language team and awaiting their answer.

Hi Patrick,

It appears datatable expects only constant scalar values, whereas now() is an expression.

So that explains it..

I've mentioned support for it is requested.