szehon-ho commented on PR #58385: URL: https://github.com/apache/spark/pull/58385#issuecomment-5519060698
One remaining coverage issue is analyzer-inserted casts. `ImplicitTypeCasts` / `AnsiTypeCoercion` can insert a `Cast`, whose evaluation mode comes from `spark.sql.ansi.enabled` and which is time-zone-aware, so a function can be configuration-sensitive even when its own expression class does not read the configuration directly. For example, `hour` / `minute` / `second` accept string inputs, and an invalid string throws with ANSI enabled instead of returning null. The date-field functions (`year`, `quarter`, `month`, `dayofweek`, `dayofmonth` / `day`, `dayofyear`, `weekday`, `weekofyear`, `monthname`, and `dayname`) require `DateType`, so coercing a string or `TimestampType` input makes them sensitive to ANSI mode and/or the session time zone as well. Could the coverage check account for configuration dependencies introduced by analyzer casts and add the corresponding Scala and Python notes? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
