Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix extension load error message grammar #11994

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/extension/extension_load.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "duckdb/common/dl.hpp"
#include "duckdb/common/virtual_file_system.hpp"
#include "duckdb/main/extension_helper.hpp"
#include "duckdb/main/error_manager.hpp"
#include "duckdb/main/extension_helper.hpp"
#include "mbedtls_wrapper.hpp"

#ifndef DUCKDB_NO_THREADS
Expand Down Expand Up @@ -165,7 +165,7 @@ bool ExtensionHelper::TryInitialLoad(DBConfig &config, FileSystem &fs, const str

if (file_size < 1024) {
throw InvalidInputException(
"Extension \"%s\" do not have metadata compatible with DuckDB loading it "
"Extension \"%s\" does not have metadata compatible with the DuckDB loading it "
"(version %s, platform %s). File size in particular is lower than minimum threshold of 1024",
filename, engine_version, engine_platform);
}
Expand All @@ -192,7 +192,7 @@ bool ExtensionHelper::TryInitialLoad(DBConfig &config, FileSystem &fs, const str
if (strncmp(a, metadata_field[0].data(), 32) != 0) {
// metadata do not looks right, add this to the error message
metadata_mismatch_error =
"\n" + StringUtil::Format("Extension \"%s\" do not have metadata compatible with DuckDB "
"\n" + StringUtil::Format("Extension \"%s\" does not have metadata compatible with the DuckDB "
"loading it (version %s, platform %s)",
filename, engine_version, engine_platform);
} else if (engine_version != extension_duckdb_version || engine_platform != extension_duckdb_platform) {
Expand Down
2 changes: 1 addition & 1 deletion test/sql/extensions/checked_load.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
statement error
LOAD 'README.md';
----
Invalid Input Error: Extension "README.md" do not have metadata compatible with DuckDB loading it
Invalid Input Error: Extension "README.md" does not have metadata compatible with the DuckDB loading it

statement ok
SET allow_extensions_metadata_mismatch=true;
Expand Down