repo string | pull_number int64 | instance_id string | issue_numbers sequence | base_commit string | patch string | test_patch string | problem_statement string | hints_text string | created_at timestamp[ns, tz=UTC] | version string | environment_setup_commit string | FAIL_TO_PASS sequence | PASS_TO_PASS sequence | FAIL_TO_FAIL sequence | PASS_TO_FAIL sequence | r_number int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tokio-rs/tokio | 5,772 | tokio-rs__tokio-5772 | [
"5756"
] | 7b24b22901f8fc89c1b5f7989d4c2482cd4f288a | diff --git a/tokio/src/runtime/context.rs b/tokio/src/runtime/context.rs
index 008686d3fd4..5943e9aa977 100644
--- a/tokio/src/runtime/context.rs
+++ b/tokio/src/runtime/context.rs
@@ -21,7 +21,6 @@ cfg_rt! {
use crate::runtime::{scheduler, task::Id};
- use std::cell::RefCell;
use std::task::Waker;
... | diff --git a/tokio/tests/rt_handle.rs b/tokio/tests/rt_handle.rs
new file mode 100644
index 00000000000..34c99cdaead
--- /dev/null
+++ b/tokio/tests/rt_handle.rs
@@ -0,0 +1,67 @@
+#![warn(rust_2018_idioms)]
+#![cfg(feature = "full")]
+
+use tokio::runtime::Runtime;
+
+#[test]
+fn basic_enter() {
+ let rt1 = rt();
+ ... | rt: interleaving multiple calls to `Handle::enter()` does not work
When calling `Handle::enter()` multiple times and dropping guards in an unexpected order, the "current runtime" is set incorrectly.
This is because the guard stores the previous state and updates the current runtime on drop.
### Repro:
```rust
... | @Darksonn Why do we check that `EnterGuard` is `Send` here? It would not be good for the guard to move threads...
Unfortunately, we can't deprecate the method. As far as I can see, the options are:
* panic if the guards are dropped out of order.
* Maintain a linked list of "previous" states. This could be intrusiv... | 2023-06-06T18:54:34 | 1.28 | 7b24b22901f8fc89c1b5f7989d4c2482cd4f288a | [
"interleave_enter_same_rt - should panic",
"interleave_enter_different_rt - should panic"
] | [
"basic_enter",
"interleave_then_enter"
] | [] | [] | null |
tokio-rs/tokio | 4,430 | tokio-rs__tokio-4430 | [
"4412",
"4412"
] | 257053e40b740f1d877116b5df728c42bc6e4df4 | diff --git a/tokio/src/runtime/task/harness.rs b/tokio/src/runtime/task/harness.rs
index 0996e5232db..530e6b13c54 100644
--- a/tokio/src/runtime/task/harness.rs
+++ b/tokio/src/runtime/task/harness.rs
@@ -165,8 +165,6 @@ where
}
pub(super) fn drop_join_handle_slow(self) {
- let mut maybe_panic = None... | diff --git a/tokio/tests/join_handle_panic.rs b/tokio/tests/join_handle_panic.rs
new file mode 100644
index 00000000000..f7de92d4178
--- /dev/null
+++ b/tokio/tests/join_handle_panic.rs
@@ -0,0 +1,20 @@
+#![warn(rust_2018_idioms)]
+#![cfg(feature = "full")]
+
+struct PanicsOnDrop;
+
+impl Drop for PanicsOnDrop {
+ f... | JoinHandle destructor should not panic when dropping output
In Tokio, panics are generally caught and not propagated to the user when dropping the `JoinHandle`, however when dropping the `JoinHandle` of a task that has already completed, that panic can propagate to the user who dropped the `JoinHandle`. That happens he... | 2022-01-27T21:11:37 | 1.15 | 257053e40b740f1d877116b5df728c42bc6e4df4 | [
"test_panics_do_not_propagate_when_dropping_join_handle"
] | [] | [] | [] | null | |
tokio-rs/tokio | 2,145 | tokio-rs__tokio-2145 | [
"1713"
] | f9ea576ccae5beffeaa2f2c48c2c0d2f9449673b | diff --git a/tokio/src/io/driver/mod.rs b/tokio/src/io/driver/mod.rs
index a36a40fa552..fcd1b3b4d62 100644
--- a/tokio/src/io/driver/mod.rs
+++ b/tokio/src/io/driver/mod.rs
@@ -198,7 +198,8 @@ impl Handle {
///
/// This function panics if there is no current reactor set.
pub(super) fn current() -> Self {... | diff --git a/tokio/tests/no_rt.rs b/tokio/tests/no_rt.rs
new file mode 100644
index 00000000000..962eed7952d
--- /dev/null
+++ b/tokio/tests/no_rt.rs
@@ -0,0 +1,27 @@
+use tokio::net::TcpStream;
+use tokio::sync::oneshot;
+use tokio::time::{timeout, Duration};
+
+use futures::executor::block_on;
+
+use std::net::TcpLis... | Improve panic messages when runtime is not running
The panic messages when the reactor or timer are not available should be improved to better explain what a user needs to do to fix them (originally reported at https://github.com/hyperium/hyper/issues/1995).
- Current timer panic: `timer error: timer is shutdown`
-... | 2020-01-21T16:06:17 | 0.2 | f0328f78103eb73df0f532b7e69eaca4b4fda6c7 | [
"panics_when_no_timer - should panic",
"panics_when_no_reactor - should panic"
] | [] | [] | [] | null | |
apache/arrow-rs | 4,351 | apache__arrow-rs-4351 | [
"4350"
] | 008cf9c27424d581a67ba97f338a22b6eace9cc1 | diff --git a/object_store/Cargo.toml b/object_store/Cargo.toml
index 28bf29f7f1e0..4002a1865fa6 100644
--- a/object_store/Cargo.toml
+++ b/object_store/Cargo.toml
@@ -75,3 +75,7 @@ tempfile = "3.1.0"
futures-test = "0.3"
rand = "0.8"
hyper = { version = "0.14.24", features = ["server"] }
+
+[[test]]
+name = "get_ran... | diff --git a/object_store/tests/get_range_file.rs b/object_store/tests/get_range_file.rs
new file mode 100644
index 000000000000..f926e3b07f2a
--- /dev/null
+++ b/object_store/tests/get_range_file.rs
@@ -0,0 +1,116 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreeme... | Default ObjectStore::get_range Doesn't Apply Range to GetResult::File
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
The default implementation of `ObjectStore::get_range` added in #4212 incorrectly handles if `GetResult::File` is returned, instead returning the entire byte rang... | 2023-06-02T16:36:39 | 40.0 | 008cf9c27424d581a67ba97f338a22b6eace9cc1 | [
"test_get_range"
] | [
"src/lib.rs - (line 154)",
"src/lib.rs - (line 53)",
"src/lib.rs - (line 178)",
"src/lib.rs - (line 106)",
"src/limit.rs - limit::LimitStore (line 39)",
"src/path/mod.rs - path::Path (line 123)",
"src/path/mod.rs - path::Path (line 102)",
"src/path/mod.rs - path::Path (line 112)"
] | [] | [] | null | |
apache/arrow-rs | 443 | apache__arrow-rs-443 | [
"349"
] | 0c0077697e55eb154dbfcf3127a3f39e63be2df8 | diff --git a/parquet/src/data_type.rs b/parquet/src/data_type.rs
index aa1def3db977..f97df3cdaf59 100644
--- a/parquet/src/data_type.rs
+++ b/parquet/src/data_type.rs
@@ -661,8 +661,15 @@ pub(crate) mod private {
_: &mut W,
bit_writer: &mut BitWriter,
) -> Result<()> {
+ if... | diff --git a/parquet/tests/boolean_writer.rs b/parquet/tests/boolean_writer.rs
new file mode 100644
index 000000000000..b9d757e71a8e
--- /dev/null
+++ b/parquet/tests/boolean_writer.rs
@@ -0,0 +1,100 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the N... | parquet reading hangs when row_group contains more than 2048 rows of data
**Describe the bug**
Reading an apparently valid parquet file (which can be read by java tools such as parquet-tools) from any rust program will hang. CPU load goes to 100%. Reproduced on both 4.0.0 and 4.1.0. rustc: 1.51.0
**To Reproduce**
... | Thanks for the report @garyanaplan !
yw.
Extra Info: It happens with debug or release builds and I reproduced it with 1.51.0 on a linux system.
I've also just encountered it. Common element with this reproduction is BOOLEAN field. It worked without BOOLEAN as well.
After quick investigation of the looping code, I... | 2021-06-10T13:13:10 | 0.3 | 4c7d4189e72901a78fb4f4250c11421241dd9e13 | [
"it_writes_data_without_hanging"
] | [
"parquet/src/compression.rs - compression (line 25) - compile",
"parquet/src/file/mod.rs - file (line 29) - compile",
"parquet/src/arrow/mod.rs - arrow (line 25) - compile",
"parquet/src/file/mod.rs - file (line 64) - compile",
"parquet/src/file/mod.rs - file (line 81) - compile",
"parquet/src/record/api.... | [] | [] | null |
apache/arrow-rs | 2,890 | apache__arrow-rs-2890 | [
"2889"
] | 17d1aade3572d1609cf6ed0e3db15f3d68511460 | diff --git a/parquet/Cargo.toml b/parquet/Cargo.toml
index 819f41bca32a..9c7da94f9dd7 100644
--- a/parquet/Cargo.toml
+++ b/parquet/Cargo.toml
@@ -81,6 +81,10 @@ experimental = []
# Enable async APIs
async = ["futures", "tokio"]
+[[test]]
+name = "arrow_writer_layout"
+required-features = ["arrow"]
+
[[bin]]
name... | diff --git a/parquet/tests/arrow_writer_layout.rs b/parquet/tests/arrow_writer_layout.rs
new file mode 100644
index 000000000000..40076add325a
--- /dev/null
+++ b/parquet/tests/arrow_writer_layout.rs
@@ -0,0 +1,472 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreeme... | Overly Pessimistic RLE Size Estimation
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
The size of RLE encoded data is routinely estimated as
```
RleEncoder::min_buffer_size(bit_width)
+ RleEncoder::max_buffer_size(bit_width, self.indices.len())
```
Where `Rl... | 2022-10-18T01:56:17 | 25.0 | a9f632c1bd04410c2528543d74151a91f78643cf | [
"test_primitive",
"test_string"
] | [
"parquet/src/file/mod.rs - file (line 64) - compile",
"parquet/src/record/api.rs - record::api::Row::get_column_iter (line 62) - compile",
"parquet/src/file/mod.rs - file (line 29) - compile",
"parquet/src/file/mod.rs - file (line 81) - compile",
"parquet/src/arrow/arrow_reader/mod.rs - arrow::arrow_reader:... | [] | [] | null | |
apache/arrow-rs | 3,222 | apache__arrow-rs-3222 | [
"3221"
] | 1a8e6ed957e483ec27b88fce54a48b8176be3179 | diff --git a/arrow-cast/src/cast.rs b/arrow-cast/src/cast.rs
index 23be8839593c..ad9f08388326 100644
--- a/arrow-cast/src/cast.rs
+++ b/arrow-cast/src/cast.rs
@@ -160,7 +160,7 @@ pub fn can_cast_types(from_type: &DataType, to_type: &DataType) -> bool {
| Time64(TimeUnit::Nanosecond)
| Timestam... | diff --git a/arrow/tests/array_cast.rs b/arrow/tests/array_cast.rs
new file mode 100644
index 000000000000..95fb973289a5
--- /dev/null
+++ b/arrow/tests/array_cast.rs
@@ -0,0 +1,407 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// dis... | bool should cast from/to Float16Type as `can_cast_types` returns true
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
`can_cast_types` returns true for casting between bool and Float16, but actually cast kernel doesn't cast them.
**To Reproduce**
<!--
Steps to reproduce the ... | 2022-11-29T08:03:42 | 28.0 | 26438feb7a59aa156563ed8c6e8b0e6579b2e028 | [
"test_can_cast_types"
] | [
"arrow/src/compute/kernels/aggregate.rs - compute::kernels::aggregate::max_boolean (line 90)",
"arrow/src/compute/kernels/aggregate.rs - compute::kernels::aggregate::min_boolean (line 65)",
"arrow/src/compute/kernels/boolean.rs - compute::kernels::boolean::is_not_null (line 435)",
"arrow/src/array/ord.rs - ar... | [] | [] | null | |
apache/arrow-rs | 3,188 | apache__arrow-rs-3188 | [
"3136"
] | fd08c31a2cd37342d261f67e999b2be2d5a4ba6b | diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 3ece06b29238..656e56a652ca 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -149,13 +149,13 @@ jobs:
virtualenv venv
source venv/bin/activate
pip install mat... | diff --git a/arrow/tests/pyarrow.rs b/arrow/tests/pyarrow.rs
new file mode 100644
index 000000000000..4b1226c738f5
--- /dev/null
+++ b/arrow/tests/pyarrow.rs
@@ -0,0 +1,42 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed w... | arrow to and from pyarrow conversion results in changes in schema
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
Converting a RecordBatch to pyarrow RecordBatch and converting it back to rust RecordBatch results in inconsistent schema.
**To Reproduce**
<!--
Steps to repr... | Yes, we may need pass the schema to the pyarrow's `from_arrays` in [to_pyarrow](https://github.com/apache/arrow-rs/blob/2460c7b5da2ba22c7fb0ef0df6ac84984e3aed12/arrow/src/pyarrow.rs#L200)
| 2022-11-25T04:08:06 | 28.0 | 26438feb7a59aa156563ed8c6e8b0e6579b2e028 | [
"test_to_pyarrow"
] | [
"arrow/src/compute/kernels/aggregate.rs - compute::kernels::aggregate::min_boolean (line 65)",
"arrow/src/compute/kernels/boolean.rs - compute::kernels::boolean::and (line 230)",
"arrow/src/compute/kernels/boolean.rs - compute::kernels::boolean::not (line 353)",
"arrow/src/compute/kernels/boolean.rs - compute... | [] | [] | null |
bitflags/bitflags | 268 | bitflags__bitflags-268 | [
"267"
] | 1aa25e1b3baf35d3d3840f12fe7e8b55adc0164a | diff --git a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -494,8 +494,7 @@ macro_rules! __impl_bitflags {
f.write_str(" | ")?;
}
first = false;
- f.write_str("0x")?;
- $crate::_core::fmt::LowerHex::f... | diff --git a/tests/compile-fail/trait/custom_impl.rs b/tests/compile-fail/trait/custom_impl.rs
--- a/tests/compile-fail/trait/custom_impl.rs
+++ b/tests/compile-fail/trait/custom_impl.rs
@@ -62,4 +62,4 @@ impl BitFlags for BootlegFlags {
}
}
-fn main() { }
+fn main() {}
diff --git a/tests/compile-pass/impls/co... | Bug: debug pretty-printing unknown flags display 0x0x
main.rs
```rust
use bitflags::bitflags;
bitflags! {
struct Flags: u8 {
const TWO = 0x2;
}
}
fn main() {
let value = 0b11;
let flags = unsafe { Flags::from_bits_unchecked(value) };
println!("{:?}", flags);
println!("---... | 2022-01-02T17:22:14 | 1.3 | 810dc35aba3df7314de01b93c7aa137968e925d4 | [
"tests/compile-pass/impls/fmt.rs",
"pass"
] | [
"tests::submodule::test_private",
"tests::test_assignment_operators",
"tests::test_binary",
"tests::test_bits",
"tests::test_const_fn",
"tests::test_contains",
"tests::test_debug",
"tests::test_default",
"tests::test_deprecated",
"tests::test_disjoint_intersects",
"tests::test_empty_bitflags",
... | [
"fail"
] | [] | null | |
rayon-rs/rayon | null | rayon-rs__rayon-986 | [
"985"
] | 2de810e97d5ce832ff98023a4a9cf215a86244ea | diff --git a/src/vec.rs b/src/vec.rs
index c9add813d..c804b0f33 100644
--- a/src/vec.rs
+++ b/src/vec.rs
@@ -151,22 +151,24 @@ impl<'data, T: Send> IndexedParallelIterator for Drain<'data, T> {
impl<'data, T: Send> Drop for Drain<'data, T> {
fn drop(&mut self) {
- if !self.range.is_empty() {
- ... | diff --git a/tests/drain_vec.rs b/tests/drain_vec.rs
new file mode 100644
index 000000000..08f1120b7
--- /dev/null
+++ b/tests/drain_vec.rs
@@ -0,0 +1,41 @@
+use rayon::prelude::*;
+
+#[test]
+fn drain_vec_yielded() {
+ let mut vec_org = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+
+ let yielded = vec_org.par_drain(0..5... | Bug in Drop for Drain<'data, T>
If you try:
```rust
use rayon::prelude::*;
fn main() {
let mut vec_org = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let yielded = vec_org.par_drain(5..5).into_par_iter().collect::<Vec<_>>();
println!("{:?}", vec_org);
}
```
it will print a little bit unexpected resu... | 2022-11-03T05:45:23 | 1.6 | b6cdc9da7adc7fe42b28758b2033f0bf8f8dc4b8 | [
"drain_vec_empty_range_yielded"
] | [
"iter::collect::test::only_left_result - should panic",
"iter::collect::test::produce_too_many_items - should panic",
"iter::collect::test::left_produces_fewer_items - should panic",
"iter::collect::test::left_produces_too_many_items - should panic",
"iter::collect::test::only_right_result - should panic",
... | [] | [] | 986 |
README.md exists but content is empty.
- Downloads last month
- 5