Hi @Sajitha S Based on the question which you have described I understand for the two table on which you are performing join its getting skewed on the join fields.
However try setting this parameters in hive and execute your hive query.
set hive.vectorized.execution.enabled = true;
set hive.vectorized.execution.reduce.enabled = true;
set hive.vectorized.execution.reduce.groupby.enabled = true;
ANALYZE TABLE tablename COMPUTE STATISTICS FOR COLUMNS;
ANALYZE TABLE tablename COMPUTE STATISTICS FOR COLUMNS colnames;
Also if possible share the logs as well.