只有满足某些其他条件时才可以有 Kusto where 语句吗?

Is it possible to have a Kusto where statement only if some other condition is met?

我想编写一个带有可选参数的 Kusto 函数。如果未提供参数,我不想执行 'where' 语句。这可能吗?

let f = (a:string = "default") {
    table1
    | where region = a // only do this search if a != default
   
};
f()

您可以使用逻辑 or 运算符:

let f = (a:string = "default") {
    table1
    | where a == 'default' or region == a
};
f()