Yes, Impala is throwing that error. Impala has a few hard limitations on (1) the number of children an expression can have and (2) the depth of the expression tree.
You can typically work around the problem by rephrasing the huge expression as a join on a new table. For example, in your example, you'd have something like:
create table grid {
lat_lower_bound double,
lat_upper_bound double,
long_lower_bound double,
long_lower_bound
}
and then
select ... from original_table t, grid g
where
t.longitude between g.lat_lower_bound and g.lat_upper_bound
and t.latitute between g.long_lower_bound and g.long_upper_bound