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

    https://github.com/apache/spark/pull/20668#discussion_r170425408
  
    --- 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")
    --- End diff --
    
    Otherwise will throw `NumberFormatException`:
    ```
    [info] Cause: java.lang.NumberFormatException: null
    [info] at java.lang.Long.parseLong(Long.java:552)
    [info] at java.lang.Long.parseLong(Long.java:631)
    [info] at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.isFastStatsSame(MetaStoreUtils.java:315)
    [info] at 
org.apache.hadoop.hive.metastore.HiveAlterHandler.alterPartitions(HiveAlterHandler.java:605)
    [info] at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_partitions_with_environment_context(HiveMetaStore.java:3837)
    ```
    more see: https://issues.apache.org/jira/browse/HIVE-15653


---

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

Reply via email to