[ 
https://issues.apache.org/jira/browse/FLINK-21058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270102#comment-17270102
 ] 

Jark Wu commented on FLINK-21058:
---------------------------------

It seems that the SHOW PARTITIONS syntax has been proposed in FLIP-63 [1], but 
not so rich as your proposal. 


[1]: 
https://cwiki.apache.org/confluence/display/FLINK/FLIP-63%3A+Rework+table+partition+support

> Add SHOW PARTITION syntax support for flink
> -------------------------------------------
>
>                 Key: FLINK-21058
>                 URL: https://issues.apache.org/jira/browse/FLINK-21058
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / Planner
>    Affects Versions: 1.12.0
>            Reporter: 孙铮
>            Priority: Minor
>             Fix For: 1.13.0
>
>
> Hive dialect already supports show partitions syntax
>  
> {code:java}
> SHOW PARTITIONS [db_name.]table_name [PARTITION(partition_spec)];
> partition_spec:
>   : (partition_column = partition_col_value, partition_column = 
> partition_col_value, ...)
> Example:
> SHOW PARTITIONS databaseFoo.tableBar PARTITION(ds='2010-03-03', 
> hr='12');{code}
>  
> I think Flink SQL should support this syntax.
>  
> Starting with Hive 4.0.0, SHOW PARTITIONS can optionally use the WHERE/ORDER 
> BY/LIMIT clause to filter/order/limit the resulting list. These clauses work 
> in a similar way as  they do in a SELECT statement.
> {code:java}
> SHOW PARTITIONS [db_name.]table_name [PARTITION(partition_spec)] [WHERE 
> where_condition] [ORDER BY col_list] [LIMIT rows];
> Example:
> SHOW PARTITIONS databaseFoo.tableBar LIMIT 10;                                
>                                
> SHOW PARTITIONS databaseFoo.tableBar PARTITION(ds='2010-03-03') LIMIT 10;     
>                                
> SHOW PARTITIONS databaseFoo.tableBar PARTITION(ds='2010-03-03') ORDER BY hr 
> DESC LIMIT 10;                   
> SHOW PARTITIONS databaseFoo.tableBar PARTITION(ds='2010-03-03') WHERE hr >= 
> 10 ORDER BY hr DESC LIMIT 10;    
> SHOW PARTITIONS databaseFoo.tableBar WHERE hr >= 10 AND ds='2010-03-03' ORDER 
> BY hr DESC LIMIT 10;
> {code}
> I think Flink SQL should also support this syntax later
>  
>  
>  
>  



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

Reply via email to