diff --git a/plugins/parquet/parquetembed.cpp b/plugins/parquet/parquetembed.cpp index f8c72646d43..a90e4e25c8a 100644 --- a/plugins/parquet/parquetembed.cpp +++ b/plugins/parquet/parquetembed.cpp @@ -169,8 +169,8 @@ arrow::Status ParquetHelper::openWriteFile() { StringBuffer filename; StringBuffer path; - splitFilename(destination.c_str(), nullptr, &path, &filename, nullptr, false); - Owned itr = createDirectoryIterator(path.str(), filename.append("*.parquet").str()); + splitFilename(destination.c_str(), nullptr, &path, &filename, &filename, false); + Owned itr = createDirectoryIterator(path.str(), filename.insert(filename.length() - 8, '*'), false, false); // We want to insert '*' before ".parquet" ForEach(*itr) {