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

    https://github.com/apache/spark/pull/8130#discussion_r36890755
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala ---
    @@ -309,11 +308,32 @@ private[hive] class HiveMetastoreCatalog(val client: 
ClientInterface, hive: Hive
         val hiveTable = (maybeSerDe, dataSource.relation) match {
           case (Some(serde), relation: HadoopFsRelation)
               if relation.paths.length == 1 && 
relation.partitionColumns.isEmpty =>
    -        logInfo {
    -          "Persisting data source relation with a single input path into 
Hive metastore in Hive " +
    -            s"compatible format.  Input path: ${relation.paths.head}"
    +        // Hive ParquetSerDe doesn't support decimal type until 1.2.0.
    +        val isParquetSerDe = 
serde.inputFormat.exists(_.toLowerCase.contains("parquet"))
    +        val hasDecimalFields = 
relation.schema.exists(_.dataType.isInstanceOf[DecimalType])
    +        val hiveVersion = hive.hiveMetastoreVersion
    +        val (hiveMajorVersion, hiveMinorVersion) = {
    +          val Version = """(\d+)\.(\d+)\..*""".r
    --- End diff --
    
    Should we use our own hive client's notion of version instead of a regex 
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to