dejankrak-db commented on code in PR #60535:
URL: https://github.com/apache/spark/pull/60535#discussion_r4606518366
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -3227,19 +3227,19 @@
},
"FILE_TYPE_IN_ROUTINE_SIGNATURE_UNSUPPORTED_MAP_KEY" : {
"message" : [
- "The FILE type cannot be a map key in the return type of <routineType>
<routineName>. Use FILE only as a map value, array element, or struct field."
+ "The FILE type cannot be a map key in the return type of <routineName>.
Use FILE only as a map value, array element, or struct field."
],
"sqlState" : "42601"
},
"FILE_TYPE_IN_ROUTINE_SIGNATURE_UNSUPPORTED_QUALIFIER" : {
"message" : [
- "The FILE type in <routineType> <routineName> does not support the
EXTERNAL qualifier. Use FILE without a qualifier."
+ "The FILE type in the signature of <routineName> does not support the
EXTERNAL qualifier. Use FILE without a qualifier."
],
"sqlState" : "42601"
},
"FILE_TYPE_MISSING_QUALIFIER" : {
"message" : [
- "FILE type requires the EXTERNAL qualifier in a column definition. Use
FILE EXTERNAL."
+ "The column <colName> of type <dataType> holds a FILE without a
qualifier, which a column definition requires. Use FILE EXTERNAL."
Review Comment:
Done in eeae119b15f, with your wording: "... holds a FILE without a
qualifier. A FILE in a column definition requires the EXTERNAL qualifier. Use
FILE EXTERNAL."
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala:
##########
@@ -307,16 +308,20 @@ case class PreprocessTableCreation(catalog:
SessionCatalog) extends Rule[Logical
case _ => cls
}
- // FILE is not comparable, so it cannot be a partition, bucket or clustering
column. A
- // bucket column is reported as a partition column, as for the V2 `bucket`
transform.
+ // FILE is not comparable, so it cannot be a partition, bucket, bucket sort
or clustering column.
private def checkNoFileTypePartitionOrClusteringColumn(
Review Comment:
Done in eeae119b15f: renamed to `checkNoFileTypeInComparableColumns`.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSchemaEvolution.scala:
##########
@@ -52,7 +52,7 @@ object ResolveSchemaEvolution extends Rule[LogicalPlan] {
case relation @ ExtractV2CatalogAndIdentifier(catalog, ident) =>
// A table cannot store a FILE without a qualifier, so schema
evolution cannot add one.
// This is checked before the catalog changes the table.
-
TypeUtils.checkNoUnknownFileTypeInColumns(write.pendingSchemaChanges.collect {
+
TypeUtils.checkNoUnknownFileTypeWrite(write.pendingSchemaChanges.collect {
Review Comment:
Done in eeae119b15f: added a schema evolution case that adds a new struct
column `s2` holding a FILE, expecting ``[`s2`.`f`]``, and a CREATE TABLE LIKE
case from a view with a FILE in a struct, expecting ``[`s`.`f`]``.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]