michaelzhan-db commented on code in PR #46626: URL: https://github.com/apache/spark/pull/46626#discussion_r1612486829
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala: ########## @@ -149,7 +149,13 @@ class CSVOptions( parameters.getOrElse(DateTimeUtils.TIMEZONE_OPTION, defaultTimeZoneId)) // A language tag in IETF BCP 47 format - val locale: Locale = parameters.get(LOCALE).map(Locale.forLanguageTag).getOrElse(Locale.US) + val locale: Locale = parameters.get(LOCALE) + .map { + case null => Review Comment: I see. Would it make more sense to just add a null check here then?https://github.com/apache/spark/blob/2516fd8439df42b1c161fbd346a0c346cc075f0f/sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala#L108 However, I'm not sure if it would adversely affect other options. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org