You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/05 06:32:15 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #34486: [SPARK-36895][SQL][FOLLOWUP] Use property to specify index type
cloud-fan commented on a change in pull request #34486:
URL: https://github.com/apache/spark/pull/34486#discussion_r743415384
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -4432,12 +4432,14 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
.map(_.multipartIdentifier).map(typedVisit[Seq[String]]).toSeq
val columnsProperties = ctx.columns.multipartIdentifierProperty.asScala
.map(x => (Option(x.options).map(visitPropertyKeyValues).getOrElse(Map.empty))).toSeq
- val options = Option(ctx.options).map(visitPropertyKeyValues).getOrElse(Map.empty)
+ var options = Option(ctx.options).map(visitPropertyKeyValues).getOrElse(Map.empty)
+ if (indexType.nonEmpty) {
+ options = options + ("indexType" -> indexType)
+ }
CreateIndex(
createUnresolvedTable(ctx.multipartIdentifier(), "CREATE INDEX"),
indexName,
- indexType,
Review comment:
Let's keep the plan unchanged. We should put `indexType` in the properties in `CreateIndexExec`.
Also let's not hardcode the property name. We can add a static constant in `SupportsIndex`, similar to `TableCatalog.PROP_PROVIDER`
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org