You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2023/01/25 18:32:59 UTC
[GitHub] [arrow-datafusion] Dandandan opened a new pull request, #5066: Fix limit when size of batch to poll == skip/fetch value
Dandandan opened a new pull request, #5066:
URL: https://github.com/apache/arrow-datafusion/pull/5066
# Which issue does this PR close?
Closes #5064
# Rationale for this change
Bug fix. I found this when working with the Coralogix which pushes down limits to fully to the scan (so the batch size almost always equals the limit).
# 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.
-->
Change `<=` to `<` 🥳
# Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
# 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] Dandandan merged pull request #5066: Fix limit when size of batch to poll == skip/fetch value
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan merged PR #5066:
URL: https://github.com/apache/arrow-datafusion/pull/5066
--
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] Dandandan commented on a diff in pull request #5066: Fix limit when size of batch to poll == skip/fetch value
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on code in PR #5066:
URL: https://github.com/apache/arrow-datafusion/pull/5066#discussion_r1087037512
##########
datafusion/core/src/physical_plan/limit.rs:
##########
@@ -571,6 +572,36 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn limit_equals_batch_size() -> Result<()> {
+ let batches = vec![
+ test::make_partition(6),
+ test::make_partition(6),
+ test::make_partition(6),
+ ];
+ let input = test::exec::TestStream::new(batches);
+
+ let index = input.index();
+ assert_eq!(index.value(), 0);
+
+ // limit of six needs to consume the entire first record batch
+ // (6 rows) and stop immediately
+ let baseline_metrics = BaselineMetrics::new(&ExecutionPlanMetricsSet::new(), 0);
+ let limit_stream =
+ LimitStream::new(Box::pin(input), 0, Some(6), baseline_metrics);
+ assert_eq!(index.value(), 0);
+
+ let results = collect(Box::pin(limit_stream)).await.unwrap();
+ let num_rows: usize = results.into_iter().map(|b| b.num_rows()).sum();
+ // Only 6 rows should have been produced
+ assert_eq!(num_rows, 6);
+
+ // Only the first batch should be consumed
+ assert_eq!(index.value(), 1);
Review Comment:
This returns `2` on 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.
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 #5066: Fix limit when size of batch to poll == skip/fetch value
Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #5066:
URL: https://github.com/apache/arrow-datafusion/pull/5066#issuecomment-1404164175
Benchmark runs are scheduled for baseline = 4a33f2708fe8e30f5f9b062a097fc6155f2db2ce and contender = 5238e8c97f998b4d2cb9fab85fb182f325a1a7fb. 5238e8c97f998b4d2cb9fab85fb182f325a1a7fb 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/e6b25d9c1e0c4b76862d24f3331607ef...219a08c24e374a13822b6e2b4fb3f36d/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/5c416de1ba794b2fb996719c5afe0dd3...8a66b0d233bf4e9e81e3b7635ac97d1a/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/48bb2dd8766d48ef9b8f0e141ad1be43...7b259be4e3714fe8b2c39f8f2542b094/)
[Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/607b0cdabedc4278bf7881d00e1e5ef6...4ce6e4745f7c4d6aab8a6ff9efeda2af/)
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