Refs #24020 -- return expressions from get_group_by_cols()

Initial preparation for PR3669.