| 250 | } |
| 251 | |
| 252 | Result<compute::Expression> KeyValuePartitioning::Parse(const std::string& path) const { |
| 253 | std::vector<compute::Expression> expressions; |
| 254 | |
| 255 | ARROW_ASSIGN_OR_RAISE(auto parsed, ParseKeys(path)); |
| 256 | for (const Key& key : parsed) { |
| 257 | ARROW_ASSIGN_OR_RAISE(auto expr, ConvertKey(key)); |
| 258 | if (expr == compute::literal(true)) continue; |
| 259 | expressions.push_back(std::move(expr)); |
| 260 | } |
| 261 | |
| 262 | return and_(std::move(expressions)); |
| 263 | } |
| 264 | |
| 265 | Result<PartitionPathFormat> KeyValuePartitioning::Format( |
| 266 | const compute::Expression& expr) const { |