You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by windpiger <gi...@git.apache.org> on 2017/02/03 13:18:39 UTC

[GitHub] spark pull request #16787: optimize some duplication functions in MetaStoreR...

GitHub user windpiger opened a pull request:

    https://github.com/apache/spark/pull/16787

    optimize some duplication functions in MetaStoreRelation and process another TODO

    ## What changes were proposed in this pull request?
    
    1. MetaStoreRelation' hiveQlTable can be replaced by calling HiveClientImpl's toHiveTable
    2. MetaStoreRelation's toHiveColumn can be replaced by calling HiveClientImpl's toHiveColumn
    3. process another TODO
    https://github.com/apache/spark/blob/master/sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala#L234
    
    ## How was this patch tested?
    N/A

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/windpiger/spark todoInMetaStoreRelation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16787.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16787
    
----
commit cb2d1b920885e8eeba6551d55c68f0b972b9942c
Author: windpiger <so...@outlook.com>
Date:   2017-02-03T13:12:49Z

    [SPARK-19448][SQL]optimize some duplication functions in MetaStoreRelation and process another TODO

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72641/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72365 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72365/testReport)** for PR 16787 at commit [`a2ccba2`](https://github.com/apache/spark/commit/a2ccba2987b90a40a6bf55477e5ecfba022c09f6).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72402 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72402/testReport)** for PR 16787 at commit [`abe8dc9`](https://github.com/apache/spark/commit/abe8dc9e4bcd88856b40daf091a48f6207efd197).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72616 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72616/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72563 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72563/testReport)** for PR 16787 at commit [`22140f0`](https://github.com/apache/spark/commit/22140f005703541596548d3b0e545cda5e56ee74).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: optimize some duplication functions in MetaStoreRelation...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72309 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72309/testReport)** for PR 16787 at commit [`75e67d5`](https://github.com/apache/spark/commit/75e67d5f6267ccbaa3184fc1c03951cba5a7ef67).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72674/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72452/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460070
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -365,8 +365,8 @@ private[hive] class HiveClientImpl(
         Option(client.getTable(dbName, tableName, false)).map { h =>
           // Note: Hive separates partition columns and the schema, but for us the
           // partition columns are part of the schema
    -      val partCols = h.getPartCols.asScala.map(fromHiveColumn)
    -      val schema = StructType(h.getCols.asScala.map(fromHiveColumn) ++ partCols)
    +      val partCols = h.getPartCols.asScala.map(HiveClientImpl.fromHiveColumn)
    +      val schema = StructType(h.getCols.asScala.map(HiveClientImpl.fromHiveColumn) ++ partCols)
    --- End diff --
    
    This will use `HiveUtils.hiveExecutionVersion`. However, it should use the version `spark.sql.hive.metastore.version`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72310/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100059652
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    -    // We start by constructing an API table as Hive performs several important transformations
    -    // internally when converting an API table to a QL table.
    -    val tTable = new org.apache.hadoop.hive.metastore.api.Table()
    -    tTable.setTableName(catalogTable.identifier.table)
    -    tTable.setDbName(catalogTable.database)
    -
    -    val tableParameters = new java.util.HashMap[String, String]()
    -    tTable.setParameters(tableParameters)
    -    catalogTable.properties.foreach { case (k, v) => tableParameters.put(k, v) }
    -
    -    tTable.setTableType(catalogTable.tableType match {
    -      case CatalogTableType.EXTERNAL => HiveTableType.EXTERNAL_TABLE.toString
    -      case CatalogTableType.MANAGED => HiveTableType.MANAGED_TABLE.toString
    -      case CatalogTableType.VIEW => HiveTableType.VIRTUAL_VIEW.toString
    -    })
    -
    -    val sd = new org.apache.hadoop.hive.metastore.api.StorageDescriptor()
    --- End diff --
    
    cc @gatorsmile 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461979
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -815,7 +829,8 @@ private[hive] class HiveClientImpl(
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    -  private def toHiveTable(table: CatalogTable): HiveTable = {
    +  def toHiveTable(table: CatalogTable, conf: Option[HiveConf] = None, shim: Shim = shimDefault)
    --- End diff --
    
    How about writing a comment to emphasize this shim is for Hive execution?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72627 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72627/testReport)** for PR 16787 at commit [`b20d14f`](https://github.com/apache/spark/commit/b20d14fb6e70aaf6c4e09c644dd8ec6b8b5569dd).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72563 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72563/testReport)** for PR 16787 at commit [`22140f0`](https://github.com/apache/spark/commit/22140f005703541596548d3b0e545cda5e56ee74).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72348/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72440 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72440/testReport)** for PR 16787 at commit [`ebf875f`](https://github.com/apache/spark/commit/ebf875f6650bc182fbac3986745561ebe90f48d0).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100343323
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -845,10 +855,10 @@ private[hive] class HiveClientImpl(
           hiveTable.setFields(schema.asJava)
         }
         hiveTable.setPartCols(partCols.asJava)
    -    hiveTable.setOwner(conf.getUser)
    +    conf.foreach(c => hiveTable.setOwner(c.getUser))
         hiveTable.setCreateTime((table.createTime / 1000).toInt)
         hiveTable.setLastAccessTime((table.lastAccessTime / 1000).toInt)
    -    table.storage.locationUri.foreach { loc => shim.setDataLocation(hiveTable, loc) }
    +    table.storage.locationUri.foreach { loc => hiveTable.getTTable.getSd.setLocation(loc)}
    --- End diff --
    
    thanks! versionsuits already has some create table case, if setLocation failed, these cases will fail?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72754 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72754/testReport)** for PR 16787 at commit [`d44ff38`](https://github.com/apache/spark/commit/d44ff38cc71296e48e3b6fc4a2e4f3908c7508a6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72453 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72453/testReport)** for PR 16787 at commit [`b9418d0`](https://github.com/apache/spark/commit/b9418d0063be854f4e2cfaae943e4f08d95f7f57).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72426/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460528
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    Actually, we do not need it for execution, because `user` is not used


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72309/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72753 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72753/testReport)** for PR 16787 at commit [`547d1da`](https://github.com/apache/spark/commit/547d1da142a4814e16b36d1cc868e07bab01f38a).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72589 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72589/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100681309
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala ---
    @@ -649,6 +648,16 @@ class VersionsSuite extends QueryTest with SQLTestUtils with TestHiveSingleton w
           }
         }
     
    +    test(s"$version: create table should success to test HiveClientImpl.toHiveTable compatible") {
    +      withTable("t", "t1") {
    +        import spark.implicits._
    +        Seq("1").toDF("a").write.saveAsTable("t")
    +        checkAnswer(spark.table("t"), Row("1") :: Nil)
    +
    +        spark.sql("create table t1 as select 2 as a")
    --- End diff --
    
    -> `CREATE TABLE t1 USING parquet AS SELECT 2 AS a`
    
    Could you change the statement and then update the test case name to `s"$version: create managed data source tables"`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    thanks! @gatorsmile 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72453/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460223
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    I think the same here. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461612
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    yes, I think we should keep it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460822
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    thanks a lot! 
    But if we don't create an Object, we should create a HiveClientImpl instance(created by HiveUtils) to use its helper function, and HiveUtils will call `IsolatedClientLoader` , I think it is not properly to do this to use the helper funtions.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72453 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72453/testReport)** for PR 16787 at commit [`b9418d0`](https://github.com/apache/spark/commit/b9418d0063be854f4e2cfaae943e4f08d95f7f57).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72349/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100057282
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -583,11 +468,12 @@ private[spark] object HiveUtils extends Logging {
         if (DDLUtils.isDatasourceTable(table) || table.schema.nonEmpty) {
           table
         } else {
    -      val hiveTable = toHiveTable(table)
    +      val hiveTable = HiveClientImpl.toHiveTable(table)
           // Note: Hive separates partition columns and the schema, but for us the
           // partition columns are part of the schema
    -      val partCols = hiveTable.getPartCols.asScala.map(fromHiveColumn)
    -      val schema = StructType(hiveTable.getCols.asScala.map(fromHiveColumn) ++ partCols)
    +      val partCols = hiveTable.getPartCols.asScala.map(HiveClientImpl.fromHiveColumn)
    +      val schema = StructType(hiveTable.getCols.asScala.map(HiveClientImpl.fromHiveColumn)
    +        ++ partCols)
           table.copy(schema = schema)
    --- End diff --
    
    nit:
    ```
    val partCols = ...
    val dataCols = ...
    table.copy(schema = StructType(dataCols ++ partCols))
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72584 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72584/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72456/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100319490
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    -    // We start by constructing an API table as Hive performs several important transformations
    -    // internally when converting an API table to a QL table.
    -    val tTable = new org.apache.hadoop.hive.metastore.api.Table()
    -    tTable.setTableName(catalogTable.identifier.table)
    -    tTable.setDbName(catalogTable.database)
    -
    -    val tableParameters = new java.util.HashMap[String, String]()
    -    tTable.setParameters(tableParameters)
    -    catalogTable.properties.foreach { case (k, v) => tableParameters.put(k, v) }
    -
    -    tTable.setTableType(catalogTable.tableType match {
    -      case CatalogTableType.EXTERNAL => HiveTableType.EXTERNAL_TABLE.toString
    -      case CatalogTableType.MANAGED => HiveTableType.MANAGED_TABLE.toString
    -      case CatalogTableType.VIEW => HiveTableType.VIRTUAL_VIEW.toString
    -    })
    -
    -    val sd = new org.apache.hadoop.hive.metastore.api.StorageDescriptor()
    --- End diff --
    
    I have the same question, that is why I added [this test case](https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala#L574-L650) to ensure it works well for all the versions. It sounds like everything works well.  


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72754/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    cc @cloud-fan @gatorsmile  


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460316
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    --- End diff --
    
    these helper functions in Object `HiveClientImpl` are not used to interact with HiveMetaStore, they just used for run time execution , which Spark use built in `hive-exec-1.2.1.jar`. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72674 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72674/testReport)** for PR 16787 at commit [`eb77b2e`](https://github.com/apache/spark/commit/eb77b2eca1b151bc596b118ca03dcbabe8af4b51).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72449/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72424/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460986
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    Something like this?
    
    ```Scala
    def toHiveTable(table: CatalogTable, conf: Option[HiveConf] = None, shim: Shim = shimDefault)
    ...
        conf.foreach(c => hiveTable.setOwner(c.getUser))
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [WIP][SPARK-19448][SQL]optimize some duplication ...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99585644
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -841,5 +841,6 @@ private[client] class Shim_v1_2 extends Shim_v1_1 {
           case e: InvocationTargetException => throw e.getCause()
         }
       }
    -
    +  
    --- End diff --
    
    Please remove this empty spaces?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Looks good to me. cc @cloud-fan @yhuai @rxin


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72584 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72584/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72348 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72348/testReport)** for PR 16787 at commit [`2fbd717`](https://github.com/apache/spark/commit/2fbd7174aa827374c8e9e5b0257b40ecf05c16c3).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72362/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72452 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72452/testReport)** for PR 16787 at commit [`a674920`](https://github.com/apache/spark/commit/a674920678dfbf359fd279302076cb31e54307c2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100235680
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -776,20 +778,21 @@ private[hive] class HiveClientImpl(
             client.dropDatabase(db, true, false, true)
           }
       }
    +}
     
    +private[hive] object HiveClientImpl {
    +  private lazy val shimForHiveExecution = IsolatedClientLoader.hiveVersion(
    --- End diff --
    
    is this still needed?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72365/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72564/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/16787


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72438 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72438/testReport)** for PR 16787 at commit [`d822209`](https://github.com/apache/spark/commit/d82220973c945e08cd34855972461e96b56ea936).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    can you update the PR descrption


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72402/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72442 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72442/testReport)** for PR 16787 at commit [`e971da0`](https://github.com/apache/spark/commit/e971da01e62c2e455504604120544f9a5e78588d).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72478 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72478/testReport)** for PR 16787 at commit [`d4155c2`](https://github.com/apache/spark/commit/d4155c29b2a077e225a89b56504a0d20ec34b684).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100235734
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -815,7 +819,20 @@ private[hive] class HiveClientImpl(
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    -  private def toHiveTable(table: CatalogTable): HiveTable = {
    +  private def toInputFormat(name: String) =
    +    Utils.classForName(name).asInstanceOf[Class[_ <: org.apache.hadoop.mapred.InputFormat[_, _]]]
    +
    +  private def toOutputFormat(name: String) =
    +    Utils.classForName(name)
    +      .asInstanceOf[Class[_ <: org.apache.hadoop.hive.ql.io.HiveOutputFormat[_, _]]]
    +
    +  /** Converts the native table metadata representation format CatalogTable to Hive's Table.
    --- End diff --
    
    style:
    ```
    /**
     * doc
     */
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [WIP][SPARK-19448][SQL]optimize some duplication ...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99585445
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveShim.scala ---
    @@ -276,4 +276,4 @@ private[hive] object HiveShim {
           compressType = intermediateCompressType
         }
       }
    -}
    +}
    --- End diff --
    
    Please add a new line here


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72423 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72423/testReport)** for PR 16787 at commit [`489cb16`](https://github.com/apache/spark/commit/489cb16c0d09440dc4b46dec649f8848b9b31c87).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class ResolveSQLOnFile(sparkSession: SparkSession) extends Rule[LogicalPlan] `
      * `class ResolveHiveSerdeTable(session: SparkSession) extends Rule[LogicalPlan] `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100070021
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    --- End diff --
    
    this method has been deleted, and use HiveClientImpl.toHiveTable which use shim to set location. In HiveClientImpl, the hive version maybe not same with the default hive(1.2.1),  so  it use run time shim to setDataLocation. while here deleted HiveUtils.toHiveTable just for runtime hive execution not to interact with metastore.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461447
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    We still need `Object HiveClientImpl` for containing these utility functions, right?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72348 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72348/testReport)** for PR 16787 at commit [`2fbd717`](https://github.com/apache/spark/commit/2fbd7174aa827374c8e9e5b0257b40ecf05c16c3).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72310 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72310/testReport)** for PR 16787 at commit [`75e67d5`](https://github.com/apache/spark/commit/75e67d5f6267ccbaa3184fc1c03951cba5a7ef67).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72429 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72429/testReport)** for PR 16787 at commit [`5ef2139`](https://github.com/apache/spark/commit/5ef2139a7628ea5d6568f56b3a87ad9b3cf1caed).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Late in the east coast. Will review it tomorrow. : )


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72455 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72455/testReport)** for PR 16787 at commit [`6149228`](https://github.com/apache/spark/commit/614922817ad771eb24527b2ed27bdec7632017fb).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461260
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    yes, we just don't new a HiveConf  in Object HiveClientImpl


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72649 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72649/testReport)** for PR 16787 at commit [`2a55c45`](https://github.com/apache/spark/commit/2a55c450b6d7a7c107e8c7095fb9a41348ead13b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72309 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72309/testReport)** for PR 16787 at commit [`75e67d5`](https://github.com/apache/spark/commit/75e67d5f6267ccbaa3184fc1c03951cba5a7ef67).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    @windpiger Could you please resolve conflicts? Looks good to me. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72404 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72404/testReport)** for PR 16787 at commit [`001352d`](https://github.com/apache/spark/commit/001352d86d1098e29a4c8856c101855155b358b7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72362 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72362/testReport)** for PR 16787 at commit [`4313840`](https://github.com/apache/spark/commit/43138409a6a79abe6c227987b1ebf27cbdfc8786).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72631 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72631/testReport)** for PR 16787 at commit [`99d5bb2`](https://github.com/apache/spark/commit/99d5bb20a3f98220e8370c94b3620e9b2c6c61f2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72563/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460850
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    if we merge `toHiveTable` in `HiveClientImpl` and `MetaStoreRelation`,  we can't seperate `hiveTable.setOwner(conf.getUser)`    from `toHiveTable` function


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461116
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    It's a good idea that we should not new a HiveConf here! thanks!
    what about the Object HiveClientImpl?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72622 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72622/testReport)** for PR 16787 at commit [`df3597e`](https://github.com/apache/spark/commit/df3597ec28e71dc82c56f87464e6c12f3862ca95).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72631/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72616 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72616/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99470385
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -365,8 +365,8 @@ private[hive] class HiveClientImpl(
         Option(client.getTable(dbName, tableName, false)).map { h =>
           // Note: Hive separates partition columns and the schema, but for us the
           // partition columns are part of the schema
    -      val partCols = h.getPartCols.asScala.map(fromHiveColumn)
    -      val schema = StructType(h.getCols.asScala.map(fromHiveColumn) ++ partCols)
    +      val partCols = h.getPartCols.asScala.map(HiveClientImpl.fromHiveColumn)
    --- End diff --
    
    Add ```import HiveClientImpl._``` at the beginning of `class HiveClientImpl`. Then, you can avoid adding `HiveClientImpl` in the class `HiveClientImpl `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72423 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72423/testReport)** for PR 16787 at commit [`489cb16`](https://github.com/apache/spark/commit/489cb16c0d09440dc4b46dec649f8848b9b31c87).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [WIP][SPARK-19448][SQL]optimize some duplication ...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99585661
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -841,5 +841,6 @@ private[client] class Shim_v1_2 extends Shim_v1_1 {
           case e: InvocationTargetException => throw e.getCause()
         }
       }
    -
    +  
     }
    +
    --- End diff --
    
    This empty line?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72627 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72627/testReport)** for PR 16787 at commit [`b20d14f`](https://github.com/apache/spark/commit/b20d14fb6e70aaf6c4e09c644dd8ec6b8b5569dd).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    LGTM, waiting @gatorsmile  for final sign-off


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460081
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    --- End diff --
    
    I think we should not have this. The caller need to pass the version. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72622 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72622/testReport)** for PR 16787 at commit [`df3597e`](https://github.com/apache/spark/commit/df3597ec28e71dc82c56f87464e6c12f3862ca95).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99462370
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/MetastoreRelation.scala ---
    @@ -231,18 +180,17 @@ private[hive] case class MetastoreRelation(
       val partitionKeys = catalogTable.partitionSchema.map(_.toAttribute)
     
       /** Non-partitionKey attributes */
    -  // TODO: just make this hold the schema itself, not just non-partition columns
    -  val attributes = catalogTable.schema
    +  val dataColKeys = catalogTable.schema
    --- End diff --
    
    here has an another change @gatorsmile 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72448/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72429/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72752/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72442/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72627/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72649/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72675 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72675/testReport)** for PR 16787 at commit [`31bb4d0`](https://github.com/apache/spark/commit/31bb4d0a647abec073673e9135016fd6d328ee2a).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72442 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72442/testReport)** for PR 16787 at commit [`e971da0`](https://github.com/apache/spark/commit/e971da01e62c2e455504604120544f9a5e78588d).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72753/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72349 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72349/testReport)** for PR 16787 at commit [`baf776a`](https://github.com/apache/spark/commit/baf776a774df6ce03a9ccb39c899615f22ccb680).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72402 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72402/testReport)** for PR 16787 at commit [`abe8dc9`](https://github.com/apache/spark/commit/abe8dc9e4bcd88856b40daf091a48f6207efd197).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99462031
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -815,7 +829,8 @@ private[hive] class HiveClientImpl(
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    -  private def toHiveTable(table: CatalogTable): HiveTable = {
    +  def toHiveTable(table: CatalogTable, conf: Option[HiveConf] = None, shim: Shim = shimDefault)
    +    : HiveTable = {
    --- End diff --
    
    Nit: Style issue:
    
    ```Scala
      def toHiveTable(
          table: CatalogTable,
          conf: Option[HiveConf] = None,
          shim: Shim = shimForHiveExecution): HiveTable = {
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72438/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72478 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72478/testReport)** for PR 16787 at commit [`d4155c2`](https://github.com/apache/spark/commit/d4155c29b2a077e225a89b56504a0d20ec34b684).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72580 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72580/testReport)** for PR 16787 at commit [`a3c9f5e`](https://github.com/apache/spark/commit/a3c9f5e4a754ceee2ffb71c3da49221001b1bf2c).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72752 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72752/testReport)** for PR 16787 at commit [`0918461`](https://github.com/apache/spark/commit/09184616951e90f25d7f653c009b41b3f79eeea1).
     * This patch **fails Scala style tests**.
     * This patch **does not merge cleanly**.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72452 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72452/testReport)** for PR 16787 at commit [`a674920`](https://github.com/apache/spark/commit/a674920678dfbf359fd279302076cb31e54307c2).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72424 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72424/testReport)** for PR 16787 at commit [`352856b`](https://github.com/apache/spark/commit/352856bca3dff862f09253ec5a06cb55fff3e76a).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72404 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72404/testReport)** for PR 16787 at commit [`001352d`](https://github.com/apache/spark/commit/001352d86d1098e29a4c8856c101855155b358b7).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100241493
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -776,20 +778,21 @@ private[hive] class HiveClientImpl(
             client.dropDatabase(db, true, false, true)
           }
       }
    +}
     
    +private[hive] object HiveClientImpl {
    +  private lazy val shimForHiveExecution = IsolatedClientLoader.hiveVersion(
    --- End diff --
    
    let me remove it , thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72589/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72448 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72448/testReport)** for PR 16787 at commit [`922eb9d`](https://github.com/apache/spark/commit/922eb9d182e547f0e5706f6ad8c924f4c9ef4496).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72455 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72455/testReport)** for PR 16787 at commit [`6149228`](https://github.com/apache/spark/commit/614922817ad771eb24527b2ed27bdec7632017fb).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72456 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72456/testReport)** for PR 16787 at commit [`0f43bb5`](https://github.com/apache/spark/commit/0f43bb51a66dc83b47c70fe570d54967d6bdfdd5).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72641 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72641/testReport)** for PR 16787 at commit [`99d5bb2`](https://github.com/apache/spark/commit/99d5bb20a3f98220e8370c94b3620e9b2c6c61f2).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72449 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72449/testReport)** for PR 16787 at commit [`6566a59`](https://github.com/apache/spark/commit/6566a59e915e1a6e9e0a4bef8d4591a7ef6e18c2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72443 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72443/testReport)** for PR 16787 at commit [`9ccf9e3`](https://github.com/apache/spark/commit/9ccf9e364f0ac57f5b7c91a9b1bed6fb4c24098c).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72440/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [WIP][SPARK-19448][SQL]optimize some duplication ...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99588025
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala ---
    @@ -841,5 +841,6 @@ private[client] class Shim_v1_2 extends Shim_v1_1 {
           case e: InvocationTargetException => throw e.getCause()
         }
       }
    -
    +  
     }
    +
    --- End diff --
    
    yes... I make a mistake, there is another HiveShim.scala .....
    sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveShim.scala


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100059580
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    -    // We start by constructing an API table as Hive performs several important transformations
    -    // internally when converting an API table to a QL table.
    -    val tTable = new org.apache.hadoop.hive.metastore.api.Table()
    -    tTable.setTableName(catalogTable.identifier.table)
    -    tTable.setDbName(catalogTable.database)
    -
    -    val tableParameters = new java.util.HashMap[String, String]()
    -    tTable.setParameters(tableParameters)
    -    catalogTable.properties.foreach { case (k, v) => tableParameters.put(k, v) }
    -
    -    tTable.setTableType(catalogTable.tableType match {
    -      case CatalogTableType.EXTERNAL => HiveTableType.EXTERNAL_TABLE.toString
    -      case CatalogTableType.MANAGED => HiveTableType.MANAGED_TABLE.toString
    -      case CatalogTableType.VIEW => HiveTableType.VIRTUAL_VIEW.toString
    -    })
    -
    -    val sd = new org.apache.hadoop.hive.metastore.api.StorageDescriptor()
    --- End diff --
    
    here we set the data location via `StorageDescriptor`, is this way safe for all hive versions?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72433 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72433/testReport)** for PR 16787 at commit [`57521c6`](https://github.com/apache/spark/commit/57521c6edfef58c48c12904ce3b7fb4949a76f82).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460541
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    We do not need to do the following line, if `hiveConf` is not set: 
    
    `hiveTable.setOwner(conf.getUser)` 
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72349 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72349/testReport)** for PR 16787 at commit [`baf776a`](https://github.com/apache/spark/commit/baf776a774df6ce03a9ccb39c899615f22ccb680).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72456 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72456/testReport)** for PR 16787 at commit [`0f43bb5`](https://github.com/apache/spark/commit/0f43bb51a66dc83b47c70fe570d54967d6bdfdd5).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72622/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72675/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99460549
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    My major concern is the default value `hiveConf` is not right. We might abuse it in the future.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100058971
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    --- End diff --
    
    why this method doesn't need a `shim`? I took a look at `HiveClientImpl.toHiveTabe`, it only use `shim` to set data location.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72443/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100329892
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -845,10 +855,10 @@ private[hive] class HiveClientImpl(
           hiveTable.setFields(schema.asJava)
         }
         hiveTable.setPartCols(partCols.asJava)
    -    hiveTable.setOwner(conf.getUser)
    +    conf.foreach(c => hiveTable.setOwner(c.getUser))
         hiveTable.setCreateTime((table.createTime / 1000).toInt)
         hiveTable.setLastAccessTime((table.lastAccessTime / 1000).toInt)
    -    table.storage.locationUri.foreach { loc => shim.setDataLocation(hiveTable, loc) }
    +    table.storage.locationUri.foreach { loc => hiveTable.getTTable.getSd.setLocation(loc)}
    --- End diff --
    
    We might need to add the extra test case or checks to [VersionsSuites](https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala) for verifying the location is correctly set. 
    
    I am not 100% sure it works for all the versions we support. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72433 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72433/testReport)** for PR 16787 at commit [`57521c6`](https://github.com/apache/spark/commit/57521c6edfef58c48c12904ce3b7fb4949a76f82).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72455/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72448 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72448/testReport)** for PR 16787 at commit [`922eb9d`](https://github.com/apache/spark/commit/922eb9d182e547f0e5706f6ad8c924f4c9ef4496).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72674 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72674/testReport)** for PR 16787 at commit [`eb77b2e`](https://github.com/apache/spark/commit/eb77b2eca1b151bc596b118ca03dcbabe8af4b51).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72310 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72310/testReport)** for PR 16787 at commit [`75e67d5`](https://github.com/apache/spark/commit/75e67d5f6267ccbaa3184fc1c03951cba5a7ef67).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72478/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72404/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    please resolve the conflict, now you need to remove the duplicated functions between HiveUtils and HiveClientImpl


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72589 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72589/testReport)** for PR 16787 at commit [`bf09f15`](https://github.com/apache/spark/commit/bf09f15ca7c90138312eb73b819131adf16ac040).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72580/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99462090
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -815,7 +829,8 @@ private[hive] class HiveClientImpl(
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    -  private def toHiveTable(table: CatalogTable): HiveTable = {
    +  def toHiveTable(table: CatalogTable, conf: Option[HiveConf] = None, shim: Shim = shimDefault)
    --- End diff --
    
    ok! thanks~


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    ok thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461201
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl(
       }
     
     
    +
    +}
    +
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    +    HiveUtils.hiveExecutionVersion) match {
    +      case hive.v12 => new Shim_v0_12()
    +      case hive.v13 => new Shim_v0_13()
    +      case hive.v14 => new Shim_v0_14()
    +      case hive.v1_0 => new Shim_v1_0()
    +      case hive.v1_1 => new Shim_v1_1()
    +      case hive.v1_2 => new Shim_v1_2()
    +  }
    +
    +  private lazy val hiveConf = new HiveConf(classOf[SessionState])
    --- End diff --
    
    We still need to pass conf in `class HiveClientImpl` for interacting with metastore, because we need to set it.
    
    I think we do not need it for Hive execution, unless we hit any error.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100315562
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala ---
    @@ -463,117 +459,6 @@ private[spark] object HiveUtils extends Logging {
         case (other, tpe) if primitiveTypes contains tpe => other.toString
       }
     
    -  /** Converts the native StructField to Hive's FieldSchema. */
    -  private def toHiveColumn(c: StructField): FieldSchema = {
    -    val typeString = if (c.metadata.contains(HiveUtils.hiveTypeString)) {
    -      c.metadata.getString(HiveUtils.hiveTypeString)
    -    } else {
    -      c.dataType.catalogString
    -    }
    -    new FieldSchema(c.name, typeString, c.getComment.orNull)
    -  }
    -
    -  /** Builds the native StructField from Hive's FieldSchema. */
    -  private def fromHiveColumn(hc: FieldSchema): StructField = {
    -    val columnType = try {
    -      CatalystSqlParser.parseDataType(hc.getType)
    -    } catch {
    -      case e: ParseException =>
    -        throw new SparkException("Cannot recognize hive type string: " + hc.getType, e)
    -    }
    -
    -    val metadata = new MetadataBuilder().putString(HiveUtils.hiveTypeString, hc.getType).build()
    -    val field = StructField(
    -      name = hc.getName,
    -      dataType = columnType,
    -      nullable = true,
    -      metadata = metadata)
    -    Option(hc.getComment).map(field.withComment).getOrElse(field)
    -  }
    -
    -  // TODO: merge this with HiveClientImpl#toHiveTable
    -  /** Converts the native table metadata representation format CatalogTable to Hive's Table. */
    -  def toHiveTable(catalogTable: CatalogTable): HiveTable = {
    --- End diff --
    
    Based on my understanding, the default runtime Hive execution does not hit any issue without Shim. Thus, we did not use Shim for some reasons. However, it will be great if we can merge them, as what this PR is doing.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r99461967
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -776,7 +778,18 @@ private[hive] class HiveClientImpl(
             client.dropDatabase(db, true, false, true)
           }
       }
    +}
     
    +private[hive] object HiveClientImpl {
    +  private lazy val shimDefault = IsolatedClientLoader.hiveVersion(
    --- End diff --
    
    How about renaming it to `shimForHiveExecution`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Thanks! Merging to master.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Thank you very much! LGTM


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72584/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72641 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72641/testReport)** for PR 16787 at commit [`99d5bb2`](https://github.com/apache/spark/commit/99d5bb20a3f98220e8370c94b3620e9b2c6c61f2).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72753 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72753/testReport)** for PR 16787 at commit [`547d1da`](https://github.com/apache/spark/commit/547d1da142a4814e16b36d1cc868e07bab01f38a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72752 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72752/testReport)** for PR 16787 at commit [`0918461`](https://github.com/apache/spark/commit/09184616951e90f25d7f653c009b41b3f79eeea1).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72564 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72564/testReport)** for PR 16787 at commit [`a3c9f5e`](https://github.com/apache/spark/commit/a3c9f5e4a754ceee2ffb71c3da49221001b1bf2c).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72438 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72438/testReport)** for PR 16787 at commit [`d822209`](https://github.com/apache/spark/commit/d82220973c945e08cd34855972461e96b56ea936).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100321936
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -891,7 +905,7 @@ private[hive] class HiveClientImpl(
         new HivePartition(ht, tpart)
       }
     
    -  private def fromHivePartition(hp: HivePartition): CatalogTablePartition = {
    +  def fromHivePartition(hp: HivePartition): CatalogTablePartition = {
    --- End diff --
    
    To be consistent with the others, also add a function description for this too? 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72365 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72365/testReport)** for PR 16787 at commit [`a2ccba2`](https://github.com/apache/spark/commit/a2ccba2987b90a40a6bf55477e5ecfba022c09f6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    retest this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72433/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100681160
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala ---
    @@ -570,7 +570,6 @@ class VersionsSuite extends QueryTest with SQLTestUtils with TestHiveSingleton w
           }
         }
    --- End diff --
    
    The above test case verified the location. I think it should be good enough


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72675 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72675/testReport)** for PR 16787 at commit [`31bb4d0`](https://github.com/apache/spark/commit/31bb4d0a647abec073673e9135016fd6d328ee2a).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72449 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72449/testReport)** for PR 16787 at commit [`6566a59`](https://github.com/apache/spark/commit/6566a59e915e1a6e9e0a4bef8d4591a7ef6e18c2).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72754 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72754/testReport)** for PR 16787 at commit [`d44ff38`](https://github.com/apache/spark/commit/d44ff38cc71296e48e3b6fc4a2e4f3908c7508a6).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72426 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72426/testReport)** for PR 16787 at commit [`5ef2139`](https://github.com/apache/spark/commit/5ef2139a7628ea5d6568f56b3a87ad9b3cf1caed).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72424 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72424/testReport)** for PR 16787 at commit [`352856b`](https://github.com/apache/spark/commit/352856bca3dff862f09253ec5a06cb55fff3e76a).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [WIP][SPARK-19448][SQL]optimize some duplication functio...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72443 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72443/testReport)** for PR 16787 at commit [`9ccf9e3`](https://github.com/apache/spark/commit/9ccf9e364f0ac57f5b7c91a9b1bed6fb4c24098c).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72580 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72580/testReport)** for PR 16787 at commit [`a3c9f5e`](https://github.com/apache/spark/commit/a3c9f5e4a754ceee2ffb71c3da49221001b1bf2c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72429 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72429/testReport)** for PR 16787 at commit [`5ef2139`](https://github.com/apache/spark/commit/5ef2139a7628ea5d6568f56b3a87ad9b3cf1caed).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100345819
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -845,10 +855,10 @@ private[hive] class HiveClientImpl(
           hiveTable.setFields(schema.asJava)
         }
         hiveTable.setPartCols(partCols.asJava)
    -    hiveTable.setOwner(conf.getUser)
    +    conf.foreach(c => hiveTable.setOwner(c.getUser))
         hiveTable.setCreateTime((table.createTime / 1000).toInt)
         hiveTable.setLastAccessTime((table.lastAccessTime / 1000).toInt)
    -    table.storage.locationUri.foreach { loc => shim.setDataLocation(hiveTable, loc) }
    +    table.storage.locationUri.foreach { loc => hiveTable.getTTable.getSd.setLocation(loc)}
    --- End diff --
    
    I will check it ,thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100681187
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala ---
    @@ -649,6 +648,16 @@ class VersionsSuite extends QueryTest with SQLTestUtils with TestHiveSingleton w
           }
         }
     
    +    test(s"$version: create table should success to test HiveClientImpl.toHiveTable compatible") {
    +      withTable("t", "t1") {
    +        import spark.implicits._
    +        Seq("1").toDF("a").write.saveAsTable("t")
    +        checkAnswer(spark.table("t"), Row("1") :: Nil)
    +
    +        spark.sql("create table t1 as select 2 as a")
    +        checkAnswer(spark.table("t1"), Row(2) :: Nil)
    --- End diff --
    
    Table `t` and `t1` are managed tables. Could you also verify whether the location are expected?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72649 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72649/testReport)** for PR 16787 at commit [`2a55c45`](https://github.com/apache/spark/commit/2a55c450b6d7a7c107e8c7095fb9a41348ead13b).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by windpiger <gi...@git.apache.org>.
Github user windpiger commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    ping @gatorsmile 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions be...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72616/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #16787: [SPARK-19448][SQL]optimize some duplication funct...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16787#discussion_r100321748
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -815,7 +809,21 @@ private[hive] class HiveClientImpl(
         Option(hc.getComment).map(field.withComment).getOrElse(field)
       }
     
    -  private def toHiveTable(table: CatalogTable): HiveTable = {
    +  private def toInputFormat(name: String) =
    +    Utils.classForName(name).asInstanceOf[Class[_ <: org.apache.hadoop.mapred.InputFormat[_, _]]]
    +
    +  private def toOutputFormat(name: String) =
    +    Utils.classForName(name)
    +      .asInstanceOf[Class[_ <: org.apache.hadoop.hive.ql.io.HiveOutputFormat[_, _]]]
    +
    +  /**
    +   * Converts the native table metadata representation format CatalogTable to Hive's Table.
    +   * the default value shimForHiveExecution is only used for hive execution, a Shim instance
    +   * with a specific metastore version should be passed to this function to interact with metastore
    --- End diff --
    
    This description is out of dated. Need an update. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #16787: [SPARK-19448][SQL]optimize some duplication functions in...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/16787
  
    **[Test build #72440 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/72440/testReport)** for PR 16787 at commit [`ebf875f`](https://github.com/apache/spark/commit/ebf875f6650bc182fbac3986745561ebe90f48d0).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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