Query for selecting records that the validity is not passed yet

Trying to get the list of valid documents using the following query, not sure how to send value of :param here as per example in user guide (JPQL macro)

select e from erp$PropertyAllotmentProposedLine e join e.propertyAllotmentProposed p where p.realEstateProject.id = :ds$realEstateProjectsDs.id and p.proposalValidUntil > :custom$dateNow

sending the parameter from the controller:

propertyAllotmentProposedLineDs.refresh(ParamsMap.of("dateNow", timeSource.currentTimeMillis()));

getting the following error:

java.lang.UnsupportedOperationException

What would be the right approach in this case?

Please provide the full stack trace.