beliefer commented on a change in pull request #31316:
URL: https://github.com/apache/spark/pull/31316#discussion_r579576358



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
##########
@@ -187,10 +187,9 @@ object ResolveHints {
       def createRepartitionByExpression(
           numPartitions: Option[Int], partitionExprs: Seq[Any]): 
RepartitionByExpression = {
         val sortOrders = partitionExprs.filter(_.isInstanceOf[SortOrder])
-        if (sortOrders.nonEmpty) throw new IllegalArgumentException(
-          s"""Invalid partitionExprs specified: $sortOrders
-             |For range partitioning use REPARTITION_BY_RANGE instead.
-           """.stripMargin)
+        if (sortOrders.nonEmpty) {
+          throw 
QueryExecutionErrors.invalidRepartitionExpressionsError(sortOrders)

Review comment:
       `class IllegalArgumentException extends RuntimeException`
   According to the description of 
https://issues.apache.org/jira/browse/SPARK-33539, RuntimeException => 
QueryExecutionErrors.
   But the package is analysis.
   cc @allisonwang-db What about your opinion ?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to