It found out that the FIRST_VALUE function appeared in H2 in version 1.4.198, in our project there was version 1.4.195