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

    https://github.com/apache/spark/pull/17232#discussion_r106045626
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -898,3 +924,107 @@ private[client] class Shim_v2_0 extends Shim_v1_2 {
       }
     
     }
    +
    +private[client] class Shim_v2_1 extends Shim_v2_0 {
    +  private lazy val loadPartitionMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "loadPartition",
    +      classOf[Path],
    +      classOf[String],
    +      classOf[JMap[String, String]],
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE)
    +  private lazy val loadTableMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "loadTable",
    +      classOf[Path],
    +      classOf[String],
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE)
    +  private lazy val loadDynamicPartitionsMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "loadDynamicPartitions",
    +      classOf[Path],
    +      classOf[String],
    +      classOf[JMap[String, String]],
    +      JBoolean.TYPE,
    +      JInteger.TYPE,
    +      JBoolean.TYPE,
    +      JBoolean.TYPE,
    +      JLong.TYPE,
    +      JBoolean.TYPE,
    +      classOf[AcidUtils.Operation])
    +  private lazy val alterTableMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "alterTable",
    +      classOf[String],
    +      classOf[Table],
    +      classOf[EnvironmentContext])
    +  private lazy val alterPartitionsMethod =
    +    findMethod(
    +      classOf[Hive],
    +      "alterPartitions",
    +      classOf[String],
    +      classOf[JList[Partition]],
    +      classOf[EnvironmentContext])
    +
    +  override def loadPartition(
    +      hive: Hive,
    +      loadPath: Path,
    +      tableName: String,
    +      partSpec: JMap[String, String],
    +      replace: Boolean,
    +      inheritTableSpecs: Boolean,
    +      isSkewedStoreAsSubdir: Boolean,
    +      isSrcLocal: Boolean): Unit = {
    +    loadPartitionMethod.invoke(hive, loadPath, tableName, partSpec, 
replace: JBoolean,
    +      inheritTableSpecs: JBoolean, isSkewedStoreAsSubdir: JBoolean,
    +      isSrcLocal: JBoolean, JBoolean.FALSE, JBoolean.FALSE)
    --- End diff --
    
    nit: From a readability perspective, would it make sense to explicitly 
define `isAcid` and `hasFollowingStatsTask` and set them to `JBoolean.FALSE` 
(along with some comments for the latter)? We can then use them here and in all 
the methods below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to