bkietz commented on code in PR #39067:
URL: https://github.com/apache/arrow/pull/39067#discussion_r1506319640
##########
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:
For URIs which do not use this format, query_items will always return
Status::Invalid. This doesn't preclude parsing them at construction time; the
data member would be `optional<unordered_map<string, string>> query_item_map_;`
where `nullopt` indicates that the query string didn't have key=value format.
Out of curiosity, which URIs don't use this format?
--
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]