We observe the following behaviour starting with spring-data-jpa 3.3.9. (3.3.8 was fine)
With a JPA query like this
@Query("""
SELECT p.id
FROM Parent p
WHERE (:ids is null OR p.id IN (:ids))
""")
Page<Long> withIds(@Param("ids")List<Long> ids, Pageable pageable);
if the result size is bigger than the Pageable page size it throws
org.springframework.dao.InvalidDataAccessResourceUsageException: No argument for named parameter ':ids_1'
if the result size is smaller than the Pageable page size it behaves like expected.
see this branch to reproduce
https://github.com/spring-projects/spring-data-jpa/compare/3.3.9...aperreaultaubeupgrade:spring-data-jpa:jpa-is-null-pageable-bug?expand=1