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 iceberg metadata parsing #50232

Merged
merged 2 commits into from May 30, 2023
Merged
Changes from all commits
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
8 changes: 7 additions & 1 deletion src/Storages/DataLakes/IcebergMetadataParser.cpp
Expand Up @@ -244,7 +244,13 @@ struct IcebergMetadataParser<Configuration, MetadataReadHelper>::Impl

const auto * str_col = assert_cast<const ColumnString *>(col_str.get());
for (size_t i = 0; i < str_col->size(); ++i)
keys.emplace_back(str_col->getDataAt(i).toView());
{
const auto data_path = std::string(str_col->getDataAt(i).toView());
const auto pos = data_path.find(configuration.url.key);
if (pos == std::string::npos)
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected to find {} in data path: {}", configuration.url.key, data_path);
keys.emplace_back(data_path.substr(pos));
}
}

return keys;
Expand Down