cloud-fan commented on a change in pull request #30403:
URL: https://github.com/apache/spark/pull/30403#discussion_r528589715
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -3343,14 +3343,21 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef]
with SQLConfHelper with Logg
"the table name in CACHE TABLE AS SELECT", ctx)
}
val options =
Option(ctx.options).map(visitPropertyKeyValues).getOrElse(Map.empty)
- CacheTableStatement(tableName, query, ctx.LAZY != null, options)
+ val isLazy = ctx.LAZY != null
+ if (query.isDefined) {
+ CacheTableAsSelect(tableName.head, query.get, isLazy, options)
Review comment:
nit: now we can move the if `tableName.length > 1` check into this
branch.
----------------------------------------------------------------
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]