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 create ao table set parallel_workers doesn't take effect #168

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

Ray-Eldath
Copy link
Contributor

closes: #131


Change logs

create table ao(c int) using ao_row with(parallel_workers=3) doesn't take effect because only storage options are taken care of in reloptions_gp.c:transformAOStdRdOptions. This PR fixes this by add code processing parallel_workers.

The default value of parallel_workers (-1) is taken from reloptions.c:intRelOpts. There're no #define-ed constant for parallel_workers's name and default value so I hard-coded them.

transformAOStdRdOptions actually reads WITH clauses before reads StdRdOptions. In the comment they say this is to preserve the order of options because some tests rely on it. I take the value from StdRdOptions w/o examining WITH clause and I see no necessity in doing so. Don't know if this could go wrong :-/

Does this PR introduce any user-facing change?

Yes. It fixes a user-perceptible bug.

@avamingli
Copy link
Collaborator

add a test case?

@Ray-Eldath
Copy link
Contributor Author

Ray-Eldath commented Aug 30, 2023

A test case has been added. I've verified that before this fix the test would fail.

"create table ao(c int) using ao_row with(parallel_workers=3)" doesn't
take effect because only storage options are taken care of in
reloptions_gp.c:transformAOStdRdOptions. This PR fixes this by add code
processing parallel_workers.
@my-ship-it my-ship-it merged commit 55aacda into cloudberrydb:main Sep 1, 2023
6 checks passed
baotingfang pushed a commit that referenced this pull request Dec 1, 2023
"create table ao(c int) using ao_row with(parallel_workers=3)" doesn't
take effect because only storage options are taken care of in
reloptions_gp.c:transformAOStdRdOptions. This PR fixes this by add code
processing parallel_workers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create AO table with(parallel_workers) doesn't take effect.
4 participants