You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2018/08/06 10:41:59 UTC

spark git commit: [SPARK-24940][SQL] Use IntegerLiteral in ResolveCoalesceHints

Repository: spark
Updated Branches:
  refs/heads/master 64ad7b841 -> d063e3a47


[SPARK-24940][SQL] Use IntegerLiteral in ResolveCoalesceHints

## What changes were proposed in this pull request?

Follow up to fix an unmerged review comment.

## How was this patch tested?

Unit test ResolveHintsSuite.

Author: John Zhuge <jz...@apache.org>

Closes #21998 from jzhuge/SPARK-24940.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d063e3a4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d063e3a4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d063e3a4

Branch: refs/heads/master
Commit: d063e3a478221c836a0aa74a69828a526a6207bb
Parents: 64ad7b8
Author: John Zhuge <jz...@apache.org>
Authored: Mon Aug 6 06:41:55 2018 -0400
Committer: Xiao Li <ga...@gmail.com>
Committed: Mon Aug 6 06:41:55 2018 -0400

----------------------------------------------------------------------
 .../org/apache/spark/sql/catalyst/analysis/ResolveHints.scala   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d063e3a4/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
index 1ef482b..80d5105 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
@@ -20,12 +20,11 @@ package org.apache.spark.sql.catalyst.analysis
 import java.util.Locale
 
 import org.apache.spark.sql.AnalysisException
-import org.apache.spark.sql.catalyst.expressions.Literal
+import org.apache.spark.sql.catalyst.expressions.IntegerLiteral
 import org.apache.spark.sql.catalyst.plans.logical._
 import org.apache.spark.sql.catalyst.rules.Rule
 import org.apache.spark.sql.catalyst.trees.CurrentOrigin
 import org.apache.spark.sql.internal.SQLConf
-import org.apache.spark.sql.types.IntegerType
 
 
 /**
@@ -119,7 +118,7 @@ object ResolveHints {
           case "COALESCE" => false
         }
         val numPartitions = h.parameters match {
-          case Seq(Literal(numPartitions: Int, IntegerType)) =>
+          case Seq(IntegerLiteral(numPartitions)) =>
             numPartitions
           case Seq(numPartitions: Int) =>
             numPartitions


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