Is there a function that returns the partition name a row is stored in? I'd like to use it in a SELECT statement, if it exists.
The goal is to get row counts per partition to determine skew on a hash-based partition (otherwise, I'd just select and group-by the partition key). I want to do something like this:
SELECT PARTITION_NAME, COUNT(*) as PER_PART_COUNT
FROM SOMETABLE
GROUP BY PARTITION_NAME;
Obviously, I would replace the string "*PARTITION_NAME*" with whatever function returns that value.
NOTE: Before the forum sharks jump all over me, I did search the documentation and forums, but I came up empty handed.