You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/22 17:23:46 UTC

[GitHub] [spark] sarutak commented on a change in pull request #31612: [SPARK-34499][SQL] Improve the catalyst expression dsl internal APIs

sarutak commented on a change in pull request #31612:
URL: https://github.com/apache/spark/pull/31612#discussion_r580436189



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala
##########
@@ -245,13 +245,9 @@ package object dsl {
       WindowExpression(windowFunc, windowSpec)
 
     implicit class DslSymbol(sym: Symbol) extends ImplicitAttribute { def s: String = sym.name }
-    // TODO more implicit class for literal?
-    implicit class DslString(val s: String) extends ImplicitOperators {
-      override def expr: Expression = Literal(s)
-      def attr: UnresolvedAttribute = analysis.UnresolvedAttribute(s)
-    }
-    implicit class DslAttr(attr: UnresolvedAttribute) extends ImplicitAttribute {
-      def s: String = attr.name
+    implicit class DslString(str: String) extends ImplicitAttribute {

Review comment:
       Why not `s: String` ?




----------------------------------------------------------------
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:
users@infra.apache.org



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