Skip to content

Commit

Permalink
[HUDI-4799] improve analyzer exception tip when cannot resolve expres…
Browse files Browse the repository at this point in the history
…sion (apache#6625)
  • Loading branch information
KnightChess authored and Alexey Kudinkin committed Dec 14, 2022
1 parent ab66b29 commit dc3b22b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,14 @@ case class HoodieResolveReferences(sparkSession: SparkSession) extends Rule[Logi
if sparkAdapter.isHoodieTable(target, sparkSession) && target.resolved =>
val resolver = sparkSession.sessionState.conf.resolver
val resolvedSource = analyzer.execute(source)
try {
analyzer.checkAnalysis(resolvedSource)
} catch {
case e: AnalysisException =>
val ae = new AnalysisException(e.message, e.line, e.startPosition, Option(resolvedSource))
ae.setStackTrace(e.getStackTrace)
throw ae
}

def isInsertOrUpdateStar(assignments: Seq[Assignment]): Boolean = {
if (assignments.isEmpty) {
Expand Down

0 comments on commit dc3b22b

Please sign in to comment.