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

Function GetFragmentScanOptions

cpp/src/arrow/dataset/dataset_internal.h:75–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73/// but of the wrong type, an error is returned.
74template <typename T>
75arrow::Result<std::shared_ptr<T>> GetFragmentScanOptions(
76 const std::string& type_name, const ScanOptions* scan_options,
77 const std::shared_ptr<FragmentScanOptions>& default_options) {
78 auto source = default_options;
79 if (scan_options && scan_options->fragment_scan_options) {
80 source = scan_options->fragment_scan_options;
81 }
82 if (!source) {
83 return std::make_shared<T>();
84 }
85 if (source->type_name() != type_name) {
86 return Status::Invalid("FragmentScanOptions of type ", source->type_name(),
87 " were provided for scanning a fragment of type ", type_name);
88 }
89 return ::arrow::internal::checked_pointer_cast<T>(source);
90}
91
92class FragmentDataset : public Dataset {
93 public:

Callers

nothing calls this directly

Calls 2

InvalidFunction · 0.50
type_nameMethod · 0.45

Tested by

no test coverage detected