As of 2.0, Impala supports query hints in a number of different places, and in different formats. Standardizing these would make for a cleaner implementation.
Adopt Oracle hint grammar:
The hint syntax must follow immediately after a CREATE, INSERT, UPDATE, DELETE, SELECT, or MERGE keyword that begins the statement block.
- The plus sign (+) causes Oracle to interpret the comment as a list of hints. The plus sign must follow immediately after the comment delimiter. No space is permitted.
- hint is one of the hints discussed in this section. The space between the plus sign and the hint is optional. If the comment contains multiple hints, then separate the hints by at least one space.
- string is other commenting text that can be interspersed with the hints.
Given hints appear within a SQL comment, this should also reduce incompatibilities with other engines that may share query text or things like SQL views that may contain embedded hints.
Examples (from Oracle)