ulysses-you commented on a change in pull request #25464: [SPARK-28746][SQL] 
Add partitionby hint  for sql queries
URL: https://github.com/apache/spark/pull/25464#discussion_r319788105
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameHintSuite.scala
 ##########
 @@ -68,5 +68,23 @@ class DataFrameHintSuite extends AnalysisTest with 
SharedSQLContext {
     check(
       df.hint("REPARTITION", 100),
       UnresolvedHint("REPARTITION", Seq(100), df.logicalPlan))
+
+    check(
+      df.hint("REPARTITION", 10, $"id".expr),
+      UnresolvedHint("REPARTITION", Seq(10, $"id".expr), df.logicalPlan))
+
+    val e1 = intercept[AnalysisException] {
 
 Review comment:
   If we want to support column, we should add code at `Dataset.hint()` that 
convert `Column` to `Expression` just like `Dataset.repartition()` and 
`Dataset.repartitionByRange()`.

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

Reply via email to