| 1071 | |
| 1072 | |
| 1073 | void |
| 1074 | extension_rumendscan_core(IndexScanDesc scan, IndexAmRoutine *coreRoutine) |
| 1075 | { |
| 1076 | if (IsCompositeOpClass(scan->indexRelation)) |
| 1077 | { |
| 1078 | DocumentDBRumIndexState *outerScanState = |
| 1079 | (DocumentDBRumIndexState *) scan->opaque; |
| 1080 | |
| 1081 | if (outerScanState->indexArrayState != NULL && IndexArrayStateFuncs != NULL) |
| 1082 | { |
| 1083 | /* free the state */ |
| 1084 | IndexArrayStateFuncs->freeState(outerScanState->indexArrayState); |
| 1085 | outerScanState->indexArrayState = NULL; |
| 1086 | } |
| 1087 | |
| 1088 | if (outerScanState->innerScan) |
| 1089 | { |
| 1090 | coreRoutine->amendscan(outerScanState->innerScan); |
| 1091 | } |
| 1092 | |
| 1093 | pfree(outerScanState); |
| 1094 | } |
| 1095 | else |
| 1096 | { |
| 1097 | coreRoutine->amendscan(scan); |
| 1098 | } |
| 1099 | } |
| 1100 | |
| 1101 | |
| 1102 | static void |
no test coverage detected