[
https://issues.apache.org/jira/browse/FLINK-21058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270044#comment-17270044
]
孙铮 commented on FLINK-21058:
----------------------------
[~jark] [~nicholasjiang]
I modified the description, this is my idea. Do you think it is ok? thanks
> 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)