spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] maropu commented on a change in pull request #25464: [SPARK-28746][SQL] Add partitionby hint for sql queries
Date Fri, 23 Aug 2019 02:30:21 GMT
maropu 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_r316954767
 
 

 ##########
 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:
   Plz add tests for this exception.

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


Mime
View raw message