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_r325614501
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
 ##########
 @@ -1307,7 +1308,16 @@ class Dataset[T] private[sql](
    */
   @scala.annotation.varargs
   def hint(name: String, parameters: Any*): Dataset[T] = withTypedPlan {
-    UnresolvedHint(name, parameters, logicalPlan)
+    if (ResolveHints.ResolveCoalesceHints.COALESCE_HINT_NAMES.contains(
 
 Review comment:
   > We need .expr? I think this is not intuitive for users... Can you try 
#25464 (comment)?
   
   @maropu As you said, if we do not support this syntax, user may feel 
strange.  How about throw a kind Exception, like this
   ```
   if (ResolveHints.ResolveCoalesceHints.COALESCE_HINT_NAMES
   .contains( name.toUpperCase(Locale.ROOT))) {
       throw new IllegalArgumentException(
   s"For coalesce hint, Please use $name(...) instead")
   }
   ```

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


With regards,
Apache Git Services

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

Reply via email to