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

Commitb409331

Browse files
committed
Perform slot validity checks in a separate pass over expression.
This reduces code duplication a bit, but the primary benefit that itmakes JITing expression evaluation easier. When doing so we can't, aspreviously done in the interpreted case, really change opcode withoutrecompiling. Nor dow we just carry around unnecessary branches toavoid re-checking over and over.As a minor side-effect this makes ExecEvalStepOp() O(log(N)) ratherthan O(N).Author: Andres FreundDiscussion:https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
1 parent4717fdb commitb409331

File tree

4 files changed

+165
-136
lines changed

4 files changed

+165
-136
lines changed

‎src/backend/executor/execExpr.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,20 +680,19 @@ ExecInitExprRec(Expr *node, ExprState *state,
680680
/* regular user column */
681681
scratch.d.var.attnum=variable->varattno-1;
682682
scratch.d.var.vartype=variable->vartype;
683-
/* select EEOP_*_FIRST opcode to force one-time checks */
684683
switch (variable->varno)
685684
{
686685
caseINNER_VAR:
687-
scratch.opcode=EEOP_INNER_VAR_FIRST;
686+
scratch.opcode=EEOP_INNER_VAR;
688687
break;
689688
caseOUTER_VAR:
690-
scratch.opcode=EEOP_OUTER_VAR_FIRST;
689+
scratch.opcode=EEOP_OUTER_VAR;
691690
break;
692691

693692
/* INDEX_VAR is handled by default case */
694693

695694
default:
696-
scratch.opcode=EEOP_SCAN_VAR_FIRST;
695+
scratch.opcode=EEOP_SCAN_VAR;
697696
break;
698697
}
699698
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp