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 a returning type of unique_ptr<SetStatement> StatementGenerator::GenerateSet() #6

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ concurrency:
jobs:
duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v0.10.3
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.0.0
with:
duckdb_version: v0.10.3
duckdb_version: main
extension_name: sqlsmith

duckdb-stable-deploy:
Expand All @@ -25,6 +25,6 @@ jobs:
uses: ./.github/workflows/_extension_deploy.yml
secrets: inherit
with:
duckdb_version: v0.10.3
duckdb_version: main
extension_name: sqlsmith
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
4 changes: 2 additions & 2 deletions src/statement_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ unique_ptr<SetStatement> StatementGenerator::GenerateSet() {
name_expr = make_uniq<ConstantExpression>(Value(name));
}
auto set = make_uniq<SetVariableStatement>("schema", std::move(name_expr), SetScope::AUTOMATIC);
return set;
return unique_ptr_cast<duckdb::SetVariableStatement, duckdb::SetStatement>(std::move(set));
}

unique_ptr<MultiStatement> StatementGenerator::GenerateAttachUse() {
Expand Down Expand Up @@ -1201,7 +1201,7 @@ string StatementGenerator::RandomString(idx_t length) {

const string charset = "$_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
string result = "";
for (int i = 0; i < length; ++i) {
for (idx_t i = 0; i < length; ++i) {
int randomIndex = RandomValue(charset.length());
result += charset[randomIndex];
}
Expand Down
Loading