rxin commented on issue #24117: [SPARK-27181][SQL]: Add public transform API URL: https://github.com/apache/spark/pull/24117#issuecomment-478179289 It is an ill pattern to have a lazy val that doesn’t do any computation. On Fri, Mar 29, 2019 at 4:28 PM Wenchen Fan <[email protected]> wrote: > *@cloud-fan* commented on this pull request. > ------------------------------ > > In > sql/catalyst/src/main/scala/org/apache/spark/sql/catalog/v2/expressions/expressions.scala > <https://github.com/apache/spark/pull/24117#discussion_r270599216>: > > > + > + override lazy val references: Array[NamedReference] = { > + arguments > + .filter(_.isInstanceOf[NamedReference]) > + .map(_.asInstanceOf[NamedReference]) > + } > + > + override lazy val describe: String = s"$name(${arguments.map(_.describe).mkString(", ")})" > + > + override def toString: String = describe > +} > + > +private[sql] final case class IdentityTransform( > + ref: NamedReference) extends SingleColumnTransform(ref) { > + override lazy val name: String = "identity" > + override lazy val describe: String = ref.describe > > I think it's more than a preference. PRs should keep the code style > consistent with the code base. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/apache/spark/pull/24117#discussion_r270599216>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AATvPPjFIH3rKqBfggEEEYmnWuDJ5Z8bks5vbqGLgaJpZM4b4GN3> > . >
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
