Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/17527#discussion_r110338963
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/OptimizeMetadataOnlyQuery.scala
---
@@ -82,8 +84,8 @@ case class OptimizeMetadataOnlyQuery(
private def getPartitionAttrs(
partitionColumnNames: Seq[String],
relation: LogicalPlan): Seq[Attribute] = {
- val partColumns = partitionColumnNames.map(_.toLowerCase).toSet
- relation.output.filter(a => partColumns.contains(a.name.toLowerCase))
+ val partColumns =
partitionColumnNames.map(_.toLowerCase(Locale.ROOT)).toSet
+ relation.output.filter(a =>
partColumns.contains(a.name.toLowerCase(Locale.ROOT)))
--- End diff --
Yes, the question is whether case-insensitive operations on schema
elements, not just data, should be locale-neutral.
The flip side to this argument is that a case-insensitive operation on a
schema with the character "I" or "i" suddenly doesn't work as expected on a
machine with the Turkish locale.
I don't know which is rarer: schema with these special characters, or a
machine with this particular Locale.
I think I'd probably err on the side of not changing the behavior. I'll
further revert the changes that touch things like column and table names.
---
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]