Some of the columns in the hive has multiple lines of values which comes as newline
But when I query the table with year it gives the correct answer
select year from tbl_name where year='2015'
what could be the reason for these multiline values and how to align these values in a proper column?
You need to provide more info here. What is the data type of each column? How are you adding data? What is the data format of the hive table? When you use you get the correct result, is it the same result or some other rows.