sunchao commented on a change in pull request #34148:
URL: https://github.com/apache/spark/pull/34148#discussion_r731194906
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -429,6 +430,17 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
val table = a.table.asInstanceOf[ResolvedTable]
AlterTableExec(table.catalog, table.identifier, a.changes) :: Nil
+ case CreateIndex(ResolvedTable(_, _, table, _),
+ indexName, indexType, ifNotExists, columns, properties) =>
+ table match {
+ case s: SupportsIndex =>
+ CreateIndexExec(s, indexName, indexType, ifNotExists, columns,
properties):: Nil
+ case _ => throw QueryCompilationErrors.tableIndexNotSupportedError(
+ s"CreateIndex is not supported in this table." +
+ s" IndexName $indexName indexType $indexType columns $columns" +
Review comment:
nit: not sure if we should dump all these - it may not be properly
formatted too
--
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]