viirya commented on a change in pull request #30881:
URL: https://github.com/apache/spark/pull/30881#discussion_r548832950
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -272,8 +272,14 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
}
DescribeTableExec(desc.output, r.table, isExtended) :: Nil
- case DescribeColumn(_: ResolvedTable, _, _) =>
- throw new AnalysisException("Describing columns is not supported for v2
tables.")
+ case desc @ DescribeColumn(_: ResolvedTable, column, isExtended) =>
+ column match {
Review comment:
Is it possible to have `GetArrayStructFields` here?
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/v2ResolutionPlans.scala
##########
@@ -97,9 +98,21 @@ case class ResolvedNamespace(catalog: CatalogPlugin,
namespace: Seq[String])
/**
* A plan containing resolved table.
*/
-case class ResolvedTable(catalog: TableCatalog, identifier: Identifier, table:
Table)
- extends LeafNode {
- override def output: Seq[Attribute] = Nil
+case class ResolvedTable(
+ catalog: TableCatalog,
+ identifier: Identifier,
+ table: Table,
+ override val output: Seq[Attribute])
+ extends LeafNode
+
+object ResolvedTable {
+ def create(
+ catalog: TableCatalog,
+ identifier: Identifier,
+ table: Table): ResolvedTable = {
Review comment:
Usually this is `apply`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]