cloud-fan commented on code in PR #42255:
URL: https://github.com/apache/spark/pull/42255#discussion_r1297902642


##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameHintSuite.scala:
##########
@@ -42,43 +44,53 @@ class DataFrameHintSuite extends AnalysisTest with 
SharedSparkSession {
 
     check(
       df.hint("hint1", 1, "a"),
-      UnresolvedHint("hint1", Seq(1, "a"), df.logicalPlan)
+      UnresolvedHint("hint1", Seq(Literal(1), Literal("a")), df.logicalPlan)
     )
 
     check(
       df.hint("hint1", 1, $"a"),
-      UnresolvedHint("hint1", Seq(1, $"a"),
+      UnresolvedHint("hint1", Seq(Literal(1), $"a".expr),
         df.logicalPlan
       )
     )
 
     check(
-      df.hint("hint1", Seq(1, 2, 3), Seq($"a", $"b", $"c")),
-      UnresolvedHint("hint1", Seq(Seq(1, 2, 3), Seq($"a", $"b", $"c")),
+      df.hint("hint1", Array(1, 2, 3), array($"a", $"b", $"c")),
+      UnresolvedHint("hint1", Seq(Literal(Array(1, 2, 3)), array($"a", $"b", 
$"c").expr),
         df.logicalPlan
       )
     )
   }
 
-  test("coalesce and repartition hint") {
+  test("coalesce, repartition and rebalance hint") {
     check(
       df.hint("COALESCE", 10),
-      UnresolvedHint("COALESCE", Seq(10), df.logicalPlan))
+      UnresolvedHint("COALESCE", Seq(Literal(10)), df.logicalPlan))

Review Comment:
   We should think of a way to fix these breaking changes. Shall we handle 
scala `Seq` specially in the `df.hint` function?



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