This is done so various implementations can cast date values appropriately by simply checking their types.
In the future when drivers are re-worked to deal with the Expanded Query directly this step will no longer be needed."
[query]
(assocquery:filter(->*expanded-query*:query:filterexpand/collapse))); collapse the filter clause from the expanded query and use that as the replacement