VLE threw "btree index keys must be ordered by attribute" because
re-scanning inner scan is not properly done in some cases. A regression
test is added to check it.
The code is refactored extensively. The followings are notable changes.
Manage chgParam to make re-scanning work. Because of this,
EState.es_forceReScan can be removed. Re-scanning will be done
through the original logic.
Don't store/restore OUTER_PREV_VID_VARNO value. VLE logic does not
change it.
Remove NestLoopVLEState.selfLoop. This variable is introduced only
for reusing the code that re-scans inner scan for the next edge. This
makes readers confused because it takes some time to grasp the logic.
Now, nl_NeedNewOuter is true only for the outer scan.
Remove NestLoopVLEState.selfTupleSlot. Outer variables are properly
stored/restored. outerTupleSlot can be directly used.
Remove VLEArrayExpr. Use existing ArrayBuildState instead.
Remove hasEdges and hasVertices in NestLoopVLEState. Do NULL
check over ArrayBuildState * instead.
VLE threw "btree index keys must be ordered by attribute" because re-scanning inner scan is not properly done in some cases. A regression test is added to check it.
The code is refactored extensively. The followings are notable changes.
chgParam
to make re-scanning work. Because of this,EState.es_forceReScan
can be removed. Re-scanning will be done through the original logic.OUTER_PREV_VID_VARNO
value. VLE logic does not change it.NestLoopVLEState.selfLoop
. This variable is introduced only for reusing the code that re-scans inner scan for the next edge. This makes readers confused because it takes some time to grasp the logic. Now,nl_NeedNewOuter
is true only for the outer scan.NestLoopVLEState.selfTupleSlot
. Outer variables are properly stored/restored.outerTupleSlot
can be directly used.VLEArrayExpr
. Use existingArrayBuildState
instead.hasEdges
andhasVertices
inNestLoopVLEState
. DoNULL
check overArrayBuildState *
instead.