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



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/EncoderResolutionSuite.scala
##########
@@ -54,38 +54,38 @@ class EncoderResolutionSuite extends PlanTest {
     val encoder = ExpressionEncoder[StringLongClass]
 
     // int type can be up cast to long type
-    val attrs1 = Seq('a.string, 'b.int)
+    val attrs1 = Seq(attr("a").string, attr("b").int)

Review comment:
       >  Ideally we should simply replace 'abc to "abc" in the test code.
   
   Yes ideally it should be like what you suggested but I found it's difficult.
   `DslString` implements `ImplicitOperators` but `DslSymbol` implements 
`ImplicitAttribute`. The implementation of `expr` conflicts. `DslString` 
implements `expr` as `Literal` but `DslSymbol` implements it as 
`UnresolvedExpression`.
   
   So, the next option would be introduce a new syntax like `attr""` with 
`StringContext`. 
   
   I said in the description like as follows.
   > Another solution would be to introduce a new string interpolation syntax 
but it's difficult to have workaround when the syntax is conflict with another 
string interpolation syntax like that $"" defined in catalyst and core conflict 
so I don't adopt this solution.
   
   But if this is internal usage only, it might be acceptable.




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to