xiaonanyang-db commented on code in PR #37933: URL: https://github.com/apache/spark/pull/37933#discussion_r976081324
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala: ########## @@ -59,6 +59,11 @@ class CSVInferSchema(val options: CSVOptions) extends Serializable { ExprUtils.getDecimalParser(options.locale) } + // Date formats that could be parsed in DefaultTimestampFormatter + // Reference: DateTimeUtils.parseTimestampString + private val LENIENT_TS_FORMATTER_SUPPORTED_DATE_FORMATS = Set( Review Comment: ``` dateFormat = "yyyy/MM/dd" timestampFormat = "yyyy/MM/dd HH:mm:ss" ``` I don't quite understand your question on this case. But speaking in the context of this PR, because `timestampFormat` is specified, a column with a mix of dates and timestamps will be inferred as `StringType`. -- 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