alamb commented on code in PR #9104:
URL: https://github.com/apache/arrow-datafusion/pull/9104#discussion_r1477077964


##########
datafusion/common/src/dfschema.rs:
##########
@@ -112,6 +112,10 @@ pub struct DFSchema {
     metadata: HashMap<String, String>,
     /// Stores functional dependencies in the schema.
     functional_dependencies: FunctionalDependencies,
+    /// Fields map
+    /// key - fully qualified field name
+    /// value - field index in schema
+    fields_map: BTreeMap<String, usize>,

Review Comment:
   String is rust is totally owned (and thus copies bytes around)
   
   You need to have something like `Arc<str>` to have Java like semantics where 
the copies just move refcounts around
   
   Maybe we can adust the underlying storage to Arc<str> somehow 🤔 



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