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


##########
arrow-array/src/builder/primitive_dictionary_builder.rs:
##########
@@ -113,6 +113,18 @@ where
         }
     }
 
+    /// Creates a new `PrimitiveDictionaryBuilder` from the provided keys and 
values builders.
+    pub fn new_from_builders(
+        keys_builder: PrimitiveBuilder<K>,
+        values_builder: PrimitiveBuilder<V>,
+    ) -> Self {
+        Self {
+            keys_builder,
+            values_builder,
+            map: HashMap::new(),

Review Comment:
   What happens if keys_builder or values_builder are not empty? I think this 
would let you create an invalid dictionary?



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