Array dimensions after filtering


I have a question about the filter operator.

I ran the following code based on your gcd_vif ( example:

store(build(<airport:string, lat:double, lon:double>[i=0:1], ‘[(‘LAX’, .5924, -2.0665), (‘BNA’, 0.6304, -1.5127)]’, true), airports);


store(cast(filter(airports, airport=‘LAX’), <airport:string, lat:double, lon:double>[i]), airports_f);


I’m getting the same start and length values for both arrays with the exception of parameter high.
However, when I print the contents of the array, I only see the cells that did not satisfy the filtering condition, i.e. the cells that remain after filtering.

So are the dimensions of an array change accordingly after filtering or they remain the same and there are just cells that are being annotated as empty?

Thank you very much in advance,

filter will produce a result array with the same schema as its input, even when that result has fewer occupied cells in it.

Hi Dave,

thank you for the clarification!

1 Like