spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EarthsonLu <Earthson...@gmail.com>
Subject [SparkSQL] Why this AttributeReference.exprId is not setted?
Date Tue, 25 Nov 2014 02:08:11 GMT
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/Aggregate.scala#L85

I can't understand this code, it seems to be a "bug", but group by of
SparkSQL just works fine.

with code below, some expressions are mapping to AttributeReferences, then
"bindReference" method will find there references. But resultAttribute's
exprId is new, I don't think it can find the true reference(But it does,
Why? How?)


  private[this] val resultExpressions = aggregateExpressions.map { agg =>
    agg.transform {
      case e: Expression if resultMap.contains(e) => resultMap(e)
    }
  }

I'm trying to write a DSL with Catalyst





--
View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/SparkSQL-Why-this-AttributeReference-exprId-is-not-setted-tp9521.html
Sent from the Apache Spark Developers List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org


Mime
View raw message