select minute, date, sums(size)/sum(size) from select sum(size) by 1 xbar time.minute, date from table where filtering
We understand we actually should use % instead of / for divide, but I believe it just return something not correct or throw an error. However, somehow this query hang the process and even click SIGINT interrupt signal it doesnt interrupt, will you have any idea about why?
Looks like you have already spotted part of the problem. The / does not denote Divide% but the iteration operator Over. Depending on the values in the size column, you might have inadvertently specified a Converge iteration, and one that might not actually converge. Iterations defined this way run very tight and can be difficult to interrupt.
The result column you want is perhaps sums[size]%sum[size], or, avoiding computing both sum and sums, .[%]1 lastsums size.
The final overload of / is equivalent to a while loop in imperative programming. It provides a declarative way to specify a test to end the iteration. Thinking functionally, we provide a predicate function that is applied to the result at each step. The iteration continues as long as the predicate result is 1b and stops otherwise. For example, we stop the computation of the Fibonacci sequence once it exceeds 1000 as follows.
Your code accidentally boiled down to an infinite loop as the result never moves to 0b
1 1/[sums;1]
/Each iteration it runs 1 1[1] / Which returns 1 /Then sums 1 /This returns 1 /This is a non zero value which gets treated as 1b so the loop starts again /Infinite loop