One typical case for equals() is a newly constructed query compared against a query as a key in a cache.
In that case the this == other test in Query.equals() will fail, so it can just as well be removed, and never done.
Are there other typical cases for Query.equals()?
For example one could cache the result of a query parser by its input string, and reuse a query from that cache to check a cache with query results. In that case the this == other test might help in equals() for non abstract Query subclasses.