pitrou commented on code in PR #39067:
URL: https://github.com/apache/arrow/pull/39067#discussion_r1506345458


##########
cpp/src/arrow/util/uri.cc:
##########
@@ -218,6 +215,9 @@ std::string Uri::path() const {
 std::string Uri::query_string() const { return 
TextRangeToString(impl_->uri_.query); }
 
 Result<std::vector<std::pair<std::string, std::string>>> Uri::query_items() 
const {
+  // XXX would it be worthwhile to fold this parsing into Uri::parse() or maybe
+  // cache these lazily in an unordered_map? Then we could provide
+  // Uri::query_item(std::string name)

Review Comment:
   > This doesn't preclude parsing them at construction time
   
   Why not. Hopefully there are no cases where parsing a URI is 
performance-critical.
   
   > Out of curiosity, which URIs don't use this format?
   
   Concretely, I don't know, but we cannot preclude this :-) The RFC does not 
mandate any particular syntax for the query component of a URI: 
https://datatracker.ietf.org/doc/html/rfc3986#section-3.4
   



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