You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/23 03:53:37 UTC

[GitHub] [spark] ulysses-you commented on a change in pull request #25464: [SPARK-28746][SQL] Add partitionby hint for sql queries

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_r316966060
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
 ##########
 @@ -143,22 +143,41 @@ object ResolveHints {
   object ResolveCoalesceHints extends Rule[LogicalPlan] {
     private val COALESCE_HINT_NAMES = Set("COALESCE", "REPARTITION")
 
+    private def createRepartitionByExpression(
+        numPartitions: Int, parameters: Seq[Any], h: UnresolvedHint): RepartitionByExpression = {
+      val exprs = parameters.drop(1)
+      val errExprs = exprs.filter(!_.isInstanceOf[UnresolvedAttribute])
+      if (errExprs.nonEmpty) throw new AnalysisException(
+        s"""Invalid type exprs : $errExprs
+           |expects UnresolvedAttribute type
+        """.stripMargin)
 
 Review comment:
   OK, I will add this later.

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


With regards,
Apache Git Services

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