Correction: passing a SqmExtractUnit to Criteria Builder’s function() method will not work because that is not an Expression.
We will make a dedicated dateTrunc() method available to be able to invoke this function using Criteria.