@Formula does not detect some keywords and append an alias as it is a column

Description

The following mapping fails in using PostgreSQL 10:

The problem is the generated query appends root table alias before reserved word interval:

And it should be mapped as:

After digging in the code, it seems the problem is at org.hibernate.sql.Template class:

dialect.getKeywords() only returns partition and it's deprecated.

I suppose should call IdentifierHelper to check keywords in isFunctionOrKeyword method.

Environment

Java 8

Assignee

Unassigned

Reporter

Juan Pablo Gardella

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure