File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis
core/src/main/scala/org/apache/spark/sql/internal Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .sql .catalyst .analysis
1919
20+ import java .util .Locale
21+
2022import org .apache .spark .sql .catalyst .expressions .Expression
2123import org .apache .spark .sql .catalyst .plans .logical .{LogicalPlan , Range }
2224import org .apache .spark .sql .catalyst .rules ._
@@ -103,7 +105,7 @@ object ResolveTableValuedFunctions extends Rule[LogicalPlan] {
103105
104106 override def apply (plan : LogicalPlan ): LogicalPlan = plan resolveOperators {
105107 case u : UnresolvedTableValuedFunction if u.functionArgs.forall(_.resolved) =>
106- builtinFunctions.get(u.functionName.toLowerCase()) match {
108+ builtinFunctions.get(u.functionName.toLowerCase(Locale . ROOT )) match {
107109 case Some (tvf) =>
108110 val resolved = tvf.flatMap { case (argList, resolver) =>
109111 argList.implicitCast(u.functionArgs) match {
Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .sql .internal
1919
20+ import java .util .Locale
21+
2022import scala .reflect .ClassTag
2123import scala .util .control .NonFatal
2224
@@ -114,7 +116,7 @@ private[sql] class SharedState(val sparkContext: SparkContext) extends Logging {
114116 // System preserved database should not exists in metastore. However it's hard to guarantee it
115117 // for every session, because case-sensitivity differs. Here we always lowercase it to make our
116118 // life easier.
117- val globalTempDB = sparkContext.conf.get(GLOBAL_TEMP_DATABASE ).toLowerCase
119+ val globalTempDB = sparkContext.conf.get(GLOBAL_TEMP_DATABASE ).toLowerCase( Locale . ROOT )
118120 if (externalCatalog.databaseExists(globalTempDB)) {
119121 throw new SparkException (
120122 s " $globalTempDB is a system preserved database, please rename your existing database " +
You can’t perform that action at this time.
0 commit comments