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 2020/12/29 07:08:38 UTC
[GitHub] [arrow] paveltiunov opened a new pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
paveltiunov opened a new pull request #9040:
URL: https://github.com/apache/arrow/pull/9040
`date_trunc` SQL function implementation and GROUP BY timestamp support.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-751983839
https://issues.apache.org/jira/browse/ARROW-11055
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] codecov-io edited a comment on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753431523
# [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=h1) Report
> Merging [#9040](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=desc) (f7b53f2) into [master](https://codecov.io/gh/apache/arrow/commit/cd22be6efedbf9832b5ea875ca59bb42de7b6c28?el=desc) (cd22be6) will **increase** coverage by `0.00%`.
> The diff coverage is `79.89%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9040/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9040 +/- ##
========================================
Coverage 82.55% 82.56%
========================================
Files 203 203
Lines 50043 50237 +194
========================================
+ Hits 41315 41476 +161
- Misses 8728 8761 +33
```
| [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [rust/datafusion/src/physical\_plan/group\_scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2dyb3VwX3NjYWxhci5ycw==) | `67.85% <0.00%> (-2.52%)` | :arrow_down: |
| [rust/datafusion/src/scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9zY2FsYXIucnM=) | `56.22% <0.00%> (-2.85%)` | :arrow_down: |
| [rust/arrow/src/csv/reader.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY3N2L3JlYWRlci5ycw==) | `93.15% <55.55%> (-1.34%)` | :arrow_down: |
| [...ust/datafusion/src/physical\_plan/hash\_aggregate.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfYWdncmVnYXRlLnJz) | `86.48% <60.00%> (-0.74%)` | :arrow_down: |
| [rust/datafusion/src/physical\_plan/hash\_join.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfam9pbi5ycw==) | `89.53% <66.66%> (-0.41%)` | :arrow_down: |
| [rust/datafusion/src/test/mod.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy90ZXN0L21vZC5ycw==) | `89.92% <75.00%> (-0.48%)` | :arrow_down: |
| [...tafusion/src/physical\_plan/datetime\_expressions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2RhdGV0aW1lX2V4cHJlc3Npb25zLnJz) | `92.60% <90.74%> (-1.66%)` | :arrow_down: |
| [rust/datafusion/src/execution/context.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9leGVjdXRpb24vY29udGV4dC5ycw==) | `89.20% <100.00%> (+0.36%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/functions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2Z1bmN0aW9ucy5ycw==) | `80.00% <100.00%> (+0.65%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/type\_coercion.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL3R5cGVfY29lcmNpb24ucnM=) | `98.54% <100.00%> (+0.01%)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=footer). Last update [cd22be6...f7b53f2](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] paveltiunov commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
paveltiunov commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753430934
Hey @jhorstmann ! Thanks for the review!
> * In postgres the argument order is the other way around [`date_trunc('week', timestamp)`](https://www.postgresql.org/docs/13/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC). I haven't compared with other databases, but following postgres makes sense to me most of the time :)
I've swapped arguments order. It's 50/50 among databases however agree Postgres order is a little bit more common.
> * A few unit tests, especially for the week truncation around the beginning/end of a year would be nice. Maybe the test input could be prepared using `to_timestamp` so the test is easier to review.
I've added some tests at the beginning of the year. Is it something you were looking for?
> * In most usages, the date part parameter would be a literal and it might be worthwhile to optimize for that. Doesn't fit that nicely into the current `BuiltinScalarFunction` infrastructure, so I'm fine with considering that as out of scope for now.
Yep. Agree it's out of scope for this PR.
@alamb I rebased it against the latest master.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] codecov-io commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753431523
# [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=h1) Report
> Merging [#9040](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=desc) (d12c12f) into [master](https://codecov.io/gh/apache/arrow/commit/cd22be6efedbf9832b5ea875ca59bb42de7b6c28?el=desc) (cd22be6) will **increase** coverage by `0.00%`.
> The diff coverage is `79.89%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9040/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9040 +/- ##
========================================
Coverage 82.55% 82.56%
========================================
Files 203 203
Lines 50043 50237 +194
========================================
+ Hits 41315 41476 +161
- Misses 8728 8761 +33
```
| [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [rust/datafusion/src/physical\_plan/group\_scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2dyb3VwX3NjYWxhci5ycw==) | `67.85% <0.00%> (-2.52%)` | :arrow_down: |
| [rust/datafusion/src/scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9zY2FsYXIucnM=) | `56.22% <0.00%> (-2.85%)` | :arrow_down: |
| [rust/arrow/src/csv/reader.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY3N2L3JlYWRlci5ycw==) | `93.15% <55.55%> (-1.34%)` | :arrow_down: |
| [...ust/datafusion/src/physical\_plan/hash\_aggregate.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfYWdncmVnYXRlLnJz) | `86.48% <60.00%> (-0.74%)` | :arrow_down: |
| [rust/datafusion/src/physical\_plan/hash\_join.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfam9pbi5ycw==) | `89.53% <66.66%> (-0.41%)` | :arrow_down: |
| [rust/datafusion/src/test/mod.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy90ZXN0L21vZC5ycw==) | `89.92% <75.00%> (-0.48%)` | :arrow_down: |
| [...tafusion/src/physical\_plan/datetime\_expressions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2RhdGV0aW1lX2V4cHJlc3Npb25zLnJz) | `92.60% <90.74%> (-1.66%)` | :arrow_down: |
| [rust/datafusion/src/execution/context.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9leGVjdXRpb24vY29udGV4dC5ycw==) | `89.20% <100.00%> (+0.36%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/functions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2Z1bmN0aW9ucy5ycw==) | `80.00% <100.00%> (+0.65%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/type\_coercion.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL3R5cGVfY29lcmNpb24ucnM=) | `98.54% <100.00%> (+0.01%)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=footer). Last update [cd22be6...14752fc](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] alamb commented on a change in pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#discussion_r550878395
##########
File path: rust/datafusion/src/physical_plan/datetime_expressions.rs
##########
@@ -205,6 +206,108 @@ pub fn to_timestamp(args: &[ArrayRef]) -> Result<TimestampNanosecondArray> {
Ok(TimestampNanosecondArray::from(Arc::new(data)))
}
+/// date_trunc SQL function
+pub fn date_trunc(args: &[ArrayRef]) -> Result<TimestampNanosecondArray> {
+ let granularity_array =
+ &args[0]
+ .as_any()
+ .downcast_ref::<StringArray>()
+ .ok_or_else(|| {
+ DataFusionError::Execution(
+ "Could not cast date_trunc granularity input to StringArray"
+ .to_string(),
+ )
+ })?;
+
+ let array = &args[1]
+ .as_any()
+ .downcast_ref::<TimestampNanosecondArray>()
+ .ok_or_else(|| {
+ DataFusionError::Execution(
+ "Could not cast date_trunc array input to TimestampNanosecondArray"
+ .to_string(),
+ )
+ })?;
+
+ let range = 0..array.len();
+ let result = range
+ .map(|i| {
+ if array.is_null(i) {
+ Ok(0_i64)
+ } else {
+ let date_time = match granularity_array.value(i) {
Review comment:
This list seems consistent with https://www.postgresql.org/docs/9.1/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC 👍 I think it is fine that we don't yeet support some of the more esoteric stuff (like milleniumm')
##########
File path: rust/datafusion/src/physical_plan/group_scalar.rs
##########
@@ -35,6 +35,8 @@ pub(crate) enum GroupByScalar {
Int32(i32),
Int64(i64),
Utf8(Box<String>),
+ TimeMicrosecond(i64),
+ TimeNanosecond(i64),
Review comment:
👍
##########
File path: rust/datafusion/src/physical_plan/datetime_expressions.rs
##########
@@ -378,6 +481,64 @@ mod tests {
Ok(())
}
+ #[test]
+ fn date_trunc_test() -> Result<()> {
+ let mut ts_builder = StringBuilder::new(2);
+ let mut truncated_builder = StringBuilder::new(2);
+ let mut string_builder = StringBuilder::new(2);
+
+ ts_builder.append_null()?;
+ truncated_builder.append_null()?;
+ string_builder.append_value("second")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-08T13:42:29.000000Z")?;
+ string_builder.append_value("second")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-08T13:42:00.000000Z")?;
+ string_builder.append_value("minute")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-08T13:00:00.000000Z")?;
+ string_builder.append_value("hour")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-08T00:00:00.000000Z")?;
+ string_builder.append_value("day")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-07T00:00:00.000000Z")?;
+ string_builder.append_value("week")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-09-01T00:00:00.000000Z")?;
+ string_builder.append_value("month")?;
+
+ ts_builder.append_value("2020-09-08T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-01-01T00:00:00.000000Z")?;
+ string_builder.append_value("year")?;
+
+ ts_builder.append_value("2021-01-01T13:42:29.190855Z")?;
+ truncated_builder.append_value("2020-12-28T00:00:00.000000Z")?;
+ string_builder.append_value("week")?;
+
+ ts_builder.append_value("2020-01-01T13:42:29.190855Z")?;
+ truncated_builder.append_value("2019-12-30T00:00:00.000000Z")?;
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] jhorstmann commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
jhorstmann commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-752424442
Cool! A few small comments:
- In postgres the argument order is the other way around [`date_trunc('week', timestamp)`][1]. I haven't compared with other databases, but following postgres makes sense to me most of the time :)
- A few unit tests, especially for the week truncation around the beginning/end of a year would be nice. Maybe the test input could be prepared using `to_timestamp` so the test is easier to review.
- In most usages, the date part parameter would be a literal and it might be worthwhile to optimize for that. Doesn't fit that nicely into the current `BuiltinScalarFunction` infrastructure, so I'm fine with considering that as out of scope for now.
[1]: https://www.postgresql.org/docs/13/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] codecov-io edited a comment on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753431523
# [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=h1) Report
> Merging [#9040](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=desc) (14752fc) into [master](https://codecov.io/gh/apache/arrow/commit/cd22be6efedbf9832b5ea875ca59bb42de7b6c28?el=desc) (cd22be6) will **decrease** coverage by `0.00%`.
> The diff coverage is `79.89%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9040/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9040 +/- ##
==========================================
- Coverage 82.55% 82.55% -0.01%
==========================================
Files 203 203
Lines 50043 50237 +194
==========================================
+ Hits 41315 41475 +160
- Misses 8728 8762 +34
```
| [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [rust/datafusion/src/physical\_plan/group\_scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2dyb3VwX3NjYWxhci5ycw==) | `67.85% <0.00%> (-2.52%)` | :arrow_down: |
| [rust/datafusion/src/scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9zY2FsYXIucnM=) | `56.22% <0.00%> (-2.85%)` | :arrow_down: |
| [rust/arrow/src/csv/reader.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY3N2L3JlYWRlci5ycw==) | `93.15% <55.55%> (-1.34%)` | :arrow_down: |
| [...ust/datafusion/src/physical\_plan/hash\_aggregate.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfYWdncmVnYXRlLnJz) | `86.48% <60.00%> (-0.74%)` | :arrow_down: |
| [rust/datafusion/src/physical\_plan/hash\_join.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfam9pbi5ycw==) | `89.53% <66.66%> (-0.41%)` | :arrow_down: |
| [rust/datafusion/src/test/mod.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy90ZXN0L21vZC5ycw==) | `89.92% <75.00%> (-0.48%)` | :arrow_down: |
| [...tafusion/src/physical\_plan/datetime\_expressions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2RhdGV0aW1lX2V4cHJlc3Npb25zLnJz) | `92.60% <90.74%> (-1.66%)` | :arrow_down: |
| [rust/datafusion/src/execution/context.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9leGVjdXRpb24vY29udGV4dC5ycw==) | `89.20% <100.00%> (+0.36%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/functions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2Z1bmN0aW9ucy5ycw==) | `80.00% <100.00%> (+0.65%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/type\_coercion.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL3R5cGVfY29lcmNpb24ucnM=) | `98.54% <100.00%> (+0.01%)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=footer). Last update [cd22be6...14752fc](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] codecov-io edited a comment on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753431523
# [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=h1) Report
> Merging [#9040](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=desc) (7a1a618) into [master](https://codecov.io/gh/apache/arrow/commit/399245678c1be5d7f45fb350cb09baa36a35797b?el=desc) (3992456) will **increase** coverage by `0.00%`.
> The diff coverage is `79.89%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9040/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9040 +/- ##
========================================
Coverage 82.56% 82.56%
========================================
Files 203 203
Lines 50042 50236 +194
========================================
+ Hits 41315 41476 +161
- Misses 8727 8760 +33
```
| [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [rust/datafusion/src/physical\_plan/group\_scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2dyb3VwX3NjYWxhci5ycw==) | `67.85% <0.00%> (-2.52%)` | :arrow_down: |
| [rust/datafusion/src/scalar.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9zY2FsYXIucnM=) | `56.17% <0.00%> (-2.83%)` | :arrow_down: |
| [rust/arrow/src/csv/reader.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9hcnJvdy9zcmMvY3N2L3JlYWRlci5ycw==) | `93.15% <55.55%> (-1.34%)` | :arrow_down: |
| [...ust/datafusion/src/physical\_plan/hash\_aggregate.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfYWdncmVnYXRlLnJz) | `86.48% <60.00%> (-0.74%)` | :arrow_down: |
| [rust/datafusion/src/physical\_plan/hash\_join.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2hhc2hfam9pbi5ycw==) | `89.53% <66.66%> (-0.41%)` | :arrow_down: |
| [rust/datafusion/src/test/mod.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy90ZXN0L21vZC5ycw==) | `89.92% <75.00%> (-0.48%)` | :arrow_down: |
| [...tafusion/src/physical\_plan/datetime\_expressions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2RhdGV0aW1lX2V4cHJlc3Npb25zLnJz) | `92.60% <90.74%> (-1.66%)` | :arrow_down: |
| [rust/datafusion/src/execution/context.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9leGVjdXRpb24vY29udGV4dC5ycw==) | `89.20% <100.00%> (+0.36%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/functions.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL2Z1bmN0aW9ucy5ycw==) | `80.00% <100.00%> (+0.65%)` | :arrow_up: |
| [rust/datafusion/src/physical\_plan/type\_coercion.rs](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL3R5cGVfY29lcmNpb24ucnM=) | `98.54% <100.00%> (+0.01%)` | :arrow_up: |
| ... and [1 more](https://codecov.io/gh/apache/arrow/pull/9040/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=footer). Last update [3992456...7a1a618](https://codecov.io/gh/apache/arrow/pull/9040?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] alamb commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-752956345
The full set of Rust CI tests did not run on this PR :(
Can you please rebase this PR against [apache/master](https://github.com/apache/arrow) to pick up the changes in https://github.com/apache/arrow/pull/9056 so that they do?
I apologize for the inconvenience.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] alamb closed pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
alamb closed pull request #9040:
URL: https://github.com/apache/arrow/pull/9040
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] paveltiunov commented on pull request #9040: ARROW-11055: [Rust] [DataFusion] Support date_trunc function
Posted by GitBox <gi...@apache.org>.
paveltiunov commented on pull request #9040:
URL: https://github.com/apache/arrow/pull/9040#issuecomment-753521462
@alamb Gotcha. I actually added SQL test however it went to `context.rs`. I saw `sql.rs` test and I wasn't sure what's the best place for these integration tests. It makes sense to move it there. Good to know. Thanks!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org