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/10/26 14:50:48 UTC
[GitHub] [arrow-datafusion] crepererum opened a new pull request, #3970: fix: check recursion limit in `Expr::to_bytes`
crepererum opened a new pull request, #3970:
URL: https://github.com/apache/arrow-datafusion/pull/3970
# Which issue does this PR close?
Closes #3968.
# Rationale for this change
`Expr::to_bytes` can create outputs that `Expr::from_bytes` can no longer read.
# What changes are included in this PR?
Try to deserialize the data in `Expr::to_bytes` to catch invalid data early. This is a workaround until https://github.com/tokio-rs/prost/issues/736 is implemented.
# Are there any user-facing changes?
Expressions that are nested too deeply are now rejected to serialization already.
--
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] crepererum commented on a diff in pull request #3970: fix: check recursion limit in `Expr::to_bytes`
Posted by GitBox <gi...@apache.org>.
crepererum commented on code in PR #3970:
URL: https://github.com/apache/arrow-datafusion/pull/3970#discussion_r1005793121
##########
datafusion/proto/src/bytes/mod.rs:
##########
@@ -84,7 +87,45 @@ impl Serializeable for Expr {
DataFusionError::Plan(format!("Error encoding protobuf as bytes: {}", e))
})?;
- Ok(buffer.into())
+ let bytes: Bytes = buffer.into();
+
+ // the produced byte stream may lead to "recursion limit" errors, see
+ // https://github.com/apache/arrow-datafusion/issues/3968
+ // Until the underlying prost issue ( https://github.com/tokio-rs/prost/issues/736 ) is fixed, we try to
+ // deserialize the data here and check for errors.
+ //
+ // Need to provide some placeholder registry because the stream may contain UDFs
+ struct PlaceHolderRegistry;
+
+ impl FunctionRegistry for PlaceHolderRegistry {
Review Comment:
:see_no_evil:
--
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 #3970: fix: check recursion limit in `Expr::to_bytes`
Posted by GitBox <gi...@apache.org>.
alamb merged PR #3970:
URL: https://github.com/apache/arrow-datafusion/pull/3970
--
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 #3970: fix: check recursion limit in `Expr::to_bytes`
Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #3970:
URL: https://github.com/apache/arrow-datafusion/pull/3970#discussion_r1006155972
##########
datafusion/proto/src/bytes/mod.rs:
##########
@@ -84,7 +87,45 @@ impl Serializeable for Expr {
DataFusionError::Plan(format!("Error encoding protobuf as bytes: {}", e))
})?;
- Ok(buffer.into())
+ let bytes: Bytes = buffer.into();
+
+ // the produced byte stream may lead to "recursion limit" errors, see
+ // https://github.com/apache/arrow-datafusion/issues/3968
+ // Until the underlying prost issue ( https://github.com/tokio-rs/prost/issues/736 ) is fixed, we try to
+ // deserialize the data here and check for errors.
+ //
+ // Need to provide some placeholder registry because the stream may contain UDFs
+ struct PlaceHolderRegistry;
+
+ impl FunctionRegistry for PlaceHolderRegistry {
Review Comment:
I think the comments explain what is going on 👍
--
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 #3970: fix: check recursion limit in `Expr::to_bytes`
Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3970:
URL: https://github.com/apache/arrow-datafusion/pull/3970#issuecomment-1295063954
Benchmark runs are scheduled for baseline = 4ea970d1bda5bdcede31d41f5c4ba7f9a280c659 and contender = 366e6100f217893e96151032686cd015c20f9e23. 366e6100f217893e96151032686cd015c20f9e23 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/c05c7ac0483447fd8d5c5e4923023558...4b6979053fdf4dd8adc6f1bc0e125e0c/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/58cc1acbe26342d1ba4b03ff75b73443...fd82135d02694a7188584ac53d58292e/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/45770a83253c4ec9a6e9544764ac58c4...770e81a8054a4444b19db221463ddc03/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/6a3ac07e128e43aaa660a548a5580731...18cd2dbce76546358ebcb732accd1b43/)
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