From 89e1c2fd68c18e018f5afb7ef81b3454abb46dfc Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Fri, 11 Oct 2024 23:28:24 +0200 Subject: [PATCH] Handle empty patterns --- chsql/src/parquet_ordered_scan.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chsql/src/parquet_ordered_scan.cpp b/chsql/src/parquet_ordered_scan.cpp index be3c617..88585c4 100644 --- a/chsql/src/parquet_ordered_scan.cpp +++ b/chsql/src/parquet_ordered_scan.cpp @@ -101,6 +101,9 @@ namespace duckdb { while (fileList.Scan(it, filename)) { unglobbedFileList.push_back(filename); } + if (unglobbedFileList.empty()) { + throw duckdb::InvalidInputException("No files matched the provided pattern."); + } res->orderBy = input.inputs[1].GetValue(); for (auto & file : unglobbedFileList) {