[
https://issues.apache.org/jira/browse/IMPALA-14065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037884#comment-18037884
]
Michael Smith commented on IMPALA-14065:
----------------------------------------
Are there other engines with similar functionality? Is there an existing
pattern we should consider?
Looking, I found:
*
[Spark](https://spark.apache.org/docs/latest/sql-ref-syntax-aux-show-partitions.html)
and
[Databricks](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-show-partitions)
provide {{SHOW PARTITIONS part_tbl PARTITION (year = 2025, month = 6)}} to
select a specific partition, or can use a partial spec {{(year = 2025)}}.
*
[Starrocks](https://docs.starrocks.io/docs/sql-reference/sql-statements/table_bucket_part_index/SHOW_PARTITIONS/)
supports a similar syntax to that proposed here.
*
[Cockroach](https://www.cockroachlabs.com/docs/stable/show-partitions#querying-partitions-programmatically)
provides a meta table to support querying partitions using {{WHERE}} and other
modifiers.
So this syntax seems reasonable.
> Support WHERE clause in SHOW PARTITIONS
> ---------------------------------------
>
> Key: IMPALA-14065
> URL: https://issues.apache.org/jira/browse/IMPALA-14065
> Project: IMPALA
> Issue Type: New Feature
> Components: Backend, Frontend
> Reporter: Quanlong Huang
> Assignee: Arnab Karmakar
> Priority: Major
> Labels: ramp-up
>
> SHOW PARTITIONS <table> is a useful statement to check #Rows, #Files and
> size, etc. of partitions. Sometimes we just want to check the new partitions.
> It'd be helpful to support a WHERE clause in this statement to simplify the
> output, especially for tables with lots of partitions.
> An example statement:
> {code:sql}
> show partitions part_tbl where year = 2025 and month < 6;{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]