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 fab8a4f commit 6bde533
Showing 1 changed file with 8 additions and 0 deletions.
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 6bde533

Please sign in to comment.