SQLServer2005Dialect corrupts distinct queries if table data includes the keyword "from"

Description

The combination of the below code:

and

may corrupt queries where a column contains the keyword 'from'. For example:

select distinct g.id, g.validFrom from SOME_TABLE g

A possible quick fix would be to not match against the word "from" but rather " from" or similar.

Environment

None

Status

Assignee

Unassigned

Reporter

Alix Warnke

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure