alamb commented on a change in pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#discussion_r730396112
##########
File path: datafusion/tests/sql.rs
##########
@@ -1276,13 +1312,18 @@ async fn query_cast_timestamp_millis() -> Result<()> {
ctx.register_table("t1", Arc::new(t1_table))?;
let sql = "SELECT to_timestamp_millis(ts) FROM t1 LIMIT 3";
- let actual = execute(&mut ctx, sql).await;
+ let actual = execute_to_batches(&mut ctx, sql).await;
+
let expected = vec![
- vec!["2009-03-01 00:00:00"],
- vec!["2009-03-01 00:01:00"],
- vec!["2009-04-01 00:00:00"],
+ "+--------------------------+",
+ "| totimestampmillis(t1.ts) |",
+ "+--------------------------+",
+ "| 2009-03-01 00:00:00 |",
+ "| 2009-03-01 00:01:00 |",
+ "| 2009-04-01 00:00:00 |",
+ "+--------------------------+",
Review comment:
The idea of adding some data that actually has millisecond precision
sounds like a good idea to me. I think it could also be done as another PR
(perhaps file at ticket) as the tests are no worse than before
--
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]