brkyvz commented on code in PR #37933: URL: https://github.com/apache/spark/pull/37933#discussion_r978224414
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala: ########## @@ -59,6 +59,13 @@ class CSVInferSchema(val options: CSVOptions) extends Serializable { ExprUtils.getDecimalParser(options.locale) } + // Date formats that could be parsed in DefaultTimestampFormatter + // Reference: DateTimeUtils.parseTimestampString + // Used to determine inferring a column with mixture of dates and timestamps as TimestampType or + // StringType when no timestamp format is specified (the lenient timestamp formatter will be used) + private val LENIENT_TS_FORMATTER_SUPPORTED_DATE_FORMATS = Set( + "yyyy-MM-dd", "yyyy-M-d", "yyyy-M-dd", "yyyy-MM-d", "yyyy-MM", "yyyy-M", "yyyy") Review Comment: These are variants of the lenient timestamp formatter's supported date formats. It's not a hardcoded list of what the user can use. -- 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