You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/10 11:43:49 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3831: Make dictionary preservation optional in row encoding

tustvold commented on code in PR #3831:
URL: https://github.com/apache/arrow-rs/pull/3831#discussion_r1132271086


##########
arrow/benches/row_format.rs:
##########
@@ -57,42 +65,44 @@ fn do_bench(c: &mut Criterion, name: &str, cols: Vec<ArrayRef>) {
 
 fn row_bench(c: &mut Criterion) {
     let cols = vec![Arc::new(create_primitive_array::<UInt64Type>(4096, 0.)) as ArrayRef];
-    do_bench(c, "4096 u64(0)", cols);
+    do_bench(c, "4096 u64(0)", cols, true);
 
     let cols = vec![Arc::new(create_primitive_array::<Int64Type>(4096, 0.)) as ArrayRef];
-    do_bench(c, "4096 i64(0)", cols);
+    do_bench(c, "4096 i64(0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 10)) as ArrayRef];
-    do_bench(c, "4096 string(10, 0)", cols);
+    do_bench(c, "4096 string(10, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 30)) as ArrayRef];
-    do_bench(c, "4096 string(30, 0)", cols);
+    do_bench(c, "4096 string(30, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 100)) as ArrayRef];
-    do_bench(c, "4096 string(100, 0)", cols);
+    do_bench(c, "4096 string(100, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0.5, 100)) as ArrayRef];
-    do_bench(c, "4096 string(100, 0.5)", cols);
+    do_bench(c, "4096 string(100, 0.5)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 10)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(10, 0)", cols);
+    do_bench(c, "4096 string_dictionary(10, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 30)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(30, 0)", cols);
+    do_bench(c, "4096 string_dictionary(30, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 100)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(100, 0)", cols);
+    do_bench(c, "4096 string_dictionary(100, 0)", cols.clone(), true);
+    do_bench(c, "4096 string_dictionary_hydrate(100, 0)", cols, false);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0.5, 100)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(100, 0.5)", cols);
+    do_bench(c, "4096 string_dictionary(100, 0.5)", cols.clone(), true);
+    do_bench(c, "4096 string_dictionary_hydrate(100, 0.5)", cols, false);

Review Comment:
   Heh, I have a very bad reason why I did this... Formatting :laughing: 



##########
arrow/benches/row_format.rs:
##########
@@ -57,42 +65,44 @@ fn do_bench(c: &mut Criterion, name: &str, cols: Vec<ArrayRef>) {
 
 fn row_bench(c: &mut Criterion) {
     let cols = vec![Arc::new(create_primitive_array::<UInt64Type>(4096, 0.)) as ArrayRef];
-    do_bench(c, "4096 u64(0)", cols);
+    do_bench(c, "4096 u64(0)", cols, true);
 
     let cols = vec![Arc::new(create_primitive_array::<Int64Type>(4096, 0.)) as ArrayRef];
-    do_bench(c, "4096 i64(0)", cols);
+    do_bench(c, "4096 i64(0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 10)) as ArrayRef];
-    do_bench(c, "4096 string(10, 0)", cols);
+    do_bench(c, "4096 string(10, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 30)) as ArrayRef];
-    do_bench(c, "4096 string(30, 0)", cols);
+    do_bench(c, "4096 string(30, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0., 100)) as ArrayRef];
-    do_bench(c, "4096 string(100, 0)", cols);
+    do_bench(c, "4096 string(100, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_array_with_len::<i32>(4096, 0.5, 100)) as ArrayRef];
-    do_bench(c, "4096 string(100, 0.5)", cols);
+    do_bench(c, "4096 string(100, 0.5)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 10)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(10, 0)", cols);
+    do_bench(c, "4096 string_dictionary(10, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 30)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(30, 0)", cols);
+    do_bench(c, "4096 string_dictionary(30, 0)", cols, true);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0., 100)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(100, 0)", cols);
+    do_bench(c, "4096 string_dictionary(100, 0)", cols.clone(), true);
+    do_bench(c, "4096 string_dictionary_hydrate(100, 0)", cols, false);
 
     let cols =
         vec![Arc::new(create_string_dict_array::<Int32Type>(4096, 0.5, 100)) as ArrayRef];
-    do_bench(c, "4096 string_dictionary(100, 0.5)", cols);
+    do_bench(c, "4096 string_dictionary(100, 0.5)", cols.clone(), true);
+    do_bench(c, "4096 string_dictionary_hydrate(100, 0.5)", cols, false);

Review Comment:
   Heh, I have a very bad reason why I did this... Formatting :laughing: I'll work around it differently
   



-- 
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