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 2022/09/14 18:14:54 UTC
[GitHub] [arrow-datafusion] alamb opened a new pull request, #3483: Upgrade to arrow 23.0.0 (WIP)
alamb opened a new pull request, #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483
# Which issue does this PR close?
re https://github.com/apache/arrow-rs/issues/2665
# Rationale for this change
I am putting up this PR so I can incrementally test the effect on DataFusion of splitting up the arrow crate in PRs such as https://github.com/apache/arrow-rs/pull/2693
Hopefully we can use it to actually upgrade to arrow 23.0.0 when it is released as well
# What changes are included in this PR?
Update to pre-release version of arrow 23.0.0
# Are there any user-facing changes?
No
--
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 diff in pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#discussion_r972011710
##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -24,7 +24,7 @@ use std::{any::Any, sync::Arc};
use arrow::array::*;
use arrow::compute::kernels::arithmetic::{
- add, add_scalar, divide, divide_scalar, modulus, modulus_scalar, multiply,
+ add, add_scalar, divide_opt, divide_scalar, modulus, modulus_scalar, multiply,
Review Comment:
default `divide` kernel changed behavior -- `divide_opt` now has the "NULL on divide by zero" behavior datafusion expects
##########
datafusion/physical-expr/src/expressions/binary/kernels_arrow.rs:
##########
@@ -372,14 +372,18 @@ pub(crate) fn multiply_decimal_scalar(
Ok(array)
}
-pub(crate) fn divide_decimal(
+pub(crate) fn divide_opt_decimal(
Review Comment:
renamed to be consistent with the arrow rename
--
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 #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#issuecomment-1248115223
> It will actually be https://github.com/apache/arrow-rs/pull/2643 which changed the unchecked divide kernels to panic on divide by zero - https://github.com/apache/arrow-rs/issues/2647
Thanks @tustvold -- great hint -- fixed in https://github.com/apache/arrow-datafusion/pull/3483/commits/0493aa1855ba0529552f855da21350e7d9fb0d47
--
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 diff in pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#discussion_r973298621
##########
datafusion/core/src/physical_plan/file_format/mod.rs:
##########
@@ -286,8 +286,7 @@ impl SchemaAdapter {
let projected_schema = Arc::new(self.table_schema.clone().project(projections)?);
// Necessary to handle empty batches
- let mut options = RecordBatchOptions::default();
- options.row_count = Some(batch.num_rows());
+ let options = RecordBatchOptions::new().with_row_count(Some(batch.num_rows()));
Review Comment:
Update to use the nice API @askoa added in https://github.com/apache/arrow-rs/pull/2729
--
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 diff in pull request #3483: Upgrade to arrow 23.0.0
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#discussion_r974709788
##########
datafusion/physical-expr/src/expressions/binary/kernels_arrow.rs:
##########
@@ -372,14 +372,18 @@ pub(crate) fn multiply_decimal_scalar(
Ok(array)
}
-pub(crate) fn divide_decimal(
+pub(crate) fn divide_opt_decimal(
left: &Decimal128Array,
right: &Decimal128Array,
) -> Result<Decimal128Array> {
let mul = 10_f64.powi(left.scale() as i32);
let array = arith_decimal(left, right, |left, right| {
let l_value = left as f64;
let r_value = right as f64;
+ // TODO: Since this uses f64 division, divide by zero and then casting to i128
+ // gives a nasty asnwer:
+ // 170141183460469231731687303715884105727
+ //https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b5949eb324d9828a802aa11b4fa9d029
Review Comment:
This has subsequently been fixed https://github.com/apache/arrow-datafusion/issues/3498 (thanks @kmitchener !)
--
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 diff in pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#discussion_r972010178
##########
datafusion/physical-expr/src/expressions/binary/kernels_arrow.rs:
##########
@@ -372,14 +372,18 @@ pub(crate) fn multiply_decimal_scalar(
Ok(array)
}
-pub(crate) fn divide_decimal(
+pub(crate) fn divide_opt_decimal(
left: &Decimal128Array,
right: &Decimal128Array,
) -> Result<Decimal128Array> {
let mul = 10_f64.powi(left.scale() as i32);
let array = arith_decimal(left, right, |left, right| {
let l_value = left as f64;
let r_value = right as f64;
+ // TODO: Since this uses f64 division, divide by zero and then casting to i128
+ // gives a nasty asnwer:
+ // 170141183460469231731687303715884105727
+ //https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b5949eb324d9828a802aa11b4fa9d029
Review Comment:
```suggestion
// casting to i128 doesn't work well when result is NaN
// https://github.com/apache/arrow-datafusion/issues/3498
```
--
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 #3483: Upgrade to arrow 23.0.0
Posted by GitBox <gi...@apache.org>.
alamb merged PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483
--
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] ursabot commented on pull request #3483: Upgrade to arrow 23.0.0
Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#issuecomment-1252124183
Benchmark runs are scheduled for baseline = e87342310e20b58ae2de2bb7cd0942dce089092e and contender = 67002a06039523e1356a5c91894b1387b021bbf7. 67002a06039523e1356a5c91894b1387b021bbf7 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/6bbff7603e3b45129a9348377c1b7dd0...6012f0d1c2c54e43a2ebfaac3bb35bd8/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/92538c00ecef4f0d92136ae6cee32cc1...fa24650f622149f4a1858dc907ed7a41/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/4c51a108609544bdbbe66141841a6eeb...4d87dbbd40564360a27fe6c7735f8a79/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/d54a1ff040ef4eafb8217a70ec3eaff2...08b90db0b2ee46b28be7ee1a3488453c/)
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
--
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] codecov-commenter commented on pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#issuecomment-1249344529
# [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/3483?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3483](https://codecov.io/gh/apache/arrow-datafusion/pull/3483?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b935cc5) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/6ffda6885c7acbbddeb5d336116b035f9a9fa30b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6ffda68) will **increase** coverage by `0.00%`.
> The diff coverage is `80.00%`.
```diff
@@ Coverage Diff @@
## master #3483 +/- ##
=======================================
Coverage 85.75% 85.75%
=======================================
Files 299 299
Lines 55289 55307 +18
=======================================
+ Hits 47415 47431 +16
- Misses 7874 7876 +2
```
| [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/3483?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...usion/core/src/avro\_to\_arrow/arrow\_array\_reader.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3NyYy9hdnJvX3RvX2Fycm93L2Fycm93X2FycmF5X3JlYWRlci5ycw==) | `0.00% <0.00%> (ø)` | |
| [datafusion/physical-expr/src/expressions/binary.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1leHByL3NyYy9leHByZXNzaW9ucy9iaW5hcnkucnM=) | `97.63% <100.00%> (-0.01%)` | :arrow_down: |
| [...sical-expr/src/expressions/binary/kernels\_arrow.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1leHByL3NyYy9leHByZXNzaW9ucy9iaW5hcnkva2VybmVsc19hcnJvdy5ycw==) | `94.02% <100.00%> (ø)` | |
| [datafusion/core/src/config.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3NyYy9jb25maWcucnM=) | `89.65% <0.00%> (-4.10%)` | :arrow_down: |
| [datafusion/expr/src/logical\_plan/plan.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9sb2dpY2FsX3BsYW4vcGxhbi5ycw==) | `77.85% <0.00%> (ø)` | |
| [datafusion/sql/src/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcWwvc3JjL3BsYW5uZXIucnM=) | `80.97% <0.00%> (+0.02%)` | :arrow_up: |
| [datafusion/core/tests/sql/information\_schema.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3483/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9pbmZvcm1hdGlvbl9zY2hlbWEucnM=) | `98.76% <0.00%> (+0.06%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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] tustvold commented on pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
tustvold commented on PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#issuecomment-1247930321
It will actually be https://github.com/apache/arrow-rs/pull/2643 which changed the unchecked divide kernels to panic on divide by zero - https://github.com/apache/arrow-rs/issues/2647
--
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 #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#issuecomment-1247921162
The failure in the `test` job https://github.com/apache/arrow-datafusion/actions/runs/3055080369/jobs/4927734152 appears to be real:
```
failures:
---- sql::expr::csv_query_nullif_divide_by_0 stdout ----
thread 'sql::expr::csv_query_nullif_divide_by_0' panicked at 'attempt to subtract with overflow', C:\Users\runneradmin\.cargo\git\checkouts\arrow-rs-3b86e19e889d5acc\5146663\arrow\src\compute\kernels\arity.rs:198:18
```
Looks related to some changes to the arity kernels -- specifically the code that is panic'ing seems to have been changed in https://github.com/apache/arrow-rs/pull/2666 by @tustvold . I am not sure if DataFusion is passing bad input or if there is some corner case in arrow that is hit.
I plan to look into it later today if no one else beat me to it.
--
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 diff in pull request #3483: Upgrade to arrow 23.0.0 (WIP)
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3483:
URL: https://github.com/apache/arrow-datafusion/pull/3483#discussion_r973299714
##########
dev/update_arrow_deps.py:
##########
@@ -88,8 +88,20 @@ def update_version_cargo_toml(cargo_toml, new_version):
for section in ("dependencies", "dev-dependencies"):
for (dep_name, constraint) in doc.get(section, {}).items():
- if dep_name in ("arrow", "parquet", "arrow-flight") and constraint.get("version") is not None:
- doc[section][dep_name]["version"] = new_version
+ if dep_name in ("arrow", "parquet", "arrow-flight"):
+ if type(constraint) == tomlkit.items.String:
Review Comment:
This is code I wrote in IOx in https://github.com/influxdata/influxdb_iox/blob/main/scripts/update_arrow_deps.py
Basically the previous version didn't handle `arrow = "22.0.0"` type toml
--
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