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

Don't get creds for local files #2

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/storage/uc_table_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ TableFunction UCTableEntry::GetScanFunction(ClientContext &context, unique_ptr<F
auto &delta_function_set = ExtensionUtil::GetTableFunction(db, "delta_scan");
auto delta_scan_function = delta_function_set.functions.GetFunctionByArguments(context, {LogicalType::VARCHAR});
auto &uc_catalog = catalog.Cast<UCCatalog>();
auto &secret_manager = SecretManager::Get(context);

D_ASSERT(table_data);

Expand All @@ -48,6 +47,8 @@ TableFunction UCTableEntry::GetScanFunction(ClientContext &context, unique_ptr<F
// Set the S3 path as input to table function
vector<Value> inputs = {table_data->storage_location};

if (table_data->storage_location.find("file://") != 0) {
auto &secret_manager = SecretManager::Get(context);
// Get Credentials from UCAPI
auto table_credentials = UCAPI::GetTableCredentials(table_data->table_id, uc_catalog.credentials);

Expand All @@ -64,7 +65,7 @@ TableFunction UCTableEntry::GetScanFunction(ClientContext &context, unique_ptr<F
};
info.scope = {table_data->storage_location};
secret_manager.CreateSecret(context, info);

}
named_parameter_map_t param_map;
vector<LogicalType> return_types;
vector<string> names;
Expand Down
Loading