Skip to content

Commit

Permalink
issue 361 refactored QueryPlanSerde.scala for enhanced type safety an…
Browse files Browse the repository at this point in the history
…d localization compliance, including a new string-to-enum conversion function and improved import organization.
  • Loading branch information
prashantksharma committed May 11, 2024
1 parent 5e6a35c commit 0b76c4a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package org.apache.comet.serde

import java.util.Locale

import scala.collection.JavaConverters._

import org.apache.spark.internal.Logging
Expand Down Expand Up @@ -527,7 +529,7 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde {
*/

def stringToEvalMode(evalModeStr: String): ExprOuterClass.EvalMode =
evalModeStr.toUpperCase match {
evalModeStr.toUpperCase(Locale.ROOT) match {
case "LEGACY" => ExprOuterClass.EvalMode.LEGACY
case "TRY" => ExprOuterClass.EvalMode.TRY
case "ANSI" => ExprOuterClass.EvalMode.ANSI
Expand Down

0 comments on commit 0b76c4a

Please sign in to comment.