[ 
https://issues.apache.org/jira/browse/IMPALA-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aman Sinha resolved IMPALA-4191.
--------------------------------
    Resolution: Fixed

The related JIRAs have been fixed and the hint syntax is similar to the Oracle 
syntax.  Marking this fixed. 

> standardize query hint syntax
> -----------------------------
>
>                 Key: IMPALA-4191
>                 URL: https://issues.apache.org/jira/browse/IMPALA-4191
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 2.7.0
>            Reporter: Greg Rahn
>            Priority: Minor
>              Labels: incompatibility
>
> 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.
> *Proposal*
> 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.
> {noformat}
> /*+ hint [ string ] [ hint [ string ] ]... */
> --+ hint [ string ] [ hint [ string ] ]...
> {noformat}
> where:
> * 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)*
> {code}
> INSERT /*+ APPEND PARALLEL(target_table, 16) PQ_DISTRIBUTE(target_table, 
> NONE) */
> INTO target_table
> SELECT * FROM source_table;
> {code}
> {code}
> CREATE /*+ PQ_DISTRIBUTE(target_table, PARTITION) */ TABLE target_table
> NOLOGGING PARALLEL 16
> PARTITION BY HASH (l_orderkey) PARTITIONS 512
> AS SELECT * FROM source_table;
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to