cloud-fan commented on code in PR #51686:
URL: https://github.com/apache/spark/pull/51686#discussion_r2245376819
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala:
##########
@@ -225,11 +194,80 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan]
with PredicateHelper {
node
}
}
+ /**
+ * Generates unique column aliases for join operations to avoid naming
conflicts.
+ * Handles case sensitivity issues across different databases (SQL Server,
MySQL, etc.).
+ *
+ * @param leftSideRequiredColumnNames Columns from the left side of the join
+ * @param rightSideRequiredColumnNames Columns from the right side of the
join
+ * @return Tuple of (leftColumnsWithAliases, rightColumnsWithAliases)
+ */
+ private[v2] def generateColumnAliasesForDuplicatedName(
+ leftSideRequiredColumnNames: Array[String],
+ rightSideRequiredColumnNames: Array[String]
+ ): (Array[SupportsPushDownJoin.ColumnWithAlias],
+ Array[SupportsPushDownJoin.ColumnWithAlias]) = {
+ // Normalize all column names to lowercase for case-insensitive comparison
+ val normalizeCase: String => String = _.toLowerCase()
Review Comment:
```suggestion
val normalizeCase: String => String = _.toLowerCase(Locale.ROOT)
```
--
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]