how to use Posexplode function in hive

I am using posexplode to split single to multiple records in hive. Along with multiple records as output i need to generate sequence number for each row. col1, col2, col3 and col4 are defined as ...