gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

FIXME (WIP): Allow SPE plans to show "Partitions selected: 1 (out of 5)"

Open pobbatihari opened this issue 2 years ago • 2 comments

""GPDB_12_MERGE_FIXME: we used to show something along the lines of "Partitions selected: 1 (out of 5)" under the partition selector. By eleminating the (static) partition selector during translation, we only get the survivor count, and lose the size of the universe temporarily. However, if we manage to shift the static pruning information sufficiently adjacent to (or better, into) a DXL Dynamic Table Scan, we should be able to get that information back.""

Through this PR I am trying to pass the total partition information through ORCA and into the plan node used in explain.

Here are some reminders before you submit the pull request

  • [ ] Add tests for the change
  • [ ] Document changes
  • [ ] Communicate in the mailing list if needed
  • [ ] Pass make installcheck
  • [ ] Review a PR in return to support the community

pobbatihari avatar Sep 12 '22 16:09 pobbatihari

I took a quick stab at the approach to leverage NumberLeafPartitions and existing CTableDescriptor::PartitionCount(). Commit here [1]. Feel free to take a look and use/change/disregard what you see fit. It may be worth noting that no changes were needed in CExpressionPreprocessor::PrunePartitions().

[1] https://github.com/dgkimura/gpdb/commit/930a2cd9cbb7ec9937dc44279341b7e5cd1b241c

dgkimura avatar Sep 13 '22 19:09 dgkimura

PartitionCount()

thanks @dgkimura, I will look into it.

pobbatihari avatar Sep 14 '22 04:09 pobbatihari