Rafferty97 commented on code in PR #9546:
URL: https://github.com/apache/arrow-rs/pull/9546#discussion_r2930261866


##########
arrow-json/benches/json_reader.rs:
##########
@@ -323,13 +325,83 @@ fn bench_serialize_list(c: &mut Criterion) {
     });
 }
 
+fn bench_schema_inference(c: &mut Criterion) {
+    const ROWS: usize = 1000;
+
+    #[derive(Serialize, Arbitrary, Debug)]
+    struct Row {
+        a: Option<i16>,
+        b: Option<String>,
+        c: Option<[i16; 8]>,
+        d: Option<[bool; 8]>,
+        e: Option<Inner>,
+        f: f64,
+    }
+
+    #[derive(Serialize, Arbitrary, Debug)]
+    struct Inner {
+        a: Option<i16>,
+        b: Option<String>,
+        c: Option<bool>,
+    }
+
+    let mut data = vec![];
+    for row in pseudorandom_sequence::<Row>(ROWS) {

Review Comment:
   I did explore using seedable_rng, but I can't remember why I abandoned that 
approach. But I agree, better to use the established pattern and avoid an extra 
dependency. Since this is already merged, I'll create a follow up PR when I get 
the time that addresses this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to