peasee commented on code in PR #15630: URL: https://github.com/apache/datafusion/pull/15630#discussion_r2034467067
########## datafusion/sql/src/unparser/expr.rs: ########## @@ -2871,6 +2872,118 @@ mod tests { Ok(()) } + #[test] + fn test_from_unixtime() -> Result<()> { + let default_dialect: Arc<dyn Dialect> = Arc::new(DefaultDialect {}); + let sqlite_dialect: Arc<dyn Dialect> = Arc::new(SqliteDialect {}); + + for (dialect, expected) in [ + (default_dialect, "from_unixtime(date_col)"), + (sqlite_dialect, "datetime(`date_col`, 'unixepoch')"), + ] { + let unparser = Unparser::new(dialect.as_ref()); + let expr = Expr::ScalarFunction(ScalarFunction { + func: Arc::new(ScalarUDF::from( + datafusion_functions::datetime::from_unixtime::FromUnixtimeFunc::new( + ), Review Comment: I've updated to import the module, the shorter module path formats better -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org