spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gatorsmile <>
Subject [GitHub] spark pull request #15024: [SPARK-17470][SQL] unify path for data source tab...
Date Thu, 27 Oct 2016 07:38:00 GMT
Github user gatorsmile commented on a diff in the pull request:
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala
    @@ -415,16 +422,34 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf:
         if (DDLUtils.isDatasourceTable(withStatsProps)) {
    -      val oldDef = client.getTable(db, withStatsProps.identifier.table)
    -      // Sets the `schema`, `partitionColumnNames` and `bucketSpec` from the old table
    -      // to retain the spark specific format if it is. Also add old data source properties
to table
    -      // properties, to retain the data source table format.
    -      val oldDataSourceProps =
    +      val oldTableDef = client.getTable(db, withStatsProps.identifier.table)
    +      val oldLocation = getLocationFromRawTable(oldTableDef)
    +      // Only update the `locationUri` field if the location is really changed, because
this table
    +      // may be not Hive-compatible and can not set the `locationUri` field. We should
respect the
    +      // old `locationUri` even it's None.
    +      val newLocation = if (oldLocation == {
    +      } else {
    +      }
    --- End diff --
    Just FYI, we do not have any test case to cover this. `ALTER TABLE SET LOCATION` for data
source tables is only tested in `DDLSuite` (when Hive support is not enabled). That means,
these code changes are not tested. Actually, this is not the only one. : (

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message