srowen commented on a change in pull request #35976:
URL: https://github.com/apache/spark/pull/35976#discussion_r839763625



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/EncoderResolutionSuite.scala
##########
@@ -200,28 +200,29 @@ class EncoderResolutionSuite extends PlanTest {
 
   test("nested case class can have different number of fields from the real 
schema") {
     val encoder = ExpressionEncoder[(String, StringIntClass)]
-    val attrs = Seq('a.string, 'b.struct('a.string, 'b.int, 'c.int))
+    val attrs = Seq($"a".string, $"b".struct($"a".string, $"b".int, $"c".int))
     encoder.resolveAndBind(attrs)
   }
 
   test("SPARK-28497: complex type is not compatible with string encoder 
schema") {
     val encoder = ExpressionEncoder[String]
 
-    Seq('a.struct('x.long), 'a.array(StringType), 'a.map(StringType, 
StringType)).foreach { attr =>
-      val attrs = Seq(attr)
-      
assert(intercept[AnalysisException](encoder.resolveAndBind(attrs)).message ==
+    Seq($"a".struct($"x".long), $"a".array(StringType), 
Symbol("a").map(StringType, StringType))

Review comment:
       Does the last one have to be Symbol? just checking

##########
File path: 
core/src/test/scala/org/apache/spark/metrics/sink/PrometheusServletSuite.scala
##########
@@ -63,7 +63,7 @@ class PrometheusServletSuite extends SparkFunSuite with 
PrivateMethodTester {
     val key = "local-1592132938718.driver.LiveListenerBus." +
       "listenerProcessingTime.org.apache.spark.HeartbeatReceiver"
     val sink = createPrometheusServlet()
-    val suffix = sink invokePrivate PrivateMethod[String]('normalizeKey)(key)
+    val suffix = sink invokePrivate 
PrivateMethod[String](Symbol("normalizeKey"))(key)

Review comment:
       Good example of when we do need Symbol!

##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala
##########
@@ -261,7 +261,7 @@ class HiveOrcQuerySuite extends OrcQueryTest with 
TestHiveSingleton {
             spark.sql(
               s"""
                  |INSERT INTO TABLE dummy_orc_partitioned
-                 |PARTITION (`date` = '2019-04-01')
+                 |PARTITION (`date` = $"2019"-04-01')

Review comment:
       Oops, this is another erroneous replace - I'd look for more like this

##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/PredicateSuite.scala
##########
@@ -518,7 +518,7 @@ class PredicateSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   test("SPARK-24872: Replace taking the $symbol with $sqlOperator in 
BinaryOperator's" +
     " toString method") {
     val expression = CatalystSqlParser.parseExpression("id=1 or 
id=2").toString()
-    val expected = "(('id = 1) OR ('id = 2))"
+    val expected = "('id = 1) OR ('id = 2))"

Review comment:
       Hm, did this have to change? the expected result looks wrong




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

To unsubscribe, e-mail: [email protected]

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