alamb opened a new issue, #1882:
URL: https://github.com/apache/arrow-rs/issues/1882

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   We are using the [indexmap](https://crates.io/crates/indexmap) for a 
relatively small usecase in the json reader to preserve iteration order
   
   
   This version isn't keeping up with dependencies (ses discussion on  
https://github.com/apache/arrow-rs/pull/1861#discussion_r895649049)
   
   
   **Describe the solution you'd like**
   I would like to remove the use of `indexmap` entirely and streamline the 
arrow dependency chain
   
   Fascinatingly when I apply the following diff all the tests pass (though I 
don't think it is entirely correct as  `BTreeSet` and `BTreeMap` do not 
actually preserve the insert order) so there is clearly a gap in test coverage 
too
   
   
   ```diff
   diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml
   index b59a697538..e0008abde4 100644
   --- a/arrow/Cargo.toml
   +++ b/arrow/Cargo.toml
   @@ -41,7 +41,6 @@ bench = false
    serde = { version = "1.0", default-features = false }
    serde_derive = { version = "1.0", default-features = false }
    serde_json = { version = "1.0", default-features = false, features = 
["preserve_order"] }
   -indexmap = { version = "1.6", default-features = false, features = ["std"] }
    rand = { version = "0.8", default-features = false, features =  ["std", 
"std_rng"], optional = true }
    num = { version = "0.4", default-features = false, features = ["std"] }
    half = { version = "1.8", default-features = false }
   diff --git a/arrow/src/json/reader.rs b/arrow/src/json/reader.rs
   index e1fa54f8a6..f7384c7e5b 100644
   --- a/arrow/src/json/reader.rs
   +++ b/arrow/src/json/reader.rs
   @@ -50,8 +50,8 @@
    use std::io::{BufRead, BufReader, Read, Seek, SeekFrom};
    use std::sync::Arc;
    
   -use indexmap::map::IndexMap as HashMap;
   -use indexmap::set::IndexSet as HashSet;
   +use std::collections::BTreeMap as HashMap;
   +use std::collections::BTreeSet as HashSet;
    use serde_json::json;
    use serde_json::{map::Map as JsonMap, Value};
    
   ```
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   This code and dependency appears to have come in originally via 
8ef1fb8745635369be815304180de833c31de870 / 
https://github.com/apache/arrow/pull/3702 from(@nevi-me)
   


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