Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/14155#discussion_r73644322 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala --- @@ -506,76 +495,16 @@ object DDLUtils { } /** - * If the given table properties (or SerDe properties) contains datasource properties, - * throw an exception. + * Checks if the given name conforms the Hive standard ("[a-zA-z_0-9]+"), + * i.e. if this name only contains characters, numbers, and _. + * + * This method is intended to have the same behavior of + * org.apache.hadoop.hive.metastore.MetaStoreUtils.validateName. */ - def verifyTableProperties(propKeys: Seq[String], operation: String): Unit = { - val datasourceKeys = propKeys.filter(_.startsWith(DATASOURCE_PREFIX)) - if (datasourceKeys.nonEmpty) { - throw new AnalysisException(s"Operation not allowed: $operation property keys may not " + - s"start with '$DATASOURCE_PREFIX': ${datasourceKeys.mkString("[", ", ", "]")}") - } - } - - def isTablePartitioned(table: CatalogTable): Boolean = { - table.partitionColumnNames.nonEmpty || table.properties.contains(DATASOURCE_SCHEMA_NUMPARTCOLS) - } - - // A persisted data source table always store its schema in the catalog. - def getSchemaFromTableProperties(metadata: CatalogTable): StructType = { --- End diff -- these methods are moved to `HiveExternalCatalog.restoreTableMetadata`
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org