dongjoon-hyun commented on code in PR #47227: URL: https://github.com/apache/spark/pull/47227#discussion_r1669618445
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala: ########## @@ -260,12 +260,14 @@ class UnivocityParser( case ym: YearMonthIntervalType => (d: String) => nullSafeDatum(d, name, nullable, options) { datum => - Cast(Literal(datum), ym).eval(EmptyRow) + IntervalUtils.castStringToYMInterval( + UTF8String.fromString(datum), ym.startField, ym.endField) Review Comment: From the PR description, is this a behavior change? > Bad record recording might not work if the cast handles the exceptions early -- 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