Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ import scala.jdk.CollectionConverters._
import org.antlr.v4.runtime.ParserRuleContext
import org.antlr.v4.runtime.tree.TerminalNode

import org.apache.spark.SparkException
import org.apache.spark.sql.catalyst.{FunctionIdentifier, TableIdentifier}
import org.apache.spark.sql.catalyst.analysis.{CurrentNamespace,
GlobalTempView, LocalTempView, PersistedView,
PlanWithUnresolvedIdentifier, SchemaEvolution, SchemaTypeEvolution, UnresolvedAttribute,
SchemaEvolution, SchemaTypeEvolution, UnresolvedAttribute,
UnresolvedIdentifier, UnresolvedNamespace, UnresolvedPartitionSpec, UnresolvedProcedure,
UnresolvedTableOrViewSearchPathMode}
import org.apache.spark.sql.catalyst.catalog._
Expand Down Expand Up @@ -314,25 +313,6 @@ class SparkSqlAstBuilder extends AstBuilder {
}
}

private def withCatalogIdentClause(
ctx: CatalogIdentifierReferenceContext,
builder: Seq[String] => LogicalPlan): LogicalPlan = {
val exprCtx = ctx.expression
if (exprCtx != null) {
// resolve later in analyzer
PlanWithUnresolvedIdentifier(withOrigin(exprCtx) { expression(exprCtx) }, Nil,
(ident, _) => builder(ident))
} else if (ctx.errorCapturingIdentifier() != null) {
// resolve immediately
builder.apply(Seq(getIdentifierText(ctx.errorCapturingIdentifier())))
} else if (ctx.stringLit() != null) {
// resolve immediately
builder.apply(Seq(string(visitStringLit(ctx.stringLit()))))
} else {
throw SparkException.internalError("Invalid catalog name")
}
}

/**
* Create a [[SetCommand]] logical plan.
*
Expand Down