Skip to content

Conversation

@dyemanov
Copy link
Member

@dyemanov dyemanov commented Dec 25, 2025

Since a new BLR verb is required anyway, I've added just one (for custom order) instead of duplicating both blr_agg_list_* verbs.

Also, the BLR printer is extended to support (optionally) WITHIN GROUP clause in other aggregate functions.

Once merged, PERCENTILE_CONT and PERCENTILE_DISC functions (PR #8807) should also be changed to utilize blr_within_group_order.

@dyemanov dyemanov self-assigned this Dec 25, 2025
@dyemanov dyemanov requested a review from asfernandes December 25, 2025 09:05
@dyemanov
Copy link
Member Author

dyemanov commented Dec 25, 2025

BLR output after the patch, for the COUNT / legacy LIST / ordered LIST:

1,0,
blr_agg_count_distinct,
    blr_field, 0, 18, 'R','D','B','$','P','R','O','C','E','D','U','R','E','_','N','A','M','E',
2,0,
blr_agg_list_distinct,
    blr_field, 0, 18, 'R','D','B','$','P','R','O','C','E','D','U','R','E','_','N','A','M','E',
    blr_literal, blr_text2, 0,0, 2,0, 59,32,
3,0,
blr_agg_list_distinct,
    blr_field, 0, 18, 'R','D','B','$','P','R','O','C','E','D','U','R','E','_','N','A','M','E',
    blr_literal, blr_text2, 0,0, 2,0, 59,32,
    blr_within_group_order, 1,
        blr_ascending,
            blr_field, 0, 18, 'R','D','B','$','P','R','O','C','E','D','U','R','E','_','N','A','M','E',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant