You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Jacek Laskowski <ja...@japila.pl> on 2017/03/29 13:35:27 UTC

Catalyst: unary or binary expressions that are not UnaryExpressions or BinaryExpressions? Why?

Hi,

While reviewing available expressions in Catalyst, I've come across
few places (AggregateExpression or WindowExpression) that are unary or
binary expressions but they inherit directly from Expression that
makes my comprehension slightly harder (esp. that I can't stop
thinking about the reason for this).

Is there any reason why some expressions (e.g. AggregateExpression or
WindowExpression) don't extend more specialized abstract classes?

Would that be acceptable to make them so? I'm going over expressions
anyway so I could squash few obvious ones.

Appreciate your comments. Thanks!

p.s. Just a side note, since Unevaluated is an Expression why not
extend from Unevaluated directly? I can understand why "extends
Expression with Unevaluable" could be very valuable, but wish I hear
what was the main motivation behind it. Thanks doubled!

Pozdrawiam,
Jacek Laskowski
----
https://medium.com/@jaceklaskowski/
Mastering Apache Spark 2 https://bit.ly/mastering-apache-spark
Follow me at https://twitter.com/jaceklaskowski

---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org