File tree Expand file tree Collapse file tree
sql/core/src/main/scala/org/apache/spark/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
113113 protected [sql] lazy val analyzer : Analyzer =
114114 new Analyzer (catalog, functionRegistry, caseSensitive = true ) {
115115 override val extendedResolutionRules =
116+ ExtractPythonUdfs ::
116117 sources.PreWriteCheck (catalog) ::
117118 sources.PreInsertCastAndRename ::
118119 Nil
@@ -1059,7 +1060,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
10591060 @ DeveloperApi
10601061 protected [sql] class QueryExecution (val logical : LogicalPlan ) {
10611062
1062- lazy val analyzed : LogicalPlan = ExtractPythonUdfs ( analyzer(logical) )
1063+ lazy val analyzed : LogicalPlan = analyzer(logical)
10631064 lazy val withCachedData : LogicalPlan = cacheManager.useCachedData(analyzed)
10641065 lazy val optimizedPlan : LogicalPlan = optimizer(withCachedData)
10651066
Original file line number Diff line number Diff line change @@ -205,6 +205,9 @@ case class EvaluatePython(
205205 extends logical.UnaryNode {
206206
207207 def output = child.output :+ resultAttribute
208+
209+ // References should not include the produced attribute.
210+ override def references = udf.references
208211}
209212
210213/**
You can’t perform that action at this time.
0 commit comments