Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit793beab

Browse files
committed
Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0.
This only became a problem with4c640f4, which didn't synchronizethe value agg_strict_input_check.nargs is set to, with the guardcondition for emitting the operation.Besides such instructions being unnecessary overhead, currently theLLVM JIT provider doesn't support them. It seems more sensible toavoid generating such instruction than supporting them. Add assertionsto make it easier to debug a potential further occurance.Discussion:https://postgr.es/m/2a505161-2727-2473-7c46-591ed108ac52@email.czBackpatch: 11-, like4c640f4.
1 parent4c640f4 commit793beab

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎src/backend/executor/execExpr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,7 @@ ExecBuildAggTrans(AggState *aggstate, AggStatePerPhase phase,
30233023
* just keep the prior transValue. This is true for both plain and
30243024
* sorted/distinct aggregates.
30253025
*/
3026-
if (trans_fcinfo->flinfo->fn_strict&&numInputs>0)
3026+
if (trans_fcinfo->flinfo->fn_strict&&pertrans->numTransInputs>0)
30273027
{
30283028
scratch.opcode=EEOP_AGG_STRICT_INPUT_CHECK;
30293029
scratch.d.agg_strict_input_check.nulls=strictnulls;

‎src/backend/jit/llvm/llvmjit_expr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,6 +2124,8 @@ llvm_compile_expr(ExprState *state)
21242124
LLVMValueRefv_nullp;
21252125
LLVMBasicBlockRef*b_checknulls;
21262126

2127+
Assert(nargs>0);
2128+
21272129
jumpnull=op->d.agg_strict_input_check.jumpnull;
21282130
v_nullp=l_ptr_const(nulls,l_ptr(TypeStorageBool));
21292131

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp