You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:48:21 UTC
[GitHub] [arrow-datafusion] matthewmturner opened a new pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
matthewmturner opened a new pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126
# Which issue does this PR close?
#743 task 2
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #.
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb merged pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-951358766
@alamb okay makes sense! I will start cleaning it up / getting CI to pass.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-944443952
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-951266754
@matthewmturner I was thinking that we could polish up the work you have so far and get it committed and then work on the remaining tests as a follow on PR(s).
Rationale for merging sooner rather than later is to minimize potential conflicts (but also so that we are able to keep chipping away at this backlog on master rather than a branch which might go stale / never get entirely completed due to other priorities).
I guess I jealously want to get these changes in so as to take advantage of all your work so far :)
We did one chunk in https://github.com/apache/arrow-datafusion/pull/760 and this would be a nice chunk
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a change in pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#discussion_r736501280
##########
File path: datafusion/tests/sql.rs
##########
@@ -1411,43 +1501,55 @@ async fn query_cast_timestamp_micros_to_others() -> Result<()> {
// Original column is micros, convert to millis and check timestamp
let sql = "SELECT to_timestamp_millis(ts) FROM ts_micros LIMIT 3";
- let actual = execute(&mut ctx, sql).await;
+ let actual = execute_to_batches(&mut ctx, sql).await;
let expected = vec![
- vec!["2020-09-08 13:42:29.190"],
- vec!["2020-09-08 12:42:29.190"],
- vec!["2020-09-08 11:42:29.190"],
+ "+---------------------------------+",
+ "| totimestampmillis(ts_micros.ts) |",
Review comment:
this column name is fascinating -- it seem like it should be `to_timestamp_millis(..)` but I'll let someone else file a ticket if it is important to them
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-951251404
> This looks like it is getting close... Would you like some help with this one @matthewmturner ?
@alamb Maybe im missing something but I still see a bunch of `assert_eq` tests so didnt think i was getting that close yet. Did you have something specific in mind?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner edited a comment on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner edited a comment on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-944478225
> optimizers.rs doesn't seem related?
@houqp
Sry, I see now. `optimizers.rs` wasnt supposed to be added here. It was from another PR. I'm removing.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] houqp commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
houqp commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-944432579
optimizers.rs doesn't seem related?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-951903085
❤️
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-951170105
This looks like it is getting close... Would you like some help with this one @matthewmturner ?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner commented on a change in pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner commented on a change in pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#discussion_r730036921
##########
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:
@alamb this test seems to be testing for milliseconds but the results dont have that much precision. should the test be updated to get to the appropriate precision? similar question for the microsecond test beneath this one.
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] matthewmturner removed a comment on pull request #1126: Update datafusion/tests/sql.rs tests to use assert_batches_eq
Posted by GitBox <gi...@apache.org>.
matthewmturner removed a comment on pull request #1126:
URL: https://github.com/apache/arrow-datafusion/pull/1126#issuecomment-944443952
> optimizers.rs doesn't seem related?
Are you saying to also include that as part of this PR?
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org