how to use Posexplode function in hive

Hi, 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