alamb commented on a change in pull request #1455:
URL: https://github.com/apache/arrow-datafusion/pull/1455#discussion_r773174335
##########
File path: datafusion/tests/sql.rs
##########
@@ -6616,12 +6623,37 @@ async fn csv_query_with_decimal_by_sql() -> Result<()> {
Ok(())
}
+#[tokio::test]
+async fn timestamp_minmax() -> Result<()> {
+ let mut ctx = ExecutionContext::new();
+ let table_a = make_timestamp_tz_table::<TimestampMillisecondType>(None)?;
+ let table_b =
+
make_timestamp_tz_table::<TimestampNanosecondType>(Some("UTC".to_owned()))?;
+ ctx.register_table("table_a", table_a)?;
+ ctx.register_table("table_b", table_b)?;
+
+ let sql = "SELECT MIN(table_a.ts), MAX(table_b.ts) FROM table_a, table_b";
+ let actual = execute_to_batches(&mut ctx, sql).await;
+ let expected = vec![
+ "+-------------------------+----------------------------+",
+ "| MIN(table_a.ts) | MAX(table_b.ts) |",
+ "+-------------------------+----------------------------+",
+ "| 2020-09-08 11:42:29.190 | 2020-09-08 13:42:29.190855 |",
+ "+-------------------------+----------------------------+",
+ ];
+ assert_batches_eq!(expected, &actual);
+
+ Ok(())
+}
+
#[tokio::test]
async fn timestamp_coercion() -> Result<()> {
{
let mut ctx = ExecutionContext::new();
- let table_a = make_timestamp_table::<TimestampSecondType>()?;
- let table_b = make_timestamp_table::<TimestampMillisecondType>()?;
+ let table_a =
Review comment:
👍
--
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]