Lazily expanded MultiFileList.
More...
|
| | LazyMultiFileList (optional_ptr< ClientContext > context) |
| vector< OpenFileInfo > | GetAllFiles () const override |
| FileExpandResult | GetExpandResult () const override |
| idx_t | GetTotalFileCount () const override |
| | Get the total file count - forces all files to be expanded / known so the exact count can be computed.
|
| MultiFileCount | GetFileCount (idx_t min_exact_count=0) const override |
| MultiFileListIterationHelper | Files () const |
| | Get Iterator over the files for pretty for loops.
|
| void | InitializeScan (MultiFileListScanData &iterator) const |
| | Initialize a sequential scan over a file list.
|
| bool | Scan (MultiFileListScanData &iterator, OpenFileInfo &result_file) const |
| | Scan the next file into result_file, returns false when out of files.
|
| OpenFileInfo | GetFirstFile () const |
| | Returns the first file or an empty string if GetTotalFileCount() == 0.
|
| bool | IsEmpty () const |
| | Syntactic sugar for GetExpandResult() == FileExpandResult::NO_FILES.
|
| virtual unique_ptr< MultiFileList > | ComplexFilterPushdown (ClientContext &context, const MultiFileOptions &options, MultiFilePushdownInfo &info, vector< unique_ptr< Expression > > &filters) const |
| | Virtual functions for subclasses.
|
| virtual unique_ptr< MultiFileList > | DynamicFilterPushdown (ClientContext &context, const MultiFileOptions &options, const vector< string > &names, const vector< LogicalType > &types, const vector< column_t > &column_ids, TableFilterSet &filters) const |
| virtual vector< OpenFileInfo > | GetDisplayFileList (optional_idx max_files=optional_idx()) const |
| virtual unique_ptr< NodeStatistics > | GetCardinality (ClientContext &context) const |
| virtual unique_ptr< MultiFileList > | Copy () const |
| template<class TARGET> |
| TARGET & | Cast () |
| template<class TARGET> |
| const TARGET & | Cast () const |
|
| bool | FileIsAvailable (idx_t i) const override |
| | Whether or not the file at the index is available instantly - or if this requires additional I/O.
|
| OpenFileInfo | GetFile (idx_t i) const override |
| | Get the i-th expanded file.
|
| virtual bool | ExpandNextPath () const =0 |
| | Grabs the next path and expands it into Expanded paths: returns false if no more files to expand.
|
Lazily expanded MultiFileList.
◆ LazyMultiFileList()
83996 : context(context_p) {
83997}
◆ GetAllFiles()
Implements duckdb::MultiFileList.
83999 {
84000 lock_guard<mutex> lck(lock);
84001 while (ExpandNextPathInternal()) {
84002 }
84004}
vector< OpenFileInfo > expanded_files
The expanded files.
Definition duckdb.cpp:53855
◆ GetExpandResult()
| FileExpandResult duckdb::LazyMultiFileList::GetExpandResult |
( |
| ) |
const |
|
overridevirtual |
Implements duckdb::MultiFileList.
84022 {
84023
84025
84026 lock_guard<mutex> lck(lock);
84028 return FileExpandResult::MULTIPLE_FILES;
84030 return FileExpandResult::SINGLE_FILE;
84031 }
84032 return FileExpandResult::NO_FILES;
84033}
OpenFileInfo GetFile(idx_t i) const override
Get the i-th expanded file.
Definition duckdb.cpp:84040
◆ GetTotalFileCount()
| idx_t duckdb::LazyMultiFileList::GetTotalFileCount |
( |
| ) |
const |
|
overridevirtual |
Get the total file count - forces all files to be expanded / known so the exact count can be computed.
Implements duckdb::MultiFileList.
84006 {
84007 lock_guard<mutex> lck(lock);
84008 while (ExpandNextPathInternal()) {
84009 }
84011}
◆ GetFileCount()
Get the file count - anything under "min_exact_count" is allowed to be incomplete (i.e. NOT_ALL_FILES_KNOWN) This allows us to get a rough idea of the file count
Reimplemented from duckdb::MultiFileList.
84013 {
84014 lock_guard<mutex> lck(lock);
84015
84017 }
84018 auto type =
all_files_expanded ? FileExpansionType::ALL_FILES_EXPANDED : FileExpansionType::NOT_ALL_FILES_KNOWN;
84020}
bool all_files_expanded
Whether or not all files have been expanded.
Definition duckdb.cpp:53857
◆ FileIsAvailable()
| bool duckdb::LazyMultiFileList::FileIsAvailable |
( |
idx_t | i | ) |
const |
|
overrideprotectedvirtual |
Whether or not the file at the index is available instantly - or if this requires additional I/O.
Reimplemented from duckdb::MultiFileList.
84035 {
84036 lock_guard<mutex> lck(lock);
84038}
◆ GetFile()
Get the i-th expanded file.
Implements duckdb::MultiFileList.
84040 {
84041 lock_guard<mutex> lck(lock);
84043 if (!ExpandNextPathInternal()) {
84044 return OpenFileInfo("");
84045 }
84046 }
84049}
◆ ExpandNextPath()
| virtual bool duckdb::LazyMultiFileList::ExpandNextPath |
( |
| ) |
const |
|
protectedpure virtual |
◆ ExpandNextPathInternal()
| bool duckdb::LazyMultiFileList::ExpandNextPathInternal |
( |
| ) |
const |
|
private |
84051 {
84053 return false;
84054 }
84055 if (context && context->interrupted) {
84056 throw InterruptException();
84057 }
84060 return false;
84061 }
84062 return true;
84063}
virtual bool ExpandNextPath() const =0
Grabs the next path and expands it into Expanded paths: returns false if no more files to expand.
The documentation for this class was generated from the following file: