panbingkun commented on code in PR #37588:
URL: https://github.com/apache/spark/pull/37588#discussion_r1109493252


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala:
##########
@@ -33,14 +44,37 @@ case class ShowTablesExec(
     output: Seq[Attribute],
     catalog: TableCatalog,
     namespace: Seq[String],
-    pattern: Option[String]) extends V2CommandExec with LeafExecNode {
+    pattern: Option[String],
+    isExtended: Boolean = false,
+    partitionSpec: Option[TablePartitionSpec] = None) extends V2CommandExec 
with LeafExecNode {

Review Comment:
   In fact, `ResolvedPartitionSpec` cannot be used here, because the 
table(`Pattern` match may have multiple tables) has not been determined.
   The scene is different from `ShowPartitionExec`.



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExec.scala:
##########
@@ -33,14 +44,37 @@ case class ShowTablesExec(
     output: Seq[Attribute],
     catalog: TableCatalog,
     namespace: Seq[String],
-    pattern: Option[String]) extends V2CommandExec with LeafExecNode {
+    pattern: Option[String],
+    isExtended: Boolean = false,
+    partitionSpec: Option[TablePartitionSpec] = None) extends V2CommandExec 
with LeafExecNode {

Review Comment:
   @MaxGekk
   two chooses:
   1.AstBuilder(visitShowTableExtended) don't use UnresolvedPartitionSpec, 
instead use Map<String, String>. Because of the lack of `decisive table`, it is 
impossible to resolve to `ResolvedPartitionSpec`.
   2.AstBuilder(visitShowTableExtended) use UnresolvedPartitionSpec, have to 
add a subclass(eg: ExtractPartitionSpec, it's `resolved` is true)
   ### The root cause is that the table is `non-deterministic` (Pattern match 
may have multiple tables) in the ShowTableExtended.



-- 
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]

Reply via email to