8000 Improve pruning of a default partition · postgres/postgres@489247b · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"489247b0e615592111226297a0564e11616361a5","url":"/postgres/postgres/commit/489247b0e615592111226297a0564e11616361a5","authoredDate":"2019-08-04T11:18:45.000-04:00","committedDate":"2019-08-04T11:18:45.000-04:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eImprove pruning of a default partition\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"When querying a partitioned table containing a default partition, we\nwere wrongly deciding to include it in the scan too early in the\nprocess, failing to exclude it in some cases. If we reinterpret the\nPruneStepResult.scan_default flag slightly, we can do a better job at\ndetecting that it can be excluded. The change is that we avoid setting\nthe flag for that pruning step unless the step absolutely requires the\ndefault partition to be scanned (in contrast with the previous\narrangement, which was to set it unless the step was able to prune it).\nSo get_matching_partitions() must explicitly check the partition that\neach returned bound value corresponds to in order to determine whether\nthe default one needs to be included, rather than relying on the flag\nfrom the final step result.\n\nAuthor: Yuzuko Hosoya \u0026lt;hosoya.yuzuko@lab.ntt.co.jp\u0026gt;\nReviewed-by: Amit Langote \u0026lt;Langote_Amit_f8@lab.ntt.co.jp\u0026gt;\nDiscussion: \u003ca href=\"https://postgr.es/m/00e601d4ca86$932b8bc0$b982a340$@lab.ntt.co.jp\" rel=\"nofollow\"\u003ehttps://postgr.es/m/00e601d4ca86$932b8bc0$b982a340$@lab.ntt.co.jp\u003c/a\u003e","authors":[{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false}],"committerAttribution":false,"committer":{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false},"parents":["69edf4f8802247209e77f69e089799b3d83c13a4"],"globalRelayId":"MDY6Q29tbWl0OTI3NDQyOjQ4OTI0N2IwZTYxNTU5MjExMTIyNjI5N2EwNTY0ZTExNjE2MzYxYTU=","sha1":"69edf4f8802247209e77f69e089799b3d83c13a4","sha2":"489247b0e615592111226297a0564e11616361a5"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":734,"text":"@@ -735,6 +735,7 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)","html":"@@ -735,6 +735,7 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)","displayNoNewLineWarning":false,"position":0,"left":734,"right":734},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":735,"text":" \tPruneStepResult **results,","html":" \t\u003cspan class=pl-smi\u003ePruneStepResult\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eresults\u003c/span\u003e,","displayNoNewLineWarning":false,"position":1,"left":735,"right":735},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":736,"text":" \t\t\t *final_result;","html":" \t\t\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efinal_result\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":736,"right":736},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":737,"text":" \tListCell *lc;","html":" \t\u003cspan class=pl-smi\u003eListCell\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003elc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":737,"right":737},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":738,"text":"+\tbool\t\tscan_default;","html":"+\t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003escan_default\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":737,"right":738},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":739,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":5,"left":738,"right":739},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":740,"text":" \t/* If there are no pruning steps then all partitions match. */","html":" \t\u003cspan class=pl-c\u003e/* If there are no pruning steps then all partitions match. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":739,"right":740},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":741,"text":" \tif (num_steps == 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003enum_steps\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":7,"left":740,"right":741},{"stylingDirective":null,"type":"HUNK","blobLineNumber":786,"text":"@@ -786,30 +787,39 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)","html":"@@ -786,30 +787,39 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)","displayNoNewLineWarning":false,"position":8,"left":785,"right":786},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":787,"text":" \tAssert(final_result != NULL);","html":" \t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003efinal_result\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e);","displayNoNewLineWarning":false,"position":9,"left":786,"right":787},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":788,"text":" \ti = -1;","html":" \t\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e-1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":10,"left":787,"right":788},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":789,"text":" \tresult = NULL;","html":" \t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":11,"left":788,"right":789},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":790,"text":"+\tscan_default = final_result-\u003escan_default;","html":"+\t\u003cspan class=pl-s1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003efinal_result\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e;","displayNoNewLineWarning":false,"position":12,"left":788,"right":790},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":791,"text":" \twhile ((i = bms_next_member(final_result-\u003ebound_offsets, i)) \u003e= 0)","html":" \t\u003cspan class=pl-k\u003ewhile\u003c/span\u003e ((\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_next_member\u003c/span\u003e(\u003cspan class=pl-s1\u003efinal_result\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e, \u003cspan class=pl-s1\u003ei\u003c/span\u003e)) \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":13,"left":789,"right":791},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":792,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":14,"left":790,"right":792},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":793,"text":" \t\tint\t\t\tpartindex = context-\u003eboundinfo-\u003eindexes[i];","html":" \t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epartindex\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eindexes\u003c/span\u003e[\u003cspan class=pl-s1\u003ei\u003c/span\u003e];","displayNoNewLineWarning":false,"position":15,"left":791,"right":793},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":794,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":792,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":793,"text":"-\t\t/*","html":"-\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":793,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":794,"text":"-\t\t * In range and hash partitioning cases, some slots may contain -1,","html":"-\u003cspan class=pl-c\u003e\t\t * In range and hash partitioning cases, some slots may contain -1,\u003c/span\u003e","displayNoNewLineWarning":false,"position":18,"left":794,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":795,"text":"-\t\t * indicating that no partition has been defined to accept a given","html":"-\u003cspan class=pl-c\u003e\t\t * indicating that no partition has been defined to accept a given\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":795,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":796,"text":"-\t\t * range of data or for a given remainder, respectively. The default","html":"-\u003cspan class=pl-c\u003e\t\t * range of data or for a given remainder, respectively. The default\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":796,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":797,"text":"-\t\t * partition, if any, in case of range partitioning, will be added to","html":"-\u003cspan class=pl-c\u003e\t\t * partition, if any, in case of range partitioning, will be added to\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":797,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":798,"text":"-\t\t * the result, because the specified range still satisfies the query's","html":"-\u003cspan class=pl-c\u003e\t\t * the result, because the specified range still satisfies the query\u0026#39;s\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":798,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":799,"text":"-\t\t * conditions.","html":"-\u003cspan class=pl-c\u003e\t\t * conditions.\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":799,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":800,"text":"-\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":24,"left":800,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":801,"text":"-\t\tif (partindex \u003e= 0)","html":"-\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindex\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":25,"left":801,"right":794},{"stylingDirective":null,"type":"DELETION","blobLineNumber":802,"text":"-\t\t\tresult = bms_add_member(result, partindex);","html":"-\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_member\u003c/span\u003e(\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-s1\u003epartindex\u003c/span\u003e);","displayNoNewLineWarning":false,"position":26,"left":802,"right":794},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":795,"text":"+\t\tif (partindex \u003c 0)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindex\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":27,"left":802,"right":795},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":796,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":28,"left":802,"right":796},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":797,"text":"+\t\t\t/*","html":"+\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":29,"left":802,"right":797},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":798,"text":"+\t\t\t * In range partitioning cases, if a partition index is -1 it","html":"+\u003cspan class=pl-c\u003e\t\t\t * In range partitioning cases, if a partition index is -1 it\u003c/span\u003e","displayNoNewLineWarning":false,"position":30,"left":802,"right":798},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":799,"text":"+\t\t\t * means that the bound at the offset is the upper bound for a","html":"+\u003cspan class=pl-c\u003e\t\t\t * means that the bound at the offset is the upper bound for a\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":802,"right":799},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":800,"text":"+\t\t\t * range not covered by any partition (other than a possible","html":"+\u003cspan class=pl-c\u003e\t\t\t * range not covered by any partition (other than a possible\u003c/span\u003e","displayNoNewLineWarning":false,"position":32,"left":802,"right":800},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":801,"text":"+\t\t\t * default partition). In hash partitioning, the same means no","html":"+\u003cspan class=pl-c\u003e\t\t\t * default partition). In hash partitioning, the same means no\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":802,"right":801},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":802,"text":"+\t\t\t * partition has been defined for the corresponding remainder","html":"+\u003cspan class=pl-c\u003e\t\t\t * partition has been defined for the corresponding remainder\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":802,"right":802},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":803,"text":"+\t\t\t * value.","html":"+\u003cspan class=pl-c\u003e\t\t\t * value.\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":802,"right":803},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":804,"text":"+\t\t\t *","html":"+\u003cspan class=pl-c\u003e\t\t\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":802,"right":804},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":805,"text":"+\t\t\t * In either case, the value is still part of the queried range of","html":"+\u003cspan class=pl-c\u003e\t\t\t * In either case, the value is still part of the queried range of\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":802,"right":805},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":806,"text":"+\t\t\t * values, so mark to scan the default partition if one exists.","html":"+\u003cspan class=pl-c\u003e\t\t\t * values, so mark to scan the default partition if one exists.\u003c/span\u003e","displayNoNewLineWarning":false,"position":38,"left":802,"right":806},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":807,"text":"+\t\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":39,"left":802,"right":807},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":808,"text":"+\t\t\tscan_default |= partition_bound_has_default(context-\u003eboundinfo);","html":"+\t\t\t\u003cspan class=pl-s1\u003escan_default\u003c/span\u003e |= \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":40,"left":802,"right":808},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":809,"text":"+\t\t\tcontinue;","html":"+\t\t\t\u003cspan class=pl-k\u003econtinue\u003c/span\u003e;","displayNoNewLineWarning":false,"position":41,"left":802,"right":809},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":810,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":42,"left":802,"right":810},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":811,"text":"+","html":"+","displayNoNewLineWarning":false,"position":43,"left":802,"right":811},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":812,"text":"+\t\tresult = bms_add_member(result, partindex);","html":"+\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_member\u003c/span\u003e(\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-s1\u003epartindex\u003c/span\u003e);","displayNoNewLineWarning":false,"position":44,"left":802,"right":812},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":813,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":45,"left":803,"right":813},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":814,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":46,"left":804,"right":814},{"stylingDirective":null,"type":"DELETION","blobLineNumber":805,"text":"-\t/* Add the null and/or default partition if needed and if present. */","html":"-\t\u003cspan class=\"pl-c\"\u003e/* Add the null and/or default partition if needed and \u003cspan class=\"x x-first x-last\"\u003eif \u003c/span\u003epresent. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":47,"left":805,"right":814},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":815,"text":"+\t/* Add the null and/or default partition if needed and present. */","html":"+\t\u003cspan class=\"pl-c\"\u003e/* Add the null and/or default partition if needed and present. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":48,"left":805,"right":815},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":816,"text":" \tif (final_result-\u003escan_null)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003efinal_result\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_null\u003c/span\u003e)","displayNoNewLineWarning":false,"position":49,"left":806,"right":816},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":817,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":50,"left":807,"right":817},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":818,"text":" \t\tAssert(context-\u003estrategy == PARTITION_STRATEGY_LIST);","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003estrategy\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003ePARTITION_STRATEGY_LIST\u003c/span\u003e);","displayNoNewLineWarning":false,"position":51,"left":808,"right":818},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":819,"text":" \t\tAssert(partition_bound_accepts_nulls(context-\u003eboundinfo));","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003epartition_bound_accepts_nulls\u003c/span\u003e(\u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eboundinfo\u003c/span\u003e));","displayNoNewLineWarning":false,"position":52,"left":809,"right":819},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":820,"text":" \t\tresult = bms_add_member(result, context-\u003eboundinfo-\u003enull_index);","html":" \t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_member\u003c/span\u003e(\u003cspan class=pl-s1\u003eresult\u003c/span\u003e, \u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enull_index\u003c/span\u003e);","displayNoNewLineWarning":false,"position":53,"left":810,"right":820},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":821,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":54,"left":811,"right":821},{"stylingDirective":null,"type":"DELETION","blobLineNumber":812,"text":"-\tif (final_result-\u003escan_default)","html":"-\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1 x x-first\"\u003efinal_result\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003escan_default\u003c/span\u003e)","displayNoNewLineWarning":false,"position":55,"left":812,"right":821},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":822,"text":"+\tif (scan_default)","html":"+\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1\"\u003escan_default\u003c/span\u003e)","displayNoNewLineWarning":false,"position":56,"left":812,"right":822},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":823,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":57,"left":813,"right":823},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":824,"text":" \t\tAssert(context-\u003estrategy == PARTITION_STRATEGY_LIST ||","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003estrategy\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003ePARTITION_STRATEGY_LIST\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":58,"left":814,"right":824},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":825,"text":" \t\t\t context-\u003estrategy == PARTITION_STRATEGY_RANGE);","html":" \t\t\t \u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003estrategy\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003ePARTITION_STRATEGY_RANGE\u003c/span\u003e);","displayNoNewLineWarning":false,"position":59,"left":815,"right":825},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2447,"text":"@@ -2438,6 +2448,11 @@ get_matching_hash_bounds(PartitionPruneContext *context,","html":"@@ -2438,6 +2448,11 @@ get_matching_hash_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":60,"left":2437,"right":2447},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2448,"text":" * get_matching_list_bounds","html":" \u003cspan class=pl-c\u003e * get_matching_list_bounds\u003c/span\u003e","displayNoNewLineWarning":false,"position":61,"left":2438,"right":2448},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2449,"text":" *\t\tDetermine the offsets of list bounds matching the specified value,","html":" \u003cspan class=pl-c\u003e *\t\tDetermine the offsets of list bounds matching the specified value,\u003c/span\u003e","displayNoNewLineWarning":false,"position":62,"left":2439,"right":2449},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2450,"text":" *\t\taccording to the semantics of the given operator strategy","html":" \u003cspan class=pl-c\u003e *\t\taccording to the semantics of the given operator strategy\u003c/span\u003e","displayNoNewLineWarning":false,"position":63,"left":2440,"right":2450},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2451,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":64,"left":2440,"right":2451},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2452,"text":"+ * scan_default will be set in the returned struct, if the default partition","html":"+\u003cspan class=pl-c\u003e * scan_default will be set in the returned struct, if the default partition\u003c/span\u003e","displayNoNewLineWarning":false,"position":65,"left":2440,"right":2452},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2453,"text":"+ * needs to be scanned, provided one exists at all. scan_null will be set if","html":"+\u003cspan class=pl-c\u003e * needs to be scanned, provided one exists at all. scan_null will be set if\u003c/span\u003e","displayNoNewLineWarning":false,"position":66,"left":2440,"right":2453},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2454,"text":"+ * the special null-accepting partition needs to be scanned.","html":"+\u003cspan class=pl-c\u003e * the special null-accepting partition needs to be scanned.\u003c/span\u003e","displayNoNewLineWarning":false,"position":67,"left":2440,"right":2454},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2455,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":68,"left":2440,"right":2455},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2456,"text":" * 'opstrategy' if non-zero must be a btree strategy number.","html":" \u003cspan class=pl-c\u003e * \u0026#39;opstrategy\u0026#39; if non-zero must be a btree strategy number.\u003c/span\u003e","displayNoNewLineWarning":false,"position":69,"left":2441,"right":2456},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2457,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":70,"left":2442,"right":2457},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2458,"text":" * 'value' contains the value to use for pruning.","html":" \u003cspan class=pl-c\u003e * \u0026#39;value\u0026#39; contains the value to use for pruning.\u003c/span\u003e","displayNoNewLineWarning":false,"position":71,"left":2443,"right":2458},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2654,"text":"@@ -2640,8 +2655,13 @@ get_matching_list_bounds(PartitionPruneContext *context,","html":"@@ -2640,8 +2655,13 @@ get_matching_list_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":72,"left":2639,"right":2654},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2655,"text":" * Each datum whose offset is in result is to be treated as the upper bound of","html":" \u003cspan class=pl-c\u003e * Each datum whose offset is in result is to be treated as the upper bound of\u003c/span\u003e","displayNoNewLineWarning":false,"position":73,"left":2640,"right":2655},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2656,"text":" * the partition that will contain the desired values.","html":" \u003cspan class=pl-c\u003e * the partition that will contain the desired values.\u003c/span\u003e","displayNoNewLineWarning":false,"position":74,"left":2641,"right":2656},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2657,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":75,"left":2642,"right":2657},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2643,"text":"- * If default partition needs to be scanned for given values, set scan_default","html":"-\u003cspan class=pl-c\u003e * If default partition needs to be scanned for given values, set scan_default\u003c/span\u003e","displayNoNewLineWarning":false,"position":76,"left":2643,"right":2657},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2644,"text":"- * in result if present.","html":"-\u003cspan class=pl-c\u003e * in result if present.\u003c/span\u003e","displayNoNewLineWarning":false,"position":77,"left":2644,"right":2657},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2658,"text":"+ * scan_default is set in the returned struct if a default partition exists","html":"+\u003cspan class=pl-c\u003e * scan_default is set in the returned struct if a default partition exists\u003c/span\u003e","displayNoNewLineWarning":false,"position":78,"left":2644,"right":2658},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2659,"text":"+ * and we're absolutely certain that it needs to be scanned. We do *not* set","html":"+\u003cspan class=pl-c\u003e * and we\u0026#39;re absolutely certain that it needs to be scanned. We do *not* set\u003c/span\u003e","displayNoNewLineWarning":false,"position":79,"left":2644,"right":2659},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2660,"text":"+ * it just because values match portions of the key space uncovered by","html":"+\u003cspan class=pl-c\u003e * it just because values match portions of the key space uncovered by\u003c/span\u003e","displayNoNewLineWarning":false,"position":80,"left":2644,"right":2660},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2661,"text":"+ * partitions other than default (space which we normally assume to belong to","html":"+\u003cspan class=pl-c\u003e * partitions other than default (space which we normally assume to belong to\u003c/span\u003e","displayNoNewLineWarning":false,"position":81,"left":2644,"right":2661},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2662,"text":"+ * the default partition): the final set of bounds obtained after combining","html":"+\u003cspan class=pl-c\u003e * the default partition): the final set of bounds obtained after combining\u003c/span\u003e","displayNoNewLineWarning":false,"position":82,"left":2644,"right":2662},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2663,"text":"+ * multiple pruning steps might exclude it, so we infer its inclusion","html":"+\u003cspan class=pl-c\u003e * multiple pruning steps might exclude it, so we infer its inclusion\u003c/span\u003e","displayNoNewLineWarning":false,"position":83,"left":2644,"right":2663},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2664,"text":"+ * elsewhere.","html":"+\u003cspan class=pl-c\u003e * elsewhere.\u003c/span\u003e","displayNoNewLineWarning":false,"position":84,"left":2644,"right":2664},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2665,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":85,"left":2645,"right":2665},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2666,"text":" * 'opstrategy' if non-zero must be a btree strategy number.","html":" \u003cspan class=pl-c\u003e * \u0026#39;opstrategy\u0026#39; if non-zero must be a btree strategy number.\u003c/span\u003e","displayNoNewLineWarning":false,"position":86,"left":2646,"right":2666},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2667,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":87,"left":2647,"right":2667},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2686,"text":"@@ -2667,8 +2687,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2667,8 +2687,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":88,"left":2666,"right":2686},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2687,"text":" \tint\t\t *partindices = boundinfo-\u003eindexes;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eindexes\u003c/span\u003e;","displayNoNewLineWarning":false,"position":89,"left":2667,"right":2687},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2688,"text":" \tint\t\t\toff,","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eoff\u003c/span\u003e,","displayNoNewLineWarning":false,"position":90,"left":2668,"right":2688},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2689,"text":" \t\t\t\tminoff,","html":" \t\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e,","displayNoNewLineWarning":false,"position":91,"left":2669,"right":2689},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2670,"text":"-\t\t\t\tmaxoff,","html":"-\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e,","displayNoNewLineWarning":false,"position":92,"left":2670,"right":2689},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2671,"text":"-\t\t\t\ti;","html":"-\t\t\t\t\u003cspan class=pl-s1\u003ei\u003c/span\u003e;","displayNoNewLineWarning":false,"position":93,"left":2671,"right":2689},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2690,"text":"+\t\t\t\tmaxoff;","html":"+\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e;","displayNoNewLineWarning":false,"position":94,"left":2671,"right":2690},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2691,"text":" \tbool\t\tis_equal;","html":" \t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003eis_equal\u003c/span\u003e;","displayNoNewLineWarning":false,"position":95,"left":2672,"right":2691},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2692,"text":" \tbool\t\tinclusive = false;","html":" \t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003einclusive\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e false;","displayNoNewLineWarning":false,"position":96,"left":2673,"right":2692},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2693,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":97,"left":2674,"right":2693},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2716,"text":"@@ -2698,13 +2717,15 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2698,13 +2717,15 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":98,"left":2697,"right":2716},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2717,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":99,"left":2698,"right":2717},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2718,"text":" \tif (nvalues == 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003envalues\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":100,"left":2699,"right":2718},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2719,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":101,"left":2700,"right":2719},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2720,"text":"+\t\t/* ignore key space not covered by any partitions */","html":"+\t\t\u003cspan class=pl-c\u003e/* ignore key space not covered by any partitions */\u003c/span\u003e","displayNoNewLineWarning":false,"position":102,"left":2700,"right":2720},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2721,"text":" \t\tif (partindices[minoff] \u003c 0)","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":103,"left":2701,"right":2721},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2722,"text":" \t\t\tminoff++;","html":" \t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":104,"left":2702,"right":2722},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2723,"text":" \t\tif (partindices[maxoff] \u003c 0)","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":105,"left":2703,"right":2723},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2724,"text":" \t\t\tmaxoff--;","html":" \t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e\u003cspan class=pl-c1\u003e--\u003c/span\u003e;","displayNoNewLineWarning":false,"position":106,"left":2704,"right":2724},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2725,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":107,"left":2705,"right":2725},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2726,"text":" \t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":" \t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":108,"left":2706,"right":2726},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2707,"text":"-\t\tAssert(minoff \u003e= 0 \u0026\u0026 maxoff \u003e= 0);","html":"-\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":109,"left":2707,"right":2726},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2727,"text":"+\t\tAssert(partindices[minoff] \u003e= 0 \u0026\u0026","html":"+\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":110,"left":2707,"right":2727},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2728,"text":"+\t\t\t partindices[maxoff] \u003e= 0);","html":"+\t\t\t \u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":111,"left":2707,"right":2728},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2729,"text":" \t\tresult-\u003ebound_offsets = bms_add_range(NULL, minoff, maxoff);","html":" \t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_range\u003c/span\u003e(\u003cspan class=pl-c1\u003eNULL\u003c/span\u003e, \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e, \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e);","displayNoNewLineWarning":false,"position":112,"left":2708,"right":2729},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2730,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":113,"left":2709,"right":2730},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2731,"text":" \t\treturn result;","html":" \t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":114,"left":2710,"right":2731},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2752,"text":"@@ -2732,11 +2753,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2732,11 +2753,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":115,"left":2731,"right":2752},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2753,"text":" \t\t\t\tif (nvalues == partnatts)","html":" \t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003envalues\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-s1\u003epartnatts\u003c/span\u003e)","displayNoNewLineWarning":false,"position":116,"left":2732,"right":2753},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2754,"text":" \t\t\t\t{","html":" \t\t\t\t{","displayNoNewLineWarning":false,"position":117,"left":2733,"right":2754},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2755,"text":" \t\t\t\t\t/* There can only be zero or one matching partition. */","html":" \t\t\t\t\t\u003cspan class=pl-c\u003e/* There can only be zero or one matching partition. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":118,"left":2734,"right":2755},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2735,"text":"-\t\t\t\t\tif (partindices[off + 1] \u003e= 0)","html":"-\t\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":119,"left":2735,"right":2755},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2736,"text":"-\t\t\t\t\t\tresult-\u003ebound_offsets = bms_make_singleton(off + 1);","html":"-\t\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_make_singleton\u003c/span\u003e(\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":120,"left":2736,"right":2755},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2737,"text":"-\t\t\t\t\telse","html":"-\t\t\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":121,"left":2737,"right":2755},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2738,"text":"-\t\t\t\t\t\tresult-\u003escan_default =","html":"-\t\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e","displayNoNewLineWarning":false,"position":122,"left":2738,"right":2755},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2739,"text":"-\t\t\t\t\t\t\tpartition_bound_has_default(boundinfo);","html":"-\t\t\t\t\t\t\t\u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":123,"left":2739,"right":2755},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2756,"text":"+\t\t\t\t\tresult-\u003ebound_offsets = bms_make_singleton(off + 1);","html":"+\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_make_singleton\u003c/span\u003e(\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":124,"left":2739,"right":2756},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2757,"text":" \t\t\t\t\treturn result;","html":" \t\t\t\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":125,"left":2740,"right":2757},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2758,"text":" \t\t\t\t}","html":" \t\t\t\t}","displayNoNewLineWarning":false,"position":126,"left":2741,"right":2758},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2759,"text":" \t\t\t\telse","html":" \t\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":127,"left":2742,"right":2759},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2840,"text":"@@ -2824,57 +2841,21 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2824,57 +2841,21 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":128,"left":2823,"right":2840},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2841,"text":" \t\t\t\t\tmaxoff = off + 1;","html":" \t\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":129,"left":2824,"right":2841},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2842,"text":" \t\t\t\t}","html":" \t\t\t\t}","displayNoNewLineWarning":false,"position":130,"left":2825,"right":2842},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2843,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":131,"left":2826,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2827,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":132,"left":2827,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2828,"text":"-\t\t\t\t * Skip if minoff/maxoff are actually the upper bound of a","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * Skip if minoff/maxoff are actually the upper bound of a\u003c/span\u003e","displayNoNewLineWarning":false,"position":133,"left":2828,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2829,"text":"-\t\t\t\t * un-assigned portion of values.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * un-assigned portion of values.\u003c/span\u003e","displayNoNewLineWarning":false,"position":134,"left":2829,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2830,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":135,"left":2830,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2831,"text":"-\t\t\t\tif (partindices[minoff] \u003c 0 \u0026\u0026 minoff \u003c boundinfo-\u003endatums)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e)","displayNoNewLineWarning":false,"position":136,"left":2831,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2832,"text":"-\t\t\t\t\tminoff++;","html":"-\t\t\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":137,"left":2832,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2833,"text":"-\t\t\t\tif (partindices[maxoff] \u003c 0 \u0026\u0026 maxoff \u003e= 1)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e1\u003c/span\u003e)","displayNoNewLineWarning":false,"position":138,"left":2833,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2834,"text":"-\t\t\t\t\tmaxoff--;","html":"-\t\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e\u003cspan class=pl-c1\u003e--\u003c/span\u003e;","displayNoNewLineWarning":false,"position":139,"left":2834,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2835,"text":"-","html":"-","displayNoNewLineWarning":false,"position":140,"left":2835,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2836,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":141,"left":2836,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2837,"text":"-\t\t\t\t * There may exist a range of values unassigned to any","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * There may exist a range of values unassigned to any\u003c/span\u003e","displayNoNewLineWarning":false,"position":142,"left":2837,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2838,"text":"-\t\t\t\t * non-default partition between the datums at minoff and","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * non-default partition between the datums at minoff and\u003c/span\u003e","displayNoNewLineWarning":false,"position":143,"left":2838,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2839,"text":"-\t\t\t\t * maxoff. Add the default partition in that case.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * maxoff. Add the default partition in that case.\u003c/span\u003e","displayNoNewLineWarning":false,"position":144,"left":2839,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2840,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":145,"left":2840,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2841,"text":"-\t\t\t\tif (partition_bound_has_default(boundinfo))","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e))","displayNoNewLineWarning":false,"position":146,"left":2841,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2842,"text":"-\t\t\t\t{","html":"-\t\t\t\t{","displayNoNewLineWarning":false,"position":147,"left":2842,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2843,"text":"-\t\t\t\t\tfor (i = minoff; i \u003c= maxoff; i++)","html":"-\t\t\t\t\t\u003cspan class=pl-k\u003efor\u003c/span\u003e (\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e \u0026lt;= \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e)","displayNoNewLineWarning":false,"position":148,"left":2843,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2844,"text":"-\t\t\t\t\t{","html":"-\t\t\t\t\t{","displayNoNewLineWarning":false,"position":149,"left":2844,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2845,"text":"-\t\t\t\t\t\tif (partindices[i] \u003c 0)","html":"-\t\t\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003ei\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":150,"left":2845,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2846,"text":"-\t\t\t\t\t\t{","html":"-\t\t\t\t\t\t{","displayNoNewLineWarning":false,"position":151,"left":2846,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2847,"text":"-\t\t\t\t\t\t\tresult-\u003escan_default = true;","html":"-\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e true;","displayNoNewLineWarning":false,"position":152,"left":2847,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2848,"text":"-\t\t\t\t\t\t\tbreak;","html":"-\t\t\t\t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":153,"left":2848,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2849,"text":"-\t\t\t\t\t\t}","html":"-\t\t\t\t\t\t}","displayNoNewLineWarning":false,"position":154,"left":2849,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2850,"text":"-\t\t\t\t\t}","html":"-\t\t\t\t\t}","displayNoNewLineWarning":false,"position":155,"left":2850,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2851,"text":"-\t\t\t\t}","html":"-\t\t\t\t}","displayNoNewLineWarning":false,"position":156,"left":2851,"right":2843},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2852,"text":"-","html":"-","displayNoNewLineWarning":false,"position":157,"left":2852,"right":2843},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2844,"text":" \t\t\t\tAssert(minoff \u003e= 0 \u0026\u0026 maxoff \u003e= 0);","html":" \t\t\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":158,"left":2853,"right":2844},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2845,"text":" \t\t\t\tresult-\u003ebound_offsets = bms_add_range(NULL, minoff, maxoff);","html":" \t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_range\u003c/span\u003e(\u003cspan class=pl-c1\u003eNULL\u003c/span\u003e, \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e, \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e);","displayNoNewLineWarning":false,"position":159,"left":2854,"right":2845},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2846,"text":" \t\t\t}","html":" \t\t\t}","displayNoNewLineWarning":false,"position":160,"left":2855,"right":2846},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2856,"text":"-\t\t\telse if (off \u003e= 0)\t/* !is_equal */","html":"-\t\t\t\u003cspan class=\"pl-k\"\u003eelse\u003c/span\u003e\u003cspan class=\"x x-first\"\u003e \u003c/span\u003e\u003cspan class=\"pl-k x\"\u003eif\u003c/span\u003e\u003cspan class=\"x\"\u003e (\u003c/span\u003e\u003cspan class=\"pl-s1 x\"\u003eoff\u003c/span\u003e\u003cspan class=\"x\"\u003e \u0026gt;= \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e0\u003c/span\u003e\u003cspan class=\"x\"\u003e)\t\u003c/span\u003e\u003cspan class=\"pl-c x x-last\"\u003e/* !is_equal */\u003c/span\u003e","displayNoNewLineWarning":false,"position":161,"left":2856,"right":2846},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2847,"text":"+\t\t\telse","html":"+\t\t\t\u003cspan class=\"pl-k\"\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":162,"left":2856,"right":2847},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2848,"text":" \t\t\t{","html":" \t\t\t{","displayNoNewLineWarning":false,"position":163,"left":2857,"right":2848},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2849,"text":" \t\t\t\t/*","html":" \t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":164,"left":2858,"right":2849},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2850,"text":" \t\t\t\t * The lookup value falls in the range between some bounds in","html":" \u003cspan class=pl-c\u003e\t\t\t\t * The lookup value falls in the range between some bounds in\u003c/span\u003e","displayNoNewLineWarning":false,"position":165,"left":2859,"right":2850},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2851,"text":" \t\t\t\t * boundinfo. 'off' would be the offset of the greatest bound","html":" \u003cspan class=pl-c\u003e\t\t\t\t * boundinfo. \u0026#39;off\u0026#39; would be the offset of the greatest bound\u003c/span\u003e","displayNoNewLineWarning":false,"position":166,"left":2860,"right":2851},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2852,"text":" \t\t\t\t * that is \u003c= lookup value, so add off + 1 to the result","html":" \u003cspan class=pl-c\u003e\t\t\t\t * that is \u0026lt;= lookup value, so add off + 1 to the result\u003c/span\u003e","displayNoNewLineWarning":false,"position":167,"left":2861,"right":2852},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2853,"text":" \t\t\t\t * instead as the offset of the upper bound of the only","html":" \u003cspan class=pl-c\u003e\t\t\t\t * instead as the offset of the upper bound of the only\u003c/span\u003e","displayNoNewLineWarning":false,"position":168,"left":2862,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2863,"text":"-\t\t\t\t * partition that may contain the lookup value.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * partition that may contain the lookup value.\u003c/span\u003e","displayNoNewLineWarning":false,"position":169,"left":2863,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2864,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":170,"left":2864,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2865,"text":"-\t\t\t\tif (partindices[off + 1] \u003e= 0)","html":"-\t\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":171,"left":2865,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2866,"text":"-\t\t\t\t\tresult-\u003ebound_offsets = bms_make_singleton(off + 1);","html":"-\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_make_singleton\u003c/span\u003e(\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":172,"left":2866,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2867,"text":"-\t\t\t\telse","html":"-\t\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":173,"left":2867,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2868,"text":"-\t\t\t\t\tresult-\u003escan_default =","html":"-\t\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e","displayNoNewLineWarning":false,"position":174,"left":2868,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2869,"text":"-\t\t\t\t\t\tpartition_bound_has_default(boundinfo);","html":"-\t\t\t\t\t\t\u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":175,"left":2869,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2870,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":176,"left":2870,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2871,"text":"-\t\t\telse","html":"-\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":177,"left":2871,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2872,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":178,"left":2872,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2873,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":179,"left":2873,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2874,"text":"-\t\t\t\t * off \u003c 0: the lookup value is smaller than all bounds, so","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * off \u0026lt; 0: the lookup value is smaller than all bounds, so\u003c/span\u003e","displayNoNewLineWarning":false,"position":180,"left":2874,"right":2853},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2875,"text":"-\t\t\t\t * only the default partition qualifies, if there is one.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * only the default partition qualifies, if there is one.\u003c/span\u003e","displayNoNewLineWarning":false,"position":181,"left":2875,"right":2853},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2854,"text":"+\t\t\t\t * partition that may contain the lookup value. If 'off' is","html":"+\u003cspan class=pl-c\u003e\t\t\t\t * partition that may contain the lookup value. If \u0026#39;off\u0026#39; is\u003c/span\u003e","displayNoNewLineWarning":false,"position":182,"left":2875,"right":2854},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2855,"text":"+\t\t\t\t * -1 indicating that all bounds are greater, then we simply","html":"+\u003cspan class=pl-c\u003e\t\t\t\t * -1 indicating that all bounds are greater, then we simply\u003c/span\u003e","displayNoNewLineWarning":false,"position":183,"left":2875,"right":2855},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2856,"text":"+\t\t\t\t * end up adding the first bound's offset, that is, 0.","html":"+\u003cspan class=pl-c\u003e\t\t\t\t * end up adding the first bound\u0026#39;s offset, that is, 0.\u003c/span\u003e","displayNoNewLineWarning":false,"position":184,"left":2875,"right":2856},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2857,"text":" \t\t\t\t */","html":" \u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":185,"left":2876,"right":2857},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2877,"text":"-\t\t\t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":"-\t\t\t\t\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-first x-last\"\u003escan_default\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en x x-first\"\u003epartition_bound_has_default\u003c/span\u003e\u003cspan class=\"x\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":186,"left":2877,"right":2857},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2858,"text":"+\t\t\t\tresult-\u003ebound_offsets = bms_make_singleton(off + 1);","html":"+\t\t\t\t\u003cspan class=\"pl-s1\"\u003eresult\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-first x-last\"\u003ebound_offsets\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en x x-first\"\u003ebms_make_singleton\u003c/span\u003e\u003cspan class=\"x\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s1 x\"\u003eoff\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e+\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":187,"left":2877,"ri 10000 ght":2858},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2859,"text":" \t\t\t}","html":" \t\t\t}","displayNoNewLineWarning":false,"position":188,"left":2878,"right":2859},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2860,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":189,"left":2879,"right":2860},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2861,"text":" \t\t\treturn result;","html":" \t\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":190,"left":2880,"right":2861},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2925,"text":"@@ -2945,16 +2926,18 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2945,16 +2926,18 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":191,"left":2944,"right":2925},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2926,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":192,"left":2945,"right":2926},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2927,"text":" \t\t\t\t\tminoff = inclusive ? off : off + 1;","html":" \t\t\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003einclusive\u003c/span\u003e ? \u003cspan class=pl-s1\u003eoff\u003c/span\u003e : \u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":193,"left":2946,"right":2927},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2928,"text":" \t\t\t\t}","html":" \t\t\t\t}","displayNoNewLineWarning":false,"position":194,"left":2947,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2948,"text":"-","html":"-","displayNoNewLineWarning":false,"position":195,"left":2948,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2949,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":196,"left":2949,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2950,"text":"-\t\t\t\t * lookup value falls in the range between some bounds in","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * lookup value falls in the range between some bounds in\u003c/span\u003e","displayNoNewLineWarning":false,"position":197,"left":2950,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2951,"text":"-\t\t\t\t * boundinfo. off would be the offset of the greatest bound","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * boundinfo. off would be the offset of the greatest bound\u003c/span\u003e","displayNoNewLineWarning":false,"position":198,"left":2951,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2952,"text":"-\t\t\t\t * that is \u003c= lookup value, so add off + 1 to the result","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * that is \u0026lt;= lookup value, so add off + 1 to the result\u003c/span\u003e","displayNoNewLineWarning":false,"position":199,"left":2952,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2953,"text":"-\t\t\t\t * instead as the offset of the upper bound of the smallest","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * instead as the offset of the upper bound of the smallest\u003c/span\u003e","displayNoNewLineWarning":false,"position":200,"left":2953,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2954,"text":"-\t\t\t\t * partition that may contain the lookup value.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * partition that may contain the lookup value.\u003c/span\u003e","displayNoNewLineWarning":false,"position":201,"left":2954,"right":2928},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2955,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":202,"left":2955,"right":2928},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2929,"text":" \t\t\t\telse","html":" \t\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":203,"left":2956,"right":2929},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2930,"text":"+\t\t\t\t{","html":"+\t\t\t\t{","displayNoNewLineWarning":false,"position":204,"left":2956,"right":2930},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2931,"text":"+","html":"+","displayNoNewLineWarning":false,"position":205,"left":2956,"right":2931},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2932,"text":"+\t\t\t\t\t/*","html":"+\t\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":206,"left":2956,"right":2932},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2933,"text":"+\t\t\t\t\t * lookup value falls in the range between some bounds in","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t * lookup value falls in the range between some bounds in\u003c/span\u003e","displayNoNewLineWarning":false,"position":207,"left":2956,"right":2933},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2934,"text":"+\t\t\t\t\t * boundinfo. off would be the offset of the greatest","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t * boundinfo. off would be the offset of the greatest\u003c/span\u003e","displayNoNewLineWarning":false,"position":208,"left":2956,"right":2934},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2935,"text":"+\t\t\t\t\t * bound that is \u003c= lookup value, so add off + 1 to the","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t * bound that is \u0026lt;= lookup value, so add off + 1 to the\u003c/span\u003e","displayNoNewLineWarning":false,"position":209,"left":2956,"right":2935},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2936,"text":"+\t\t\t\t\t * result instead as the offset of the upper bound of the","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t * result instead as the offset of the upper bound of the\u003c/span\u003e","displayNoNewLineWarning":false,"position":210,"left":2956,"right":2936},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2937,"text":"+\t\t\t\t\t * smallest partition that may contain the lookup value.","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t * smallest partition that may contain the lookup value.\u003c/span\u003e","displayNoNewLineWarning":false,"position":211,"left":2956,"right":2937},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2938,"text":"+\t\t\t\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":212,"left":2956,"right":2938},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2939,"text":" \t\t\t\t\tminoff = off + 1;","html":" \t\t\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":213,"left":2957,"right":2939},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2940,"text":"+\t\t\t\t}","html":"+\t\t\t\t}","displayNoNewLineWarning":false,"position":214,"left":2957,"right":2940},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2941,"text":" \t\t\t}","html":" \t\t\t}","displayNoNewLineWarning":false,"position":215,"left":2958,"right":2941},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2942,"text":" \t\t\tbreak;","html":" \t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":216,"left":2959,"right":2942},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2943,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":217,"left":2960,"right":2943},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2954,"text":"@@ -2972,16 +2955,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -2972,16 +2955,7 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":218,"left":2971,"right":2954},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2955,"text":" \t\t\t\t\t\t\t\t\t\t\t\tboundinfo,","html":" \t\t\t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e,","displayNoNewLineWarning":false,"position":219,"left":2972,"right":2955},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2956,"text":" \t\t\t\t\t\t\t\t\t\t\t\tnvalues, values,","html":" \t\t\t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-s1\u003envalues\u003c/span\u003e, \u003cspan class=pl-s1\u003evalues\u003c/span\u003e,","displayNoNewLineWarning":false,"position":220,"left":2973,"right":2956},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2957,"text":" \t\t\t\t\t\t\t\t\t\t\t\t\u0026is_equal);","html":" \t\t\t\t\t\t\t\t\t\t\t\t\u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eis_equal\u003c/span\u003e);","displayNoNewLineWarning":false,"position":221,"left":2974,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2975,"text":"-\t\t\tif (off \u003c 0)","html":"-\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":222,"left":2975,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2976,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":223,"left":2976,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2977,"text":"-\t\t\t\t/*","html":"-\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":224,"left":2977,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2978,"text":"-\t\t\t\t * All bounds are greater than the key, so we could only","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * All bounds are greater than the key, so we could only\u003c/span\u003e","displayNoNewLineWarning":false,"position":225,"left":2978,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2979,"text":"-\t\t\t\t * expect to find the lookup key in the default partition.","html":"-\u003cspan class=pl-c\u003e\t\t\t\t * expect to find the lookup key in the default partition.\u003c/span\u003e","displayNoNewLineWarning":false,"position":226,"left":2979,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2980,"text":"-\t\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":227,"left":2980,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2981,"text":"-\t\t\t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":228,"left":2981,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2982,"text":"-\t\t\t\treturn result;","html":"-\t\t\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":229,"left":2982,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2983,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":230,"left":2983,"right":2957},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2984,"text":"-\t\t\telse","html":"-\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":231,"left":2984,"right":2957},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2958,"text":"+\t\t\tif (off \u003e= 0)","html":"+\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":232,"left":2984,"right":2958},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2959,"text":" \t\t\t{","html":" \t\t\t{","displayNoNewLineWarning":false,"position":233,"left":2985,"right":2959},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2960,"text":" \t\t\t\t/*","html":" \t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":234,"left":2986,"right":2960},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2961,"text":" \t\t\t\t * See the comment above.","html":" \u003cspan class=pl-c\u003e\t\t\t\t * See the comment above.\u003c/span\u003e","displayNoNewLineWarning":false,"position":235,"left":2987,"right":2961},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3002,"text":"@@ -3029,65 +3003,58 @@ get_matching_range_bounds(PartitionPruneContext *context,","html":"@@ -3029,65 +3003,58 @@ get_matching_range_bounds(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":236,"left":3028,"right":3002},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3003,"text":" \t\t\t\telse","html":" \t\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":237,"left":3029,"right":3003},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3004,"text":" \t\t\t\t\tmaxoff = off;","html":" \t\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eoff\u003c/span\u003e;","displayNoNewLineWarning":false,"position":238,"left":3030,"right":3004},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3005,"text":" \t\t\t}","html":" \t\t\t}","displayNoNewLineWarning":false,"position":239,"left":3031,"right":3005},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3006,"text":"+\t\t\telse","html":"+\t\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":240,"left":3031,"right":3006},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3007,"text":"+\t\t\t{","html":"+\t\t\t{","displayNoNewLineWarning":false,"position":241,"left":3031,"right":3007},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3008,"text":"+\t\t\t\t/*","html":"+\t\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":242,"left":3031,"right":3008},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3009,"text":"+\t\t\t\t * 'off' is -1 indicating that all bounds are greater, so just","html":"+\u003cspan class=pl-c\u003e\t\t\t\t * \u0026#39;off\u0026#39; is -1 indicating that all bounds are greater, so just\u003c/span\u003e","displayNoNewLineWarning":false,"position":243,"left":3031,"right":3009},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3010,"text":"+\t\t\t\t * set the first bound's offset as maxoff.","html":"+\u003cspan class=pl-c\u003e\t\t\t\t * set the first bound\u0026#39;s offset as maxoff.\u003c/span\u003e","displayNoNewLineWarning":false,"position":244,"left":3031,"right":3010},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3011,"text":"+\t\t\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":245,"left":3031,"right":3011},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3012,"text":"+\t\t\t\tmaxoff = off + 1;","html":"+\t\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eoff\u003c/span\u003e \u003cspan class=pl-c1\u003e+\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":246,"left":3031,"right":3012},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3013,"text":"+\t\t\t}","html":"+\t\t\t}","displayNoNewLineWarning":false,"position":247,"left":3031,"right":3013},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3014,"text":" \t\t\tbreak;","html":" \t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":248,"left":3032,"right":3014},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3015,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":249,"left":3033,"right":3015},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3016,"text":" \t\tdefault:","html":" \t\t\u003cspan class=pl-k\u003edefault\u003c/span\u003e:","displayNoNewLineWarning":false,"position":250,"left":3034,"right":3016},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3017,"text":" \t\t\telog(ERROR, \"invalid strategy number %d\", opstrategy);","html":" \t\t\t\u003cspan class=pl-en\u003eelog\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;invalid strategy number %d\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003eopstrategy\u003c/span\u003e);","displayNoNewLineWarning":false,"position":251,"left":3035,"right":3017},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3018,"text":" \t\t\tbreak;","html":" \t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":252,"left":3036,"right":3018},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3019,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":253,"left":3037,"right":3019},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3020,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":254,"left":3038,"right":3020},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3021,"text":"+\tAssert(minoff \u003e= 0 \u0026\u0026 minoff \u003c= boundinfo-\u003endatums);","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u0026lt;= \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e);","displayNoNewLineWarning":false,"position":255,"left":3038,"right":3021},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3022,"text":"+\tAssert(maxoff \u003e= 0 \u0026\u0026 maxoff \u003c= boundinfo-\u003endatums);","html":"+\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026lt;= \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e);","displayNoNewLineWarning":false,"position":256,"left":3038,"right":3022},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3023,"text":"+","html":"+","displayNoNewLineWarning":false,"position":257,"left":3038,"right":3023},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3024,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":258,"left":3039,"right":3024},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3040,"text":"-\t * Skip a gap and when doing so, check if the bound contains a finite","html":"-\u003cspan class=pl-c\u003e\t * Skip a gap and when doing so, check if the bound contains a finite\u003c/span\u003e","displayNoNewLineWarning":false,"position":259,"left":3040,"right":3024},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3041,"text":"-\t * value to decide if we need to add the default partition. If it's an","html":"-\u003cspan class=pl-c\u003e\t * value to decide if we need to add the default partition. If it\u0026#39;s an\u003c/span\u003e","displayNoNewLineWarning":false,"position":260,"left":3041,"right":3024},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3042,"text":"-\t * infinite bound, we need not add the default partition, as having an","html":"-\u003cspan class=pl-c\u003e\t * infinite bound, we need not add the default partition, as having an\u003c/span\u003e","displayNoNewLineWarning":false,"position":261,"left":3042,"right":3024},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3043,"text":"-\t * infinite bound means the partition in question catches any values that","html":"-\u003cspan class=pl-c\u003e\t * infinite bound means the partition in question catches any values that\u003c/span\u003e","displayNoNewLineWarning":false,"position":262,"left":3043,"right":3024},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3044,"text":"-\t * would otherwise be in the default partition.","html":"-\u003cspan class=pl-c\u003e\t * would otherwise be in the default partition.\u003c/span\u003e","displayNoNewLineWarning":false,"position":263,"left":3044,"right":3024},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3025,"text":"+\t * If the smallest partition to return has MINVALUE (negative infinity) as","html":"+\u003cspan class=pl-c\u003e\t * If the smallest partition to return has MINVALUE (negative infinity) as\u003c/span\u003e","displayNoNewLineWarning":false,"position":264,"left":3044,"right":3025},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3026,"text":"+\t * its lower bound, increment it to point to the next finite bound","html":"+\u003cspan class=pl-c\u003e\t * its lower bound, increment it to point to the next finite bound\u003c/span\u003e","displayNoNewLineWarning":false,"position":265,"left":3044,"right":3026},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3027,"text":"+\t * (supposedly its upper bound), so that we don't advertently end up","html":"+\u003cspan class=pl-c\u003e\t * (supposedly its upper bound), so that we don\u0026#39;t advertently end up\u003c/span\u003e","displayNoNewLineWarning":false,"position":266,"left":3044,"right":3027},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3028,"text":"+\t * scanning the default partition.","html":"+\u003cspan class=pl-c\u003e\t * scanning the default partition.\u003c/span\u003e","displayNoNewLineWarning":false,"position":267,"left":3044,"right":3028},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3029,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":268,"left":3045,"right":3029},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3046,"text":"-\tif (partindices[minoff] \u003c 0)","html":"-\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1\"\u003epartindices\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003eminoff\u003c/span\u003e] \u003cspan class=\"pl-c1\"\u003e\u0026lt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":269,"left":3046,"right":3029},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3030,"text":"+\tif (minoff \u003c boundinfo-\u003endatums \u0026\u0026 partindices[minoff] \u003c 0)","html":"+\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1 x x-first\"\u003eminoff\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e\u0026lt;\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-s1 x\"\u003eboundinfo\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003endatums\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e\u0026amp;\u0026amp;\u003c/span\u003e\u003cspan class=\"x x-last\"\u003e \u003c/span\u003e\u003cspan class=\"pl-s1\"\u003epartindices\u003c/span\u003e[\u003cspan class=\"pl-s1\"\u003eminoff\u003c/span\u003e] \u003cspan class=\"pl-c1\"\u003e\u0026lt;\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":270,"left":3046,"right":3030},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3031,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":271,"left":3047,"right":3031},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3032,"text":" \t\tint\t\t\tlastkey = nvalues - 1;","html":" \t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003envalues\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":272,"left":3048,"right":3032},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3033,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":273,"left":3049,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3050,"text":"-\t\tif (minoff \u003e= 0 \u0026\u0026","html":"-\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":274,"left":3050,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3051,"text":"-\t\t\tminoff \u003c boundinfo-\u003endatums \u0026\u0026","html":"-\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":275,"left":3051,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3052,"text":"-\t\t\tboundinfo-\u003ekind[minoff][lastkey] ==","html":"-\t\t\t\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekind\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e][\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e] \u003cspan class=pl-c1\u003e==\u003c/span\u003e","displayNoNewLineWarning":false,"position":276,"left":3052,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3053,"text":"-\t\t\tPARTITION_RANGE_DATUM_VALUE)","html":"-\t\t\t\u003cspan class=pl-c1\u003ePARTITION_RANGE_DATUM_VALUE\u003c/span\u003e)","displayNoNewLineWarning":false,"position":277,"left":3053,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3054,"text":"-\t\t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":"-\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":278,"left":3054,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3055,"text":"-","html":"-","displayNoNewLineWarning":false,"position":279,"left":3055,"right":3033},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3056,"text":"-\t\tminoff++;","html":"-\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":280,"left":3056,"right":3033},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3034,"text":"+\t\tif (boundinfo-\u003ekind[minoff][lastkey] ==","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekind\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e][\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e] \u003cspan class=pl-c1\u003e==\u003c/span\u003e","displayNoNewLineWarning":false,"position":281,"left":3056,"right":3034},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3035,"text":"+\t\t\tPARTITION_RANGE_DATUM_MINVALUE)","html":"+\t\t\t\u003cspan class=pl-c1\u003ePARTITION_RANGE_DATUM_MINVALUE\u003c/span\u003e)","displayNoNewLineWarning":false,"position":282,"left":3056,"right":3035},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3036,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":283,"left":3056,"right":3036},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3037,"text":"+\t\t\tminoff++;","html":"+\t\t\t\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e;","displayNoNewLineWarning":false,"position":284,"left":3056,"right":3037},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3038,"text":"+\t\t\tAssert(boundinfo-\u003eindexes[minoff] \u003e= 0);","html":"+\t\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eindexes\u003c/span\u003e[\u003cspan class=pl-s1\u003eminoff\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":285,"left":3056,"right":3038},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3039,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":286,"left":3056,"right":3039},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3040,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":287,"left":3057,"right":3040},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3041,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":288,"left":3058,"right":3041},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3042,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":289,"left":3059,"right":3042},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3060,"text":"-\t * Skip a gap. See the above comment about how we decide whether or not","html":"-\u003cspan class=pl-c\u003e\t * Skip a gap. See the above comment about how we decide whether or not\u003c/span\u003e","displayNoNewLineWarning":false,"position":290,"left":3060,"right":3042},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3061,"text":"-\t * to scan the default partition based whether the datum that will become","html":"-\u003cspan class=pl-c\u003e\t * to scan the default partition based whether the datum that will become\u003c/span\u003e","displayNoNewLineWarning":false,"position":291,"left":3061,"right":3042},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3062,"text":"-\t * the maximum datum is finite or not.","html":"-\u003cspan class=pl-c\u003e\t * the maximum datum is finite or not.\u003c/span\u003e","displayNoNewLineWarning":false,"position":292,"left":3062,"right":3042},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3043,"text":"+\t * If the previous greatest partition has MAXVALUE (positive infinity) as","html":"+\u003cspan class=pl-c\u003e\t * If the previous greatest partition has MAXVALUE (positive infinity) as\u003c/span\u003e","displayNoNewLineWarning":false,"position":293,"left":3062,"right":3043},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3044,"text":"+\t * its upper bound (something only possible to do with multi-column range","html":"+\u003cspan class=pl-c\u003e\t * its upper bound (something only possible to do with multi-column range\u003c/span\u003e","displayNoNewLineWarning":false,"position":294,"left":3062,"right":3044},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3045,"text":"+\t * partitioning), we scan switch to it as the greatest partition to","html":"+\u003cspan class=pl-c\u003e\t * partitioning), we scan switch to it as the greatest partition to\u003c/span\u003e","displayNoNewLineWarning":false,"position":295,"left":3062,"right":3045},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3046,"text":"+\t * return. Again, so that we don't advertently end up scanning the","html":"+\u003cspan class=pl-c\u003e\t * return. Again, so that we don\u0026#39;t advertently end up scanning the\u003c/span\u003e","displayNoNewLineWarning":false,"position":296,"left":3062,"right":3046},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3047,"text":"+\t * default partition.","html":"+\u003cspan class=pl-c\u003e\t * default partition.\u003c/span\u003e","displayNoNewLineWarning":false,"position":297,"left":3062,"right":3047},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3048,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":298,"left":3063,"right":3048},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3049,"text":" \tif (maxoff \u003e= 1 \u0026\u0026 partindices[maxoff] \u003c 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e1\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":299,"left":3064,"right":3049},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3050,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":300,"left":3065,"right":3050},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3051,"text":" \t\tint\t\t\tlastkey = nvalues - 1;","html":" \t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003envalues\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":301,"left":3066,"right":3051},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3052,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":302,"left":3067,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3068,"text":"-\t\tif (maxoff \u003e= 0 \u0026\u0026","html":"-\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":303,"left":3068,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3069,"text":"-\t\t\tmaxoff \u003c= boundinfo-\u003endatums \u0026\u0026","html":"-\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u0026lt;= \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":304,"left":3069,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3070,"text":"-\t\t\tboundinfo-\u003ekind[maxoff - 1][lastkey] ==","html":"-\t\t\t\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekind\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e][\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e] \u003cspan class=pl-c1\u003e==\u003c/span\u003e","displayNoNewLineWarning":false,"position":305,"left":3070,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3071,"text":"-\t\t\tPARTITION_RANGE_DATUM_VALUE)","html":"-\t\t\t\u003cspan class=pl-c1\u003ePARTITION_RANGE_DATUM_VALUE\u003c/span\u003e)","displayNoNewLineWarning":false,"position":306,"left":3071,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3072,"text":"-\t\t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":"-\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":307,"left":3072,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3073,"text":"-","html":"-","displayNoNewLineWarning":false,"position":308,"left":3073,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3074,"text":"-\t\tmaxoff--;","html":"-\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e\u003cspan class=pl-c1\u003e--\u003c/span\u003e;","displayNoNewLineWarning":false,"position":309,"left":3074,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3075,"text":"-\t}","html":"-\t}","displayNoNewLineWarning":false,"position":310,"left":3075,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3076,"text":"-","html":"-","displayNoNewLineWarning":false,"position":311,"left":3076,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3077,"text":"-\tif (partition_bound_has_default(boundinfo))","html":"-\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e))","displayNoNewLineWarning":false,"position":312,"left":3077,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3078,"text":"-\t{","html":"-\t{","displayNoNewLineWarning":false,"position":313,"left":3078,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3079,"text":"-\t\t/*","html":"-\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":314,"left":3079,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3080,"text":"-\t\t * There may exist a range of values unassigned to any non-default","html":"-\u003cspan class=pl-c\u003e\t\t * There may exist a range of values unassigned to any non-default\u003c/span\u003e","displayNoNewLineWarning":false,"position":315,"left":3080,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3081,"text":"-\t\t * partition between the datums at minoff and maxoff. Add the default","html":"-\u003cspan class=pl-c\u003e\t\t * partition between the datums at minoff and maxoff. Add the default\u003c/span\u003e","displayNoNewLineWarning":false,"position":316,"left":3081,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3082,"text":"-\t\t * partition in that case.","html":"-\u003cspan class=pl-c\u003e\t\t * partition in that case.\u003c/span\u003e","displayNoNewLineWarning":false,"position":317,"left":3082,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3083,"text":"-\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":318,"left":3083,"right":3052},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3084,"text":"-\t\tfor (i = minoff; i \u003c= maxoff; i++)","html":"-\t\t\u003cspan class=pl-k\u003efor\u003c/span\u003e (\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eminoff\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e \u0026lt;= \u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e)","displayNoNewLineWarning":false,"position":319,"left":3084,"right":3052},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3053,"text":"+\t\tif (boundinfo-\u003ekind[maxoff - 1][lastkey] ==","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ekind\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e][\u003cspan class=pl-s1\u003elastkey\u003c/span\u003e] \u003cspan class=pl-c1\u003e==\u003c/span\u003e","displayNoNewLineWarning":false,"position":320,"left":3084,"right":3053},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3054,"text":"+\t\t\tPARTITION_RANGE_DATUM_MAXVALUE)","html":"+\t\t\t\u003cspan class=pl-c1\u003ePARTITION_RANGE_DATUM_MAXVALUE\u003c/span\u003e)","displayNoNewLineWarning":false,"position":321,"left":3084,"right":3054},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3055,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":322,"left":3085,"right":3055},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3086,"text":"-\t\t\tif (partindices[i] \u003c 0)","html":"-\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003epartindices\u003c/span\u003e[\u003cspan class=pl-s1\u003ei\u003c/span\u003e] \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":323,"left":3086,"right":3055},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3087,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":324,"left":3087,"right":3055},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3088,"text":"-\t\t\t\tresult-\u003escan_default = true;","html":"-\t\t\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e true;","displayNoNewLineWarning":false,"position":325,"left":3088,"right":3055},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3089,"text":"-\t\t\t\tbreak;","html":"-\t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":326,"left":3089,"right":3055},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3090,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":327,"left":3090,"right":3055},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3056,"text":"+\t\t\tmaxoff--;","html":"+\t\t\t\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e\u003cspan class=pl-c1\u003e--\u003c/span\u003e;","displayNoNewLineWarning":false,"position":328,"left":3090,"right":3056},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3057,"text":"+\t\t\tAssert(boundinfo-\u003eindexes[maxoff] \u003e= 0);","html":"+\t\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eindexes\u003c/span\u003e[\u003cspan class=pl-s1\u003emaxoff\u003c/span\u003e] \u0026gt;= \u003cspan class=pl-c1\u003e0\u003c/span\u003e);","displayNoNewLineWarning":false,"position":329,"left":3090,"right":3057},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3058,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":330,"left":3091,"right":3058},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3059,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":331,"left":3092,"right":3059},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3060,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":332,"left":3093,"right":3060},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3298,"text":"@@ -3332,14 +3299,24 @@ perform_pruning_combine_step(PartitionPruneContext *context,","html":"@@ -3332,14 +3299,24 @@ perform_pruning_combine_step(PartitionPruneContext *context,","displayNoNewLineWarning":false,"position":333,"left":3331,"right":3298},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3299,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":334,"left":3332,"right":3299},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3300,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":335,"left":3333,"right":3300},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3301,"text":" \t * A combine step without any source steps is an indication to not perform","html":" \u003cspan class=pl-c\u003e\t * A combine step without any source steps is an indication to not perform\u003c/span\u003e","displayNoNewLineWarning":false,"position":336,"left":3334,"right":3301},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3335,"text":"-\t * any partition pruning, we just return all partitions.","html":"-\u003cspan class=\"pl-c\"\u003e\t * any partition pruning\u003cspan class=\"x x-first x-last\"\u003e, we just return \u003c/span\u003eall \u003cspan class=\"x x-first x-last\"\u003epartitions\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":337,"left":3335,"right":3301},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3302,"text":"+\t * any partition pruning. Return all datum indexes in that case.","html":"+\u003cspan class=\"pl-c\"\u003e\t * any partition pruning\u003cspan class=\"x x-first x-last\"\u003e. Return \u003c/span\u003eall \u003cspan class=\"x x-first x-last\"\u003edatum indexes in that case\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":338,"left":3335,"right":3302},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3303,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":339,"left":3336,"right":3303},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3304,"text":" \tresult = (PruneStepResult *) palloc0(sizeof(PruneStepResult));","html":" \t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e (\u003cspan class=pl-smi\u003ePruneStepResult\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-en\u003epalloc0\u003c/span\u003e(\u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003ePruneStepResult\u003c/span\u003e));","displayNoNewLineWarning":false,"position":340,"left":3337,"right":3304},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3305,"text":" \tif (list_length(cstep-\u003esource_stepids) == 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003ecstep\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003esource_stepids\u003c/span\u003e) \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":341,"left":3338,"right":3305},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3306,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":342,"left":3339,"right":3306},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3307,"text":" \t\tPartitionBoundInfo boundinfo = context-\u003eboundinfo;","html":" \t\t\u003cspan class=pl-smi\u003ePartitionBoundInfo\u003c/span\u003e \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eboundinfo\u003c/span\u003e;","displayNoNewLineWarning":false,"position":343,"left":3340,"right":3307},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3308,"text":"+\t\tint\t\t\trangemax;","html":"+\t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003erangemax\u003c/span\u003e;","displayNoNewLineWarning":false,"position":344,"left":3340,"right":3308},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3309,"text":"+","html":"+","displayNoNewLineWarning":false,"position":345,"left":3340,"right":3309},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3310,"text":"+\t\t/*","html":"+\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":346,"left":3340,"right":3310},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3311,"text":"+\t\t * Add all valid offsets into the boundinfo-\u003eindexes array. For range","html":"+\u003cspan class=pl-c\u003e\t\t * Add all valid offsets into the boundinfo-\u0026gt;indexes array. For range\u003c/span\u003e","displayNoNewLineWarning":false,"position":347,"left":3340,"right":3311},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3312,"text":"+\t\t * partitioning, boundinfo-\u003eindexes contains (boundinfo-\u003endatums + 1)","html":"+\u003cspan class=pl-c\u003e\t\t * partitioning, boundinfo-\u0026gt;indexes contains (boundinfo-\u0026gt;ndatums + 1)\u003c/span\u003e","displayNoNewLineWarning":false,"position":348,"left":3340,"right":3312},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3313,"text":"+\t\t * valid entries; otherwise there are boundinfo-\u003endatums.","html":"+\u003cspan class=pl-c\u003e\t\t * valid entries; otherwise there are boundinfo-\u0026gt;ndatums.\u003c/span\u003e","displayNoNewLineWarning":false,"position":349,"left":3340,"right":3313},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3314,"text":"+\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":350,"left":3340,"right":3314},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3315,"text":"+\t\trangemax = context-\u003estrategy == PARTITION_STRATEGY_RANGE ?","html":"+\t\t\u003cspan class=pl-s1\u003erangemax\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003econtext\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003estrategy\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003ePARTITION_STRATEGY_RANGE\u003c/span\u003e ?","displayNoNewLineWarning":false,"position":351,"left":3340,"right":3315},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3316,"text":"+\t\t\tboundinfo-\u003endatums : boundinfo-\u003endatums - 1;","html":"+\t\t\t\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e : \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":352,"left":3340,"right":3316},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3317,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":353,"left":3341,"right":3317},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3342,"text":"-\t\tresult-\u003ebound_offsets = bms_add_range(NULL, 0, boundinfo-\u003endatums - 1);","html":"-\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003ebms_add_range\u003c/span\u003e(\u003cspan class=pl-c1\u003eNULL\u003c/span\u003e, \u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003endatums\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e);","displayNoNewLineWarning":false,"position":354,"left":3342,"right":3317},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3318,"text":"+\t\tresult-\u003ebound_offsets =","html":"+\t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e","displayNoNewLineWarning":false,"position":355,"left":3342,"right":3318},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3319,"text":"+\t\t\tbms_add_range(result-\u003ebound_offsets, 0, rangemax);","html":"+\t\t\t\u003cspan class=pl-en\u003ebms_add_range\u003c/span\u003e(\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ebound_offsets\u003c/span\u003e, \u003cspan class=pl-c1\u003e0\u003c/span\u003e, \u003cspan class=pl-s1\u003erangemax\u003c/span\u003e);","displayNoNewLineWarning":false,"position":356,"left":3342,"right":3319},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3320,"text":" \t\tresult-\u003escan_default = partition_bound_has_default(boundinfo);","html":" \t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_default\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_has_default\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":357,"left":3343,"right":3320},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3321,"text":" \t\tresult-\u003escan_null = partition_bound_accepts_nulls(boundinfo);","html":" \t\t\u003cspan class=pl-s1\u003eresult\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan_null\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epartition_bound_accepts_nulls\u003c/span\u003e(\u003cspan class=pl-s1\u003eboundinfo\u003c/span\u003e);","displayNoNewLineWarning":false,"position":358,"left":3344,"right":3321},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3322,"text":" \t\treturn result;","html":" \t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eresult\u003c/span\u003e;","displayNoNewLineWarning":false,"position":359,"left":3345,"right":3322}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3507,"linesChanged":219,"newTreeEntry":{"lineCount":3507,"path":"src/backend/partitioning/partprune.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/partitioning/partprune.c","mode":100644},"linesAdded":98,"linesDeleted":121,"path":"src/backend/partitioning/partprune.c","pathDigest":"4cea0c7ceb47e61b974a7524e5a0840ebe7f4b31cc6a4fdb32447c8d42d13c17","status":"MODIFIED","truncatedReason":null,"oldOid":"69edf4f8802247209e77f69e089799b3d83c13a4","newOid":"489247b0e615592111226297a0564e11616361a5","copilotChatReference":null,"deletedSha":"69edf4f8802247209e77f69e089799b3d83c13a4","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":55,"text":"@@ -56,7 +56,6 @@","html":"@@ -56,7 +56,6 @@","displayNoNewLineWarning":false,"position":0,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" * pointed by remainder produced when hash value of the datum-tuple is divided","html":" \u003cspan class=pl-c\u003e * pointed by remainder produced when hash value of the datum-tuple is divided\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" * by the greatest modulus.","html":" \u003cspan class=pl-c\u003e * by the greatest modulus.\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":57,"right":57},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":58,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":58,"right":58},{"stylingDirective":null,"type":"DELETION","blobLineNumber":59,"text":"-","html":"-","displayNoNewLineWarning":false,"position":4,"left":59,"right":58},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":59,"text":" typedef struct PartitionBoundInfoData","html":" \u003cspan class=pl-k\u003etypedef\u003c/span\u003e \u003cspan class=pl-k\u003estruct\u003c/span\u003e \u003cspan class=pl-smi\u003ePartitionBoundInfoData\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":60,"right":59},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":60,"text":" {","html":" {","displayNoNewLineWarning":false,"position":6,"left":61,"right":60},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":61,"text":" \tchar\t\tstrategy;\t\t/* hash, list or range? */","html":" \t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-c1\u003estrategy\u003c/span\u003e;\t\t\u003cspan class=pl-c\u003e/* hash, list or range? */\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":62,"right":61}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":112,"linesChanged":1,"newTreeEntry":{"lineCount":112,"path":"src/include/partitioning/partbounds.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/partitioning/partbounds.h","mode":100644},"linesAdded":0,"linesDeleted":1,"path":"src/include/partitioning/partbounds.h","pathDigest":"8ab507399c188864bf4e8dcd24c36ae13b3b400622ea4e5fbf9a01455c17faba","status":"MODIFIED","truncatedReason":null,"oldOid":"69edf4f8802247209e77f69e089799b3d83c13a4","newOid":"489247b0e615592111226297a0564e11616361a5","copilotChatReference":null,"deletedSha":"69edf4f8802247209e77f69e089799b3d83c13a4","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"path":"src/test/regress/expected/partition_prune.out","pathDigest":"789eb4147ba182a57d9c57686f8fc0ebdcdd84efe45899549286db43369f1901","status":"MODIFIED"},{"path":"src/test/regress/sql/partition_prune.sql","pathDigest":"62108ec673984d80d4a9f6312ef83bbaa386e2b6950395f3a0745d0b3026c2ef","status":"MODIFIED"}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/489247b0e615592111226297a0564e11616361a5","fileTreeExpanded":true,"headerInfo":{"additions":111,"deletions":130,"filesChanged":4,"filesChangedString":"4"},"moreDiffsToLoad":true,"asyncDiffLoadInfo":{"startIndex":2,"truncated":false,"byteCount":12616,"lineShownCount":368},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"6uG9q6u_vurBKgoSMCEE2mB5HwJeRJuqSbKnefhkZTUZMknB14ASY83BkyXd83U8sYw7ANN-j1ki-n27eHzJ4w"},"/users/diffview?diff=unified":{"post":"FHgePKIpZNeud5u1bGyaBKVQQKm4KTPLWKF3P7x44Nvnq-pW3hbIXqKcAoKBvuvidKVkqzUTJzgz6a39PGBMDQ"},"/notifications/thread":{"post":"_Q6uUsqMlCfX53ilIGoDqwBu2qLPx0UJwat1EYePflSBPAWwdRFSff-s-d71UvZxLDYCD9XxBnB3F272C8mnwQ"}}},"title":"Improve pruning of a default partition · postgres/postgres@489247b","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-f6b2312e7da9.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}

Commit 489247b

Browse files
committed
Improve pruning of a default partition
When querying a partitioned table containing a default partition, we were wrongly deciding to include it in the scan too early in the process, failing to exclude it in some cases. If we reinterpret the PruneStepResult.scan_default flag slightly, we can do a better job at detecting that it can be excluded. The change is that we avoid setting the flag for that pruning step unless the step absolutely requires the default partition to be scanned (in contrast with the previous arrangement, which was to set it unless the step was able to prune it). So get_matching_partitions() must explicitly check the partition that each returned bound value corresponds to in order to determine whether the default one needs to be included, rather than relying on the flag from the final step result. Author: Yuzuko Hosoya <hosoya.yuzuko@lab.ntt.co.jp> Reviewed-by: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> Discussion: https://postgr.es/m/00e601d4ca86$932b8bc0$b982a340$@lab.ntt.co.jp
1 parent 69edf4f commit 489247b

File tree

4 files changed

+111
-130
lines changed

4 files changed

+111
-130
lines changed

src/backend/partitioning/partprune.c

Lines changed: 98 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,7 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)
735735
PruneStepResult **results,
736736
*final_result;
737737
ListCell *lc;
738+
bool scan_default;
738739

739740
/* If there are no pruning steps then all partitions match. */
740741
if (num_steps == 0)
@@ -786,30 +787,39 @@ get_matching_partitions(PartitionPruneContext *context, List *pruning_steps)
786787
Assert(final_result != NULL);
787788
i = -1;
788789
result = NULL;
790+
scan_default = final_result->scan_default;
789791
while ((i = bms_next_member(final_result->bound_offsets, i)) >= 0)
790792
{
791793
int partindex = context->boundinfo->indexes[i];
792794

793-
/*
794-
* In range and hash partitioning cases, some slots may contain -1,
795-
* indicating that no partition has been defined to accept a given
796-
* range of data or for a given remainder, respectively. The default
797-
* partition, if any, in case of range partitioning, will be added to
798-
* the result, because the specified range still satisfies the query's
799-
* conditions.
800-
*/
801-
if (partindex >= 0)
802-
result = bms_add_member(result, partindex);
795+
if (partindex < 0)
796+
{
797+
/*
798+
* In range partitioning cases, if a partition index is -1 it
799+
* means that the bound at the offset is the upper bound for a
800+
* range not covered by any partition (other than a possible
801+
* default partition). In hash partitioning, the same means no
802+
* partition has been defined for the corresponding remainder
803+
* value.
804+
*
805+
* In either case, the value is still part of the queried range of
806+
* values, so mark to scan the default partition if one exists.
807+
*/
808+
scan_default |= partition_bound_has_default(context->boundinfo);
809+
continue;
810+
}
811+
812+
result = bms_add_member(result, partindex);
803813
}
804814

805-
/* Add the null and/or default partition if needed and if present. */
815+
/* Add the null and/or default partition if needed and present. */
806816
if (final_result->scan_null)
807817
{
808818
Assert(context->strategy == PARTITION_STRATEGY_LIST);
809819
Assert(partition_bound_accepts_nulls(context->boundinfo));
810820
result = bms_add_member(result, context->boundinfo->null_index);
811821
}
812-
if (final_result->scan_default)
822+
if (scan_default)
813823
{
814824
Assert(context->strategy == PARTITION_STRATEGY_LIST ||
815825
context->strategy == PARTITION_STRATEGY_RANGE);
@@ -2438,6 +2448,11 @@ get_matching_hash_bounds(PartitionPruneContext *context,
24382448
* get_matching_list_bounds
24392449
* Determine the offsets of list bounds matching the specified value,
24402450
* according to the semantics of the given operator strategy
2451+
*
2452+
* scan_default will be set in the returned struct, if the default partition
2453+
* needs to be scanned, provided one exists at all. scan_null will be set if
2454+
* the special null-accepting partition needs to be scanned.
2455+
*
24412456
* 'opstrategy' if non-zero must be a btree strategy number.
24422457
*
24432458
* 'value' contains the value to use for pruning.
@@ -2640,8 +2655,13 @@ get_matching_list_bounds(PartitionPruneContext *context,
26402655
* Each datum whose offset is in result is to be treated as the upper bound of
26412656
* the partition that will contain the desired values.
26422657
*
2643-
* If default partition needs to be scanned for given values, set scan_default
2644-
* in result if present.
2658+
* scan_default is set in the returned struct if a default partition exists
2659+
* and we're absolutely certain that it needs to be scanned. We do *not* set
2660+
* it just because values match portions of the key space uncovered by
2661+
* partitions other than default (space which we normally assume to belong to
2662+
* the default partition): the final set of bounds obtained after combining
2663+
* multiple pruning steps might exclude it, so we infer its inclusion
2664+
* elsewhere.
26452665
*
26462666
* 'opstrategy' if non-zero must be a btree strategy number.
26472667
*
@@ -2667,8 +2687,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
26672687
int *partindices = boundinfo->indexes;
26682688
int off,
26692689
minoff,
2670-
maxoff,
2671-
i;
2690+
maxoff;
26722691
bool is_equal;
26732692
bool inclusive = false;
26742693

@@ -2698,13 +2717,15 @@ get_matching_range_bounds(PartitionPruneContext *context,
26982717
*/
26992718
if (nvalues == 0)
27002719
{
2720+
/* ignore key space not covered by any partitions */
27012721
if (partindices[minoff] < 0)
27022722
minoff++;
27032723
if (partindices[maxoff] < 0)
27042724
maxoff--;
27052725

27062726
result->scan_default = partition_bound_has_default(boundinfo);
2707-
Assert(minoff >= 0 && maxoff >= 0);
2727+
Assert(partindices[minoff] >= 0 &&
2728+
partindices[maxoff] >= 0);
27082729
result->bound_offsets = bms_add_range(NULL, minoff, maxoff);
27092730

27102731
return result;
@@ -2732,11 +2753,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
27322753
if (nvalues == partnatts)
27332754
{
27342755
/* There can only be zero or one matching partition. */
2735-
if (partindices[off + 1] >= 0)
2736-
result->bound_offsets = bms_make_singleton(off + 1);
2737-
else
2738-
result->scan_default =
2739-
partition_bound_has_default(boundinfo);
2756+
result->bound_offsets = bms_make_singleton(off + 1);
27402757
return result;
27412758
}
27422759
else
@@ -2824,57 +2841,21 @@ get_matching_range_bounds(PartitionPruneContext *context,
28242841
maxoff = off + 1;
28252842
}
28262843

2827-
/*
2828-
* Skip if minoff/maxoff are actually the upper bound of a
2829-
* un-assigned portion of values.
2830-
*/
2831-
if (partindices[minoff] < 0 && minoff < boundinfo->ndatums)
2832-
minoff++;
2833-
if (partindices[maxoff] < 0 && maxoff >= 1)
2834-
maxoff--;
2835-
2836-
/*
2837-
* There may exist a range of values unassigned to any
2838-
* non-default partition between the datums at minoff and
2839-
* maxoff. Add the default partition in that case.
2840-
*/
2841-
if (partition_bound_has_default(boundinfo))
2842-
{
2843-
for (i = minoff; i <= maxoff; i++)
2844-
{
2845-
if (partindices[i] < 0)
2846-
{
2847-
result->scan_default = true;
2848-
break;
2849-
}
2850-
}
2851-
}
2852-
28532844
Assert(minoff >= 0 && maxoff >= 0);
28542845
result->bound_offsets = bms_add_range(NULL, minoff, maxoff);
28552846
}
2856-
else if (off >= 0) /* !is_equal */
2847+
else
28572848
{
28582849
/*
28592850
* The lookup value falls in the range between some bounds in
28602851
* boundinfo. 'off' would be the offset of the greatest bound
28612852
* that is <= lookup value, so add off + 1 to the result
28622853
* instead as the offset of the upper bound of the only
2863-
* partition that may contain the lookup value.
2864-
*/
2865-
if (partindices[off + 1] >= 0)
2866-
result->bound_offsets = bms_make_singleton(off + 1);
2867-
else
2868-
result->scan_default =
2869-
partition_bound_has_default(boundinfo);
2870-
}
2871-
else
2872-
{
2873-
/*
2874-
* off < 0: the lookup value is smaller than all bounds, so
2875-
* only the default partition qualifies, if there is one.
2854+
* partition that may contain the lookup value. If 'off' is
2855+
* -1 indicating that all bounds are greater, then we simply
2856+
* end up adding the first bound's offset, that is, 0.
28762857
*/
2877-
result->scan_default = partition_bound_has_default(boundinfo);
2858+
result->bound_offsets = bms_make_singleton(off + 1);
28782859
}
28792860

28802861
return result;
@@ -2945,16 +2926,18 @@ get_matching_range_bounds(PartitionPruneContext *context,
29452926

29462927
minoff = inclusive ? off : off + 1;
29472928
}
2948-
2949-
/*
2950-
* lookup value falls in the range between some bounds in
2951-
* boundinfo. off would be the offset of the greatest bound
2952-
* that is <= lookup value, so add off + 1 to the result
2953-
* instead as the offset of the upper bound of the smallest
2954-
* partition that may contain the lookup value.
2955-
*/
29562929
else
2930+
{
2931+
2932+
/*
2933+
* lookup value falls in the range between some bounds in
2934+
* boundinfo. off would be the offset of the greatest
2935+
* bound that is <= lookup value, so add off + 1 to the
2936+
* result instead as the offset of the upper bound of the
2937+
* smallest partition that may contain the lookup value.
2938+
*/
29572939
minoff = off + 1;
2940+
}
29582941
}
29592942
break;
29602943

@@ -2972,16 +2955,7 @@ get_matching_range_bounds(PartitionPruneContext *context,
29722955
boundinfo,
29732956
nvalues, values,
29742957
&is_equal);
2975-
if (off < 0)
2976-
{
2977-
/*
2978-
* All bounds are greater than the key, so we could only
2979-
* expect to find the lookup key in the default partition.
2980-
*/
2981-
result->scan_default = partition_bound_has_default(boundinfo);
2982-
return result;
2983-
}
2984-
else
2958+
if (off >= 0)
29852959
{
29862960
/*
29872961
* See the comment above.
@@ -3029,65 +3003,58 @@ get_matching_range_bounds(PartitionPruneContext *context,
30293003
else
30303004
maxoff = off;
30313005
}
3006+
else
3007+
{
3008+
/*
3009+
* 'off' is -1 indicating that all bounds are greater, so just
3010+
* set the first bound's offset as maxoff.
3011+
*/
3012+
maxoff = off + 1;
3013+
}
30323014
break;
30333015

30343016
default:
30353017
elog(ERROR, "invalid strategy number %d", opstrategy);
30363018
break;
30373019
}
30383020

3021+
Assert(minoff >= 0 && minoff <= boundinfo->ndatums);
3022+
Assert(maxoff >= 0 && maxoff <= boundinfo->ndatums);
3023+
30393024
/*
3040-
* Skip a gap and when doing so, check if the bound contains a finite
3041-
* value to decide if we need to add the default partition. If it's an
3042-
* infinite bound, we need not add the default partition, as having an
3043-
* infinite bound means the partition in question catches any values that
3044-
* would otherwise be in the default partition.
3025+
* If the smallest partition to return has MINVALUE (negative infinity) as
3026+
* its lower bound, increment it to point to the next finite bound
3027+
* (supposedly its upper bound), so that we don't advertently end up
3028+
* scanning the default partition.
30453029
*/
3046-
if (partindices[minoff] < 0)
3030+
if (minoff < boundinfo->ndatums && partindices[minoff] < 0)
30473031
{
30483032
int lastkey = nvalues - 1;
30493033

3050-
if (minoff >= 0 &&
3051-
minoff < boundinfo->ndatums &&
3052-
boundinfo->kind[minoff][lastkey] ==
3053-
PARTITION_RANGE_DATUM_VALUE)
3054-
result->scan_default = partition_bound_has_default(boundinfo);
3055-
3056-
minoff++;
3034+
if (boundinfo->kind[minoff][lastkey] ==
3035+
PARTITION_RANGE_DATUM_MINVALUE)
3036+
{
3037+
minoff++;
3038+
Assert(boundinfo->indexes[minoff] >= 0);
3039+
}
30573040
}
30583041

30593042
/*
3060-
* Skip a gap. See the above comment about how we decide whether or not
3061-
* to scan the default partition based whether the datum that will become
3062-
* the maximum datum is finite or not.
3043+
* If the previous greatest partition has MAXVALUE (positive infinity) as
3044+
* its upper bound (something only possible to do with multi-column range
3045+
* partitioning), we scan switch to it as the greatest partition to
3046+
* return. Again, so that we don't advertently end up scanning the
3047+
* default partition.
30633048
*/
30643049
if (maxoff >= 1 && partindices[maxoff] < 0)
30653050
{
30663051
int lastkey = nvalues - 1;
30673052

3068-
if (maxoff >= 0 &&
3069-
maxoff <= boundinfo->ndatums &&
3070-
boundinfo->kind[maxoff - 1][lastkey] ==
3071-
PARTITION_RANGE_DATUM_VALUE)
3072-
result->scan_default = partition_bound_has_default(boundinfo);
3073-
3074-
maxoff--;
3075-
}
3076-
3077-
if (partition_bound_has_default(boundinfo))
3078-
{
3079-
/*
3080-
* There may exist a range of values unassigned to any non-default
3081-
* partition between the datums at minoff and maxoff. Add the default
3082-
* partition in that case.
3083-
*/
3084-
for (i = minoff; i <= maxoff; i++)
3053+
if (boundinfo->kind[maxoff - 1][lastkey] ==
3054+
PARTITION_RANGE_DATUM_MAXVALUE)
30853055
{
3086-
if (partindices[i] < 0)
3087-
{
3088-
result->scan_default = true;
3089-
break;
3090-
}
3056+
maxoff--;
3057+
Assert(boundinfo->indexes[maxoff] >= 0);
30913058
}
30923059
}
30933060

@@ -3332,14 +3299,24 @@ perform_pruning_combine_step(PartitionPruneContext *context,
33323299

33333300
/*
33343301
* A combine step without any source steps is an indication to not perform
3335-
* any partition pruning, we just return all partitions.
3302+
* any partition pruning. Return all datum indexes in that case.
33363303
*/
33373304
result = (PruneStepResult *) palloc0(sizeof(PruneStepResult));
33383305
if (list_length(cstep->source_stepids) == 0)
33393306
{
33403307
PartitionBoundInfo boundinfo = context->boundinfo;
3308+
int rangemax;
3309+
3310+
/*
3311+
* Add all valid offsets into the boundinfo->indexes array. For range
3312+
* partitioning, boundinfo->indexes contains (boundinfo->ndatums + 1)
3313+
* valid entries; otherwise there are boundinfo->ndatums.
3314+
*/
3315+
rangemax = context->strategy == PARTITION_STRATEGY_RANGE ?
3316+
boundinfo->ndatums : boundinfo->ndatums - 1;
33413317

3342-
result->bound_offsets = bms_add_range(NULL, 0, boundinfo->ndatums - 1);
3318+
result->bound_offsets =
3319+
bms_add_range(result->bound_offsets, 0, rangemax);
33433320
result->scan_default = partition_bound_has_default(boundinfo);
33443321
result->scan_null = partition_bound_accepts_nulls(boundinfo);
33453322
return result;

src/include/partitioning/partbounds.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
* pointed by remainder produced when hash value of the datum-tuple is divided
5757
* by the greatest modulus.
5858
*/
59-
6059
typedef struct PartitionBoundInfoData
6160
{
6261
char strategy; /* hash, list or range? */

0 commit comments

Comments
 (0)
0