Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20668#discussion_r170444340
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -1146,3 +1146,25 @@ private[client] class Shim_v2_1 extends Shim_v2_0 {
         alterPartitionsMethod.invoke(hive, tableName, newParts, 
environmentContextInAlterTable)
       }
     }
    +
    +private[client] class Shim_v2_2 extends Shim_v2_1 {
    +
    +}
    +
    +private[client] class Shim_v2_3 extends Shim_v2_2 {
    +
    +  val environmentContext = new EnvironmentContext()
    +  environmentContext.putToProperties("DO_NOT_UPDATE_STATS", "true")
    +
    +  private lazy val alterPartitionsMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "alterPartitions",
    +      classOf[String],
    +      classOf[JList[Partition]],
    +      classOf[EnvironmentContext])
    +
    +  override def alterPartitions(hive: Hive, tableName: String, newParts: 
JList[Partition]): Unit = {
    --- End diff --
    
    If we do not add `alterPartitionsMethod `, which test case will fail? 


---

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

Reply via email to