panbingkun commented on code in PR #37588:
URL: https://github.com/apache/spark/pull/37588#discussion_r1372536605
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolvePartitionSpec.scala:
##########
@@ -50,6 +50,16 @@ object ResolvePartitionSpec extends Rule[LogicalPlan] {
}
case _ => command
}
+ case command @ ShowTableExtended(ResolvedNamespace(catalog: TableCatalog,
namespace),
Review Comment:
According to my understanding of the processing logic of V2PartitionCommand
in ResolvePartitionSpec,
the table it processes is a single table,
However, our ShowTableExtended supports two situations:
- (A).SHOW TABLE EXTENDED FROM/IN catalog.namespace LIKE
'table_name_pattern'; --- support a table regex pattern
- (B).SHOW TABLE EXTENDED FROM/IN catalog.namespace LIKE 'table_name'
PARTITION (part1 = 1); --- not support a table regex pattern, only support a
certain table name.
https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-aux-show-table.html
<img width="738" alt="image"
src="https://github.com/apache/spark/assets/15246973/95e62919-1777-4421-a759-c84626782e2b">
In case A, the tables it processes may be multiple tables, which is a regex
pattern. It seems inappropriate to resolve the table in `ResolvePartitionSpec`.
In case B, the tables it processes is single (currently we only support the
partitioned extended display information function in the case of one table)
If it is only a table name and partition information is specified, we can
resolved partition here (covering situation B)
so made a special logic here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]