Skip to content

Fix create ao table set parallel_workers doesn't take effect#168

Merged
my-ship-it merged 1 commit intoapache:mainfrom
Ray-Eldath:fix-131
Sep 1, 2023
Merged

Fix create ao table set parallel_workers doesn't take effect#168
my-ship-it merged 1 commit intoapache:mainfrom
Ray-Eldath:fix-131

Conversation

@Ray-Eldath
Copy link
Copy Markdown
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
Copy Markdown
Contributor

add a test case?

@Ray-Eldath
Copy link
Copy Markdown
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.

Comment thread src/test/regress/sql/gp_parallel.sql Outdated
"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 apache:main Sep 1, 2023
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