* A forgiving slice table indexer that returns the indexed Slice* or NULL */
| 1766 | * A forgiving slice table indexer that returns the indexed Slice* or NULL |
| 1767 | */ |
| 1768 | ExecSlice * |
| 1769 | getCurrentSlice(EState *estate, int sliceIndex) |
| 1770 | { |
| 1771 | SliceTable *sliceTable = estate->es_sliceTable; |
| 1772 | |
| 1773 | if (sliceTable && |
| 1774 | sliceIndex >= 0 && |
| 1775 | sliceIndex < sliceTable->numSlices) |
| 1776 | return &sliceTable->slices[sliceIndex]; |
| 1777 | |
| 1778 | return NULL; |
| 1779 | } |
| 1780 | |
| 1781 | /* Should the slice run on the QD? |
| 1782 | * |
no outgoing calls
no test coverage detected