MCPcopy Create free account
hub / github.com/apache/arrow / Inspect

Method Inspect

cpp/src/arrow/dataset/partition.cc:785–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783 std::string type_name() const override { return "hive"; }
784
785 Result<std::shared_ptr<Schema>> Inspect(
786 const std::vector<std::string>& paths) override {
787 auto options = options_.AsHivePartitioningOptions();
788 for (auto path : paths) {
789 for (auto&& segment : fs::internal::SplitAbstractPath(path)) {
790 ARROW_ASSIGN_OR_RAISE(auto maybe_key,
791 HivePartitioning::ParseKey(segment, options));
792 if (auto key = maybe_key) {
793 RETURN_NOT_OK(InsertRepr(key->name, key->value));
794 }
795 }
796 }
797
798 field_names_ = FieldNames();
799 return DoInspect();
800 }
801
802 Result<std::shared_ptr<Partitioning>> Finish(
803 const std::shared_ptr<Schema>& schema) const override {

Callers 1

GetOrInferSchemaMethod · 0.45

Calls 2

SplitAbstractPathFunction · 0.85

Tested by

no test coverage detected