babelfish_extensions icon indicating copy to clipboard operation
babelfish_extensions copied to clipboard

Allow parallelism for pltsql return expression after community commit 556f7b7

Open Deepesh125 opened this issue 8 months ago • 1 comments

Description

With the commit 556f7b7, we unintentionally blocked parallelism to evaluate plpgsql return expression because maxtuples = 2 is being passed to exec_run_select(...) from exec_eval_expr(...) to evaluate the return expression of the plpgsql function.

Idea to fix this issue to pass maxtuples = 0. It is safe to do it because number of processed rows is anyway being checked later in exec_eval_expr(...). But with this, there is not real caller remained which calls exec_run_select(...) with maxtuple != 0 so updated definition of exec_run_select(...) to remove maxtuples argument.

Task: BABEL-5599 Signed-off-by: Dipesh Dhameliya [email protected]

Check List

  • [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Deepesh125 avatar Apr 28 '25 03:04 Deepesh125

Pull Request Test Coverage Report for Build 15158478629

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 11 (54.55%) changed or added relevant lines in 3 files are covered.
  • 425 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 75.369%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/pl_exec-2.c 1 2 50.0%
contrib/babelfishpg_tsql/src/iterative_exec.c 1 3 33.33%
contrib/babelfishpg_tsql/src/pl_exec.c 4 6 66.67%
<!-- Total: 6 11
Files with Coverage Reduction New Missed Lines %
contrib/babelfishpg_common/src/varchar.c 4 84.51%
contrib/babelfishpg_money/fixeddecimal.c 200 70.21%
contrib/babelfishpg_tsql/runtime/functions.c 221 83.95%
<!-- Total: 425
Totals Coverage Status
Change from base Build 14998429710: 0.04%
Covered Lines: 48570
Relevant Lines: 64443

💛 - Coveralls

coveralls avatar Apr 28 '25 04:04 coveralls