You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GpuCast, when ansi mode is enabled, the input column is checked if all its values are within the boundary values of the target type. Such check is performed by calling the assertValuesInRange function.
However, that function is inefficient: It calls lessThan operator, then any, then greaterThan, and then any again. All these operators run in O(N) time. We can achieve the same result but in half of the computation by using a new approach:
Call min and max on the input column, which both run in O(N) time, then
Compare the min/max values with the boundary values of the target type. This is just O(1) time.
The text was updated successfully, but these errors were encountered:
In
GpuCast
, when ansi mode is enabled, the input column is checked if all its values are within the boundary values of the target type. Such check is performed by calling theassertValuesInRange
function.However, that function is inefficient: It calls
lessThan
operator, thenany
, thengreaterThan
, and thenany
again. All these operators run inO(N)
time. We can achieve the same result but in half of the computation by using a new approach:min
andmax
on the input column, which both run inO(N)
time, thenmin
/max
values with the boundary values of the target type. This is justO(1)
time.The text was updated successfully, but these errors were encountered: