Splitting array of string values into Rows Numbers Table Ref Error
Your numbers.number is a double precision. But split_part() expects the third parameter to be an integer and the value isn't implicitly cast. Try to explicitly cast numbers.number.

...
, split_part(test_lead.test_mediums, ', ', numbers.number::integer) as medium_name
....