It is not possible to specify such a filter with the current CalDAV spec.
What you are asking for is described in https://datatracker.ietf.org/doc/html/draft-daboo-caldav-extensions which is currently expired. I doubt that many servers have implemented this feature so want your client to check for its presence:
Servers advertise support for this extension by including the token "calendar-query-extended" in the DAV response header to an OPTIONS request on any resource supporting the extended query report. Clients MUST check for the presence of that token before using the "test" or "match-type" XML attributes.